Add a --chdir option to configpm, and use this in the Win32 Makfiles.
[p5sagit/p5-mst-13.2.git] / symbian / PerlApp.h
index 37a02f2..cbf1963 100644 (file)
@@ -5,56 +5,77 @@
 #ifndef __PerlApp_h__
 #define __PerlApp_h__
 
-#include <aknapp.h>
-#include <aknappui.h>
-#include <akndoc.h>
-#include <coecntrl.h>
-#include <f32file.h>
+#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<KPerlAppOneLinerSize> 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__