1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file is auto-generated from
6 // ui/gl/generate_bindings.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
11 #ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_GLX_H_
12 #define UI_GFX_GL_GL_BINDINGS_AUTOGEN_GLX_H_
18 typedef void(GL_BINDING_CALL
* glXBindTexImageEXTProc
)(Display
* dpy
,
22 typedef GLXFBConfig
*(GL_BINDING_CALL
* glXChooseFBConfigProc
)(
25 const int* attribList
,
27 typedef XVisualInfo
*(GL_BINDING_CALL
* glXChooseVisualProc
)(Display
* dpy
,
30 typedef void(GL_BINDING_CALL
* glXCopyContextProc
)(Display
* dpy
,
34 typedef void(GL_BINDING_CALL
* glXCopySubBufferMESAProc
)(Display
* dpy
,
40 typedef GLXContext(GL_BINDING_CALL
* glXCreateContextProc
)(Display
* dpy
,
44 typedef GLXContext(GL_BINDING_CALL
* glXCreateContextAttribsARBProc
)(
47 GLXContext share_context
,
49 const int* attrib_list
);
50 typedef GLXPixmap(GL_BINDING_CALL
* glXCreateGLXPixmapProc
)(Display
* dpy
,
53 typedef GLXContext(GL_BINDING_CALL
* glXCreateNewContextProc
)(
59 typedef GLXPbuffer(GL_BINDING_CALL
* glXCreatePbufferProc
)(
62 const int* attribList
);
63 typedef GLXPixmap(GL_BINDING_CALL
* glXCreatePixmapProc
)(Display
* dpy
,
66 const int* attribList
);
67 typedef GLXWindow(GL_BINDING_CALL
* glXCreateWindowProc
)(Display
* dpy
,
70 const int* attribList
);
71 typedef void(GL_BINDING_CALL
* glXDestroyContextProc
)(Display
* dpy
,
73 typedef void(GL_BINDING_CALL
* glXDestroyGLXPixmapProc
)(Display
* dpy
,
75 typedef void(GL_BINDING_CALL
* glXDestroyPbufferProc
)(Display
* dpy
,
77 typedef void(GL_BINDING_CALL
* glXDestroyPixmapProc
)(Display
* dpy
,
79 typedef void(GL_BINDING_CALL
* glXDestroyWindowProc
)(Display
* dpy
,
81 typedef const char*(GL_BINDING_CALL
* glXGetClientStringProc
)(Display
* dpy
,
83 typedef int(GL_BINDING_CALL
* glXGetConfigProc
)(Display
* dpy
,
87 typedef GLXContext(GL_BINDING_CALL
* glXGetCurrentContextProc
)(void);
88 typedef Display
*(GL_BINDING_CALL
* glXGetCurrentDisplayProc
)(void);
89 typedef GLXDrawable(GL_BINDING_CALL
* glXGetCurrentDrawableProc
)(void);
90 typedef GLXDrawable(GL_BINDING_CALL
* glXGetCurrentReadDrawableProc
)(void);
91 typedef int(GL_BINDING_CALL
* glXGetFBConfigAttribProc
)(Display
* dpy
,
95 typedef GLXFBConfig(GL_BINDING_CALL
* glXGetFBConfigFromVisualSGIXProc
)(
97 XVisualInfo
* visualInfo
);
98 typedef GLXFBConfig
*(GL_BINDING_CALL
* glXGetFBConfigsProc
)(Display
* dpy
,
101 typedef bool(GL_BINDING_CALL
* glXGetMscRateOMLProc
)(Display
* dpy
,
102 GLXDrawable drawable
,
105 typedef void(GL_BINDING_CALL
* glXGetSelectedEventProc
)(Display
* dpy
,
106 GLXDrawable drawable
,
107 unsigned long* mask
);
108 typedef bool(GL_BINDING_CALL
* glXGetSyncValuesOMLProc
)(Display
* dpy
,
109 GLXDrawable drawable
,
113 typedef XVisualInfo
*(GL_BINDING_CALL
* glXGetVisualFromFBConfigProc
)(
116 typedef int(GL_BINDING_CALL
* glXIsDirectProc
)(Display
* dpy
, GLXContext ctx
);
117 typedef int(GL_BINDING_CALL
* glXMakeContextCurrentProc
)(Display
* dpy
,
121 typedef int(GL_BINDING_CALL
* glXMakeCurrentProc
)(Display
* dpy
,
122 GLXDrawable drawable
,
124 typedef int(GL_BINDING_CALL
* glXQueryContextProc
)(Display
* dpy
,
128 typedef void(GL_BINDING_CALL
* glXQueryDrawableProc
)(Display
* dpy
,
131 unsigned int* value
);
132 typedef int(GL_BINDING_CALL
* glXQueryExtensionProc
)(Display
* dpy
,
135 typedef const char*(GL_BINDING_CALL
* glXQueryExtensionsStringProc
)(Display
* dpy
,
137 typedef const char*(GL_BINDING_CALL
* glXQueryServerStringProc
)(Display
* dpy
,
140 typedef int(GL_BINDING_CALL
* glXQueryVersionProc
)(Display
* dpy
,
143 typedef void(GL_BINDING_CALL
* glXReleaseTexImageEXTProc
)(Display
* dpy
,
144 GLXDrawable drawable
,
146 typedef void(GL_BINDING_CALL
* glXSelectEventProc
)(Display
* dpy
,
147 GLXDrawable drawable
,
149 typedef void(GL_BINDING_CALL
* glXSwapBuffersProc
)(Display
* dpy
,
150 GLXDrawable drawable
);
151 typedef void(GL_BINDING_CALL
* glXSwapIntervalEXTProc
)(Display
* dpy
,
152 GLXDrawable drawable
,
154 typedef void(GL_BINDING_CALL
* glXSwapIntervalMESAProc
)(unsigned int interval
);
155 typedef void(GL_BINDING_CALL
* glXUseXFontProc
)(Font font
,
159 typedef void(GL_BINDING_CALL
* glXWaitGLProc
)(void);
160 typedef int(GL_BINDING_CALL
* glXWaitVideoSyncSGIProc
)(int divisor
,
162 unsigned int* count
);
163 typedef void(GL_BINDING_CALL
* glXWaitXProc
)(void);
165 struct ExtensionsGLX
{
166 bool b_GLX_ARB_create_context
;
167 bool b_GLX_EXT_swap_control
;
168 bool b_GLX_EXT_texture_from_pixmap
;
169 bool b_GLX_MESA_copy_sub_buffer
;
170 bool b_GLX_MESA_swap_control
;
171 bool b_GLX_OML_sync_control
;
172 bool b_GLX_SGIX_fbconfig
;
173 bool b_GLX_SGI_video_sync
;
177 glXBindTexImageEXTProc glXBindTexImageEXTFn
;
178 glXChooseFBConfigProc glXChooseFBConfigFn
;
179 glXChooseVisualProc glXChooseVisualFn
;
180 glXCopyContextProc glXCopyContextFn
;
181 glXCopySubBufferMESAProc glXCopySubBufferMESAFn
;
182 glXCreateContextProc glXCreateContextFn
;
183 glXCreateContextAttribsARBProc glXCreateContextAttribsARBFn
;
184 glXCreateGLXPixmapProc glXCreateGLXPixmapFn
;
185 glXCreateNewContextProc glXCreateNewContextFn
;
186 glXCreatePbufferProc glXCreatePbufferFn
;
187 glXCreatePixmapProc glXCreatePixmapFn
;
188 glXCreateWindowProc glXCreateWindowFn
;
189 glXDestroyContextProc glXDestroyContextFn
;
190 glXDestroyGLXPixmapProc glXDestroyGLXPixmapFn
;
191 glXDestroyPbufferProc glXDestroyPbufferFn
;
192 glXDestroyPixmapProc glXDestroyPixmapFn
;
193 glXDestroyWindowProc glXDestroyWindowFn
;
194 glXGetClientStringProc glXGetClientStringFn
;
195 glXGetConfigProc glXGetConfigFn
;
196 glXGetCurrentContextProc glXGetCurrentContextFn
;
197 glXGetCurrentDisplayProc glXGetCurrentDisplayFn
;
198 glXGetCurrentDrawableProc glXGetCurrentDrawableFn
;
199 glXGetCurrentReadDrawableProc glXGetCurrentReadDrawableFn
;
200 glXGetFBConfigAttribProc glXGetFBConfigAttribFn
;
201 glXGetFBConfigFromVisualSGIXProc glXGetFBConfigFromVisualSGIXFn
;
202 glXGetFBConfigsProc glXGetFBConfigsFn
;
203 glXGetMscRateOMLProc glXGetMscRateOMLFn
;
204 glXGetSelectedEventProc glXGetSelectedEventFn
;
205 glXGetSyncValuesOMLProc glXGetSyncValuesOMLFn
;
206 glXGetVisualFromFBConfigProc glXGetVisualFromFBConfigFn
;
207 glXIsDirectProc glXIsDirectFn
;
208 glXMakeContextCurrentProc glXMakeContextCurrentFn
;
209 glXMakeCurrentProc glXMakeCurrentFn
;
210 glXQueryContextProc glXQueryContextFn
;
211 glXQueryDrawableProc glXQueryDrawableFn
;
212 glXQueryExtensionProc glXQueryExtensionFn
;
213 glXQueryExtensionsStringProc glXQueryExtensionsStringFn
;
214 glXQueryServerStringProc glXQueryServerStringFn
;
215 glXQueryVersionProc glXQueryVersionFn
;
216 glXReleaseTexImageEXTProc glXReleaseTexImageEXTFn
;
217 glXSelectEventProc glXSelectEventFn
;
218 glXSwapBuffersProc glXSwapBuffersFn
;
219 glXSwapIntervalEXTProc glXSwapIntervalEXTFn
;
220 glXSwapIntervalMESAProc glXSwapIntervalMESAFn
;
221 glXUseXFontProc glXUseXFontFn
;
222 glXWaitGLProc glXWaitGLFn
;
223 glXWaitVideoSyncSGIProc glXWaitVideoSyncSGIFn
;
224 glXWaitXProc glXWaitXFn
;
227 class GL_EXPORT GLXApi
{
232 virtual void glXBindTexImageEXTFn(Display
* dpy
,
233 GLXDrawable drawable
,
235 int* attribList
) = 0;
236 virtual GLXFBConfig
* glXChooseFBConfigFn(Display
* dpy
,
238 const int* attribList
,
240 virtual XVisualInfo
* glXChooseVisualFn(Display
* dpy
,
242 int* attribList
) = 0;
243 virtual void glXCopyContextFn(Display
* dpy
,
246 unsigned long mask
) = 0;
247 virtual void glXCopySubBufferMESAFn(Display
* dpy
,
248 GLXDrawable drawable
,
253 virtual GLXContext
glXCreateContextFn(Display
* dpy
,
255 GLXContext shareList
,
257 virtual GLXContext
glXCreateContextAttribsARBFn(Display
* dpy
,
259 GLXContext share_context
,
261 const int* attrib_list
) = 0;
262 virtual GLXPixmap
glXCreateGLXPixmapFn(Display
* dpy
,
265 virtual GLXContext
glXCreateNewContextFn(Display
* dpy
,
268 GLXContext shareList
,
270 virtual GLXPbuffer
glXCreatePbufferFn(Display
* dpy
,
272 const int* attribList
) = 0;
273 virtual GLXPixmap
glXCreatePixmapFn(Display
* dpy
,
276 const int* attribList
) = 0;
277 virtual GLXWindow
glXCreateWindowFn(Display
* dpy
,
280 const int* attribList
) = 0;
281 virtual void glXDestroyContextFn(Display
* dpy
, GLXContext ctx
) = 0;
282 virtual void glXDestroyGLXPixmapFn(Display
* dpy
, GLXPixmap pixmap
) = 0;
283 virtual void glXDestroyPbufferFn(Display
* dpy
, GLXPbuffer pbuf
) = 0;
284 virtual void glXDestroyPixmapFn(Display
* dpy
, GLXPixmap pixmap
) = 0;
285 virtual void glXDestroyWindowFn(Display
* dpy
, GLXWindow window
) = 0;
286 virtual const char* glXGetClientStringFn(Display
* dpy
, int name
) = 0;
287 virtual int glXGetConfigFn(Display
* dpy
,
291 virtual GLXContext
glXGetCurrentContextFn(void) = 0;
292 virtual Display
* glXGetCurrentDisplayFn(void) = 0;
293 virtual GLXDrawable
glXGetCurrentDrawableFn(void) = 0;
294 virtual GLXDrawable
glXGetCurrentReadDrawableFn(void) = 0;
295 virtual int glXGetFBConfigAttribFn(Display
* dpy
,
299 virtual GLXFBConfig
glXGetFBConfigFromVisualSGIXFn(
301 XVisualInfo
* visualInfo
) = 0;
302 virtual GLXFBConfig
* glXGetFBConfigsFn(Display
* dpy
,
305 virtual bool glXGetMscRateOMLFn(Display
* dpy
,
306 GLXDrawable drawable
,
308 int32
* denominator
) = 0;
309 virtual void glXGetSelectedEventFn(Display
* dpy
,
310 GLXDrawable drawable
,
311 unsigned long* mask
) = 0;
312 virtual bool glXGetSyncValuesOMLFn(Display
* dpy
,
313 GLXDrawable drawable
,
317 virtual XVisualInfo
* glXGetVisualFromFBConfigFn(Display
* dpy
,
318 GLXFBConfig config
) = 0;
319 virtual int glXIsDirectFn(Display
* dpy
, GLXContext ctx
) = 0;
320 virtual int glXMakeContextCurrentFn(Display
* dpy
,
324 virtual int glXMakeCurrentFn(Display
* dpy
,
325 GLXDrawable drawable
,
327 virtual int glXQueryContextFn(Display
* dpy
,
331 virtual void glXQueryDrawableFn(Display
* dpy
,
334 unsigned int* value
) = 0;
335 virtual int glXQueryExtensionFn(Display
* dpy
, int* errorb
, int* event
) = 0;
336 virtual const char* glXQueryExtensionsStringFn(Display
* dpy
, int screen
) = 0;
337 virtual const char* glXQueryServerStringFn(Display
* dpy
,
340 virtual int glXQueryVersionFn(Display
* dpy
, int* maj
, int* min
) = 0;
341 virtual void glXReleaseTexImageEXTFn(Display
* dpy
,
342 GLXDrawable drawable
,
344 virtual void glXSelectEventFn(Display
* dpy
,
345 GLXDrawable drawable
,
346 unsigned long mask
) = 0;
347 virtual void glXSwapBuffersFn(Display
* dpy
, GLXDrawable drawable
) = 0;
348 virtual void glXSwapIntervalEXTFn(Display
* dpy
,
349 GLXDrawable drawable
,
351 virtual void glXSwapIntervalMESAFn(unsigned int interval
) = 0;
352 virtual void glXUseXFontFn(Font font
, int first
, int count
, int list
) = 0;
353 virtual void glXWaitGLFn(void) = 0;
354 virtual int glXWaitVideoSyncSGIFn(int divisor
,
356 unsigned int* count
) = 0;
357 virtual void glXWaitXFn(void) = 0;
362 #define glXBindTexImageEXT ::gfx::g_current_glx_context->glXBindTexImageEXTFn
363 #define glXChooseFBConfig ::gfx::g_current_glx_context->glXChooseFBConfigFn
364 #define glXChooseVisual ::gfx::g_current_glx_context->glXChooseVisualFn
365 #define glXCopyContext ::gfx::g_current_glx_context->glXCopyContextFn
366 #define glXCopySubBufferMESA \
367 ::gfx::g_current_glx_context->glXCopySubBufferMESAFn
368 #define glXCreateContext ::gfx::g_current_glx_context->glXCreateContextFn
369 #define glXCreateContextAttribsARB \
370 ::gfx::g_current_glx_context->glXCreateContextAttribsARBFn
371 #define glXCreateGLXPixmap ::gfx::g_current_glx_context->glXCreateGLXPixmapFn
372 #define glXCreateNewContext ::gfx::g_current_glx_context->glXCreateNewContextFn
373 #define glXCreatePbuffer ::gfx::g_current_glx_context->glXCreatePbufferFn
374 #define glXCreatePixmap ::gfx::g_current_glx_context->glXCreatePixmapFn
375 #define glXCreateWindow ::gfx::g_current_glx_context->glXCreateWindowFn
376 #define glXDestroyContext ::gfx::g_current_glx_context->glXDestroyContextFn
377 #define glXDestroyGLXPixmap ::gfx::g_current_glx_context->glXDestroyGLXPixmapFn
378 #define glXDestroyPbuffer ::gfx::g_current_glx_context->glXDestroyPbufferFn
379 #define glXDestroyPixmap ::gfx::g_current_glx_context->glXDestroyPixmapFn
380 #define glXDestroyWindow ::gfx::g_current_glx_context->glXDestroyWindowFn
381 #define glXGetClientString ::gfx::g_current_glx_context->glXGetClientStringFn
382 #define glXGetConfig ::gfx::g_current_glx_context->glXGetConfigFn
383 #define glXGetCurrentContext \
384 ::gfx::g_current_glx_context->glXGetCurrentContextFn
385 #define glXGetCurrentDisplay \
386 ::gfx::g_current_glx_context->glXGetCurrentDisplayFn
387 #define glXGetCurrentDrawable \
388 ::gfx::g_current_glx_context->glXGetCurrentDrawableFn
389 #define glXGetCurrentReadDrawable \
390 ::gfx::g_current_glx_context->glXGetCurrentReadDrawableFn
391 #define glXGetFBConfigAttrib \
392 ::gfx::g_current_glx_context->glXGetFBConfigAttribFn
393 #define glXGetFBConfigFromVisualSGIX \
394 ::gfx::g_current_glx_context->glXGetFBConfigFromVisualSGIXFn
395 #define glXGetFBConfigs ::gfx::g_current_glx_context->glXGetFBConfigsFn
396 #define glXGetMscRateOML ::gfx::g_current_glx_context->glXGetMscRateOMLFn
397 #define glXGetSelectedEvent ::gfx::g_current_glx_context->glXGetSelectedEventFn
398 #define glXGetSyncValuesOML ::gfx::g_current_glx_context->glXGetSyncValuesOMLFn
399 #define glXGetVisualFromFBConfig \
400 ::gfx::g_current_glx_context->glXGetVisualFromFBConfigFn
401 #define glXIsDirect ::gfx::g_current_glx_context->glXIsDirectFn
402 #define glXMakeContextCurrent \
403 ::gfx::g_current_glx_context->glXMakeContextCurrentFn
404 #define glXMakeCurrent ::gfx::g_current_glx_context->glXMakeCurrentFn
405 #define glXQueryContext ::gfx::g_current_glx_context->glXQueryContextFn
406 #define glXQueryDrawable ::gfx::g_current_glx_context->glXQueryDrawableFn
407 #define glXQueryExtension ::gfx::g_current_glx_context->glXQueryExtensionFn
408 #define glXQueryExtensionsString \
409 ::gfx::g_current_glx_context->glXQueryExtensionsStringFn
410 #define glXQueryServerString \
411 ::gfx::g_current_glx_context->glXQueryServerStringFn
412 #define glXQueryVersion ::gfx::g_current_glx_context->glXQueryVersionFn
413 #define glXReleaseTexImageEXT \
414 ::gfx::g_current_glx_context->glXReleaseTexImageEXTFn
415 #define glXSelectEvent ::gfx::g_current_glx_context->glXSelectEventFn
416 #define glXSwapBuffers ::gfx::g_current_glx_context->glXSwapBuffersFn
417 #define glXSwapIntervalEXT ::gfx::g_current_glx_context->glXSwapIntervalEXTFn
418 #define glXSwapIntervalMESA ::gfx::g_current_glx_context->glXSwapIntervalMESAFn
419 #define glXUseXFont ::gfx::g_current_glx_context->glXUseXFontFn
420 #define glXWaitGL ::gfx::g_current_glx_context->glXWaitGLFn
421 #define glXWaitVideoSyncSGI ::gfx::g_current_glx_context->glXWaitVideoSyncSGIFn
422 #define glXWaitX ::gfx::g_current_glx_context->glXWaitXFn
424 #endif // UI_GFX_GL_GL_BINDINGS_AUTOGEN_GLX_H_