X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=symbian%2FPerlApp.h;h=cbf1963cf4544bed3c599ac94e6e0d29f7c2c007;hb=e9d185f8391f09209c11be82e97358d853f1ba30;hp=04cc0c7db55af49b7c8cf41e70cce58846cc5c89;hpb=ed76c0e43f6496020fbf49e22ea9651b31346e91;p=p5sagit%2Fp5-mst-13.2.git diff --git a/symbian/PerlApp.h b/symbian/PerlApp.h index 04cc0c7..cbf1963 100644 --- a/symbian/PerlApp.h +++ b/symbian/PerlApp.h @@ -5,116 +5,77 @@ #ifndef __PerlApp_h__ #define __PerlApp_h__ -#ifdef __SERIES60__ -# include -# include -# include -#endif /* #ifdef __SERIES60__ */ - -#ifdef __SERIES80__ -# include -# include -# include -# include -# include -#endif /* #ifdef __SERIES60__ */ - -#include -#include +#include "PerlUi.h" /* The source code can be compiled into "PerlApp" which is the simple - * launchpad application/demonstrator, or into "PerlMin", which is the - * 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 - -#ifdef PerlMinSample -# define PerlMin -# define PerlMinUid 0x102015F6 -# define PerlMinName L"PerlMin" + * launchpad application/demonstrator, or into "PerlAppMinimal", which + * is the minimal Perl launchpad application. Define the cpp symbols + * CreatePerlAppMinimal (a boolean), PerlAppMinimalUid (the Symbian + * application uid in the 0x... format), and PerlAppMinimalName (a C + * wide string, with the L prefix) to compile as "PerlAppMinimal". */ + +// #define CreatePerlAppMinimal + +#ifdef CreatePerlAppMinimal +# define PerlAppMinimal +# ifndef PerlAppMinimalUid // PerlApp is ...F6, PerlRecog is ...F7 +# define PerlAppMinimalUid 0x102015F8 +# endif +# ifndef PerlAppMinimalName +# define PerlAppMinimalName L"PerlAppMinimal" +# endif #endif -#ifdef PerlMin -# ifndef PerlMinUid -# error PerlMin defined but PerlMinUid undefined +#ifdef PerlAppMinimal +# ifndef PerlAppMinimalUid +# error PerlAppMinimal defined but PerlAppMinimalUid undefined # endif -# ifndef PerlMinName -# error PerlMin defined but PerlMinName undefined +# ifndef PerlAppMinimalName +# error PerlAppMinimal defined but PerlAppMinimalName undefined # endif #endif -#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 +class CPerlAppDocument : public CgPerlUiDocument { public: - CPerlAppDocument(CEikApplication& aApp):CMyDocument(aApp) {;} -#ifndef PerlMin + CPerlAppDocument(CEikApplication& aApp) : CgPerlUiDocument(aApp) {;} +#ifndef PerlAppMinimal CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFilename, RFs& aFs); -#endif // #ifndef PerlMin +#endif // #ifndef PerlAppMinimal private: // from CEikDocument CEikAppUi* CreateAppUiL(); }; -class CPerlAppApplication : public CMyApplication +class CPerlAppApplication : public CPerlUiApplication { private: CApaDocument* CreateDocumentL(); TUid AppDllUid() const; }; -const TUint KPerlAppPromptSize = 20; -const TUint KPerlAppOneLinerSize = 128; - -class CPerlAppView; +class CPerlAppAppView; -class CPerlAppUi : public CMyAppUi +class CPerlAppAppUi : public CPerlUiAppUi { public: - void ConstructL(); - ~CPerlAppUi(); TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail); - void HandleCommandL(TInt aCommand); -#ifndef PerlMin + void DoHandleCommandL(TInt aCommand); +#ifndef PerlAppMinimal void OpenFileL(const TDesC& aFileName); void InstallOrRunL(const TFileName& aFileName); void SetFs(const RFs& aFs); -#endif // #ifndef PerlMin - TBuf iOneLiner; // Perl source code to evaluate. - CPerlAppView* iAppView; +#endif // #ifndef PerlAppMinimal + ~CPerlAppAppUi(); private: RFs* iFs; }; -class CPerlAppView : public CMyAppView +class CPerlAppAppView : public CPerlUiAppView { public: - static CPerlAppView* NewL(const TRect& aRect); - static CPerlAppView* NewLC(const TRect& aRect); - ~CPerlAppView(); - void Draw(const TRect& aRect) const; -#ifdef __SERIES80__ +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) void HandleCommandL(TInt aCommand); -#endif /* #ifdef __SERIES80__ */ - private: - void ConstructL(const TRect& aRect); +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ }; #endif // __PerlApp_h__