[Release] wrt_0.8.257
[platform/framework/web/wrt.git] / src / wrt-client / wrt-client.h
index 11f02c8..7a7e703 100644 (file)
@@ -16,6 +16,7 @@
 #ifndef WRT_CLIENT_H
 #define WRT_CLIENT_H
 
+#include <memory>
 #include <dpl/application.h>
 #include <dpl/generic_event.h>
 #include <dpl/event/controller.h>
 
 DECLARE_GENERIC_EVENT_0(NextStepEvent)
 
+namespace ClientModule {
+class SubmodeSupport;
+}
+
 class WrtClient :
     public DPL::Application,
     private DPL::Event::Controller<DPL::TypeListDecl<NextStepEvent>::Type>,
@@ -56,6 +61,7 @@ class WrtClient :
     ReturnStatus::Type   getReturnStatus() const;
     virtual void Quit();
     static std::string getTizenIdFromArgument(int argc, char **argv);
+    void autoRotationSetOrientation(Evas_Object* obj);
 
   protected:
     virtual void OnStop();
@@ -69,44 +75,56 @@ class WrtClient :
 
   private:
     void showHelpAndQuit();
-    bool checkArgument();
-    void setSdkLauncherDebugData();
-    bool checkDebugMode(SDKDebugData* debugData);
-    void connectElmCallback();
+    void setDebugMode(bundle* b);
     void initializeWindowModes();
-    bool isFullscreen();
 
     // Events
     virtual void OnEventReceived(const NextStepEvent& event);
 
     // static Callback
-    static void backButtonCallback(void* data,
-                                   Evas_Object* obj,
-                                   void* event_info);
     static Eina_Bool naviframeBackButtonCallback(void* data,
                                                  Elm_Object_Item* it);
-
-    // Low Memory Callback
     static int appcoreLowMemoryCallback(void* data);
     static int languageChangedCallback(void *data);
+    static void autoRotationCallback(void* data, Evas_Object* obj, void* event);
+    static void focusedCallback(void* data,
+                                Evas_Object* obj,
+                                void* eventInfo);
+    static void unfocusedCallback(void* data,
+                                  Evas_Object* obj,
+                                  void* eventInfo);
+
+    //view-mode
+    void setInitialViewMode();
 
     //orientation
-    void setOrientationWindow();
-    void unsetOrientationWindow();
-    void setOrientationEwk();
+    void setWindowOrientation(int angle);
+    void setWindowInitialOrientation();
+    void unsetWindowOrientation();
+    void setEwkInitialOrientation();
+
+    //ctxpopup
+    void setCtxpopupItem();
+    void ctxpopupShare();
+    void ctxpopupReload();
+    void ctxpopupLaunchBrowser();
+
+    // hwkey
+    void hwkeyCallback(const std::string& key);
 
     // launching steps
     void initStep();
     void launchStep();
     void shutdownStep();
     void loadFinishCallback(Evas_Object* webview);
+    void resetCallback(bool result);
     void progressStartedCallback();
     void loadProgressCallback(Evas_Object* webview, double value);
     void progressFinishCallback();
     void webkitExitCallback();
     void webCrashCallback();
-    void toggleFullscreenCallback(bool fullscreen);
-    void imeChangedCallback(bool open);
+    void enterFullscreenCallback(Evas_Object* obj, bool isFullscreenByPlatform);
+    void exitFullscreenCallback(Evas_Object* obj);
     void setLayout(Evas_Object* newBuffer);
     void unsetLayout(Evas_Object* currentBuffer);
 
@@ -117,9 +135,7 @@ class WrtClient :
     bool m_launched;
     bool m_initializing;
     bool m_initialized;
-    int m_sdkLauncherPid;
     bool m_debugMode;
-    unsigned short m_debuggerPort;
     ReturnStatus::Type m_returnStatus;
     WRT::RunnableWidgetObjectPtr m_widget;
     WrtDB::WidgetDAOReadOnlyPtr m_dao;
@@ -127,7 +143,12 @@ class WrtClient :
     WidgetState m_widgetState;
     std::unique_ptr<WindowData> m_windowData;
     std::unique_ptr<SplashScreenSupport> m_splashScreen;
-    bool m_fullscreen;
+    std::string m_initialViewMode;
+    std::string m_currentViewMode;
+    bool m_isWebkitFullscreen;
+    bool m_isFullscreenByPlatform;
+
+    std::unique_ptr<ClientModule::SubmodeSupport> m_submodeSupport;
 };
 
 #endif // WRT_CLIENT_H