X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=symbian%2FPerlApp.h;h=cbf1963cf4544bed3c599ac94e6e0d29f7c2c007;hb=cd22a09c8c81e5e4c639c15ad19704a0d1e0c842;hp=37a02f25026cbd1b1cdaa5cb6e19ee0d31d12579;hpb=27da23d53ccce622bc51822f59df8def79b4df95;p=p5sagit%2Fp5-mst-13.2.git diff --git a/symbian/PerlApp.h b/symbian/PerlApp.h index 37a02f2..cbf1963 100644 --- a/symbian/PerlApp.h +++ b/symbian/PerlApp.h @@ -5,56 +5,77 @@ #ifndef __PerlApp_h__ #define __PerlApp_h__ -#include -#include -#include -#include -#include +#include "PerlUi.h" -class CPerlAppDocument : public CAknDocument +/* The source code can be compiled into "PerlApp" which is the simple + * 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 PerlAppMinimal +# ifndef PerlAppMinimalUid +# error PerlAppMinimal defined but PerlAppMinimalUid undefined +# endif +# ifndef PerlAppMinimalName +# error PerlAppMinimal defined but PerlAppMinimalName undefined +# endif +#endif + +class CPerlAppDocument : public CgPerlUiDocument { public: - CPerlAppDocument(CEikApplication& aApp):CAknDocument(aApp) {;} + CPerlAppDocument(CEikApplication& aApp) : CgPerlUiDocument(aApp) {;} +#ifndef PerlAppMinimal CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFilename, RFs& aFs); +#endif // #ifndef PerlAppMinimal private: // from CEikDocument CEikAppUi* CreateAppUiL(); }; -class CPerlAppApplication : public CAknApplication +class CPerlAppApplication : public CPerlUiApplication { private: CApaDocument* CreateDocumentL(); TUid AppDllUid() const; }; -const TUint KPerlAppOneLinerSize = 80; - -class CPerlAppView; +class CPerlAppAppView; -class CPerlAppUi : public CAknAppUi +class CPerlAppAppUi : public CPerlUiAppUi { public: - void ConstructL(); - ~CPerlAppUi(); - void HandleCommandL(TInt aCommand); - void OpenFileL(const TDesC& aFileName); TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail); + void DoHandleCommandL(TInt aCommand); +#ifndef PerlAppMinimal + void OpenFileL(const TDesC& aFileName); void InstallOrRunL(const TFileName& aFileName); void SetFs(const RFs& aFs); +#endif // #ifndef PerlAppMinimal + ~CPerlAppAppUi(); private: - CPerlAppView* iAppView; RFs* iFs; - TBuf iOneLiner; }; -class CPerlAppView : public CCoeControl +class CPerlAppAppView : public CPerlUiAppView { public: - static CPerlAppView* NewL(const TRect& aRect); - static CPerlAppView* NewLC(const TRect& aRect); - void Draw(const TRect& aRect) const; - private: - void ConstructL(const TRect& aRect); +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) + void HandleCommandL(TInt aCommand); +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ }; #endif // __PerlApp_h__