1e5c31af7Sopenharmony_ci/* WARNING: This is auto-generated file. Do not modify, since changes will
2e5c31af7Sopenharmony_ci * be lost! Modify the generating script instead.
3e5c31af7Sopenharmony_ci *
4e5c31af7Sopenharmony_ci * Generated from Khronos EGL API description (egl.xml) revision 6550e9b12e0b4f11182bda30ae2a8dd56d0b02c8.
5e5c31af7Sopenharmony_ci */
6e5c31af7Sopenharmony_ci
7e5c31af7Sopenharmony_ciEGLBoolean eglwBindAPI (EGLenum api)
8e5c31af7Sopenharmony_ci{
9e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
10e5c31af7Sopenharmony_ci	if (!egl)
11e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
12e5c31af7Sopenharmony_ci	return egl->bindAPI(api);
13e5c31af7Sopenharmony_ci}
14e5c31af7Sopenharmony_ci
15e5c31af7Sopenharmony_ciEGLBoolean eglwBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer)
16e5c31af7Sopenharmony_ci{
17e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
18e5c31af7Sopenharmony_ci	if (!egl)
19e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
20e5c31af7Sopenharmony_ci	return egl->bindTexImage(dpy, surface, buffer);
21e5c31af7Sopenharmony_ci}
22e5c31af7Sopenharmony_ci
23e5c31af7Sopenharmony_ciEGLBoolean eglwChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
24e5c31af7Sopenharmony_ci{
25e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
26e5c31af7Sopenharmony_ci	if (!egl)
27e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
28e5c31af7Sopenharmony_ci	return egl->chooseConfig(dpy, attrib_list, configs, config_size, num_config);
29e5c31af7Sopenharmony_ci}
30e5c31af7Sopenharmony_ci
31e5c31af7Sopenharmony_ciEGLint eglwClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)
32e5c31af7Sopenharmony_ci{
33e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
34e5c31af7Sopenharmony_ci	if (!egl)
35e5c31af7Sopenharmony_ci		return (EGLint)0;
36e5c31af7Sopenharmony_ci	return egl->clientWaitSync(dpy, sync, flags, timeout);
37e5c31af7Sopenharmony_ci}
38e5c31af7Sopenharmony_ci
39e5c31af7Sopenharmony_ciEGLBoolean eglwCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
40e5c31af7Sopenharmony_ci{
41e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
42e5c31af7Sopenharmony_ci	if (!egl)
43e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
44e5c31af7Sopenharmony_ci	return egl->copyBuffers(dpy, surface, (void*)target);
45e5c31af7Sopenharmony_ci}
46e5c31af7Sopenharmony_ci
47e5c31af7Sopenharmony_ciEGLContext eglwCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
48e5c31af7Sopenharmony_ci{
49e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
50e5c31af7Sopenharmony_ci	if (!egl)
51e5c31af7Sopenharmony_ci		return (EGLContext)0;
52e5c31af7Sopenharmony_ci	return egl->createContext(dpy, config, share_context, attrib_list);
53e5c31af7Sopenharmony_ci}
54e5c31af7Sopenharmony_ci
55e5c31af7Sopenharmony_ciEGLImage eglwCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list)
56e5c31af7Sopenharmony_ci{
57e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
58e5c31af7Sopenharmony_ci	if (!egl)
59e5c31af7Sopenharmony_ci		return (EGLImage)0;
60e5c31af7Sopenharmony_ci	return egl->createImage(dpy, ctx, target, buffer, attrib_list);
61e5c31af7Sopenharmony_ci}
62e5c31af7Sopenharmony_ci
63e5c31af7Sopenharmony_ciEGLSurface eglwCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list)
64e5c31af7Sopenharmony_ci{
65e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
66e5c31af7Sopenharmony_ci	if (!egl)
67e5c31af7Sopenharmony_ci		return (EGLSurface)0;
68e5c31af7Sopenharmony_ci	return egl->createPbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list);
69e5c31af7Sopenharmony_ci}
70e5c31af7Sopenharmony_ci
71e5c31af7Sopenharmony_ciEGLSurface eglwCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
72e5c31af7Sopenharmony_ci{
73e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
74e5c31af7Sopenharmony_ci	if (!egl)
75e5c31af7Sopenharmony_ci		return (EGLSurface)0;
76e5c31af7Sopenharmony_ci	return egl->createPbufferSurface(dpy, config, attrib_list);
77e5c31af7Sopenharmony_ci}
78e5c31af7Sopenharmony_ci
79e5c31af7Sopenharmony_ciEGLSurface eglwCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list)
80e5c31af7Sopenharmony_ci{
81e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
82e5c31af7Sopenharmony_ci	if (!egl)
83e5c31af7Sopenharmony_ci		return (EGLSurface)0;
84e5c31af7Sopenharmony_ci	return egl->createPixmapSurface(dpy, config, (void*)pixmap, attrib_list);
85e5c31af7Sopenharmony_ci}
86e5c31af7Sopenharmony_ci
87e5c31af7Sopenharmony_ciEGLSurface eglwCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list)
88e5c31af7Sopenharmony_ci{
89e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
90e5c31af7Sopenharmony_ci	if (!egl)
91e5c31af7Sopenharmony_ci		return (EGLSurface)0;
92e5c31af7Sopenharmony_ci	return egl->createPlatformPixmapSurface(dpy, config, native_pixmap, attrib_list);
93e5c31af7Sopenharmony_ci}
94e5c31af7Sopenharmony_ci
95e5c31af7Sopenharmony_ciEGLSurface eglwCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list)
96e5c31af7Sopenharmony_ci{
97e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
98e5c31af7Sopenharmony_ci	if (!egl)
99e5c31af7Sopenharmony_ci		return (EGLSurface)0;
100e5c31af7Sopenharmony_ci	return egl->createPlatformWindowSurface(dpy, config, native_window, attrib_list);
101e5c31af7Sopenharmony_ci}
102e5c31af7Sopenharmony_ci
103e5c31af7Sopenharmony_ciEGLSync eglwCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list)
104e5c31af7Sopenharmony_ci{
105e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
106e5c31af7Sopenharmony_ci	if (!egl)
107e5c31af7Sopenharmony_ci		return (EGLSync)0;
108e5c31af7Sopenharmony_ci	return egl->createSync(dpy, type, attrib_list);
109e5c31af7Sopenharmony_ci}
110e5c31af7Sopenharmony_ci
111e5c31af7Sopenharmony_ciEGLSurface eglwCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
112e5c31af7Sopenharmony_ci{
113e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
114e5c31af7Sopenharmony_ci	if (!egl)
115e5c31af7Sopenharmony_ci		return (EGLSurface)0;
116e5c31af7Sopenharmony_ci	return egl->createWindowSurface(dpy, config, (void*)win, attrib_list);
117e5c31af7Sopenharmony_ci}
118e5c31af7Sopenharmony_ci
119e5c31af7Sopenharmony_ciEGLBoolean eglwDestroyContext (EGLDisplay dpy, EGLContext ctx)
120e5c31af7Sopenharmony_ci{
121e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
122e5c31af7Sopenharmony_ci	if (!egl)
123e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
124e5c31af7Sopenharmony_ci	return egl->destroyContext(dpy, ctx);
125e5c31af7Sopenharmony_ci}
126e5c31af7Sopenharmony_ci
127e5c31af7Sopenharmony_ciEGLBoolean eglwDestroyImage (EGLDisplay dpy, EGLImage image)
128e5c31af7Sopenharmony_ci{
129e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
130e5c31af7Sopenharmony_ci	if (!egl)
131e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
132e5c31af7Sopenharmony_ci	return egl->destroyImage(dpy, image);
133e5c31af7Sopenharmony_ci}
134e5c31af7Sopenharmony_ci
135e5c31af7Sopenharmony_ciEGLBoolean eglwDestroySurface (EGLDisplay dpy, EGLSurface surface)
136e5c31af7Sopenharmony_ci{
137e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
138e5c31af7Sopenharmony_ci	if (!egl)
139e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
140e5c31af7Sopenharmony_ci	return egl->destroySurface(dpy, surface);
141e5c31af7Sopenharmony_ci}
142e5c31af7Sopenharmony_ci
143e5c31af7Sopenharmony_ciEGLBoolean eglwDestroySync (EGLDisplay dpy, EGLSync sync)
144e5c31af7Sopenharmony_ci{
145e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
146e5c31af7Sopenharmony_ci	if (!egl)
147e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
148e5c31af7Sopenharmony_ci	return egl->destroySync(dpy, sync);
149e5c31af7Sopenharmony_ci}
150e5c31af7Sopenharmony_ci
151e5c31af7Sopenharmony_ciEGLBoolean eglwGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
152e5c31af7Sopenharmony_ci{
153e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
154e5c31af7Sopenharmony_ci	if (!egl)
155e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
156e5c31af7Sopenharmony_ci	return egl->getConfigAttrib(dpy, config, attribute, value);
157e5c31af7Sopenharmony_ci}
158e5c31af7Sopenharmony_ci
159e5c31af7Sopenharmony_ciEGLBoolean eglwGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config)
160e5c31af7Sopenharmony_ci{
161e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
162e5c31af7Sopenharmony_ci	if (!egl)
163e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
164e5c31af7Sopenharmony_ci	return egl->getConfigs(dpy, configs, config_size, num_config);
165e5c31af7Sopenharmony_ci}
166e5c31af7Sopenharmony_ci
167e5c31af7Sopenharmony_ciEGLContext eglwGetCurrentContext (void)
168e5c31af7Sopenharmony_ci{
169e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
170e5c31af7Sopenharmony_ci	if (!egl)
171e5c31af7Sopenharmony_ci		return (EGLContext)0;
172e5c31af7Sopenharmony_ci	return egl->getCurrentContext();
173e5c31af7Sopenharmony_ci}
174e5c31af7Sopenharmony_ci
175e5c31af7Sopenharmony_ciEGLDisplay eglwGetCurrentDisplay (void)
176e5c31af7Sopenharmony_ci{
177e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
178e5c31af7Sopenharmony_ci	if (!egl)
179e5c31af7Sopenharmony_ci		return (EGLDisplay)0;
180e5c31af7Sopenharmony_ci	return egl->getCurrentDisplay();
181e5c31af7Sopenharmony_ci}
182e5c31af7Sopenharmony_ci
183e5c31af7Sopenharmony_ciEGLSurface eglwGetCurrentSurface (EGLint readdraw)
184e5c31af7Sopenharmony_ci{
185e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
186e5c31af7Sopenharmony_ci	if (!egl)
187e5c31af7Sopenharmony_ci		return (EGLSurface)0;
188e5c31af7Sopenharmony_ci	return egl->getCurrentSurface(readdraw);
189e5c31af7Sopenharmony_ci}
190e5c31af7Sopenharmony_ci
191e5c31af7Sopenharmony_ciEGLDisplay eglwGetDisplay (EGLNativeDisplayType display_id)
192e5c31af7Sopenharmony_ci{
193e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
194e5c31af7Sopenharmony_ci	if (!egl)
195e5c31af7Sopenharmony_ci		return (EGLDisplay)0;
196e5c31af7Sopenharmony_ci	return egl->getDisplay((void*)display_id);
197e5c31af7Sopenharmony_ci}
198e5c31af7Sopenharmony_ci
199e5c31af7Sopenharmony_ciEGLint eglwGetError (void)
200e5c31af7Sopenharmony_ci{
201e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
202e5c31af7Sopenharmony_ci	if (!egl)
203e5c31af7Sopenharmony_ci		return (EGLint)0;
204e5c31af7Sopenharmony_ci	return egl->getError();
205e5c31af7Sopenharmony_ci}
206e5c31af7Sopenharmony_ci
207e5c31af7Sopenharmony_ciEGLDisplay eglwGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list)
208e5c31af7Sopenharmony_ci{
209e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
210e5c31af7Sopenharmony_ci	if (!egl)
211e5c31af7Sopenharmony_ci		return (EGLDisplay)0;
212e5c31af7Sopenharmony_ci	return egl->getPlatformDisplay(platform, native_display, attrib_list);
213e5c31af7Sopenharmony_ci}
214e5c31af7Sopenharmony_ci
215e5c31af7Sopenharmony_ci__eglMustCastToProperFunctionPointerType eglwGetProcAddress (const char *procname)
216e5c31af7Sopenharmony_ci{
217e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
218e5c31af7Sopenharmony_ci	if (!egl)
219e5c31af7Sopenharmony_ci		return (__eglMustCastToProperFunctionPointerType)0;
220e5c31af7Sopenharmony_ci	return egl->getProcAddress(procname);
221e5c31af7Sopenharmony_ci}
222e5c31af7Sopenharmony_ci
223e5c31af7Sopenharmony_ciEGLBoolean eglwGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value)
224e5c31af7Sopenharmony_ci{
225e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
226e5c31af7Sopenharmony_ci	if (!egl)
227e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
228e5c31af7Sopenharmony_ci	return egl->getSyncAttrib(dpy, sync, attribute, value);
229e5c31af7Sopenharmony_ci}
230e5c31af7Sopenharmony_ci
231e5c31af7Sopenharmony_ciEGLBoolean eglwInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor)
232e5c31af7Sopenharmony_ci{
233e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
234e5c31af7Sopenharmony_ci	if (!egl)
235e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
236e5c31af7Sopenharmony_ci	return egl->initialize(dpy, major, minor);
237e5c31af7Sopenharmony_ci}
238e5c31af7Sopenharmony_ci
239e5c31af7Sopenharmony_ciEGLBoolean eglwMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
240e5c31af7Sopenharmony_ci{
241e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
242e5c31af7Sopenharmony_ci	if (!egl)
243e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
244e5c31af7Sopenharmony_ci	return egl->makeCurrent(dpy, draw, read, ctx);
245e5c31af7Sopenharmony_ci}
246e5c31af7Sopenharmony_ci
247e5c31af7Sopenharmony_ciEGLenum eglwQueryAPI (void)
248e5c31af7Sopenharmony_ci{
249e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
250e5c31af7Sopenharmony_ci	if (!egl)
251e5c31af7Sopenharmony_ci		return (EGLenum)0;
252e5c31af7Sopenharmony_ci	return egl->queryAPI();
253e5c31af7Sopenharmony_ci}
254e5c31af7Sopenharmony_ci
255e5c31af7Sopenharmony_ciEGLBoolean eglwQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value)
256e5c31af7Sopenharmony_ci{
257e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
258e5c31af7Sopenharmony_ci	if (!egl)
259e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
260e5c31af7Sopenharmony_ci	return egl->queryContext(dpy, ctx, attribute, value);
261e5c31af7Sopenharmony_ci}
262e5c31af7Sopenharmony_ci
263e5c31af7Sopenharmony_ciconst char * eglwQueryString (EGLDisplay dpy, EGLint name)
264e5c31af7Sopenharmony_ci{
265e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
266e5c31af7Sopenharmony_ci	if (!egl)
267e5c31af7Sopenharmony_ci		return (const char *)0;
268e5c31af7Sopenharmony_ci	return egl->queryString(dpy, name);
269e5c31af7Sopenharmony_ci}
270e5c31af7Sopenharmony_ci
271e5c31af7Sopenharmony_ciEGLBoolean eglwQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value)
272e5c31af7Sopenharmony_ci{
273e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
274e5c31af7Sopenharmony_ci	if (!egl)
275e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
276e5c31af7Sopenharmony_ci	return egl->querySurface(dpy, surface, attribute, value);
277e5c31af7Sopenharmony_ci}
278e5c31af7Sopenharmony_ci
279e5c31af7Sopenharmony_ciEGLBoolean eglwReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer)
280e5c31af7Sopenharmony_ci{
281e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
282e5c31af7Sopenharmony_ci	if (!egl)
283e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
284e5c31af7Sopenharmony_ci	return egl->releaseTexImage(dpy, surface, buffer);
285e5c31af7Sopenharmony_ci}
286e5c31af7Sopenharmony_ci
287e5c31af7Sopenharmony_ciEGLBoolean eglwReleaseThread (void)
288e5c31af7Sopenharmony_ci{
289e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
290e5c31af7Sopenharmony_ci	if (!egl)
291e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
292e5c31af7Sopenharmony_ci	return egl->releaseThread();
293e5c31af7Sopenharmony_ci}
294e5c31af7Sopenharmony_ci
295e5c31af7Sopenharmony_ciEGLBoolean eglwSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
296e5c31af7Sopenharmony_ci{
297e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
298e5c31af7Sopenharmony_ci	if (!egl)
299e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
300e5c31af7Sopenharmony_ci	return egl->surfaceAttrib(dpy, surface, attribute, value);
301e5c31af7Sopenharmony_ci}
302e5c31af7Sopenharmony_ci
303e5c31af7Sopenharmony_ciEGLBoolean eglwSwapBuffers (EGLDisplay dpy, EGLSurface surface)
304e5c31af7Sopenharmony_ci{
305e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
306e5c31af7Sopenharmony_ci	if (!egl)
307e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
308e5c31af7Sopenharmony_ci	return egl->swapBuffers(dpy, surface);
309e5c31af7Sopenharmony_ci}
310e5c31af7Sopenharmony_ci
311e5c31af7Sopenharmony_ciEGLBoolean eglwSwapInterval (EGLDisplay dpy, EGLint interval)
312e5c31af7Sopenharmony_ci{
313e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
314e5c31af7Sopenharmony_ci	if (!egl)
315e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
316e5c31af7Sopenharmony_ci	return egl->swapInterval(dpy, interval);
317e5c31af7Sopenharmony_ci}
318e5c31af7Sopenharmony_ci
319e5c31af7Sopenharmony_ciEGLBoolean eglwTerminate (EGLDisplay dpy)
320e5c31af7Sopenharmony_ci{
321e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
322e5c31af7Sopenharmony_ci	if (!egl)
323e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
324e5c31af7Sopenharmony_ci	return egl->terminate(dpy);
325e5c31af7Sopenharmony_ci}
326e5c31af7Sopenharmony_ci
327e5c31af7Sopenharmony_ciEGLBoolean eglwWaitClient (void)
328e5c31af7Sopenharmony_ci{
329e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
330e5c31af7Sopenharmony_ci	if (!egl)
331e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
332e5c31af7Sopenharmony_ci	return egl->waitClient();
333e5c31af7Sopenharmony_ci}
334e5c31af7Sopenharmony_ci
335e5c31af7Sopenharmony_ciEGLBoolean eglwWaitGL (void)
336e5c31af7Sopenharmony_ci{
337e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
338e5c31af7Sopenharmony_ci	if (!egl)
339e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
340e5c31af7Sopenharmony_ci	return egl->waitGL();
341e5c31af7Sopenharmony_ci}
342e5c31af7Sopenharmony_ci
343e5c31af7Sopenharmony_ciEGLBoolean eglwWaitNative (EGLint engine)
344e5c31af7Sopenharmony_ci{
345e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
346e5c31af7Sopenharmony_ci	if (!egl)
347e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
348e5c31af7Sopenharmony_ci	return egl->waitNative(engine);
349e5c31af7Sopenharmony_ci}
350e5c31af7Sopenharmony_ci
351e5c31af7Sopenharmony_ciEGLBoolean eglwWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags)
352e5c31af7Sopenharmony_ci{
353e5c31af7Sopenharmony_ci	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
354e5c31af7Sopenharmony_ci	if (!egl)
355e5c31af7Sopenharmony_ci		return (EGLBoolean)0;
356e5c31af7Sopenharmony_ci	return egl->waitSync(dpy, sync, flags);
357e5c31af7Sopenharmony_ci}
358