1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_ECOREX_WINDOW_BASE_ECORE_X_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_ECOREX_WINDOW_BASE_ECORE_X_H
5 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/internal/window-system/common/window-base.h>
36 class WindowRenderSurface;
37 class WindowRenderSurfaceEcoreX;
40 * WindowBaseEcoreX class provides an WindowBase EcoreX implementation.
42 class WindowBaseEcoreX : public WindowBase
49 WindowBaseEcoreX( Window* window, WindowRenderSurface* windowRenderSurface );
54 virtual ~WindowBaseEcoreX();
59 * @brief Called when the window property is changed.
61 Eina_Bool OnWindowPropertyChanged( void* data, int type, void* event );
64 * Called when the window receives a delete request
66 void OnDeleteRequest();
71 * @copydoc Dali::Internal::Adaptor::WindowBase::Initialize()
73 virtual void Initialize() override;
76 * @copydoc Dali::Internal::Adaptor::WindowBase::ShowIndicator()
78 virtual void ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode ) override;
81 * @copydoc Dali::Internal::Adaptor::WindowBase::SetIndicatorProperties()
83 virtual void SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation ) override;
86 * @copydoc Dali::Internal::Adaptor::WindowBase::IndicatorTypeChanged()
88 virtual void IndicatorTypeChanged( IndicatorInterface::Type type ) override;
91 * @copydoc Dali::Internal::Adaptor::WindowBase::SetClass()
93 virtual void SetClass( std::string name, std::string className ) override;
96 * @copydoc Dali::Internal::Adaptor::WindowBase::Raise()
98 virtual void Raise() override;
101 * @copydoc Dali::Internal::Adaptor::WindowBase::Lower()
103 virtual void Lower() override;
106 * @copydoc Dali::Internal::Adaptor::WindowBase::Activate()
108 virtual void Activate() override;
111 * @copydoc Dali::Internal::Adaptor::WindowBase::SetAvailableOrientations()
113 virtual void SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations ) override;
116 * @copydoc Dali::Internal::Adaptor::WindowBase::SetPreferredOrientation()
118 virtual void SetPreferredOrientation( Dali::Window::WindowOrientation orientation ) override;
121 * @copydoc Dali::Internal::Adaptor::WindowBase::SetAcceptFocus()
123 virtual void SetAcceptFocus( bool accept ) override;
126 * @copydoc Dali::Internal::Adaptor::WindowBase::Show()
128 virtual void Show() override;
131 * @copydoc Dali::Internal::Adaptor::WindowBase::Hide()
133 virtual void Hide() override;
136 * @copydoc Dali::Internal::Adaptor::WindowBase::GetSupportedAuxiliaryHintCount()
138 virtual unsigned int GetSupportedAuxiliaryHintCount() const override;
141 * @copydoc Dali::Internal::Adaptor::WindowBase::GetSupportedAuxiliaryHint()
143 virtual std::string GetSupportedAuxiliaryHint( unsigned int index ) const override;
146 * @copydoc Dali::Internal::Adaptor::WindowBase::AddAuxiliaryHint()
148 virtual unsigned int AddAuxiliaryHint( const std::string& hint, const std::string& value ) override;
151 * @copydoc Dali::Internal::Adaptor::WindowBase::RemoveAuxiliaryHint()
153 virtual bool RemoveAuxiliaryHint( unsigned int id ) override;
156 * @copydoc Dali::Internal::Adaptor::WindowBase::SetAuxiliaryHintValue()
158 virtual bool SetAuxiliaryHintValue( unsigned int id, const std::string& value ) override;
161 * @copydoc Dali::Internal::Adaptor::WindowBase::GetAuxiliaryHintValue()
163 virtual std::string GetAuxiliaryHintValue( unsigned int id ) const override;
166 * @copydoc Dali::Internal::Adaptor::WindowBase::GetAuxiliaryHintId()
168 virtual unsigned int GetAuxiliaryHintId( const std::string& hint ) const override;
171 * @copydoc Dali::Internal::Adaptor::WindowBase::SetInputRegion()
173 virtual void SetInputRegion( const Rect< int >& inputRegion ) override;
176 * @copydoc Dali::Internal::Adaptor::WindowBase::SetType()
178 virtual void SetType( Dali::Window::Type type ) override;
181 * @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
183 virtual bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level ) override;
186 * @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
188 virtual Dali::Window::NotificationLevel::Type GetNotificationLevel() const override;
191 * @copydoc Dali::Internal::Adaptor::WindowBase::SetOpaqueState()
193 virtual void SetOpaqueState( bool opaque ) override;
196 * @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
198 virtual bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode) override;
201 * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
203 virtual Dali::Window::ScreenOffMode::Type GetScreenOffMode() const override;
206 * @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
208 virtual bool SetBrightness( int brightness ) override;
211 * @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
213 virtual int GetBrightness() const override;
216 * @copydoc Dali::Internal::Adaptor::WindowBase::GrabKey()
218 virtual bool GrabKey( Dali::KEY key, KeyGrab::KeyGrabMode grabMode ) override;
221 * @copydoc Dali::Internal::Adaptor::WindowBase::UngrabKey()
223 virtual bool UngrabKey( Dali::KEY key ) override;
226 * @copydoc Dali::Internal::Adaptor::WindowBase::GrabKeyList()
228 virtual bool GrabKeyList( const Dali::Vector< Dali::KEY >& key, const Dali::Vector< KeyGrab::KeyGrabMode >& grabMode, Dali::Vector< bool >& result ) override;
231 * @copydoc Dali::Internal::Adaptor::WindowBase::UngrabKeyList()
233 virtual bool UngrabKeyList( const Dali::Vector< Dali::KEY >& key, Dali::Vector< bool >& result ) override;
238 WindowBaseEcoreX(const WindowBaseEcoreX&) = delete;
241 WindowBaseEcoreX& operator=(const WindowBaseEcoreX& rhs) = delete;
245 Dali::Vector< Ecore_Event_Handler* > mEcoreEventHandler;
248 WindowRenderSurfaceEcoreX* mWindowSurface;
249 Ecore_X_Window mEcoreWindow;
251 bool mRotationAppSet:1;
254 } // namespace Adaptor
256 } // namespace internal
260 #endif // DALI_INTERNAL_WINDOWSYSTEM_ECOREX_WINDOW_BASE_ECORE_X_H