Add coding style guide.
[platform/core/uifw/coregl.git] / src / headers / sym_egl.h
1 // Defult use-case for exporting symbols
2 #ifndef _COREGL_SYMBOL
3 #define _COREGL_SYMBOL_NOT_DEFINED
4 #define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST)     COREGL_API extern RET_TYPE FUNC_NAME PARAM_LIST;
5 #endif
6 #ifndef _COREGL_EXT_SYMBOL
7 #define _COREGL_EXT_SYMBOL_NOT_DEFINED
8 #define _COREGL_EXT_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST)   _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST)
9 #endif
10 #ifndef _COREGL_EXT_SYMBOL_ALIAS
11 #define _COREGL_EXT_SYMBOL_ALIAS_NOT_DEFINED
12 #define _COREGL_EXT_SYMBOL_ALIAS(FUNC_NAME, ALIAS_NAME)
13 #endif
14 #ifndef _COREGL_EXT_SYMBOL_FASTPATH_PASS
15 #define _COREGL_EXT_SYMBOL_FASTPATH_PASS_NOT_DEFINED
16 #define _COREGL_EXT_SYMBOL_FASTPATH_PASS(FUNC_NAME)
17 #endif
18 #ifndef _COREGL_EXT_SYMBOL_FASTPATH_BLOCK
19 #define _COREGL_EXT_SYMBOL_FASTPATH_BLOCK_NOT_DEFINED
20 #define _COREGL_EXT_SYMBOL_FASTPATH_BLOCK(FUNC_NAME)
21 #endif
22
23 // Standard EGL APIs
24
25 _COREGL_SYMBOL(EGLint, eglGetError, (void))
26 _COREGL_SYMBOL(EGLDisplay, eglGetDisplay, (EGLNativeDisplayType display_id))
27 _COREGL_SYMBOL(EGLBoolean, eglInitialize, (EGLDisplay dpy, EGLint *major,
28                 EGLint *minor))
29 _COREGL_SYMBOL(EGLBoolean, eglTerminate, (EGLDisplay dpy))
30 _COREGL_SYMBOL(const char *, eglQueryString, (EGLDisplay dpy, EGLint name))
31
32 _COREGL_SYMBOL(EGLBoolean, eglGetConfigs, (EGLDisplay dpy, EGLConfig *configs,
33                 EGLint config_size, EGLint *num_config))
34 _COREGL_SYMBOL(EGLBoolean, eglChooseConfig, (EGLDisplay dpy,
35                 const EGLint *attrib_list, EGLConfig *configs, EGLint config_size,
36                 EGLint *num_config))
37 _COREGL_SYMBOL(EGLBoolean, eglGetConfigAttrib, (EGLDisplay dpy,
38                 EGLConfig config, EGLint attribute, EGLint *value))
39
40 _COREGL_SYMBOL(EGLSurface, eglCreateWindowSurface, (EGLDisplay dpy,
41                 EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list))
42 _COREGL_SYMBOL(EGLSurface, eglCreatePbufferSurface, (EGLDisplay dpy,
43                 EGLConfig config, const EGLint *attrib_list))
44 _COREGL_SYMBOL(EGLSurface, eglCreatePixmapSurface, (EGLDisplay dpy,
45                 EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list))
46 _COREGL_SYMBOL(EGLBoolean, eglDestroySurface, (EGLDisplay dpy,
47                 EGLSurface surface))
48 _COREGL_SYMBOL(EGLBoolean, eglQuerySurface, (EGLDisplay dpy, EGLSurface surface,
49                 EGLint attribute, EGLint *value))
50
51 _COREGL_SYMBOL(EGLBoolean, eglBindAPI, (EGLenum api))
52 _COREGL_SYMBOL(EGLenum, eglQueryAPI, (void))
53 _COREGL_SYMBOL(EGLBoolean, eglWaitClient, (void))
54 _COREGL_SYMBOL(EGLBoolean, eglReleaseThread, (void))
55 _COREGL_SYMBOL(EGLSurface, eglCreatePbufferFromClientBuffer, (EGLDisplay dpy,
56                 EGLenum buftype, EGLClientBuffer buffer, EGLConfig config,
57                 const EGLint *attrib_list))
58
59 _COREGL_SYMBOL(EGLBoolean, eglSurfaceAttrib, (EGLDisplay dpy,
60                 EGLSurface surface, EGLint attribute, EGLint value))
61 _COREGL_SYMBOL(EGLBoolean, eglBindTexImage, (EGLDisplay dpy, EGLSurface surface,
62                 EGLint buffer))
63 _COREGL_SYMBOL(EGLBoolean, eglReleaseTexImage, (EGLDisplay dpy,
64                 EGLSurface surface, EGLint buffer))
65 _COREGL_SYMBOL(EGLBoolean, eglSwapInterval, (EGLDisplay dpy, EGLint interval))
66 _COREGL_SYMBOL(EGLContext, eglCreateContext, (EGLDisplay dpy, EGLConfig config,
67                 EGLContext share_context, const EGLint *attrib_list))
68 _COREGL_SYMBOL(EGLBoolean, eglDestroyContext, (EGLDisplay dpy, EGLContext ctx))
69 _COREGL_SYMBOL(EGLBoolean, eglMakeCurrent, (EGLDisplay dpy, EGLSurface draw,
70                 EGLSurface read, EGLContext ctx))
71 _COREGL_SYMBOL(EGLContext, eglGetCurrentContext, (void))
72 _COREGL_SYMBOL(EGLSurface, eglGetCurrentSurface, (EGLint readdraw))
73 _COREGL_SYMBOL(EGLDisplay, eglGetCurrentDisplay, (void))
74
75 _COREGL_SYMBOL(EGLBoolean, eglQueryContext, (EGLDisplay dpy, EGLContext ctx,
76                 EGLint attribute, EGLint *value))
77 _COREGL_SYMBOL(EGLBoolean, eglWaitGL, (void))
78 _COREGL_SYMBOL(EGLBoolean, eglWaitNative, (EGLint engine))
79 _COREGL_SYMBOL(EGLBoolean, eglSwapBuffers, (EGLDisplay dpy, EGLSurface surface))
80 _COREGL_SYMBOL(EGLBoolean, eglCopyBuffers, (EGLDisplay dpy, EGLSurface surface,
81                 EGLNativePixmapType target))
82
83 _COREGL_SYMBOL(_eng_fn, eglGetProcAddress, (const char *procname))
84
85
86 // Extensions
87 _COREGL_EXT_SYMBOL(EGLImageKHR, eglCreateImageKHR, (EGLDisplay dpy,
88                    EGLContext ctx, EGLenum target, EGLClientBuffer buffer,
89                    const EGLint *attrib_list))
90 _COREGL_EXT_SYMBOL(EGLBoolean, eglDestroyImageKHR, (EGLDisplay dpy,
91                    EGLImageKHR image))
92
93 _COREGL_EXT_SYMBOL(void *, eglMapImageSEC, (EGLDisplay dpy, EGLImageKHR image,
94                    EGLint device_type, EGLint access_option))
95 _COREGL_EXT_SYMBOL(EGLBoolean, eglUnmapImageSEC, (EGLDisplay dpy,
96                    EGLImageKHR image, EGLint device_type))
97 _COREGL_EXT_SYMBOL(EGLBoolean, eglGetImageAttribSEC, (EGLDisplay dpy,
98                    EGLImageKHR image, EGLint attribute, EGLint *value))
99
100 _COREGL_EXT_SYMBOL(EGLBoolean, eglLockSurfaceKHR, (EGLDisplay display,
101                    EGLSurface surface, const EGLint *attrib_list))
102 _COREGL_EXT_SYMBOL(EGLBoolean, eglUnlockSurfaceKHR, (EGLDisplay display,
103                    EGLSurface surface))
104
105 _COREGL_EXT_SYMBOL(EGLBoolean, eglSwapBuffersWithDamageEXT, (EGLDisplay dpy,
106                    EGLSurface surface, EGLint *rects, EGLint n_rects))
107
108 _COREGL_EXT_SYMBOL(EGLBoolean, eglSwapBuffersRegionEXT, (EGLDisplay dpy,
109                    EGLSurface surface, EGLint numRects, const EGLint *rects))
110
111 _COREGL_EXT_SYMBOL(EGLBoolean, eglBindWaylandDisplayWL, (EGLDisplay dpy,
112                    void *display))
113
114 _COREGL_EXT_SYMBOL(EGLBoolean, eglUnbindWaylandDisplayWL, (EGLDisplay dpy,
115                    void *display))
116
117 _COREGL_EXT_SYMBOL(EGLBoolean, eglQueryWaylandBufferWL, (EGLDisplay dpy,
118                    void *buffer, EGLint attribute, EGLint *value))
119
120 /* Fastpath Verified extensions */
121 //_COREGL_EXT_SYMBOL_FASTPATH_PASS(eglSwapBuffersRegionSEC)
122 _COREGL_EXT_SYMBOL_FASTPATH_PASS(eglCreateSyncKHR)
123 _COREGL_EXT_SYMBOL_FASTPATH_PASS(eglDestroySyncKHR)
124 _COREGL_EXT_SYMBOL_FASTPATH_PASS(eglClientWaitSyncKHR)
125 _COREGL_EXT_SYMBOL_FASTPATH_PASS(eglSignalSyncKHR)
126 _COREGL_EXT_SYMBOL_FASTPATH_PASS(eglGetSyncAttribKHR)
127 _COREGL_EXT_SYMBOL_FASTPATH_PASS(eglWaitSyncKHR)
128 _COREGL_EXT_SYMBOL_FASTPATH_PASS(eglPostSubBufferNV)
129
130 /* Fastpath Blocked extensions */
131 //_COREGL_EXT_SYMBOL_FASTPATH_BLOCK()
132
133 #ifdef _COREGL_EXT_SYMBOL_NOT_DEFINED
134 #undef _COREGL_EXT_SYMBOL_NOT_DEFINED
135 #undef _COREGL_EXT_SYMBOL
136 #endif
137
138 #ifdef _COREGL_SYMBOL_NOT_DEFINED
139 #undef _COREGL_SYMBOL_NOT_DEFINED
140 #undef _COREGL_SYMBOL
141 #endif
142
143 #ifdef _COREGL_EXT_SYMBOL_ALIAS_NOT_DEFINED
144 #undef _COREGL_EXT_SYMBOL_ALIAS_NOT_DEFINED
145 #undef _COREGL_EXT_SYMBOL_ALIAS
146 #endif
147
148 #ifdef _COREGL_EXT_SYMBOL_FASTPATH_PASS_NOT_DEFINED
149 #undef _COREGL_EXT_SYMBOL_FASTPATH_PASS_NOT_DEFINED
150 #undef _COREGL_EXT_SYMBOL_FASTPATH_PASS
151 #endif
152
153 #ifdef _COREGL_EXT_SYMBOL_FASTPATH_BLOCK_NOT_DEFINED
154 #undef _COREGL_EXT_SYMBOL_FASTPATH_BLOCK_NOT_DEFINED
155 #undef _COREGL_EXT_SYMBOL_FASTPATH_BLOCK
156 #endif
157