1 /* Copyright (c) 2004-2005 Nokia. All rights reserved. */
3 /* The PerlApp application is licensed under the same terms as Perl itself. */
14 /* The source code can be compiled into "PerlApp" which is the simple
15 * launchpad application/demonstrator, or into "PerlMin", which is the
16 * minimal Perl-on-Series-60 application. Define the cpp symbols
17 * PerlMin (a boolean), PerlMinUid (the Symbian application uid in
18 * the 0x... format), and PerlMinName (a C wide string, with the L prefix)
19 * to compile as "PerlMin". */
21 // #define PerlMinSample
25 # define PerlMinUid 0x102015F6
26 # define PerlMinName L"PerlMin"
31 # error PerlMin defined but PerlMinUid undefined
34 # error PerlMin defined but PerlMinName undefined
38 class CPerlAppDocument : public CAknDocument
41 CPerlAppDocument(CEikApplication& aApp):CAknDocument(aApp) {;}
43 CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFilename, RFs& aFs);
44 #endif // #ifndef PerlMin
45 private: // from CEikDocument
46 CEikAppUi* CreateAppUiL();
49 class CPerlAppApplication : public CAknApplication
52 CApaDocument* CreateDocumentL();
53 TUid AppDllUid() const;
56 const TUint KPerlAppOneLinerSize = 80;
60 class CPerlAppUi : public CAknAppUi
65 TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail);
66 void HandleCommandL(TInt aCommand);
68 void OpenFileL(const TDesC& aFileName);
69 void InstallOrRunL(const TFileName& aFileName);
70 void SetFs(const RFs& aFs);
71 #endif // #ifndef PerlMin
73 CPerlAppView* iAppView;
75 TBuf<KPerlAppOneLinerSize> iOneLiner;
78 class CPerlAppView : public CCoeControl
81 static CPerlAppView* NewL(const TRect& aRect);
82 static CPerlAppView* NewLC(const TRect& aRect);
83 void Draw(const TRect& aRect) const;
85 void ConstructL(const TRect& aRect);
88 #endif // __PerlApp_h__