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_EcoreEvas.h
19 * @brief This is the header file for the _EcoreEvas class.
21 * This header file contains the declarations of the %_EcoreEvas class.
23 #ifndef _FUI_INTERNAL_ECORE_EVAS_H_
24 #define _FUI_INTERNAL_ECORE_EVAS_H_
26 #include <Ecore_Evas.h>
29 #include <FBaseErrorDefine.h>
30 #include <FBaseObject.h>
31 #include "FUi_Types.h"
33 namespace Tizen { namespace App
35 class _IActiveWindowEventListener;
38 namespace Tizen { namespace Graphics
43 namespace Tizen { namespace Ui { namespace Animations
45 class _RootVisualElement;
48 }}} // Tizen::Ui::Animations
51 namespace Tizen { namespace Ui
55 _CLIP_FORMAT_TARGETS = -1,
56 _CLIP_FORMAT_NONE = 0x00,
57 _CLIP_FORMAT_TEXT = 0x01,
58 _CLIP_FORMAT_MARKUP = 0x02,
59 _CLIP_FORMAT_IMAGE = 0x04,
60 _CLIP_FORMAT_VCARD = 0x08,
61 _CLIP_FORMAT_HTML = 0x10,
64 enum _IndicatorOpacity
66 _INDICATOR_OPACITY_UNKNOWN,
67 _INDICATOR_OPACITY_OPAQUE,
68 _INDICATOR_OPACITY_TRANSLUCENT,
69 _INDICATOR_OPACITY_TRANSPARENT,
74 _WINDOW_LEVEL_UNKNOWN,
76 _WINDOW_LEVEL_NOTIFICATION_MIDDLE,
77 _WINDOW_LEVEL_NOTIFICATION_HIGH,
82 _RENDER_BACKEND_DEFAULT,
89 class _ActiveWindowEvent;
91 class _OSP_EXPORT_ _EcoreEvas
92 : public Tizen::Base::Object
95 static _EcoreEvas* CreateInstanceN(void);
97 virtual ~_EcoreEvas(void);
99 void RotateWindow(int orientation);
100 void RotateWindow(const _Window& window, int orientation);
102 bool GetFloatingMode(void) const;
103 bool GetFloatingMode(const _Window& window) const;
105 void AddActiveWindowEventListener(const Tizen::App::_IActiveWindowEventListener& listener);
106 void RemoveActiveWindowEventListener(const Tizen::App::_IActiveWindowEventListener& listener);
107 void FireActiveWindowEvent(unsigned int xid, int pid, char* pAppName);
108 unsigned int GetActiveWindow(void);
110 int GetProcessId(unsigned int window);
111 void SetOwner(NativeWindowHandle ownee, NativeWindowHandle owner);
112 void ActivateWindow(const _Window& window);
114 void SetRenderBackend(_RenderBackend backend);
115 _RenderBackend GetRenderBackend(void);
117 #if !defined(MULTI_WINDOW)
118 result CopyClip(_ClipFormat format, const char* pChar);
119 bool RetrieveClipN(int index, int* format, char** pData);
120 int GetClipCount(void) const;
121 void OpenClipboard(unsigned long clipFormats);
122 void CloseClipboard(void);
123 bool IsClipboardOpened(void);
125 result SetEventPropagation(const _Control& control, bool enable);
126 result SetFocus(const _Control& control, bool focus);
128 result SetIndicatorShowState(bool showState);
129 bool GetIndicatorShowState(void) const;
130 Tizen::Graphics::Rectangle GetIndicatorBounds(void) const;
131 result SetIndicatorOpacity(_IndicatorOpacity opacity);
132 _IndicatorOpacity GetIndicatorOpacity(void) const;
134 result SetFloatingMode(bool enable);
136 void SetFrame(const _Control& control);
137 const _Control* GetFrame(void) const;
139 void SetWindowLevel(_WindowLevel level);
140 _WindowLevel GetWindowLevel(void) const;
142 void SetWindowAlwaysOnTop(bool alwaysOnTop);
143 void SetWindowAlwaysAtBottom(bool alwaysAtBottom);
145 void BringWindowToTop(void);
146 void BringWindowToBottom(void);
149 void SetWindowBounds(const Tizen::Graphics::Rectangle& bounds);
150 void SetWindowVisibleState(bool visibleState);
152 Evas* GetEvas(void) const;
153 Ecore_Evas* GetEcoreEvas(void) const;
154 Evas_Object* GetWindowObject(void) const;
155 Ecore_X_Window GetXWindow(void) const;
157 Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void)const;
159 void AllowSetWindowBounds(bool allow);
161 result CopyClip(_ClipFormat format, const char* pChar);
162 bool RetrieveClipN(int index, int* format, char** pData);
163 int GetClipCount(void) const;
164 void OpenClipboard(unsigned long clipFormats);
165 void CloseClipboard(void);
166 bool IsClipboardOpened(void);
168 result SetEventPropagation(const _Control& control, bool enable);
169 result SetFocus(const _Control& control, bool focus);
171 result SetIndicatorShowState(const _Window& window, bool showState);
172 bool GetIndicatorShowState(const _Window& window) const;
173 Tizen::Graphics::Rectangle GetIndicatorBounds(const _Window& window) const;
174 result SetIndicatorOpacity(const _Window& window, _IndicatorOpacity opacity);
175 _IndicatorOpacity GetIndicatorOpacity(const _Window& window) const;
177 void SetWindowActivationEnabled(const _Window& window, bool enable);
178 bool IsWindowActivationEnabled(const _Window& window);
180 result SetFloatingMode(const _Window& window, bool enable);
182 void SetFrame(const _Control& control);
183 const _Control* GetFrame(void) const;
185 void SetWindowLevel(const _Window& window, _WindowLevel level);
186 _WindowLevel GetWindowLevel(const _Window& window) const;
188 void SetWindowBounds(const _Window& window, const Tizen::Graphics::Rectangle& bounds);
189 void SetWindowVisibleState(const _Window& window, bool visibleState);
191 void SetOwner(const _Window& ownee, const _Control& owner);
193 int GetWindowRotation(const _Window& window);
195 Evas* GetEvas(void) const;
196 Ecore_Evas* GetEcoreEvas(void) const;
197 Evas_Object* GetWindowObject(void) const;
198 Ecore_X_Window GetXWindow(void) const;
200 Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void)const;
202 void AllowSetWindowBounds(bool allow);
205 bool GetSelectedCbhmItem(Ecore_X_Atom* pDataType, char** pBuffer) const;
208 bool IsAccessibilityScreenReaderActivated(void);
211 result CreateWindow(void);
213 result InitializeAtomList(void);
214 bool IsValidClipFormat(_ClipFormat clipFormat);
215 Ecore_X_Window GetCbhmWindow(void) const;
216 bool SendCbhmMessage(Ecore_X_Window xwin, const char* pMsg);
217 bool SetCbhmItem(Ecore_X_Window xwin, Ecore_X_Atom dataType, char* pItemData);
218 void* GetCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom property, Ecore_X_Atom* pDataType, int* pNum) const;
219 int GetCbhmItemCount(void) const;
220 bool GetCbhmItem(int index, Ecore_X_Atom* pDataType, char** pBuffer) const;
222 Tizen::Ui::Animations::_EflLayer* GetEflLayer(const _Window& window) const;
225 _EcoreEvas(const _EcoreEvas& rhs);
226 _EcoreEvas& operator =(const _EcoreEvas& rhs);
230 Evas_Object* __pForegroundWindow;
231 const _Control* __pFrame;
233 Ecore_Event_Handler* __pXWindowVisibility;
234 Ecore_Event_Handler* __pClientMessageHandler;
236 Ecore_Event_Handler* __pClearClip;
237 Ecore_Event_Handler* __pNotifyClip;
238 Ecore_Event_Handler* __pClipboardClosed;
240 Ecore_Event_Handler* __pWindowPropertyChanged;
241 _ActiveWindowEvent* __pActiveWindowEvent;
244 Tizen::Ui::Animations::_RootVisualElement* __pRootVE;
245 Tizen::Ui::Animations::_NativeLayer* __pLayer;
248 bool __openClipboard;
253 #endif // _FUI_INTERNAL_ECORE_EVAS_H_