tizen 2.4 release
[sdk/emulator-yagl.git] / EGL / yagl_host_egl_calls.c
1 /*
2  * Generated by gen-yagl-calls.py, do not modify!
3  */
4 #include "yagl_host_egl_calls.h"
5 #include "yagl_transport_egl.h"
6 #include "yagl_state.h"
7 #include <assert.h>
8
9 /*
10  * eglGetDisplay wrapper. id = 1
11  */
12 yagl_host_handle yagl_host_eglGetDisplay(uint32_t display_id, EGLint *error)
13 {
14     struct yagl_transport *t = yagl_get_transport();
15     yagl_host_handle retval = 0;
16
17     yagl_transport_begin(t, yagl_api_id_egl, 1, 5 * 8, 5 * 8);
18     yagl_transport_put_out_uint32_t(t, display_id);
19     yagl_transport_put_in_EGLint(t, error);
20     yagl_transport_put_in_yagl_host_handle(t, &retval);
21     yagl_transport_end(t);
22
23     return retval;
24 }
25
26 /*
27  * eglInitialize wrapper. id = 2
28  */
29 EGLBoolean yagl_host_eglInitialize(yagl_host_handle dpy, EGLint *major, EGLint *minor, EGLint *error)
30 {
31     struct yagl_transport *t = yagl_get_transport();
32     EGLBoolean retval = 0;
33
34     yagl_transport_begin(t, yagl_api_id_egl, 2, 9 * 8, 9 * 8);
35     yagl_transport_put_out_yagl_host_handle(t, dpy);
36     yagl_transport_put_in_EGLint(t, major);
37     yagl_transport_put_in_EGLint(t, minor);
38     yagl_transport_put_in_EGLint(t, error);
39     yagl_transport_put_in_EGLBoolean(t, &retval);
40     yagl_transport_end(t);
41
42     return retval;
43 }
44
45 /*
46  * eglTerminate wrapper. id = 3
47  */
48 EGLBoolean yagl_host_eglTerminate(yagl_host_handle dpy, EGLint *error)
49 {
50     struct yagl_transport *t = yagl_get_transport();
51     EGLBoolean retval = 0;
52
53     yagl_transport_begin(t, yagl_api_id_egl, 3, 5 * 8, 5 * 8);
54     yagl_transport_put_out_yagl_host_handle(t, dpy);
55     yagl_transport_put_in_EGLint(t, error);
56     yagl_transport_put_in_EGLBoolean(t, &retval);
57     yagl_transport_end(t);
58
59     return retval;
60 }
61
62 /*
63  * eglGetConfigs wrapper. id = 4
64  */
65 EGLBoolean yagl_host_eglGetConfigs(yagl_host_handle dpy, yagl_host_handle *configs, int32_t configs_maxcount, int32_t *configs_count, EGLint *error)
66 {
67     struct yagl_transport *t = yagl_get_transport();
68     EGLBoolean retval = 0;
69
70     yagl_transport_begin(t, yagl_api_id_egl, 4, 7 * 8, 5 * 8 + yagl_transport_array_size(configs, configs_maxcount, sizeof(yagl_host_handle)));
71     yagl_transport_put_out_yagl_host_handle(t, dpy);
72     yagl_transport_put_in_array(t, configs, configs_maxcount, configs_count, sizeof(yagl_host_handle));
73     yagl_transport_put_in_EGLint(t, error);
74     yagl_transport_put_in_EGLBoolean(t, &retval);
75     yagl_transport_end(t);
76
77     return retval;
78 }
79
80 /*
81  * eglChooseConfig wrapper. id = 5
82  */
83 EGLBoolean yagl_host_eglChooseConfig(yagl_host_handle dpy, const EGLint *attrib_list, int32_t attrib_list_count, yagl_host_handle *configs, int32_t configs_maxcount, int32_t *configs_count, EGLint *error)
84 {
85     struct yagl_transport *t = yagl_get_transport();
86     EGLBoolean retval = 0;
87
88     yagl_transport_begin(t, yagl_api_id_egl, 5, 9 * 8, 5 * 8 + yagl_transport_array_size(attrib_list, attrib_list_count, sizeof(EGLint)) + yagl_transport_array_size(configs, configs_maxcount, sizeof(yagl_host_handle)));
89     yagl_transport_put_out_yagl_host_handle(t, dpy);
90     yagl_transport_put_out_array(t, attrib_list, attrib_list_count, sizeof(EGLint));
91     yagl_transport_put_in_array(t, configs, configs_maxcount, configs_count, sizeof(yagl_host_handle));
92     yagl_transport_put_in_EGLint(t, error);
93     yagl_transport_put_in_EGLBoolean(t, &retval);
94     yagl_transport_end(t);
95
96     return retval;
97 }
98
99 /*
100  * eglGetConfigAttrib wrapper. id = 6
101  */
102 EGLBoolean yagl_host_eglGetConfigAttrib(yagl_host_handle dpy, yagl_host_handle config, EGLint attribute, EGLint *value, EGLint *error)
103 {
104     struct yagl_transport *t = yagl_get_transport();
105     EGLBoolean retval = 0;
106
107     yagl_transport_begin(t, yagl_api_id_egl, 6, 9 * 8, 9 * 8);
108     yagl_transport_put_out_yagl_host_handle(t, dpy);
109     yagl_transport_put_out_yagl_host_handle(t, config);
110     yagl_transport_put_out_EGLint(t, attribute);
111     yagl_transport_put_in_EGLint(t, value);
112     yagl_transport_put_in_EGLint(t, error);
113     yagl_transport_put_in_EGLBoolean(t, &retval);
114     yagl_transport_end(t);
115
116     return retval;
117 }
118
119 /*
120  * eglDestroySurface wrapper. id = 7
121  */
122 EGLBoolean yagl_host_eglDestroySurface(yagl_host_handle dpy, yagl_host_handle surface, EGLint *error)
123 {
124     struct yagl_transport *t = yagl_get_transport();
125     EGLBoolean retval = 0;
126
127     yagl_transport_begin(t, yagl_api_id_egl, 7, 6 * 8, 6 * 8);
128     yagl_transport_put_out_yagl_host_handle(t, dpy);
129     yagl_transport_put_out_yagl_host_handle(t, surface);
130     yagl_transport_put_in_EGLint(t, error);
131     yagl_transport_put_in_EGLBoolean(t, &retval);
132     yagl_transport_end(t);
133
134     return retval;
135 }
136
137 /*
138  * eglQuerySurface wrapper. id = 8
139  */
140 EGLBoolean yagl_host_eglQuerySurface(yagl_host_handle dpy, yagl_host_handle surface, EGLint attribute, EGLint *value, EGLint *error)
141 {
142     struct yagl_transport *t = yagl_get_transport();
143     EGLBoolean retval = 0;
144
145     yagl_transport_begin(t, yagl_api_id_egl, 8, 9 * 8, 9 * 8);
146     yagl_transport_put_out_yagl_host_handle(t, dpy);
147     yagl_transport_put_out_yagl_host_handle(t, surface);
148     yagl_transport_put_out_EGLint(t, attribute);
149     yagl_transport_put_in_EGLint(t, value);
150     yagl_transport_put_in_EGLint(t, error);
151     yagl_transport_put_in_EGLBoolean(t, &retval);
152     yagl_transport_end(t);
153
154     return retval;
155 }
156
157 /*
158  * eglBindAPI wrapper. id = 9
159  */
160 void yagl_host_eglBindAPI(EGLenum api)
161 {
162     struct yagl_transport *t = yagl_get_transport();
163
164     yagl_transport_begin(t, yagl_api_id_egl, 9, 1 * 8, 1 * 8);
165     yagl_transport_put_out_EGLenum(t, api);
166     yagl_transport_end(t);
167 }
168
169 /*
170  * eglWaitClient wrapper. id = 10
171  */
172 void yagl_host_eglWaitClient()
173 {
174     struct yagl_transport *t = yagl_get_transport();
175
176     yagl_transport_begin(t, yagl_api_id_egl, 10, 0 * 8, 0 * 8);
177     yagl_transport_end(t);
178     yagl_transport_flush(t, NULL);
179 }
180
181 /*
182  * eglReleaseThread wrapper. id = 11
183  */
184 EGLBoolean yagl_host_eglReleaseThread(EGLint *error)
185 {
186     struct yagl_transport *t = yagl_get_transport();
187     EGLBoolean retval = 0;
188
189     yagl_transport_begin(t, yagl_api_id_egl, 11, 4 * 8, 4 * 8);
190     yagl_transport_put_in_EGLint(t, error);
191     yagl_transport_put_in_EGLBoolean(t, &retval);
192     yagl_transport_end(t);
193
194     return retval;
195 }
196
197 /*
198  * eglSurfaceAttrib wrapper. id = 12
199  */
200 EGLBoolean yagl_host_eglSurfaceAttrib(yagl_host_handle dpy, yagl_host_handle surface, EGLint attribute, EGLint value, EGLint *error)
201 {
202     struct yagl_transport *t = yagl_get_transport();
203     EGLBoolean retval = 0;
204
205     yagl_transport_begin(t, yagl_api_id_egl, 12, 8 * 8, 8 * 8);
206     yagl_transport_put_out_yagl_host_handle(t, dpy);
207     yagl_transport_put_out_yagl_host_handle(t, surface);
208     yagl_transport_put_out_EGLint(t, attribute);
209     yagl_transport_put_out_EGLint(t, value);
210     yagl_transport_put_in_EGLint(t, error);
211     yagl_transport_put_in_EGLBoolean(t, &retval);
212     yagl_transport_end(t);
213
214     return retval;
215 }
216
217 /*
218  * eglCreateContext wrapper. id = 13
219  */
220 yagl_host_handle yagl_host_eglCreateContext(yagl_host_handle dpy, yagl_host_handle config, yagl_host_handle share_context, const EGLint *attrib_list, int32_t attrib_list_count, EGLint *error)
221 {
222     struct yagl_transport *t = yagl_get_transport();
223     yagl_host_handle retval = 0;
224
225     yagl_transport_begin(t, yagl_api_id_egl, 13, 9 * 8, 7 * 8 + yagl_transport_array_size(attrib_list, attrib_list_count, sizeof(EGLint)));
226     yagl_transport_put_out_yagl_host_handle(t, dpy);
227     yagl_transport_put_out_yagl_host_handle(t, config);
228     yagl_transport_put_out_yagl_host_handle(t, share_context);
229     yagl_transport_put_out_array(t, attrib_list, attrib_list_count, sizeof(EGLint));
230     yagl_transport_put_in_EGLint(t, error);
231     yagl_transport_put_in_yagl_host_handle(t, &retval);
232     yagl_transport_end(t);
233
234     return retval;
235 }
236
237 /*
238  * eglDestroyContext wrapper. id = 14
239  */
240 EGLBoolean yagl_host_eglDestroyContext(yagl_host_handle dpy, yagl_host_handle ctx, EGLint *error)
241 {
242     struct yagl_transport *t = yagl_get_transport();
243     EGLBoolean retval = 0;
244
245     yagl_transport_begin(t, yagl_api_id_egl, 14, 6 * 8, 6 * 8);
246     yagl_transport_put_out_yagl_host_handle(t, dpy);
247     yagl_transport_put_out_yagl_host_handle(t, ctx);
248     yagl_transport_put_in_EGLint(t, error);
249     yagl_transport_put_in_EGLBoolean(t, &retval);
250     yagl_transport_end(t);
251
252     return retval;
253 }
254
255 /*
256  * eglMakeCurrent wrapper. id = 15
257  */
258 void yagl_host_eglMakeCurrent(yagl_host_handle dpy, yagl_host_handle draw, yagl_host_handle read, yagl_host_handle ctx)
259 {
260     struct yagl_transport *t = yagl_get_transport();
261
262     yagl_transport_begin(t, yagl_api_id_egl, 15, 4 * 8, 4 * 8);
263     yagl_transport_put_out_yagl_host_handle(t, dpy);
264     yagl_transport_put_out_yagl_host_handle(t, draw);
265     yagl_transport_put_out_yagl_host_handle(t, read);
266     yagl_transport_put_out_yagl_host_handle(t, ctx);
267     yagl_transport_end(t);
268     yagl_transport_flush(t, NULL);
269 }
270
271 /*
272  * eglQueryContext wrapper. id = 16
273  */
274 EGLBoolean yagl_host_eglQueryContext(yagl_host_handle dpy, yagl_host_handle ctx, EGLint attribute, EGLint *value, EGLint *error)
275 {
276     struct yagl_transport *t = yagl_get_transport();
277     EGLBoolean retval = 0;
278
279     yagl_transport_begin(t, yagl_api_id_egl, 16, 9 * 8, 9 * 8);
280     yagl_transport_put_out_yagl_host_handle(t, dpy);
281     yagl_transport_put_out_yagl_host_handle(t, ctx);
282     yagl_transport_put_out_EGLint(t, attribute);
283     yagl_transport_put_in_EGLint(t, value);
284     yagl_transport_put_in_EGLint(t, error);
285     yagl_transport_put_in_EGLBoolean(t, &retval);
286     yagl_transport_end(t);
287
288     return retval;
289 }
290
291 /*
292  * eglSwapBuffers wrapper. id = 17
293  */
294 void yagl_host_eglSwapBuffers(yagl_host_handle dpy, yagl_host_handle surface)
295 {
296     struct yagl_transport *t = yagl_get_transport();
297
298     yagl_transport_begin(t, yagl_api_id_egl, 17, 2 * 8, 2 * 8);
299     yagl_transport_put_out_yagl_host_handle(t, dpy);
300     yagl_transport_put_out_yagl_host_handle(t, surface);
301     yagl_transport_end(t);
302     yagl_transport_flush(t, NULL);
303 }
304
305 /*
306  * eglCopyBuffers wrapper. id = 18
307  */
308 void yagl_host_eglCopyBuffers(yagl_host_handle dpy, yagl_host_handle surface)
309 {
310     struct yagl_transport *t = yagl_get_transport();
311
312     yagl_transport_begin(t, yagl_api_id_egl, 18, 2 * 8, 2 * 8);
313     yagl_transport_put_out_yagl_host_handle(t, dpy);
314     yagl_transport_put_out_yagl_host_handle(t, surface);
315     yagl_transport_end(t);
316     yagl_transport_flush(t, NULL);
317 }
318
319 /*
320  * eglCreateWindowSurfaceOffscreenYAGL wrapper. id = 19
321  */
322 yagl_host_handle yagl_host_eglCreateWindowSurfaceOffscreenYAGL(yagl_host_handle dpy, yagl_host_handle config, uint32_t width, uint32_t height, uint32_t bpp, void *pixels, const EGLint *attrib_list, int32_t attrib_list_count, EGLint *error)
323 {
324     struct yagl_transport *t = yagl_get_transport();
325     yagl_host_handle retval = 0;
326
327     yagl_transport_begin(t, yagl_api_id_egl, 19, 12 * 8, 10 * 8 + yagl_transport_array_size(attrib_list, attrib_list_count, sizeof(EGLint)));
328     yagl_transport_put_out_yagl_host_handle(t, dpy);
329     yagl_transport_put_out_yagl_host_handle(t, config);
330     yagl_transport_put_out_uint32_t(t, width);
331     yagl_transport_put_out_uint32_t(t, height);
332     yagl_transport_put_out_uint32_t(t, bpp);
333     yagl_transport_put_out_va(t, pixels);
334     yagl_transport_put_out_array(t, attrib_list, attrib_list_count, sizeof(EGLint));
335     yagl_transport_put_in_EGLint(t, error);
336     yagl_transport_put_in_yagl_host_handle(t, &retval);
337     yagl_transport_end(t);
338
339     return retval;
340 }
341
342 /*
343  * eglCreatePbufferSurfaceOffscreenYAGL wrapper. id = 20
344  */
345 yagl_host_handle yagl_host_eglCreatePbufferSurfaceOffscreenYAGL(yagl_host_handle dpy, yagl_host_handle config, uint32_t width, uint32_t height, uint32_t bpp, void *pixels, const EGLint *attrib_list, int32_t attrib_list_count, EGLint *error)
346 {
347     struct yagl_transport *t = yagl_get_transport();
348     yagl_host_handle retval = 0;
349
350     yagl_transport_begin(t, yagl_api_id_egl, 20, 12 * 8, 10 * 8 + yagl_transport_array_size(attrib_list, attrib_list_count, sizeof(EGLint)));
351     yagl_transport_put_out_yagl_host_handle(t, dpy);
352     yagl_transport_put_out_yagl_host_handle(t, config);
353     yagl_transport_put_out_uint32_t(t, width);
354     yagl_transport_put_out_uint32_t(t, height);
355     yagl_transport_put_out_uint32_t(t, bpp);
356     yagl_transport_put_out_va(t, pixels);
357     yagl_transport_put_out_array(t, attrib_list, attrib_list_count, sizeof(EGLint));
358     yagl_transport_put_in_EGLint(t, error);
359     yagl_transport_put_in_yagl_host_handle(t, &retval);
360     yagl_transport_end(t);
361
362     return retval;
363 }
364
365 /*
366  * eglCreatePixmapSurfaceOffscreenYAGL wrapper. id = 21
367  */
368 yagl_host_handle yagl_host_eglCreatePixmapSurfaceOffscreenYAGL(yagl_host_handle dpy, yagl_host_handle config, uint32_t width, uint32_t height, uint32_t bpp, void *pixels, const EGLint *attrib_list, int32_t attrib_list_count, EGLint *error)
369 {
370     struct yagl_transport *t = yagl_get_transport();
371     yagl_host_handle retval = 0;
372
373     yagl_transport_begin(t, yagl_api_id_egl, 21, 12 * 8, 10 * 8 + yagl_transport_array_size(attrib_list, attrib_list_count, sizeof(EGLint)));
374     yagl_transport_put_out_yagl_host_handle(t, dpy);
375     yagl_transport_put_out_yagl_host_handle(t, config);
376     yagl_transport_put_out_uint32_t(t, width);
377     yagl_transport_put_out_uint32_t(t, height);
378     yagl_transport_put_out_uint32_t(t, bpp);
379     yagl_transport_put_out_va(t, pixels);
380     yagl_transport_put_out_array(t, attrib_list, attrib_list_count, sizeof(EGLint));
381     yagl_transport_put_in_EGLint(t, error);
382     yagl_transport_put_in_yagl_host_handle(t, &retval);
383     yagl_transport_end(t);
384
385     return retval;
386 }
387
388 /*
389  * eglResizeOffscreenSurfaceYAGL wrapper. id = 22
390  */
391 EGLBoolean yagl_host_eglResizeOffscreenSurfaceYAGL(yagl_host_handle dpy, yagl_host_handle surface, uint32_t width, uint32_t height, uint32_t bpp, void *pixels, EGLint *error)
392 {
393     struct yagl_transport *t = yagl_get_transport();
394     EGLBoolean retval = 0;
395
396     yagl_transport_begin(t, yagl_api_id_egl, 22, 10 * 8, 10 * 8);
397     yagl_transport_put_out_yagl_host_handle(t, dpy);
398     yagl_transport_put_out_yagl_host_handle(t, surface);
399     yagl_transport_put_out_uint32_t(t, width);
400     yagl_transport_put_out_uint32_t(t, height);
401     yagl_transport_put_out_uint32_t(t, bpp);
402     yagl_transport_put_out_va(t, pixels);
403     yagl_transport_put_in_EGLint(t, error);
404     yagl_transport_put_in_EGLBoolean(t, &retval);
405     yagl_transport_end(t);
406
407     return retval;
408 }
409
410 /*
411  * eglCreateWindowSurfaceOnscreenYAGL wrapper. id = 23
412  */
413 yagl_host_handle yagl_host_eglCreateWindowSurfaceOnscreenYAGL(yagl_host_handle dpy, yagl_host_handle config, yagl_winsys_id win, const EGLint *attrib_list, int32_t attrib_list_count, EGLint *error)
414 {
415     struct yagl_transport *t = yagl_get_transport();
416     yagl_host_handle retval = 0;
417
418     yagl_transport_begin(t, yagl_api_id_egl, 23, 9 * 8, 7 * 8 + yagl_transport_array_size(attrib_list, attrib_list_count, sizeof(EGLint)));
419     yagl_transport_put_out_yagl_host_handle(t, dpy);
420     yagl_transport_put_out_yagl_host_handle(t, config);
421     yagl_transport_put_out_yagl_winsys_id(t, win);
422     yagl_transport_put_out_array(t, attrib_list, attrib_list_count, sizeof(EGLint));
423     yagl_transport_put_in_EGLint(t, error);
424     yagl_transport_put_in_yagl_host_handle(t, &retval);
425     yagl_transport_end(t);
426
427     return retval;
428 }
429
430 /*
431  * eglCreatePbufferSurfaceOnscreenYAGL wrapper. id = 24
432  */
433 yagl_host_handle yagl_host_eglCreatePbufferSurfaceOnscreenYAGL(yagl_host_handle dpy, yagl_host_handle config, yagl_winsys_id buffer, const EGLint *attrib_list, int32_t attrib_list_count, EGLint *error)
434 {
435     struct yagl_transport *t = yagl_get_transport();
436     yagl_host_handle retval = 0;
437
438     yagl_transport_begin(t, yagl_api_id_egl, 24, 9 * 8, 7 * 8 + yagl_transport_array_size(attrib_list, attrib_list_count, sizeof(EGLint)));
439     yagl_transport_put_out_yagl_host_handle(t, dpy);
440     yagl_transport_put_out_yagl_host_handle(t, config);
441     yagl_transport_put_out_yagl_winsys_id(t, buffer);
442     yagl_transport_put_out_array(t, attrib_list, attrib_list_count, sizeof(EGLint));
443     yagl_transport_put_in_EGLint(t, error);
444     yagl_transport_put_in_yagl_host_handle(t, &retval);
445     yagl_transport_end(t);
446
447     return retval;
448 }
449
450 /*
451  * eglCreatePixmapSurfaceOnscreenYAGL wrapper. id = 25
452  */
453 yagl_host_handle yagl_host_eglCreatePixmapSurfaceOnscreenYAGL(yagl_host_handle dpy, yagl_host_handle config, yagl_winsys_id pixmap, const EGLint *attrib_list, int32_t attrib_list_count, EGLint *error)
454 {
455     struct yagl_transport *t = yagl_get_transport();
456     yagl_host_handle retval = 0;
457
458     yagl_transport_begin(t, yagl_api_id_egl, 25, 9 * 8, 7 * 8 + yagl_transport_array_size(attrib_list, attrib_list_count, sizeof(EGLint)));
459     yagl_transport_put_out_yagl_host_handle(t, dpy);
460     yagl_transport_put_out_yagl_host_handle(t, config);
461     yagl_transport_put_out_yagl_winsys_id(t, pixmap);
462     yagl_transport_put_out_array(t, attrib_list, attrib_list_count, sizeof(EGLint));
463     yagl_transport_put_in_EGLint(t, error);
464     yagl_transport_put_in_yagl_host_handle(t, &retval);
465     yagl_transport_end(t);
466
467     return retval;
468 }
469
470 /*
471  * eglInvalidateOnscreenSurfaceYAGL wrapper. id = 26
472  */
473 void yagl_host_eglInvalidateOnscreenSurfaceYAGL(yagl_host_handle dpy, yagl_host_handle surface, yagl_winsys_id buffer)
474 {
475     struct yagl_transport *t = yagl_get_transport();
476
477     yagl_transport_begin(t, yagl_api_id_egl, 26, 3 * 8, 3 * 8);
478     yagl_transport_put_out_yagl_host_handle(t, dpy);
479     yagl_transport_put_out_yagl_host_handle(t, surface);
480     yagl_transport_put_out_yagl_winsys_id(t, buffer);
481     yagl_transport_end(t);
482     yagl_transport_flush(t, NULL);
483 }
484
485 /*
486  * eglCreateImageYAGL wrapper. id = 27
487  */
488 EGLBoolean yagl_host_eglCreateImageYAGL(uint32_t texture, yagl_host_handle dpy, yagl_winsys_id buffer, EGLint *error)
489 {
490     struct yagl_transport *t = yagl_get_transport();
491     EGLBoolean retval = 0;
492
493     yagl_transport_begin(t, yagl_api_id_egl, 27, 7 * 8, 7 * 8);
494     yagl_transport_put_out_uint32_t(t, texture);
495     yagl_transport_put_out_yagl_host_handle(t, dpy);
496     yagl_transport_put_out_yagl_winsys_id(t, buffer);
497     yagl_transport_put_in_EGLint(t, error);
498     yagl_transport_put_in_EGLBoolean(t, &retval);
499     yagl_transport_end(t);
500
501     return retval;
502 }