Return to previous window structure
authorlke01.lee <lke01.lee@samsung.com>
Thu, 22 Nov 2012 04:42:18 +0000 (13:42 +0900)
committerlke01.lee <lke01.lee@samsung.com>
Thu, 22 Nov 2012 06:50:36 +0000 (15:50 +0900)
[Issue#] New concept for window doesn't apply on RSA
[Problem]
[Cause]
[Solution] Return to the previous window structure
[SCMRequest] N/A

Change-Id: I72546458843f2d2d09b43902b3b1932e3ed197ee

src/wrt-client/window_data.cpp
src/wrt-client/window_data.h
src/wrt-client/wrt-client.cpp

index b60a7ee..60c027a 100755 (executable)
@@ -30,6 +30,7 @@ char const* const DAEMON_EDJ_PATH = "/usr/share/edje/wrt/Daemon.edj";
 char const* const THEME_EDJ_PATH = "/usr/share/edje/wrt/wrt_theme.edj";
 char const* const ELM_STATE_SHOW_CONTENT = "elm,state,show,content";
 char const* const ELM_SWALLOW_CONTENT = "elm.swallow.content";
+char const* const ELM_SWALLOW_BACKWARD = "elm.swallow.backward";
 char const* const ELM_SWALLOW_TOOLBAR = "elm.swallow.toolbar";
 char const* const ELM_RECT_HIDDENOPTION = "elm.rect.hiddenOption";
 
@@ -48,10 +49,9 @@ char const* const FLOATBACKWARD_BUTTON_STYLE = "wrt/backward";
 } // anonymous namespace
 
 WindowData::WindowData(unsigned long pid, bool manualInit) :
-    m_debugMode(false),
-    m_win(NULL),
-    m_naviBackButton(NULL),
-    m_toolbarTimer(NULL)
+    m_win(NULL), m_naviBackButton(NULL),
+    m_toolbarTimer(NULL),
+    m_debugMode(false)
 {
     m_win = createWindow(pid);
 
@@ -74,15 +74,14 @@ void WindowData::init()
     // import button theme
     elm_theme_overlay_add(NULL, THEME_EDJ_PATH);
 
-    m_conformant = createConformant(m_win);
-    evas_object_show(m_conformant);
-    m_platform_layout = createPlatformLayout(m_conformant);
+    m_platform_layout = createPlatformLayout(m_win);
     evas_object_show(m_platform_layout);
     m_navigation = createNavigationBar(m_platform_layout);
     evas_object_show(m_navigation);
     m_user_layout = createUserLayout(m_navigation);
     evas_object_show(m_user_layout);
-
+    m_conformant = createConformant(m_user_layout);
+    evas_object_show(m_conformant);
 }
 
 void WindowData::setEvasObjectForLayout(Evas_Object* evas_object)
@@ -98,32 +97,143 @@ void WindowData::unsetEvasObjectForLayout()
 void WindowData::toggleIndicator(bool fullscreen)
 {
     LogDebug(__PRETTY_FUNCTION__);
-    if (fullscreen) {
-        elm_win_indicator_mode_set(m_win, ELM_WIN_INDICATOR_HIDE);
-    }
-    else {
+    if (!fullscreen) {
         elm_win_indicator_mode_set(m_win, ELM_WIN_INDICATOR_SHOW);
+        elm_layout_theme_set(m_platform_layout,
+                LAYOUT,
+                APPLICATION,
+                INDICATOR);
+    } else {
+        elm_win_indicator_mode_set(m_win, ELM_WIN_INDICATOR_HIDE);
+        elm_layout_theme_set(m_platform_layout,
+                LAYOUT,
+                APPLICATION,
+                NOINDICATOR);
     }
-
 }
 
 void WindowData::setViewMode(
+        const char *title,
         bool fullscreen,
         CtxMenuItems ctxMenuItems)
 {
-    LogDebug("setViewMode");
-    LogDebug("fullscreen: " << fullscreen );
+    LogDebug("setViewMode " <<m_debugMode);
+    LogDebug("fullscreen: " << fullscreen);
 
     m_fullscreen = fullscreen;
 
     toggleIndicator(m_fullscreen);
 
+    m_title = title;
     m_ctxMenuItems = ctxMenuItems;
 
     if(m_debugMode) {
-        showHiddenOption(m_user_layout);
+        if(fullscreen)
+            showHiddenOption(m_user_layout);
+        else
+            createTitle(m_title.c_str(), m_ctxMenuItems);
+
         createToolbar(m_ctxMenuItems);
     }
+    else
+        if(!fullscreen)
+            createTitle(m_title.c_str(), m_ctxMenuItems);
+}
+
+void WindowData::createTitle(const char *data, CtxMenuItems ctxMenuItems)
+{
+    LogDebug("createTitle");
+    showTitle(data);
+    if(m_debugMode) {
+        createMoreButton();
+        createTitleToolbar(ctxMenuItems);
+    }
+}
+
+void WindowData::showTitle(const char *data)
+{
+    LogInfo("showTitle");
+
+    Elm_Object_Item* naviIt = elm_naviframe_top_item_get(m_navigation);
+    elm_naviframe_item_title_visible_set(naviIt, EINA_TRUE);
+    elm_object_item_text_set(naviIt, data);
+}
+
+void WindowData::hideTitle()
+{
+    LogInfo("hideTitle");
+
+    Elm_Object_Item* naviIt = elm_naviframe_top_item_get(m_navigation);
+    elm_object_item_signal_emit(naviIt, "elm,state,optionheader,instant_close", "");
+    optionheaderClose = FALSE;
+
+    elm_naviframe_item_title_visible_set(naviIt, EINA_FALSE);
+}
+
+void WindowData::createMoreButton()
+{
+    Evas_Object *btn = elm_button_add(m_navigation);
+    if (!btn)
+        return;
+    Elm_Object_Item* naviIt = elm_naviframe_top_item_get(m_navigation);
+    elm_object_style_set(btn, "naviframe/more/default");
+    evas_object_smart_callback_add(btn, "clicked", moreButtonCallback, this);
+    elm_object_item_part_content_set(naviIt, "title_more_btn", btn);
+    evas_object_show(btn);
+
+}
+
+void WindowData::createTitleToolbar(CtxMenuItems ctxMenuItems)
+{
+    Elm_Object_Item *toolbarIt;
+    Evas_Object *toolbarButton;
+    Elm_Object_Item *naviIt = elm_naviframe_top_item_get(m_navigation);
+
+    Evas_Object *toolbar = elm_toolbar_add(m_navigation);
+    if (!toolbar)
+        return;
+    elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
+
+    elm_object_style_set(toolbar, "naviframe");
+
+    toolbarButton = elm_button_add(m_navigation);
+    if (!toolbarButton)
+        return;
+
+    std::list<CtxMenuItem>::iterator itor;
+    for (itor = ctxMenuItems.begin(); itor != ctxMenuItems.end(); ++itor) {
+        toolbarButton = elm_button_add(toolbar);
+        elm_object_style_set(toolbarButton, "naviframe_contrl/default");
+        evas_object_size_hint_align_set(toolbarButton,
+                EVAS_HINT_FILL,
+                EVAS_HINT_FILL);
+        elm_object_text_set(toolbarButton, ((*itor).label).c_str());
+        evas_object_smart_callback_add(toolbarButton,
+                "clicked",
+                (*itor).callback,
+                (*itor).data);
+        toolbarIt = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
+        elm_object_item_part_content_set(toolbarIt, "object", toolbarButton);
+    }
+
+    toolbarButton = elm_button_add(toolbar);
+    elm_object_style_set(toolbarButton, "naviframe_contrl/default");
+    evas_object_size_hint_align_set(toolbarButton,
+            EVAS_HINT_FILL,
+            EVAS_HINT_FILL);
+    elm_object_text_set(toolbarButton, WRT_OPTION_LABEL_FULLVIEW);
+    evas_object_smart_callback_add(toolbarButton,
+            "clicked",
+            changeViewModeCallback,
+            this);
+    toolbarIt = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
+    elm_object_item_part_content_set(toolbarIt, "object", toolbarButton);
+
+    elm_object_item_part_content_set(naviIt, "optionheader", toolbar);
+    elm_object_item_signal_emit(naviIt,
+            "elm,state,optionheader,instant_close",
+            "");
+    optionheaderClose = TRUE;
 }
 
 void WindowData::createToolbar(CtxMenuItems ctxMenuItems)
@@ -156,11 +266,8 @@ void WindowData::createToolbar(CtxMenuItems ctxMenuItems)
                 EVAS_HINT_EXPAND);
 
         Evas_Object *ic = elm_icon_add(toolbar);
-
-        // (*itor).icon.c_str() guarantied not to have format specifiers
-        snprintf(buf, sizeof(buf), (*itor).icon.c_str());
-
-        elm_icon_file_set(ic, buf, NULL);
+         snprintf(buf, sizeof(buf), (*itor).icon.c_str());
+         elm_icon_file_set(ic, buf, NULL);
         evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
         elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
         elm_object_part_content_set(toolbarButton, "icon", ic);
@@ -186,6 +293,30 @@ void WindowData::createToolbar(CtxMenuItems ctxMenuItems)
         elm_object_item_part_content_set(toolbarIt, "object", toolbarButton);
     }
 
+    toolbarButton = elm_button_add(toolbar);
+    if (!toolbarButton)
+        return;
+
+    Evas_Object *ic = elm_icon_add(toolbar);
+    snprintf(buf, sizeof(buf), WRT_OPTION_ICON_WINDOWVIEW);
+    elm_icon_file_set(ic, buf, NULL);
+    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+    elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
+    elm_object_part_content_set(toolbarButton, "icon", ic);
+
+    evas_object_size_hint_align_set(toolbarButton,
+            EVAS_HINT_FILL,
+            EVAS_HINT_FILL);
+    evas_object_size_hint_weight_set(toolbarButton,
+            EVAS_HINT_EXPAND,
+            EVAS_HINT_EXPAND);
+    evas_object_smart_callback_add(toolbarButton,
+            "clicked",
+            changeViewModeCallback,
+            this);
+    toolbarIt = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
+    elm_object_item_part_content_set(toolbarIt, "object", toolbarButton);
+
     optionheaderClose = TRUE;
 
     elm_object_part_content_set(m_user_layout,
@@ -208,76 +339,70 @@ void WindowData::hideToolbar()
     }
 }
 
+void WindowData::createTitleButton()
+{
+    // Add left button for back action
+    m_naviBackButton = elm_button_add(m_navigation);
+    elm_object_style_set(m_naviBackButton, "navigationbar_backbutton/default");
+
+    Elm_Object_Item* naviIt = elm_naviframe_top_item_get(m_navigation);
+    elm_object_item_part_content_set(naviIt, "prev_btn", m_naviBackButton);
+}
+
+void WindowData::createFloatBackButton()
+{
+    // Add float backbutton on the left coner
+    m_floatBackButton = elm_button_add(m_user_layout);
+    elm_object_style_set(m_floatBackButton, FLOATBACKWARD_BUTTON_STYLE);
+    elm_object_part_content_set(m_user_layout,
+                                ELM_SWALLOW_BACKWARD,
+                                m_floatBackButton);
+    evas_object_show(m_floatBackButton);
+}
+
+void WindowData::updateTitleButton(const bool display)
+{
+    if (display) {
+        evas_object_show(m_naviBackButton);
+    } else {
+        evas_object_hide(m_naviBackButton);
+    }
+}
+
 Evas_Object* WindowData::createWindow(unsigned long pid)
 {
-    ADD_PROFILING_POINT("elm_win_add", "start");
     Evas_Object* window = elm_win_add(NULL, "wrt-widget", ELM_WIN_BASIC);
-    ADD_PROFILING_POINT("elm_win_add", "stop");
     ecore_x_window_prop_property_set(
         elm_win_xwindow_get(window),
         ECORE_X_ATOM_NET_WM_PID,
         ECORE_X_ATOM_CARDINAL, 32, &pid, 1);
+    elm_win_title_set(window, "wrt-widget");
+    elm_win_borderless_set(window, EINA_TRUE);
     elm_win_conformant_set(window, EINA_TRUE);
     int w, h;
     ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
     evas_object_resize(window, w, h);
-
-    evas_object_smart_callback_add(window,
-            "profile,changed",
-            winProfileChangedCallback,
-            this);
     return window;
 }
 
-Evas_Object* WindowData::createConformant(Evas_Object* parent)
-{
-    Assert(parent != NULL && "Parent is null");
-    Evas_Object* conformant = elm_conformant_add(parent);
-
-    evas_object_size_hint_weight_set(
-            conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(conformant, EVAS_HINT_FILL, EVAS_HINT_FILL);
-    elm_win_resize_object_add(parent, conformant);
-    return conformant;
-}
-
 Evas_Object* WindowData::createPlatformLayout(Evas_Object* parent)
 {
     Evas_Object*  platform_layout = elm_layout_add(parent);
 
-    ADD_PROFILING_POINT("elm_layout_theme_set", "start");
-    elm_layout_file_set(platform_layout, PLATFORM_EDJ_PATH, "platformlayout");
-    ADD_PROFILING_POINT("elm_layout_theme_set", "stop");
+    if (!elm_layout_file_set(platform_layout, PLATFORM_EDJ_PATH, "platformlayout"))
+        elm_layout_theme_set(platform_layout, LAYOUT, APPLICATION, NOINDICATOR);
 
-    evas_object_size_hint_align_set(platform_layout,
-            EVAS_HINT_FILL,
-            EVAS_HINT_FILL);
-    evas_object_size_hint_weight_set(platform_layout,
-            EVAS_HINT_EXPAND,
-            EVAS_HINT_EXPAND);
+    evas_object_size_hint_expand_set(platform_layout,
+                                     EVAS_HINT_EXPAND,
+                                     EVAS_HINT_EXPAND);
+
+    elm_win_resize_object_add(parent, platform_layout);
 
-    elm_object_content_set(parent, platform_layout);
     edje_object_signal_emit(
             elm_layout_edje_get(platform_layout), ELM_STATE_SHOW_CONTENT, ELM);
     return platform_layout;
 }
 
-Evas_Object* WindowData::createNavigationBar(Evas_Object* parent)
-{
-    Assert(parent != NULL && "Parent for naviframe is null");
-    Evas_Object* navigation = elm_naviframe_add(parent);
-
-    evas_object_size_hint_align_set(navigation,
-            EVAS_HINT_FILL,
-            EVAS_HINT_FILL);
-    evas_object_size_hint_weight_set(navigation,
-            EVAS_HINT_EXPAND,
-            EVAS_HINT_EXPAND);
-    elm_object_part_content_set(parent, ELM_SWALLOW_CONTENT, navigation);
-    //elm_object_content_set(parent, navigation);
-    return navigation;
-}
-
 Evas_Object* WindowData::createUserLayout(Evas_Object* parent)
 {
     Assert(parent != NULL && "Parent for User Layout is null");
@@ -286,8 +411,8 @@ Evas_Object* WindowData::createUserLayout(Evas_Object* parent)
     evas_object_size_hint_weight_set(
             layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
     evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    elm_win_resize_object_add(parent, layout);
 
-    ADD_PROFILING_POINT("elm_naviframe_item_push", "start");
     Elm_Object_Item* naviIt = elm_naviframe_item_push(
         /* Evas_Object *obj */
         parent,
@@ -301,13 +426,33 @@ Evas_Object* WindowData::createUserLayout(Evas_Object* parent)
         layout,
         /* const char *item_style */
         NULL);
-    ADD_PROFILING_POINT("elm_naviframe_item_push", "stop");
 
     elm_naviframe_item_title_visible_set(naviIt, EINA_FALSE);
 
     return layout;
 }
 
+Evas_Object* WindowData::createConformant(Evas_Object* parent)
+{
+    Assert(parent != NULL && "Parent is null");
+    Evas_Object* conformant = elm_conformant_add(parent);
+    elm_object_style_set(conformant, INTERNAL_LAYOUT);
+    evas_object_size_hint_weight_set(
+            conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(conformant, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    elm_object_part_content_set(parent, ELM_SWALLOW_CONTENT, conformant);
+    evas_object_show(conformant);
+    return conformant;
+}
+
+Evas_Object* WindowData::createNavigationBar(Evas_Object* parent)
+{
+    Assert(parent != NULL && "Parent for naviframe is null");
+    Evas_Object* navigation = elm_naviframe_add(parent);
+    elm_object_part_content_set(parent, ELM_SWALLOW_CONTENT, navigation);
+    return navigation;
+}
+
 void WindowData::showHiddenOption(Evas_Object* parent)
 {
     Assert(parent != NULL && "Parent for Hiden Option");
@@ -339,16 +484,6 @@ void WindowData::initFullViewMode ()
     showHiddenOption(m_user_layout);
 }
 
-void WindowData::setDesktopIcon()
-{
-    // set window icon
-    Evas_Object *icon = evas_object_image_add(evas_object_evas_get(m_win));
-    evas_object_image_file_set(icon,
-            "/opt/share/icons/default/small/tizenScmgz.png",
-            NULL);
-    elm_win_icon_object_set(m_win, icon);
-}
-
 void WindowData::addNaviBackButtonCallback(
         const char* event,
         CallbackType callback,
@@ -366,6 +501,23 @@ void* WindowData::delNaviBackButtonCallback(
     return evas_object_smart_callback_del(m_naviBackButton, event, callBack);
 }
 
+void WindowData::addFloatBackButtonCallback(
+        const char* event,
+        CallbackType callback,
+        const void* data)
+{
+    Assert(m_floatBackButton != NULL && "m_floatBackButton is null");
+    evas_object_smart_callback_add(m_floatBackButton, event, callback, data);
+}
+
+void* WindowData::delFloatBackButtonCallback(
+        const char* event,
+        CallbackType callBack)
+{
+    Assert(m_floatBackButton != NULL && "m_floatBackButton is null");
+    return evas_object_smart_callback_del(m_floatBackButton, event, callBack);
+}
+
 void WindowData::userlayoutCallbackAdd(
         const Evas_Callback_Type event,
         EvasCallbackType callback,
@@ -419,29 +571,38 @@ void WindowData::changeViewModeCallback(void *data,
     Elm_Object_Item *naviIt = elm_naviframe_top_item_get(This->m_navigation);
 
     if(elm_naviframe_item_title_visible_get(naviIt)) {
+        This->hideTitle();
         This->showHiddenOption(This->m_user_layout);
 
     } else {
+        This->createTitle(This->m_title.c_str(), This->m_ctxMenuItems);
         This ->hideToolbar();
     }
 }
 
 void WindowData::controlHiddenOptionCallback(void *data,
-        Evas_Object * /*obj*/,
-        const char * /*emission*/,
-        const char * /*source*/)
+        Evas_Object */*obj*/,
+        const char */*emission*/,
+        const char */*source*/)
 {
     LogDebug("controlHiddenOptionCallback");
     WindowData* This = static_cast<WindowData *>(data);
-    const char* state = edje_object_part_state_get(
-            elm_layout_edje_get(This->m_user_layout), "elm.swallow.toolbar",
-            NULL);
+    Elm_Object_Item *naviIt = elm_naviframe_top_item_get(This->m_navigation);
+
+    if(!elm_naviframe_item_title_visible_get(naviIt)) {
+        const char* state = edje_object_part_state_get(
+                elm_layout_edje_get(This->m_user_layout),
+                "elm.swallow.toolbar",
+                NULL);
+
+        if (state && !strncmp(state, "default", strlen("default"))) {
+            This->showToolbar();
+            This->hideHiddenOption(This->m_user_layout);
+        }
+        else {
+            This->initFullViewMode();
+        }
 
-    if (state && !strncmp(state, "default", strlen("default"))) {
-        This->showToolbar();
-        This->hideHiddenOption(This->m_user_layout);
-    } else {
-        This->initFullViewMode();
     }
 }
 
@@ -466,28 +627,11 @@ void WindowData::toggleFullscreen(bool fullscreen)
         return;
     }
 
+    if (!m_fullscreen) //If ViewMode is not fullscreen, toggle the title bar.
+        fullscreen ? hideTitle() : showTitle(m_title.c_str());
+
     if (m_indicator) //If indicator is shown by default, toggle it.
         toggleIndicator(!fullscreen);
 
     alreadyFullscreen = !alreadyFullscreen;
 }
-
-void WindowData::winProfileChangedCallback(void *data,
-                                           Evas_Object* /*obj*/,
-                                           void* /*eventInfo*/)
-{
-    LogDebug("winProfileChangedCallback");
-    if (data == NULL) {
-        return;
-    }
-    WindowData* This = static_cast<WindowData *>(data);
-    const char *profile = elm_config_profile_get();
-
-    if (!strcmp(profile, "desktop")) {
-        elm_win_indicator_mode_set(This->m_win, ELM_WIN_INDICATOR_HIDE);
-        This->setDesktopIcon();
-    }
-    else
-        elm_win_indicator_mode_set(This->m_win, ELM_WIN_INDICATOR_SHOW);
-}
-
index fa97b80..ce81672 100755 (executable)
@@ -44,10 +44,12 @@ namespace {
 const char *const WRT_OPTION_LABEL_BACKWARD = "Backward";
 const char *const WRT_OPTION_LABEL_FORWARD = "Forward";
 const char *const WRT_OPTION_LABEL_RELOAD = "Reload";
+const char *const WRT_OPTION_LABEL_FULLVIEW = "Full view";
 
 const char *const WRT_OPTION_ICON_BACKWARD = "/usr/etc/wrt/icon_left_arrow.png";
 const char *const WRT_OPTION_ICON_FORWARD = "/usr/etc/wrt/icon_right_arrow.png";
 const char *const WRT_OPTION_ICON_RELOAD  = "/usr/etc/wrt/icon_refresh.png";
+const char *const WRT_OPTION_ICON_WINDOWVIEW = "/usr/etc/wrt/mp_stop.png";
 }
 
 class WindowData : private DPL::Noncopyable
@@ -72,10 +74,9 @@ class WindowData : private DPL::Noncopyable
     typedef std::vector<EventWithFunction> EventWithFunctionVector;
 
   public:
-    bool m_debugMode;
     Evas_Object* m_win;
-    Evas_Object* m_user_layout;
-
+    Evas_Object* m_conformant;
+    bool m_debugMode;
 
     struct CtxMenuItem
     {
@@ -99,6 +100,13 @@ class WindowData : private DPL::Noncopyable
     void* delNaviBackButtonCallback(
             const char* event,
             CallbackType callBack);
+    void addFloatBackButtonCallback(
+            const char* event,
+            CallbackType callback,
+            const void* data);
+    void* delFloatBackButtonCallback(
+            const char* event,
+            CallbackType callBack);
     void userlayoutCallbackAdd(
             const Evas_Callback_Type event,
             EvasCallbackType callback,
@@ -111,12 +119,14 @@ class WindowData : private DPL::Noncopyable
             const char* source);
 
     void changeViewMode();
+    void createTitleToolbar(CtxMenuItems ctxMenuItems);
     void createToolbar(CtxMenuItems ctxMenuItems);
     void showToolbar();
     void hideToolbar();
     void createOptionButton();
     void destroyOptionButton();
     void setViewMode(
+            const char *title,
             bool fullscreen,
             CtxMenuItems ctxMenuItems);
     void initFullViewMode();
@@ -133,15 +143,13 @@ class WindowData : private DPL::Noncopyable
             const char *source);
     static Eina_Bool hideToolbarCallback(void *data);
     void toggleFullscreen(bool fullscreen);
-    static void winProfileChangedCallback(void *data,
-            Evas_Object * obj,
-            void *event_info);
 
   protected:
-    Evas_Object* m_conformant;
     Evas_Object* m_platform_layout;
+    Evas_Object* m_user_layout;
     Evas_Object* m_navigation;
     Evas_Object* m_naviBackButton;
+    Evas_Object* m_floatBackButton;
     bool optionheaderClose;
     std::string m_title;
     CtxMenuItems m_ctxMenuItems;
@@ -159,8 +167,14 @@ class WindowData : private DPL::Noncopyable
     void hideHiddenOption(Evas_Object* parent);
 
     void alignProgressPosition();
-    void toggleIndicator(bool fullscreen);
-    void setDesktopIcon();
+    void createTitle(const char* data, CtxMenuItems ctxMenuItems);
+    void showTitle(const char* data);
+    void hideTitle();
+    void createMoreButton();
+    void createTitleButton();
+    void createFloatBackButton();
+    void updateTitleButton(const bool display);
+    void toggleIndicator(bool indicator);
 };
 
 #endif /* WINDOW_INITIALIZE_H_ */
index 2827a63..df4a3bd 100755 (executable)
@@ -32,9 +32,9 @@
 #define W3C_DEBUG_ENV_VARIABLE "DEBUG_LOAD_FINISH"
 
 // window signal callback
+const char *EDJE_SHOW_BACKWARD_SIGNAL = "show,backward,signal";
 const std::string VIEWMODE_TYPE_FULLSCREEN = "fullscreen";
 const std::string VIEWMODE_TYPE_MAXIMIZED = "maximized";
-char const* const ELM_SWALLOW_CONTENT = "elm.swallow.content";
 
 WrtClient::WrtClient(int argc, char **argv) :
     Application(argc, argv, "wrt-client", false),
@@ -547,14 +547,6 @@ void WrtClient::initializeWindowModes()
             break;
         }
     }
-    bool indicator = true;
-    if (m_dao->getWidgetType().appType == WrtDB::APP_TYPE_TIZENWEBAPP) {
-        WidgetSettings widgetSettings;
-        m_dao->getWidgetSettings(widgetSettings);
-        WidgetSettingList settings(widgetSettings);
-        indicator = (settings.getIndicatorPresence()
-                == Indicator_Enable);
-    }
 
     WrtDB::WidgetLocalizedInfo localizedInfo =
             W3CFileLocalization::getLocalizedInfo(m_dao);
@@ -563,14 +555,16 @@ void WrtClient::initializeWindowModes()
         name = DPL::ToUTF8String(*(localizedInfo.name));
     }
     LogInfo("initializeWindowModes " << m_debugMode);
-
+#if 1
+    m_windowData->m_debugMode = FALSE;
+#else
     if(m_debugMode) {
         m_windowData->m_debugMode = TRUE;
     }
     else {
         m_windowData->m_debugMode = FALSE;
     }
-
+#endif
     WindowData::CtxMenuItems ctxMenuItems;
 
     WindowData::CtxMenuItem ctxMenuBackword;
@@ -594,8 +588,9 @@ void WrtClient::initializeWindowModes()
     ctxMenuForward.data = this;
     ctxMenuItems.push_back(ctxMenuForward);
 
-    m_windowData->setViewMode(fullscreen,
-                              ctxMenuItems);
+    m_windowData->setViewMode(name.c_str(),
+            fullscreen,
+            ctxMenuItems);
 }
 
 void WrtClient::backButtonCallback(void* data,
@@ -670,9 +665,7 @@ void WrtClient::connectElmCallback()
 void WrtClient::setLayout(Evas_Object* newBuffer) {
     LogDebug("add new webkit buffer to window");
     Assert(newBuffer);
-
-    elm_object_part_content_set(m_windowData->m_user_layout, ELM_SWALLOW_CONTENT, newBuffer);
-
+    elm_object_content_set(m_windowData->m_conformant, newBuffer);
     evas_object_show(newBuffer);
     evas_object_focus_set(newBuffer, EINA_TRUE);
 }
@@ -681,9 +674,7 @@ void WrtClient::unsetLayout(Evas_Object* currentBuffer) {
     LogDebug("remove current webkit buffer from window");
     Assert(currentBuffer);
     evas_object_hide(currentBuffer);
-
-    elm_object_part_content_unset(m_windowData->m_user_layout, ELM_SWALLOW_CONTENT);
-
+    elm_object_content_unset(m_windowData->m_conformant);
 }
 
 void WrtClient::shutdownStep()