From c7a4d1c0391ba3d9736e90c66ae273d85847f9b0 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Wed, 26 Oct 2005 18:50:08 +0300 Subject: Symbian: better Series 80 support Message-ID: p4raw-id: //depot/perl@25856 --- symbian/PerlApp.h | 66 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 21 deletions(-) (limited to 'symbian/PerlApp.h') diff --git a/symbian/PerlApp.h b/symbian/PerlApp.h index 04cc0c7db5..8782fa0db5 100644 --- a/symbian/PerlApp.h +++ b/symbian/PerlApp.h @@ -17,32 +17,37 @@ # include # include # include +# include #endif /* #ifdef __SERIES60__ */ #include #include /* 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 @@ -66,9 +71,9 @@ class CPerlAppDocument : public CMyDocument { public: CPerlAppDocument(CEikApplication& aApp):CMyDocument(aApp) {;} -#ifndef PerlMin +#ifndef PerlAppMinimal CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFilename, RFs& aFs); -#endif // #ifndef PerlMin +#endif // #ifndef PerlAppMinimal private: // from CEikDocument CEikAppUi* CreateAppUiL(); }; @@ -92,11 +97,11 @@ class CPerlAppUi : public CMyAppUi ~CPerlAppUi(); TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail); void HandleCommandL(TInt aCommand); -#ifndef PerlMin +#ifndef PerlAppMinimal void OpenFileL(const TDesC& aFileName); void InstallOrRunL(const TFileName& aFileName); void SetFs(const RFs& aFs); -#endif // #ifndef PerlMin +#endif // #ifndef PerlAppMinimal TBuf iOneLiner; // Perl source code to evaluate. CPerlAppView* iAppView; private: @@ -117,4 +122,23 @@ class CPerlAppView : public CMyAppView void ConstructL(const TRect& aRect); }; +#ifdef __SERIES80__ + +class CPerlAppTextQueryDialog : public CEikDialog +{ + public: + CPerlAppTextQueryDialog(HBufC*& aBuffer); + /* TODO: OfferKeyEventL() so that newline can be seen as 'OK'. */ + HBufC*& iData; + TPtrC iTitle; // used in S80 but not in S60 + TPtrC iPrompt; // used in S60 and S80 + TInt iMaxLength; + protected: + void PreLayoutDynInitL(); + private: + TBool OkToExitL(TInt aKeycode); +}; + +#endif /* #ifdef __SERIES80__ */ + #endif // __PerlApp_h__ -- cgit v1.2.1