Fix to adjust the position of the partial Frame
[platform/framework/native/uifw.git] / inc / eglplatform.h
1 /* $Change: 1028567 $ */
2
3 /**
4  * @file                eglplatform.h
5  * @brief               This is the header file for the eglplatform.
6  *
7  * This header file contains the declarations of the eglplatform.
8  */
9
10 #ifndef __eglplatform_h_
11 #define __eglplatform_h_
12
13 /*
14 ** Copyright (c) 2007-2009 The Khronos Group Inc.
15 **
16 ** Permission is hereby granted, free of charge, to any person obtaining a
17 ** copy of this software and/or associated documentation files (the
18 ** "Materials"), to deal in the Materials without restriction, including
19 ** without limitation the rights to use, copy, modify, merge, publish,
20 ** distribute, sublicense, and/or sell copies of the Materials, and to
21 ** permit persons to whom the Materials are furnished to do so, subject to
22 ** the following conditions:
23 **
24 ** The above copyright notice and this permission notice shall be included
25 ** in all copies or substantial portions of the Materials.
26 **
27 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
30 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
31 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
32 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
33 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
34  */
35
36 /* Platform-specific types and definitions for egl.h
37  * $Revision: #1 $ on $Date: 2011/08/12 $
38  *
39  * Adopters may modify khrplatform.h and this file to suit their platform.
40  * You are encouraged to submit all modifications to the Khronos group so that
41  * they can be included in future versions of this file.  Please submit changes
42  * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
43  * by filing a bug against product "EGL" component "Registry".
44  */
45
46 #ifdef _FGRAPHICS_OPENGL_H_
47 }}}
48 #endif
49
50 namespace Tizen { namespace Ui
51 {
52 class Control;
53 };
54 };
55 namespace Tizen { namespace Graphics
56 {
57 class Bitmap;
58 };
59 };
60
61 #ifdef _FGRAPHICS_OPENGL_H_
62 namespace Tizen { namespace Graphics { namespace Opengl
63 {
64 #endif
65
66
67 #include "khrplatform.h"
68
69
70 /* Macros used in EGL function prototype declarations.
71  *
72  * EGL functions should be prototyped as:
73  *
74  * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
75  * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
76  *
77  * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
78  */
79
80 /**
81  * @addtogroup opengles
82  *
83  * @{
84  */
85
86 #ifndef _WIN32
87 #define EGLAPI
88 #define EGLAPIENTRY
89 #else
90 #ifndef EGLAPIENTRY
91 #define EGLAPIENTRY __stdcall
92 #endif
93 #ifndef EGLAPI
94 #define EGLAPI
95 #endif
96 #endif
97
98 #define EGLAPIENTRYP KHRONOS_APIENTRY*
99 /*
100 ** Types and resources
101 */
102
103 /*! \var typedef int EGLint
104     \brief A type definition for EGLConfig.
105 */
106 typedef int EGLint;
107
108 #ifdef _WIN32
109 typedef void* EGLNativeDisplayType;
110 class Tizen::Ui::Control;
111 typedef Tizen::Ui::Control* EGLNativeWindowType;
112 class Tizen::Graphics::Bitmap;
113 typedef Tizen::Graphics::Bitmap* EGLNativePixmapType;
114
115 #elif FEATURE_SYSLSI_S5PC110
116 typedef int EGLNativeDisplayType;
117 typedef void* EGLNativeWindowType;
118 typedef struct
119 {
120         void* pBuffer;
121         long lWidth;
122         long lHeight;
123         enum
124         {
125                 NUEGL_PIXELFORMAT_565 = 0,
126                 NUEGL_PIXELFORMAT_4444 = 1,
127                 NUEGL_PIXELFORMAT_8888 = 2,
128                 NUEGL_PIXELFORMAT_1555 = 3,
129                 NUEGL_PIXELFORMAT_force_to_32_bits = 0x12345678
130         } ePixelFormat;
131         enum
132         {
133                 NUEGL_ROTATE_0 = 0,
134                 NUEGL_ROTATE_90 = 1,
135                 NUEGL_ROTATE_180 = 2,
136                 NUEGL_ROTATE_270 = 3,
137                 NUEGL_ROTATE_force_to_32_bits = 0x12345678
138         } eRotation;
139 } sEGLNativePixmapType;
140 typedef sEGLNativePixmapType* EGLNativePixmapType;
141 #else
142
143 /*! \var typedef void *EGLNativeDisplayType
144     \brief A type definition for EGLNativeDisplayType.
145 */
146 typedef void* EGLNativeDisplayType;
147
148 /*! \var typedef void *EGLNativeWindowType
149     \brief A type definition for EGLNativeWindowType.
150 */
151 typedef void* EGLNativeWindowType;
152
153 /*! \var typedef void *EGLNativePixmapType
154     \brief A type definition for EGLNativePixmapType.
155 */
156 typedef void* EGLNativePixmapType;
157 #endif
158
159 /*! \var typedef EGLNativeDisplayType NativeDisplayType
160     \brief A type definition for NativeDisplayType.
161 */
162 typedef EGLNativeDisplayType NativeDisplayType;
163
164 /*! \var typedef EGLNativePixmapType  NativePixmapType
165     \brief A type definition for NativePixmapType.
166 */
167 typedef EGLNativePixmapType NativePixmapType;
168
169 /*! \var typedef EGLNativeWindowType  NativeWindowType
170     \brief A type definition for NativeWindowType.
171 */
172 typedef EGLNativeWindowType NativeWindowType;
173
174 #include "egl_macro.h"
175
176 /**
177  * @}
178  */
179
180 #endif /* __eglplatform_h_ */