[SRUK] Initial copy from Tizen 2.2 version
[platform/core/uifw/dali-adaptor.git] / adaptors / tizen / internal / common / ecore-x / ecore-x-render-surface-factory.h
1 #ifndef __DALI_INTERNAL_ADAPTOR_ECOREX_RENDER_SURFACE_FACTORY_H__
2 #define __DALI_INTERNAL_ADAPTOR_ECOREX_RENDER_SURFACE_FACTORY_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.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
10 //
11 //     http://floralicense.org/license/
12 //
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.
18 //
19
20 // EXTERNAL INCLUDES
21 #include <boost/any.hpp>
22 #include <string>
23 #include <dali/public-api/math/rect.h>
24 #include <dali/public-api/common/dali-common.h>
25
26 // INTERNAL INCLUDES
27 #include <native-buffer-pool.h>
28
29 namespace Dali
30 {
31 namespace Internal
32 {
33 namespace Adaptor
34 {
35 namespace ECoreX
36 {
37 class RenderSurface;
38
39 /**
40  * Surface factory function for pixmap
41  * A pixmap surface is created.
42  *
43  * @param [in] type the type of surface to create
44  * @param [in] positionSize the position and size of the surface to create
45  * @param [in] display X Pixmap to use, or null for default.
46  * @param [in] display X Display to use, or null for default.
47  * @param [in] name Name of surface passed in
48  * @param [in] isTransparent Whether the surface has an alpha channel
49  */
50 DALI_IMPORT_API RenderSurface* CreatePixmapSurface(
51   PositionSize       positionSize,
52   boost::any         surface,
53   boost::any         display,
54   const std::string& name,
55   bool               isTransparent );
56
57 /**
58  * Surface factory function for Native buffer
59  * A native buffer surface is created.
60  * @param [in] provider The provider
61  * @param [in] pool The native buffer pool
62  * @param [in] maxBufferCount The maximum number of buffers to create
63  * @param [in] type the type of surface to create
64  * @param [in] positionSize the position and size of the surface to create
65  * @param [in] display X Pixmap to use, or null for default.
66  * @param [in] display X Display to use, or null for default.
67  * @param [in] name Name of surface passed in
68  * @param [in] isTransparent Whether the surface has an alpha channel
69  */
70 DALI_IMPORT_API RenderSurface* CreateNativeBufferSurface(
71   native_buffer_provider* provider,
72   native_buffer_pool*     pool,
73   unsigned int            maxBufferCount,
74   PositionSize            positionSize,
75   boost::any              surface,
76   boost::any              display,
77   const std::string&      name,
78   bool                    isTransparent );
79
80
81
82 }// ECoreX
83 }// Adaptor
84 }// Internal
85 }// Dali
86
87 #endif //  __DALI_INTERNAL_ADAPTOR_ECOREX_RENDER_SURFACE_FACTORY_H__