1 #ifndef __DALI_INTERNAL_ECORE_X_WINDOW_RENDER_SURFACE_H__
2 #define __DALI_INTERNAL_ECORE_X_WINDOW_RENDER_SURFACE_H__
5 * Copyright (c) 2014 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 <ecore-x-render-surface.h>
31 * @copydoc Dali::ECore::EcoreXRenderSurface.
32 * Window specialization.
34 class WindowRenderSurface : public EcoreXRenderSurface
39 * Uses an X11 surface to render to.
40 * @param [in] positionSize the position and size of the surface
41 * @param [in] surface can be a X-window or X-pixmap (type must be unsigned int).
42 * @param [in] name optional name of surface passed in
43 * @param [in] className optional class name of the surface passed in
44 * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
46 WindowRenderSurface( Dali::PositionSize positionSize,
48 const std::string& name,
49 const std::string& className,
50 bool isTransparent = false );
53 * @copydoc Dali::ECore::EcoreXRenderSurface::~EcoreXRenderSurface
55 virtual ~WindowRenderSurface();
60 * @copydoc Dali::RenderSurface::GetDrawable()
62 virtual Ecore_X_Drawable GetDrawable();
65 * Request to approve deiconify operation
66 * If it is requested, it will send ECORE_X_ATOM_E_DEICONIFY_APPROVE event to window manager after rendering
68 void RequestToApproveDeiconify();
76 * @copydoc Dali::ECore::EcoreXRenderSurface::GetSurface()
78 virtual Any GetSurface();
81 * @copydoc Dali::ECore::EcoreXRenderSurface::GetXWindow()
83 virtual Ecore_X_Window GetXWindow();
85 public: // from Dali::RenderSurface
88 * @copydoc Dali::RenderSurface::InitializeEgl()
90 virtual void InitializeEgl( EglInterface& egl );
93 * @copydoc Dali::RenderSurface::CreateEglSurface()
95 virtual void CreateEglSurface( EglInterface& egl );
98 * @copydoc Dali::RenderSurface::DestroyEglSurface()
100 virtual void DestroyEglSurface( EglInterface& egl );
103 * @copydoc Dali::RenderSurface::ReplaceEGLSurface()
105 virtual bool ReplaceEGLSurface( EglInterface& egl );
108 * @copydoc Dali::RenderSurface::MoveResize()
110 virtual void MoveResize( Dali::PositionSize positionSize);
113 * @copydoc Dali::RenderSurface::SetViewMode()
115 void SetViewMode( ViewMode viewMode );
118 * @copydoc Dali::RenderSurface::StartRender()
120 virtual void StartRender();
123 * @copydoc Dali::RenderSurface::PreRender()
125 virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction );
128 * @copydoc Dali::RenderSurface::PostRender()
130 virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, bool replacingSurface );
133 * @copydoc Dali::RenderSurface::StopRender()
135 virtual void StopRender();
138 * @copydoc Dali::RenderSurface::SetThreadSynchronization
140 virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization );
143 * @copydoc Dali::RenderSurface::ReleaseLock()
145 virtual void ReleaseLock();
152 virtual void CreateXRenderable();
155 * @copydoc Dali::Internal::Adaptor::ECore::EcoreXRenderSurface::UseExistingRenderable
157 virtual void UseExistingRenderable( unsigned int surfaceId );
161 Ecore_X_Window mX11Window; ///< X-Window
162 bool mNeedToApproveDeiconify; ///< Whether need to send ECORE_X_ATOM_E_DEICONIFY_APPROVE event
163 std::string mClassName; ///< The class name of the window
165 }; // class WindowRenderSurface
171 #endif // __DALI_INTERNAL_ECORE_X_WINDOW_RENDER_SURFACE_H__