2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FUi_WindowImpl.h
19 * @brief This is the header file for the _WindowImpl class.
21 * This header file contains the declarations of the %_WindowImpl class.
24 #ifndef _FUI_INTERNAL_WINDOW_IMPL_H_
25 #define _FUI_INTERNAL_WINDOW_IMPL_H_
27 #include <FUiWindow.h>
28 #include "FUi_ContainerImpl.h"
29 #include "FUi_Window.h"
31 namespace Tizen { namespace Ui { namespace Animations {
33 }}} // Tizen::Ui::Animations
35 namespace Tizen { namespace Ui
38 class _OSP_EXPORT_ _WindowImpl
39 : public _ContainerImpl
43 static WindowState GetErrorWindowState(void);
47 void Initialize(Window* pPublic, _Window* pCore, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout);
48 static _WindowImpl* CreateWindowImplN(Window* pPublic, const Tizen::Graphics::Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable);
49 virtual ~_WindowImpl(void);
51 static _WindowImpl* GetInstance(Window& window);
52 static const _WindowImpl* GetInstance(const Window& window);
53 virtual const char* GetPublicClassName(void) const;
54 virtual const Window& GetPublic(void) const;
55 virtual Window& GetPublic(void);
56 virtual const _Window& GetCore(void) const;
57 virtual _Window& GetCore(void);
59 // Public Event Listeners
60 void AddWindowEventListener(Tizen::Ui::IWindowEventListener& listener);
61 void RemoveWindowEventListener(Tizen::Ui::IWindowEventListener& listener);
63 virtual void OnActivated(void);
64 virtual void OnNativeWindowActivated(void);
65 virtual void OnDeactivated(void);
68 #if !defined(MULTI_WINDOW)
69 virtual void Rotate(_ControlRotation rotation);
71 virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds);
72 virtual void OnRotated(_ControlRotation rotation);
76 result Open(bool drawAndShow = true);
78 WindowState GetWindowState(void) const;
79 void SetWindowState(WindowState windowState); // [ToDo] Failed if the window is opened.
80 Tizen::Ui::Animations::DisplayContext* GetDisplayContext(void) const;
82 result SetZOrderGroup(WindowZOrderGroup windowZOrderGroup);
83 _Control* GetOwner(void) const;
84 void SetOwner(Tizen::Ui::Control *pControl);
86 NativeWindowHandle GetNativeHandle(void) const;
89 _WindowImpl(Window* pPublic, _Window* pCore, const Layout* pPublicPortraitLayout = null, const Layout* pPublicLandscapeLayout = null);
90 _WindowImpl(Window* pPublic, _Window* pCore, const Tizen::Graphics::Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable);
92 _WindowImpl(const _WindowImpl& rhs);
93 _WindowImpl& operator =(const _WindowImpl& rhs);
96 PublicEventListenerList* __pPublicWindowEventListeners;
97 class WindowImplDelegate;
98 WindowImplDelegate* __pImplDelegate;
104 #endif // _FUI_INTERNAL_WINDOW_IMPL_H_