2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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.
19 * @file FUi_EcoreEvas.h
20 * @brief This is the header file for the _EcoreEvas class.
22 * This header file contains the declarations of the %_EcoreEvas class.
25 #ifndef _FUI_INTERNAL_ECORE_EVAS_H_
26 #define _FUI_INTERNAL_ECORE_EVAS_H_
28 #include <Ecore_Evas.h>
31 #include <FBaseErrorDefine.h>
32 #include <FBaseObject.h>
33 #include "FUi_Types.h"
35 namespace Tizen { namespace App
37 class _IActiveWindowEventListener;
40 namespace Tizen { namespace Graphics
46 namespace Tizen { namespace Ui { namespace Animations
48 class _RootVisualElement;
51 }}} // Tizen::Ui::Animations
54 namespace Tizen { namespace Ui
58 _CLIP_FORMAT_TARGETS = -1,
59 _CLIP_FORMAT_NONE = 0x00,
60 _CLIP_FORMAT_TEXT = 0x01,
61 _CLIP_FORMAT_MARKUP = 0x02,
62 _CLIP_FORMAT_IMAGE = 0x04,
63 _CLIP_FORMAT_VCARD = 0x08,
64 _CLIP_FORMAT_HTML = 0x10,
67 enum _IndicatorOpacity
69 _INDICATOR_OPACITY_UNKNOWN,
70 _INDICATOR_OPACITY_OPAQUE,
71 _INDICATOR_OPACITY_TRANSLUCENT,
72 _INDICATOR_OPACITY_TRANSPARENT,
77 _WINDOW_LEVEL_UNKNOWN,
79 _WINDOW_LEVEL_NOTIFICATION_MIDDLE,
80 _WINDOW_LEVEL_NOTIFICATION_HIGH,
85 _RENDER_BACKEND_DEFAULT,
92 class _ActiveWindowEvent;
94 class _OSP_EXPORT_ _EcoreEvas
95 : public Tizen::Base::Object
98 static _EcoreEvas* CreateInstanceN(void);
99 virtual ~_EcoreEvas(void);
101 unsigned int GetActiveWindow(void);
102 int GetProcessId(unsigned int window);
103 void SetRenderBackend(_RenderBackend backend);
104 _RenderBackend GetRenderBackend(void);
105 void SetOwner(NativeWindowHandle ownee, NativeWindowHandle owner);
106 void SetOwner(const _Window& ownee, const _Control& owner);
108 void ActivateWindow(const _Window& window);
109 void MinimizeWindow(_Window& window);
111 void RotateWindow(const _Window& window, int orientation, bool rotateEvas = true);
112 int GetWindowRotation(const _Window& window);
113 void SetWindowPreferredRotation(const _Window& window, int rotation);
114 void SetWindowAvailabledRotation(const _Window& window, int* rotations, unsigned int count);
115 void RegisterWindowStateCallback(const _Window& window);
116 void SetWindowRotationBounds(const _Window& window, int rotation, const Tizen::Graphics::Rectangle& bounds);
117 void SetWindowRotationBounds(const _Window& window, int rotation, const Tizen::Graphics::FloatRectangle& bounds);
119 void SetWindowType(const _Window& window, int winType);
120 result SetFloatingMode(const _Window& window, bool enable);
121 bool GetFloatingMode(const _Window& window) const;
122 void SetWindowActivationEnabled(const _Window& window, bool enable);
123 bool IsWindowActivationEnabled(const _Window& window);
124 void SetWindowLevel(const _Window& window, _WindowLevel level);
125 _WindowLevel GetWindowLevel(const _Window& window) const;
126 void SetWindowBounds(const _Window& window, const Tizen::Graphics::Rectangle& bounds);
127 void SetWindowBounds(const _Window& window, const Tizen::Graphics::FloatRectangle& bounds);
128 void SetWindowVisibleState(const _Window& window, bool visibleState);
129 void AllowSetWindowBounds(bool allow);
130 bool IsWindowVisible(const _Window& window);
132 result SetEventPropagation(const _Control& control, bool enable);
133 result SetFocus(const _Control& control, bool focus);
135 result SetIndicatorShowState(const _Window& window, bool showState);
136 bool GetIndicatorShowState(const _Window& window) const;
138 result CopyClip(_ClipFormat format, const char* pChar);
139 bool RetrieveClipN(int index, int* format, char** pData);
140 int GetClipCount(void) const;
141 bool GetSelectedCbhmItem(Ecore_X_Atom* pDataType, char** pBuffer) const;
142 void OpenClipboard(unsigned long clipFormats);
143 void CloseClipboard(void);
144 bool IsClipboardOpened(void);
146 bool IsAccessibilityScreenReaderActivated(void);
149 bool GetFloatingMode(void) const;
150 Tizen::Graphics::Rectangle GetIndicatorBounds(const _Window& window) const;
151 result SetIndicatorOpacity(const _Window& window, _IndicatorOpacity opacity);
152 _IndicatorOpacity GetIndicatorOpacity(const _Window& window) const;
153 void AddActiveWindowEventListener(const Tizen::App::_IActiveWindowEventListener& listener);
154 void RemoveActiveWindowEventListener(const Tizen::App::_IActiveWindowEventListener& listener);
155 Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void)const;
156 void SetFrame(const _Control& control);
157 const _Control* GetFrame(void) const;
158 Evas* GetEvas(void) const;
159 Ecore_Evas* GetEcoreEvas(void) const;
160 Evas_Object* GetWindowObject(void) const;
161 Ecore_X_Window GetXWindow(void) const;
162 void SetQuickPanelScrollEnabled(const _Window& window, bool enable);
163 bool IsQuickPanelScrollEnabled(const _Window& window);
166 Tizen::Ui::Animations::_EflLayer* GetEflLayer(const _Window& window) const;
169 result InitializeAtomList(void);
170 bool IsValidClipFormat(_ClipFormat clipFormat);
171 Ecore_X_Window GetCbhmWindow(void) const;
172 bool SendCbhmMessage(Ecore_X_Window xwin, const char* pMsg);
173 bool SetCbhmItem(Ecore_X_Window xwin, Ecore_X_Atom dataType, char* pItemData);
174 void* GetCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom property, Ecore_X_Atom* pDataType, int* pNum) const;
175 int GetCbhmItemCount(void) const;
176 bool GetCbhmItem(int index, Ecore_X_Atom* pDataType, char** pBuffer) const;
178 _EcoreEvas(const _EcoreEvas& rhs);
179 _EcoreEvas& operator =(const _EcoreEvas& rhs);
182 Ecore_Event_Handler* __pWindowVisibilityChanged;
183 Ecore_Event_Handler* __pWindowPropertyChanged;
184 Ecore_Event_Handler* __pWindowShown;
185 Ecore_Event_Handler* __pClientMessageReceived;
186 Ecore_Event_Handler* __pClearClip;
187 Ecore_Event_Handler* __pNotifyClip;
188 Ecore_Event_Handler* __pClipboardClosed;
191 Evas_Object* __pForegroundWindow;
192 const _Control* __pFrame;
194 bool __openClipboard;
199 #endif // _FUI_INTERNAL_ECORE_EVAS_H_