Rename ext/I18N/Langinfo to ext/I18N-Langinfo
[p5sagit/p5-mst-13.2.git] / symbian / PerlApp.h
index 04cc0c7..cbf1963 100644 (file)
 #ifndef __PerlApp_h__
 #define __PerlApp_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>
+#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<KPerlAppOneLinerSize> 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__