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] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
45 WindowRenderSurface( Dali::PositionSize positionSize,
47 const std::string& name,
48 bool isTransparent = false );
51 * @copydoc Dali::ECore::EcoreXRenderSurface::~EcoreXRenderSurface
53 virtual ~WindowRenderSurface();
58 * @copydoc Dali::RenderSurface::GetDrawable()
60 virtual Ecore_X_Drawable GetDrawable();
63 * Request to approve deiconify operation
64 * If it is requested, it will send ECORE_X_ATOM_E_DEICONIFY_APPROVE event to window manager after rendering
66 void RequestToApproveDeiconify();
74 * @copydoc Dali::ECore::EcoreXRenderSurface::GetSurface()
76 virtual Any GetSurface();
79 * @copydoc Dali::ECore::EcoreXRenderSurface::GetXWindow()
81 virtual Ecore_X_Window GetXWindow();
83 public: // from Dali::RenderSurface
86 * @copydoc Dali::RenderSurface::InitializeEgl()
88 virtual void InitializeEgl( EglInterface& egl );
91 * @copydoc Dali::RenderSurface::CreateEglSurface()
93 virtual void CreateEglSurface( EglInterface& egl );
96 * @copydoc Dali::RenderSurface::DestroyEglSurface()
98 virtual void DestroyEglSurface( EglInterface& egl );
101 * @copydoc Dali::RenderSurface::ReplaceEGLSurface()
103 virtual bool ReplaceEGLSurface( EglInterface& egl );
106 * @copydoc Dali::RenderSurface::MoveResize()
108 virtual void MoveResize( Dali::PositionSize positionSize);
111 * @copydoc Dali::RenderSurface::SetViewMode()
113 void SetViewMode( ViewMode viewMode );
116 * @copydoc Dali::RenderSurface::StartRender()
118 virtual void StartRender();
121 * @copydoc Dali::RenderSurface::PreRender()
123 virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction );
126 * @copydoc Dali::RenderSurface::PostRender()
128 virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, unsigned int deltaTime, bool replacingSurface );
131 * @copydoc Dali::RenderSurface::StopRender()
133 virtual void StopRender();
136 * @copydoc Dali::RenderSurface::ReleaseLock()
138 virtual void ReleaseLock();
145 virtual void CreateXRenderable();
148 * @copydoc Dali::Internal::Adaptor::ECore::EcoreXRenderSurface::UseExistingRenderable
150 virtual void UseExistingRenderable( unsigned int surfaceId );
154 Ecore_X_Window mX11Window; ///< X-Window
155 bool mNeedToApproveDeiconify; ///< Whether need to send ECORE_X_ATOM_E_DEICONIFY_APPROVE event
157 }; // class WindowRenderSurface
163 #endif // __DALI_INTERNAL_ECORE_X_WINDOW_RENDER_SURFACE_H__