Add the window type
authorChoi Munseok <ms47.choi@samsung.com>
Wed, 10 Apr 2013 03:00:47 +0000 (12:00 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Wed, 10 Apr 2013 03:00:47 +0000 (12:00 +0900)
Change-Id: If62d6b2715d33119a8ca4b208fc5f903b772fc53
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/FUi_Window.cpp
src/ui/inc/FUi_Window.h

index 7a37859..97cb5b5 100644 (file)
@@ -256,8 +256,10 @@ _Window::SetOwner(_Control* pOwner)
 }
 
 result
-_Window::CreateRootVisualElement(void)
+_Window::CreateRootVisualElement(_WindowType windowType)
 {
+       __type = windowType;
+
        result r = CreateLayer();
        SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -282,7 +284,14 @@ _Window::CreateRootVisualElement(void)
        __pRootVisualElement->AttachChild(*GetVisualElement());
 
 #if defined(WINDOW_BASE_ROTATE)
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Create.", GetNativeHandle());
+       if (__type == _WINDOW_TYPE_MAIN)
+       {
+               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, BASIC] Create.", GetNativeHandle());
+       }
+       else
+       {
+               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, UTILITY] Create.", GetNativeHandle());
+       }
 #endif
 
        return E_SUCCESS;
@@ -294,7 +303,15 @@ _Window::CreateLayer(void)
        _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
        SysAssert(pDisplayManager);
 
-       __pLayer = _NativeLayer::CreateInstanceN();
+       if (__type == _WINDOW_TYPE_MAIN)
+       {
+               __pLayer = _NativeLayer::CreateInstanceN();
+       }
+       else
+       {
+               __pLayer = _NativeLayer::CreateInstanceN(false);
+       }
+
        SysAssert(__pLayer);
        __pRootVisualElement = __pLayer->GetRootVisualElement();
 
@@ -698,7 +715,8 @@ _Window::SetZOrderGroup(int windowZOrderGroup)
 }
 
 _Window::_Window()
-       : __windowState(WINDOW_STATE_INITIALIZED)
+       : __type(_WINDOW_TYPE_MAIN)
+       , __windowState(WINDOW_STATE_INITIALIZED)
        , __pOwner(null)
        , __pWindowDelegate(null)
        , __activated(false)
index 830653b..0e6e55f 100644 (file)
@@ -39,6 +39,12 @@ class _NativeLayer;
 namespace Tizen { namespace Ui
 {
 
+enum _WindowType
+{
+       _WINDOW_TYPE_MAIN,
+       _WINDOW_TYPE_SUB,
+};
+
 class _IWindowDelegate
 {
 public:
@@ -71,7 +77,7 @@ public:
        void Close(void);
        _Control* GetOwner(void) const;
        void SetOwner(_Control* pOwner);
-       result CreateRootVisualElement(void);
+       result CreateRootVisualElement(_WindowType windowType = _WINDOW_TYPE_MAIN);
        virtual result CreateLayer(void);
        virtual bool IsFocusableDescendant(const _Control* pFocus) const;
        virtual bool IsLayoutChangable(void) const;
@@ -147,6 +153,7 @@ private:
        void Deactivate(void);
 
 private:
+       _WindowType __type;
        WindowState __windowState;
        _Control* __pOwner;
        _IWindowDelegate* __pWindowDelegate;