diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2005-10-21 20:15:23 +0300 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2005-10-21 14:12:10 +0000 |
commit | ed76c0e43f6496020fbf49e22ea9651b31346e91 (patch) | |
tree | dfb2d6e7605023979056f995918fc79f131e4ccf /symbian/PerlApp.h | |
parent | 4ef2275c8517a5b084d75f6179d5b49f77f76d2c (diff) | |
download | perl-ed76c0e43f6496020fbf49e22ea9651b31346e91.tar.gz |
Symbian/beginnings of Series 80 support
Message-ID: <B356D8F434D20B40A8CEDAEC305A1F24E7A67E@esebe105.NOE.Nokia.com>
p4raw-id: //depot/perl@25814
Diffstat (limited to 'symbian/PerlApp.h')
-rw-r--r-- | symbian/PerlApp.h | 58 |
1 files changed, 45 insertions, 13 deletions
diff --git a/symbian/PerlApp.h b/symbian/PerlApp.h index c76d9632c9..04cc0c7db5 100644 --- a/symbian/PerlApp.h +++ b/symbian/PerlApp.h @@ -5,20 +5,31 @@ #ifndef __PerlApp_h__ #define __PerlApp_h__ -#include <aknapp.h> -#include <aknappui.h> -#include <akndoc.h> +#ifdef __SERIES60__ +# include <aknapp.h> +# include <aknappui.h> +# include <akndoc.h> +#endif /* #ifdef __SERIES60__ */ + +#ifdef __SERIES80__ +# include <eikapp.h> +# include <eikappui.h> +# include <eikdoc.h> +# include <eikbctrl.h> +# include <eikgted.h> +#endif /* #ifdef __SERIES60__ */ + #include <coecntrl.h> #include <f32file.h> /* The source code can be compiled into "PerlApp" which is the simple * launchpad application/demonstrator, or into "PerlMin", which is the - * minimal Perl-on-Series-60 application. Define the cpp symbols + * minimal Perl launchpad application. Define the cpp symbols * PerlMin (a boolean), PerlMinUid (the Symbian application uid in * the 0x... format), and PerlMinName (a C wide string, with the L prefix) * to compile as "PerlMin". */ -// #define PerlMinSample +#define PerlMinSample #ifdef PerlMinSample # define PerlMin @@ -35,10 +46,26 @@ # endif #endif -class CPerlAppDocument : public CAknDocument +#ifdef __SERIES60__ +# define CMyDocument CAknDocument +# define CMyApplication CAknApplication +# define CMyAppUi CAknAppUi +# define CMyNoteDialog CAknNoteDialog +# define CMyAppView CCoeControl +#endif /* #ifdef __SERIES60__ */ + +#ifdef __SERIES80__ +# define CMyDocument CEikDocument +# define CMyApplication CEikApplication +# define CMyAppUi CEikAppUi +# define CMyNoteDialog CCknFlashingDialog +# define CMyAppView CEikBorderedControl +#endif /* #ifdef __SERIES60__ */ + +class CPerlAppDocument : public CMyDocument { public: - CPerlAppDocument(CEikApplication& aApp):CAknDocument(aApp) {;} + CPerlAppDocument(CEikApplication& aApp):CMyDocument(aApp) {;} #ifndef PerlMin CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFilename, RFs& aFs); #endif // #ifndef PerlMin @@ -46,18 +73,19 @@ class CPerlAppDocument : public CAknDocument CEikAppUi* CreateAppUiL(); }; -class CPerlAppApplication : public CAknApplication +class CPerlAppApplication : public CMyApplication { private: CApaDocument* CreateDocumentL(); TUid AppDllUid() const; }; -const TUint KPerlAppOneLinerSize = 80; +const TUint KPerlAppPromptSize = 20; +const TUint KPerlAppOneLinerSize = 128; class CPerlAppView; -class CPerlAppUi : public CAknAppUi +class CPerlAppUi : public CMyAppUi { public: void ConstructL(); @@ -69,18 +97,22 @@ class CPerlAppUi : public CAknAppUi void InstallOrRunL(const TFileName& aFileName); void SetFs(const RFs& aFs); #endif // #ifndef PerlMin - private: + TBuf<KPerlAppOneLinerSize> iOneLiner; // Perl source code to evaluate. CPerlAppView* iAppView; + private: RFs* iFs; - TBuf<KPerlAppOneLinerSize> iOneLiner; }; -class CPerlAppView : public CCoeControl +class CPerlAppView : public CMyAppView { public: static CPerlAppView* NewL(const TRect& aRect); static CPerlAppView* NewLC(const TRect& aRect); + ~CPerlAppView(); void Draw(const TRect& aRect) const; +#ifdef __SERIES80__ + void HandleCommandL(TInt aCommand); +#endif /* #ifdef __SERIES80__ */ private: void ConstructL(const TRect& aRect); }; |