RGFW
A multi-platform single-header very simple-to-use framework library for creating GUI Libraries or simple GUI programs.
Loading...
Searching...
No Matches
XDL.h
Go to the documentation of this file.
1/*
2 <Colleague Riley>
3
4 This is free and unencumbered software released into the public domain.
5 Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
6 software, either in source code form or as a compiled binary, for any purpose,
7 commercial or non-commercial, and by any means.
8 In jurisdictions that recognize copyright laws, the author or authors of this
9 software dedicate any and all copyright interest in the software to the public
10 domain. We make this dedication for the benefit of the public at large and to
11 the detriment of our heirs and successors. We intend this dedication to be an
12 overt act of relinquishment in perpetuity of all present and future rights to
13 this software under copyright law.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
18 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
19 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21 Credit is not required but would be greatly appreciated. :)
22*/
23
24/*
25 #define XDL_IMPLEMENTATION - (semi-option) makes it so function definitions are included
26 #define XDL_NO_GLX - (optional) Makes it so the GLX module is not included
27 #define XDL_NO_DEALLOCATE - (optional) Disables automatic deallocation for c++, returns back to C's void** system
28*/
29
30/*
31Credits :
32 GLFW - Much of this implementation is based on GLFW's internal x11 dynamic loader
33 A great portion of the declarations for the X11 module are sourced from GLFW
34
35 stb - This project is heavily inspired by the stb single header files
36*/
37
38#include <X11/Xlib.h>
39#include <X11/Xutil.h>
40#include <X11/XKBlib.h>
41#include <X11/Xresource.h>
42
43
44#if defined(XDL_EXPORT) || defined(XDL_IMPORT)
45 #if defined(_WIN32)
46 #if defined(__TINYC__) && (defined(XDL_EXPORT) || defined(XDL_IMPORT))
47 #define __declspec(x) __attribute__((x))
48 #endif
49
50 #if defined(XDL_EXPORT)
51 #define XDLDEF __declspec(dllexport)
52 #else
53 #define XDLDEF __declspec(dllimport)
54 #endif
55 #else
56 #if defined(XDL_EXPORT)
57 #define XDLDEF __attribute__((visibility("default")))
58 #endif
59 #endif
60#endif
61
62#ifndef XDLDEF
63 #define XDLDEF inline
64#endif
65
66XDLDEF void XDL_init(void); /* inits the X11 (and GLX) modules */
67XDLDEF void XDL_close(void); /* closes and frees the X11 (and GLX modules) */
68
69/* function types */
70typedef XClassHint* (* PFN_XAllocClassHint)(void);
71typedef XSizeHints* (* PFN_XAllocSizeHints)(void);
72typedef XWMHints* (* PFN_XAllocWMHints)(void);
73typedef int (* PFN_XChangeProperty)(Display*,Window,Atom,Atom,int,int,const unsigned char*,int);
74typedef int (* PFN_XChangeWindowAttributes)(Display*,Window,unsigned long,XSetWindowAttributes*);
75typedef Bool (* PFN_XCheckIfEvent)(Display*,XEvent*,Bool(*)(Display*,XEvent*,XPointer),XPointer);
76typedef Bool (* PFN_XCheckTypedWindowEvent)(Display*,Window,int,XEvent*);
77typedef int (* PFN_XCloseDisplay)(Display*);
78typedef Status (* PFN_XCloseIM)(XIM);
79typedef int (* PFN_XConvertSelection)(Display*,Atom,Atom,Atom,Window,Time);
80typedef Colormap (* PFN_XCreateColormap)(Display*,Window,Visual*,int);
81typedef Cursor (* PFN_XCreateFontCursor)(Display*,unsigned int);
82typedef XIC (* PFN_XCreateIC)(XIM,...);
83typedef Region (* PFN_XCreateRegion)(void);
84typedef Window (* PFN_XCreateWindow)(Display*,Window,int,int,unsigned int,unsigned int,unsigned int,int,unsigned int,Visual*,unsigned long,XSetWindowAttributes*);
85typedef int (* PFN_XDefineCursor)(Display*,Window,Cursor);
86typedef int (* PFN_XDeleteContext)(Display*,XID,XContext);
87typedef int (* PFN_XDeleteProperty)(Display*,Window,Atom);
88typedef void (* PFN_XDestroyIC)(XIC);
89typedef int (* PFN_XDestroyRegion)(Region);
90typedef int (* PFN_XDestroyWindow)(Display*,Window);
91typedef int (* PFN_XDisplayKeycodes)(Display*,int*,int*);
92typedef int (* PFN_XEventsQueued)(Display*,int);
93typedef Bool (* PFN_XFilterEvent)(XEvent*,Window);
94typedef int (* PFN_XFindContext)(Display*,XID,XContext,XPointer*);
95typedef int (* PFN_XFlush)(Display*);
96typedef int (* PFN_XFree)(void*);
97typedef int (* PFN_XFreeColormap)(Display*,Colormap);
98typedef int (* PFN_XFreeCursor)(Display*,Cursor);
99typedef void (* PFN_XFreeEventData)(Display*,XGenericEventCookie*);
100typedef int (* PFN_XGetErrorText)(Display*,int,char*,int);
101typedef Bool (* PFN_XGetEventData)(Display*,XGenericEventCookie*);
102typedef char* (* PFN_XGetICValues)(XIC,...);
103typedef char* (* PFN_XGetIMValues)(XIM,...);
104typedef int (* PFN_XGetInputFocus)(Display*,Window*,int*);
105typedef KeySym* (* PFN_XGetKeyboardMapping)(Display*,KeyCode,int,int*);
106typedef int (* PFN_XGetScreenSaver)(Display*,int*,int*,int*,int*);
107typedef Window (* PFN_XGetSelectionOwner)(Display*,Atom);
108typedef XVisualInfo* (* PFN_XGetVisualInfo)(Display*,long,XVisualInfo*,int*);
109typedef Status (* PFN_XGetWMNormalHints)(Display*,Window,XSizeHints*,long*);
110typedef Status (* PFN_XGetWindowAttributes)(Display*,Window,XWindowAttributes*);
111typedef int (* PFN_XGetWindowProperty)(Display*,Window,Atom,long,long,Bool,Atom,Atom*,int*,unsigned long*,unsigned long*,unsigned char**);
112typedef int (* PFN_XGrabPointer)(Display*,Window,Bool,unsigned int,int,int,Window,Cursor,Time);
113typedef Status (* PFN_XIconifyWindow)(Display*,Window,int);
114typedef Status (* PFN_XInitThreads)(void);
115typedef Atom (* PFN_XInternAtom)(Display*,const char*,Bool);
116typedef int (* PFN_XLookupString)(XKeyEvent*,char*,int,KeySym*,XComposeStatus*);
117typedef int (* PFN_XMapRaised)(Display*,Window);
118typedef int (* PFN_XMapWindow)(Display*,Window);
119typedef int (* PFN_XMoveResizeWindow)(Display*,Window,int,int,unsigned int,unsigned int);
120typedef int (* PFN_XMoveWindow)(Display*,Window,int,int);
121typedef int (* PFN_XNextEvent)(Display*,XEvent*);
122typedef Display* (* PFN_XOpenDisplay)(const char*);
123typedef int (* PFN_XPeekEvent)(Display*,XEvent*);
124typedef int (* PFN_XPending)(Display*);
125typedef Bool (* PFN_XQueryExtension)(Display*,const char*,int*,int*,int*);
126typedef Bool (* PFN_XQueryPointer)(Display*,Window,Window*,Window*,int*,int*,int*,int*,unsigned int*);
127typedef int (* PFN_XRaiseWindow)(Display*,Window);
128typedef Bool (* PFN_XRegisterIMInstantiateCallback)(Display*,void*,char*,char*,XIDProc,XPointer);
129typedef int (* PFN_XResizeWindow)(Display*,Window,unsigned int,unsigned int);
130typedef char* (* PFN_XResourceManagerString)(Display*);
131typedef int (* PFN_XSaveContext)(Display*,XID,XContext,const char*);
132typedef int (* PFN_XSelectInput)(Display*,Window,long);
133typedef Status (* PFN_XSendEvent)(Display*,Window,Bool,long,XEvent*);
134typedef int (* PFN_XSetClassHint)(Display*,Window,XClassHint*);
135typedef XErrorHandler (* PFN_XSetErrorHandler)(XErrorHandler);
136typedef void (* PFN_XSetICFocus)(XIC);
137typedef char* (* PFN_XSetIMValues)(XIM,...);
138typedef int (* PFN_XSetInputFocus)(Display*,Window,int,Time);
139typedef char* (* PFN_XSetLocaleModifiers)(const char*);
140typedef int (* PFN_XSetScreenSaver)(Display*,int,int,int,int);
141typedef int (* PFN_XSetSelectionOwner)(Display*,Atom,Window,Time);
142typedef int (* PFN_XSetWMHints)(Display*,Window,XWMHints*);
143typedef void (* PFN_XSetWMNormalHints)(Display*,Window,XSizeHints*);
144typedef Status (* PFN_XSetWMProtocols)(Display*,Window,Atom*,int);
145typedef Bool (* PFN_XSupportsLocale)(void);
146typedef int (* PFN_XSync)(Display*,Bool);
147typedef Bool (* PFN_XTranslateCoordinates)(Display*,Window,Window,int,int,int*,int*,Window*);
148typedef int (* PFN_XUndefineCursor)(Display*,Window);
149typedef int (* PFN_XUngrabPointer)(Display*,Time);
150typedef int (* PFN_XUnmapWindow)(Display*,Window);
151typedef void (* PFN_XUnsetICFocus)(XIC);
152typedef VisualID (* PFN_XVisualIDFromVisual)(Visual*);
153typedef int (* PFN_XWarpPointer)(Display*,Window,Window,int,int,unsigned int,unsigned int,int,int);
154typedef void (* PFN_XkbFreeKeyboard)(XkbDescPtr,unsigned int,Bool);
155typedef void (* PFN_XkbFreeNames)(XkbDescPtr,unsigned int,Bool);
156typedef XkbDescPtr (* PFN_XkbGetMap)(Display*,unsigned int,unsigned int);
157typedef XkbDescPtr (* PFN_XkbGetKeyboardByName)(Display*,unsigned int,XkbComponentNamesPtr,unsigned int,unsigned int,Bool);
158typedef Status (* PFN_XkbGetNames)(Display*,unsigned int,XkbDescPtr);
159typedef Status (* PFN_XkbGetState)(Display*,unsigned int,XkbStatePtr);
160typedef KeySym (* PFN_XkbKeycodeToKeysym)(Display*,KeyCode,int,int);
161typedef Bool (* PFN_XkbQueryExtension)(Display*,int*,int*,int*,int*,int*);
162typedef Bool (* PFN_XkbSelectEventDetails)(Display*,unsigned int,unsigned int,unsigned long,unsigned long);
163typedef Bool (* PFN_XkbSetDetectableAutoRepeat)(Display*,Bool,Bool*);
164typedef KeySym (*PFN_XStringToKeysym)(char*);
165typedef int (*PFN_XConnectionNumber)(Display*);
166typedef int (*PFN_XStoreName)(Display*, Window, const char*);
167typedef Status (*PFN_XMatchVisualInfo)(Display*, int, int, int, XVisualInfo*);
168typedef void (*PFN_XSetWMSizeHints)(Display*, Window, XSizeHints*, Atom);
169typedef char* (*PFN_XKeysymToString)(KeySym);
170typedef int (*PFN_XGetKeyboardControl)(Display*, XKeyboardState*);
171typedef char* (*PFN_XGetAtomName)(Display*, Atom);
172typedef Window (*PFN_XDefaultRootWindow)(Display*);
173typedef int (*PFN_XDefaultScreen)(Display*);
174typedef int (*PFN_XQueryKeymap)(Display*, char[32]);
175typedef KeyCode (*PFN_XKeysymToKeycode)(Display*, KeySym);
176typedef void (*PFN_XFreeColors)(Display *display, Colormap colormap, unsigned long *pixels, int npixels, unsigned long planes);
177typedef int (*PFN_XDisplayWidth)(Display *display, int screen_number);
178typedef int (*PFN_XDisplayHeight)(Display *display, int screen_number);
179typedef int (*PFN_XGetSystemContentDPI)(Display* display);
180typedef XrmDatabase (*PFN_XrmGetStringDatabase)(const char *data);
181typedef Bool (*PFN_XrmGetResource)(XrmDatabase database, const char *resource_name, const char *resource_class, char **type, XrmValue *value);
182typedef void (*PFN_XrmDestroyDatabase)(XrmDatabase database);
183typedef char *(*PFN_XDisplayName)(const char *string);
184typedef int (*PFN_XWidthOfScreen)(Screen* screen);
185typedef int (*PFN_XHeightOfScreen)(Screen* screen);
186typedef GC (*PFN_XCreateGC)(Display* display, Drawable d, unsigned long valuemask, XGCValues* values);
187typedef int (*PFN_XFreeGC)(Display *display, GC gc);
188typedef XImage* (*PFN_XCreateImage)(Display*, Visual*, unsigned int, int, int, char*, unsigned int, unsigned int, int, int);
189typedef Pixmap (*PFN_XCreatePixmap)(Display* display, Drawable d, unsigned int width, unsigned int height, unsigned int depth);
190typedef int (*PFN_XPutImage)(Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height);
191
192#ifndef XDL_NO_XRANDR
193#include <X11/extensions/Xrandr.h>
194typedef XRRScreenResources *(*PFN_XRRGetScreenResourcesCurrent)(Display *display, Window window);
195typedef XRRCrtcInfo *(*PFN_XRRGetCrtcInfo)(Display *display, XRRScreenResources *resources, RRCrtc crtc);
196typedef XRROutputInfo *(*PFN_XRRGetOutputInfo)(Display *display, XRRScreenResources *resources, RROutput output);
197typedef void (*PFN_XRRFreeCrtcInfo)(XRRCrtcInfo *crtc_info);
198typedef XRRScreenResources *(*PFN_XRRGetScreenResources)(Display *display, Window window);
199typedef void (*PFN_XRRFreeScreenResources)(XRRScreenResources *resources);
200typedef void (*PFN_XRRFreeOutputInfo)(XRROutputInfo*);
201typedef Status (*PFN_XRRSetScreenConfig) (Display *dpy, XRRScreenConfiguration *config, Drawable draw, int size_index, Rotation rotation, Time timestamp);
202typedef Status (*PFN_XRRSetCrtcConfig)(Display*, XRRScreenResources*, RRCrtc, Time, int, int, RRMode, Rotation, RROutput*, int);
203#endif
204
205#ifndef XDL_NO_GLX
206
207#include <GL/glx.h>
208typedef XVisualInfo* (*PFN_glXChooseVisual)(Display*, int, int*);
209typedef GLXContext (*PFN_glXCreateContext)(Display*, XVisualInfo*, GLXContext, Bool);
210typedef Bool (*PFN_glXMakeCurrent)(Display*, GLXDrawable, GLXContext);
211typedef GLXContext (*PFN_glXGetCurrentContext)(void);
212typedef void (*PFN_glXSwapBuffers)(Display*, GLXDrawable);
213typedef PFNGLXSWAPINTERVALEXTPROC PFN_glXSwapIntervalEXT;
214typedef void* (*PFN_glXGetProcAddress)(const GLubyte *procname);
215typedef PFNGLXGETVISUALFROMFBCONFIGPROC PFN_glXGetVisualFromFBConfig;
216typedef PFNGLXGETFBCONFIGATTRIBPROC PFN_glXGetFBConfigAttrib;
217typedef __GLXextFuncPtr (*PFN_glXGetProcAddressARB)(const GLubyte *);
218typedef PFNGLXCHOOSEFBCONFIGPROC PFN_glXChooseFBConfig;
219typedef void (*PFN_glXDestroyContext)(Display *dpy, GLXContext ctx);
220typedef const char* (*PFN_glXQueryExtensionsString)(Display* dpy, int screen);
221#endif
222
223/* Src vars for reciving the functions */
340#ifndef XDL_NO_XRANDR
350#endif
351
352#ifndef XDL_NO_GLX
366#endif
367
368/* Function to source defines */
369#define XAllocClassHint XAllocClassHintSrc
370#define XAllocSizeHints XAllocSizeHintsSrc
371#define XAllocWMHints XAllocWMHintsSrc
372#define XChangeProperty XChangePropertySrc
373#define XChangeWindowAttributes XChangeWindowAttributesSrc
374#define XCheckIfEvent XCheckIfEventSrc
375#define XCheckTypedWindowEvent XCheckTypedWindowEventSrc
376#define XCloseDisplay XCloseDisplaySrc
377#define XCloseIM XCloseIMSrc
378#define XConvertSelection XConvertSelectionSrc
379#define XCreateColormap XCreateColormapSrc
380#define XCreateFontCursor XCreateFontCursorSrc
381#define XCreateIC XCreateICSrc
382#define XCreateRegion XCreateRegionSrc
383#define XCreateWindow XCreateWindowSrc
384#define XDefineCursor XDefineCursorSrc
385#define XDeleteContext XDeleteContextSrc
386#define XDeleteProperty XDeletePropertySrc
387#define XDestroyIC XDestroyICSrc
388#define XDestroyRegion XDestroyRegionSrc
389#define XDestroyWindow XDestroyWindowSrc
390#define XDisplayKeycodes XDisplayKeycodesSrc
391#define XkbGetState XkbGetStateSrc
392#define XWidthOfScreen XWidthOfScreenSrc
393#define XHeightOfScreen XHeightOfScreenSrc
394#define XCreateGC XCreateGCSrc
395#define XFreeGC XFreeGCSrc
396#define XCreateImage XCreateImageSrc
397#define XEventsQueued XEventsQueuedSrc
398#define XFilterEvent XFilterEventSrc
399#define XFindContext XFindContextSrc
400#define XFlush XFlushSrc
401#define XFree XFreeSrc
402#define XFreeColormap XFreeColormapSrc
403#define XFreeCursor XFreeCursorSrc
404#define XFreeEventData XFreeEventDataSrc
405#define XGetErrorText XGetErrorTextSrc
406#define XGetEventData XGetEventDataSrc
407#define XGetICValues XGetICValuesSrc
408#define XGetIMValues XGetIMValuesSrc
409#define XGetInputFocus XGetInputFocusSrc
410#define XGetKeyboardMapping XGetKeyboardMappingSrc
411#define XGetScreenSaver XGetScreenSaverSrc
412#define XGetSelectionOwner XGetSelectionOwnerSrc
413#define XGetVisualInfo XGetVisualInfoSrc
414#define XGetWMNormalHints XGetWMNormalHintsSrc
415#define XGetWindowAttributes XGetWindowAttributesSrc
416#define XGetWindowProperty XGetWindowPropertySrc
417#define XGrabPointer XGrabPointerSrc
418#define XIconifyWindow XIconifyWindowSrc
419#define XInternAtom XInternAtomSrc
420#define XLookupString XLookupStringSrc
421#define XMapRaised XMapRaisedSrc
422#define XMapWindow XMapWindowSrc
423#define XMoveResizeWindow XMoveResizeWindowSrc
424#define XMoveWindow XMoveWindowSrc
425#define XNextEvent XNextEventSrc
426#define XPeekEvent XPeekEventSrc
427#define XPending XPendingSrc
428#define XQueryExtension XQueryExtensionSrc
429#define XQueryPointer XQueryPointerSrc
430#define XRaiseWindow XRaiseWindowSrc
431#define XRegisterIMInstantiateCallback XRegisterIMInstantiateCallbackSrc
432#define XResizeWindow XResizeWindowSrc
433#define XResourceManagerString XResourceManagerStringSrc
434#define XSaveContext XSaveContextSrc
435#define XSelectInput XSelectInputSrc
436#define XSendEvent XSendEventSrc
437#define XSetClassHint XSetClassHintSrc
438#define XSetErrorHandler XSetErrorHandlerSrc
439#define XSetICFocus XSetICFocusSrc
440#define XSetIMValues XSetIMValuesSrc
441#define XSetInputFocus XSetInputFocusSrc
442#define XSetLocaleModifiers XSetLocaleModifiersSrc
443#define XSetScreenSaver XSetScreenSaverSrc
444#define XSetSelectionOwner XSetSelectionOwnerSrc
445#define XSetWMHints XSetWMHintsSrc
446#define XSetWMNormalHints XSetWMNormalHintsSrc
447#define XSetWMProtocols XSetWMProtocolsSrc
448#define XSupportsLocale XSupportsLocaleSrc
449#define XSync XSyncSrc
450#define XTranslateCoordinates XTranslateCoordinatesSrc
451#define XUndefineCursor XUndefineCursorSrc
452#define XUngrabPointer XUngrabPointerSrc
453#define XUnmapWindow XUnmapWindowSrc
454#define XUnsetICFocus XUnsetICFocusSrc
455#define XVisualIDFromVisual XVisualIDFromVisualSrc
456#define XWarpPointer XWarpPointerSrc
457#define XStoreName XStoreNameSrc
458#define XSetWMSizeHints XSetWMSizeHintsSrc
459#define XOpenDisplay XOpenDisplaySrc
460#define XStringToKeysym XStringToKeysymSrc
461#define XQueryKeymap XQueryKeymapSrc
462#define XKeysymToString XKeysymToStringSrc
463#define XInitThreads XInitThreadsSrc
464#define XkbKeycodeToKeysym XkbKeycodeToKeysymSrc
465#define XkbGetMap XkbGetMapSrc
466#define XkbGetNames XkbGetNamesSrc
467#define XkbGetKeyboardByName XkbGetKeyboardByNameSrc
468#define XkbFreeKeyboard XkbFreeKeyboardSrc
469#define XGetAtomName XGetAtomNameSrc
470#define XDefaultRootWindow XDefaultRootWindowSrc
471#define XDefaultScreen XDefaultScreenSrc
472#define XMatchVisualInfo XMatchVisualInfoSrc
473#define XGetKeyboardControl XGetKeyboardControlSrc
474#define XKeysymToKeycode XKeysymToKeycodeSrc
475#define XConnectionNumber XConnectionNumberSrc
476#define XFreeColors XFreeColorsSrc
477#define XDisplayWidth XDisplayWidthSrc
478#define XDisplayHeight XDisplayHeightSrc
479#define XrmGetStringDatabase XrmGetStringDatabaseSrc
480#define XrmGetResource XrmGetResourceSrc
481#define XrmDestroyDatabase XrmDestroyDatabaseSrc
482#define XDisplayName XDisplayNameSrc
483#define XCreateImage XCreateImageSrc
484#define XCreatePixmap XCreatePixmapSrc
485#define XPutImage XPutImageSrc
486
487#ifndef XDL_NO_XRANDR
488 #define XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrentSrc
489 #define XRRGetCrtcInfo XRRGetCrtcInfoSrc
490 #define XRRGetOutputInfo XRRGetOutputInfoSrc
491 #define XRRFreeCrtcInfo XRRFreeCrtcInfoSrc
492 #define XRRGetScreenResources XRRGetScreenResourcesSrc
493 #define XRRFreeScreenResources XRRFreeScreenResourcesSrc
494 #define XRRFreeOutputInfo XRRFreeOutputInfoSrc
495 #define XRRSetScreenConfig XRRSetScreenConfigSrc
496 #define XRRSetCrtcConfig XRRSetCrtcConfigSrc
497#endif
498
499#ifndef XDL_NO_GLX
500 #define glXChooseVisual glXChooseVisualSrc
501 #define glXCreateContext glXCreateContextSrc
502 #define glXMakeCurrent glXMakeCurrentSrc
503 #define glXGetCurrentContext glXGetCurrentContextSrc
504 #define glXSwapBuffers glXSwapBuffersSrc
505 #define glXGetProcAddress glXGetProcAddressSrc
506 #define glXGetVisualFromFBConfig glXGetVisualFromFBConfigSrc
507 #define glXGetFBConfigAttrib glXGetFBConfigAttribSrc
508 #define glXGetProcAddressARB glXGetProcAddressARBSrc
509 #define glXChooseFBConfig glXChooseFBConfigSrc
510 #define glXDestroyContext glXDestroyContextSrc
511 #define glXSwapIntervalEXT glXSwapIntervalEXTSrc
512 #define glXQueryExtensionsString glXQueryExtensionsStringSrc
513#endif
514
515#ifdef XDL_IMPLEMENTATION
516#include <dlfcn.h>
517
518#define XDL_PROC_DEF(proc, name) name = (PFN_##name)dlsym(XDL_module[proc], #name)
519
520
521void* XDL_module[3] = {NULL, NULL, NULL};
522
523void XDL_init(void) {
524 /* allocating memory for module data */
525 /* loading the modules */
526 #if defined(__CYGWIN__)
527 XDL_module[0] = dlopen("libX11-6.so", RTLD_LAZY | RTLD_LOCAL);
528 #elif defined(__OpenBSD__) || defined(__NetBSD__)
529 XDL_module[0] = dlopen("libX11.so", RTLD_LAZY | RTLD_LOCAL);
530 #else
531 XDL_module[0] = dlopen("libX11.so.6", RTLD_LAZY | RTLD_LOCAL);
532 #endif
533
534#ifndef XDL_NO_GLX
535 const char* glxSonames[] = {
536#if defined(__CYGWIN__)
537 "libGL-1.so",
538#elif defined(__OpenBSD__) || defined(__NetBSD__)
539 "libGL.so",
540#else
541 "libGLX.so.0",
542 "libGL.so.1",
543 "libGL.so",
544#endif
545 };
546
547 for (int i = 0; sizeof(glxSonames) / sizeof(char*); i++) {
548 XDL_module[1] = dlopen(glxSonames[i], RTLD_LAZY | RTLD_LOCAL);
549 if (XDL_module[1])
550 break;
551 }
552#endif
553
554 #if defined(__CYGWIN__)
555 XDL_module[2] = dlopen("libXrandr-2.so", RTLD_LAZY | RTLD_LOCAL);
556 #elif defined(__OpenBSD__) || defined(__NetBSD__)
557 XDL_module[2] = dlopen("libXrandr.so", RTLD_LAZY | RTLD_LOCAL);
558 #else
559 XDL_module[2] = dlopen("libXrandr.so.2", RTLD_LAZY | RTLD_LOCAL);
560 #endif
561
562 /* loading the functions into the source vars */
563 XAllocClassHintSrc = (PFN_XAllocClassHint)dlsym(XDL_module[0], "XAllocClassHint");
564 XAllocSizeHintsSrc = (PFN_XAllocSizeHints)dlsym(XDL_module[0], "XAllocSizeHints");
565 XAllocWMHintsSrc = (PFN_XAllocWMHints)dlsym(XDL_module[0], "XAllocWMHints");
566 XChangePropertySrc = (PFN_XChangeProperty)dlsym(XDL_module[0], "XChangeProperty");
567 XChangeWindowAttributesSrc = (PFN_XChangeWindowAttributes)dlsym(XDL_module[0], "XChangeWindowAttributes");
568 XCheckIfEventSrc = (PFN_XCheckIfEvent)dlsym(XDL_module[0], "XCheckIfEvent");
569 XCheckTypedWindowEventSrc = (PFN_XCheckTypedWindowEvent)dlsym(XDL_module[0], "XCheckTypedWindowEvent");
570 XCloseDisplaySrc = (PFN_XCloseDisplay)dlsym(XDL_module[0], "XCloseDisplay");
571 XCloseIMSrc = (PFN_XCloseIM)dlsym(XDL_module[0], "XCloseIM");
572 XConvertSelectionSrc = (PFN_XConvertSelection)dlsym(XDL_module[0], "XConvertSelection");
573 XCreateColormapSrc = (PFN_XCreateColormap)dlsym(XDL_module[0], "XCreateColormap");
574 XCreateFontCursorSrc = (PFN_XCreateFontCursor)dlsym(XDL_module[0], "XCreateFontCursor");
575 XCreateICSrc = (PFN_XCreateIC)dlsym(XDL_module[0], "XCreateIC");
576 XCreateRegionSrc = (PFN_XCreateRegion)dlsym(XDL_module[0], "XCreateRegion");
577 XCreateWindowSrc = (PFN_XCreateWindow)dlsym(XDL_module[0], "XCreateWindow");
578 XDefineCursorSrc = (PFN_XDefineCursor)dlsym(XDL_module[0], "XDefineCursor");
579 XDeleteContextSrc = (PFN_XDeleteContext)dlsym(XDL_module[0], "XDeleteContext");
580 XDeletePropertySrc = (PFN_XDeleteProperty)dlsym(XDL_module[0], "XDeleteProperty");
581 XDestroyICSrc = (PFN_XDestroyIC)dlsym(XDL_module[0], "XDestroyIC");
582 XDestroyRegionSrc = (PFN_XDestroyRegion)dlsym(XDL_module[0], "XDestroyRegion");
583 XDestroyWindowSrc = (PFN_XDestroyWindow)dlsym(XDL_module[0], "XDestroyWindow");
584 XDisplayKeycodesSrc = (PFN_XDisplayKeycodes)dlsym(XDL_module[0], "XDisplayKeycodes");
585 XEventsQueuedSrc = (PFN_XEventsQueued)dlsym(XDL_module[0], "XEventsQueued");
586 XFilterEventSrc = (PFN_XFilterEvent)dlsym(XDL_module[0], "XFilterEvent");
587 XFindContextSrc = (PFN_XFindContext)dlsym(XDL_module[0], "XFindContext");
588 XFlushSrc = (PFN_XFlush)dlsym(XDL_module[0], "XFlush");
589 XFreeSrc = (PFN_XFree)dlsym(XDL_module[0], "XFree");
590 XFreeColormapSrc = (PFN_XFreeColormap)dlsym(XDL_module[0], "XFreeColormap");
591 XFreeCursorSrc = (PFN_XFreeCursor)dlsym(XDL_module[0], "XFreeCursor");
592 XFreeEventDataSrc = (PFN_XFreeEventData)dlsym(XDL_module[0], "XFreeEventData");
593 XGetErrorTextSrc = (PFN_XGetErrorText)dlsym(XDL_module[0], "XGetErrorText");
594 XGetEventDataSrc = (PFN_XGetEventData)dlsym(XDL_module[0], "XGetEventData");
595 XGetICValuesSrc = (PFN_XGetICValues)dlsym(XDL_module[0], "XGetICValues");
596 XGetIMValuesSrc = (PFN_XGetIMValues)dlsym(XDL_module[0], "XGetIMValues");
597 XGetInputFocusSrc = (PFN_XGetInputFocus)dlsym(XDL_module[0], "XGetInputFocus");
598 XGetKeyboardMappingSrc = (PFN_XGetKeyboardMapping)dlsym(XDL_module[0], "XGetKeyboardMapping");
599 XGetScreenSaverSrc = (PFN_XGetScreenSaver)dlsym(XDL_module[0], "XGetScreenSaver");
600 XGetSelectionOwnerSrc = (PFN_XGetSelectionOwner)dlsym(XDL_module[0], "XGetSelectionOwner");
601 XGetVisualInfoSrc = (PFN_XGetVisualInfo)dlsym(XDL_module[0], "XGetVisualInfo");
602 XGetWMNormalHintsSrc = (PFN_XGetWMNormalHints)dlsym(XDL_module[0], "XGetWMNormalHints");
603 XGetWindowAttributesSrc = (PFN_XGetWindowAttributes)dlsym(XDL_module[0], "XGetWindowAttributes");
604 XGetWindowPropertySrc = (PFN_XGetWindowProperty)dlsym(XDL_module[0], "XGetWindowProperty");
605 XGrabPointerSrc = (PFN_XGrabPointer)dlsym(XDL_module[0], "XGrabPointer");
606 XIconifyWindowSrc = (PFN_XIconifyWindow)dlsym(XDL_module[0], "XIconifyWindow");
607 XInternAtomSrc = (PFN_XInternAtom)dlsym(XDL_module[0], "XInternAtom");
608 XLookupStringSrc = (PFN_XLookupString)dlsym(XDL_module[0], "XLookupString");
609 XMapRaisedSrc = (PFN_XMapRaised)dlsym(XDL_module[0], "XMapRaised");
610 XMapWindowSrc = (PFN_XMapWindow)dlsym(XDL_module[0], "XMapWindow");
611 XMoveResizeWindowSrc = (PFN_XMoveResizeWindow)dlsym(XDL_module[0], "XMoveResizeWindow");
612 XMoveWindowSrc = (PFN_XMoveWindow)dlsym(XDL_module[0], "XMoveWindow");
613 XNextEventSrc = (PFN_XNextEvent)dlsym(XDL_module[0], "XNextEvent");
614 XPeekEventSrc = (PFN_XPeekEvent)dlsym(XDL_module[0], "XPeekEvent");
615 XPendingSrc = (PFN_XPending)dlsym(XDL_module[0], "XPending");
616 XQueryExtensionSrc = (PFN_XQueryExtension)dlsym(XDL_module[0], "XQueryExtension");
617 XQueryPointerSrc = (PFN_XQueryPointer)dlsym(XDL_module[0], "XQueryPointer");
618 XRaiseWindowSrc = (PFN_XRaiseWindow)dlsym(XDL_module[0], "XRaiseWindow");
619 XRegisterIMInstantiateCallbackSrc = (PFN_XRegisterIMInstantiateCallback)dlsym(XDL_module[0], "XRegisterIMInstantiateCallback");
620 XResizeWindowSrc = (PFN_XResizeWindow)dlsym(XDL_module[0], "XResizeWindow");
621 XResourceManagerStringSrc = (PFN_XResourceManagerString)dlsym(XDL_module[0], "XResourceManagerString");
622 XSaveContextSrc = (PFN_XSaveContext)dlsym(XDL_module[0], "XSaveContext");
623 XSelectInputSrc = (PFN_XSelectInput)dlsym(XDL_module[0], "XSelectInput");
624 XSendEventSrc = (PFN_XSendEvent)dlsym(XDL_module[0], "XSendEvent");
625 XSetClassHintSrc = (PFN_XSetClassHint)dlsym(XDL_module[0], "XSetClassHint");
626 XSetErrorHandlerSrc = (PFN_XSetErrorHandler)dlsym(XDL_module[0], "XSetErrorHandler");
627 XSetICFocusSrc = (PFN_XSetICFocus)dlsym(XDL_module[0], "XSetICFocus");
628 XSetIMValuesSrc = (PFN_XSetIMValues)dlsym(XDL_module[0], "XSetIMValues");
629 XSetInputFocusSrc = (PFN_XSetInputFocus)dlsym(XDL_module[0], "XSetInputFocus");
630 XSetLocaleModifiersSrc = (PFN_XSetLocaleModifiers)dlsym(XDL_module[0], "XSetLocaleModifiers");
631 XSetScreenSaverSrc = (PFN_XSetScreenSaver)dlsym(XDL_module[0], "XSetScreenSaver");
632 XSetSelectionOwnerSrc = (PFN_XSetSelectionOwner)dlsym(XDL_module[0], "XSetSelectionOwner");
633 XSetWMHintsSrc = (PFN_XSetWMHints)dlsym(XDL_module[0], "XSetWMHints");
634 XSetWMNormalHintsSrc = (PFN_XSetWMNormalHints)dlsym(XDL_module[0], "XSetWMNormalHints");
635 XSetWMProtocolsSrc = (PFN_XSetWMProtocols)dlsym(XDL_module[0], "XSetWMProtocols");
636 XSupportsLocaleSrc = (PFN_XSupportsLocale)dlsym(XDL_module[0], "XSupportsLocale");
637 XSyncSrc = (PFN_XSync)dlsym(XDL_module[0], "XSync");
638 XTranslateCoordinatesSrc = (PFN_XTranslateCoordinates)dlsym(XDL_module[0], "XTranslateCoordinates");
639 XUndefineCursorSrc = (PFN_XUndefineCursor)dlsym(XDL_module[0], "XUndefineCursor");
640 XUngrabPointerSrc = (PFN_XUngrabPointer)dlsym(XDL_module[0], "XUngrabPointer");
641 XUnmapWindowSrc = (PFN_XUnmapWindow)dlsym(XDL_module[0], "XUnmapWindow");
642 XUnsetICFocusSrc = (PFN_XUnsetICFocus)dlsym(XDL_module[0], "XUnsetICFocus");
643 XVisualIDFromVisualSrc = (PFN_XVisualIDFromVisual)dlsym(XDL_module[0], "XVisualIDFromVisual");
644 XWarpPointerSrc = (PFN_XWarpPointer)dlsym(XDL_module[0], "XWarpPointer");
645 XStoreNameSrc = (PFN_XStoreName)dlsym(XDL_module[0], "XStoreName");
646 XSetWMSizeHintsSrc = (PFN_XSetWMSizeHints)dlsym(XDL_module[0], "XSetWMSizeHints");
647 XOpenDisplaySrc = (PFN_XOpenDisplay)dlsym(XDL_module[0], "XOpenDisplay");
648 XStringToKeysymSrc = (PFN_XStringToKeysym)dlsym(XDL_module[0], "XStringToKeysym");
649 XQueryKeymapSrc = (PFN_XQueryKeymap)dlsym(XDL_module[0], "XQueryKeymap");
650 XDL_PROC_DEF(0, XKeysymToString);
651 XDL_PROC_DEF(0, XInitThreads);
652 XDL_PROC_DEF(0, XkbKeycodeToKeysym);
653 XDL_PROC_DEF(0, XkbGetMap);
654 XDL_PROC_DEF(0, XkbGetNames);
655 XDL_PROC_DEF(0, XkbGetKeyboardByName);
656 XDL_PROC_DEF(0, XkbFreeKeyboard);
657 XDL_PROC_DEF(0, XGetAtomName);
658 XDL_PROC_DEF(0, XDefaultRootWindow);
659 XDL_PROC_DEF(0, XDefaultScreen);
660 XDL_PROC_DEF(0, XMatchVisualInfo);
661 XDL_PROC_DEF(0, XGetKeyboardControl);
662 XDL_PROC_DEF(0, XKeysymToKeycode);
663 XDL_PROC_DEF(0, XConnectionNumber);
664 XDL_PROC_DEF(0, XFreeColors);
665 XDL_PROC_DEF(0, XDisplayWidth);
666 XDL_PROC_DEF(0, XDisplayHeight);
667 XDL_PROC_DEF(0, XrmGetStringDatabase);
668 XDL_PROC_DEF(0, XrmGetResource);
669 XDL_PROC_DEF(0, XrmDestroyDatabase);
670 XDL_PROC_DEF(0, XDisplayName);
671 XDL_PROC_DEF(0, XkbGetState);
672 XDL_PROC_DEF(0, XWidthOfScreen);
673 XDL_PROC_DEF(0, XHeightOfScreen);
674 XDL_PROC_DEF(0, XCreateGC);
675 XDL_PROC_DEF(0, XFreeGC);
676 XDL_PROC_DEF(0, XCreateImage);
677 XDL_PROC_DEF(0, XCreatePixmap);
678 XDL_PROC_DEF(0, XPutImage);
679
680 #ifndef XDL_NO_XRANDR
681 XDL_PROC_DEF(2, XRRGetScreenResourcesCurrent);
682 XDL_PROC_DEF(2, XRRGetCrtcInfo);
683 XDL_PROC_DEF(2, XRRGetOutputInfo);
684 XDL_PROC_DEF(2, XRRFreeCrtcInfo);
685 XDL_PROC_DEF(2, XRRGetScreenResources);
686 XDL_PROC_DEF(2, XRRFreeScreenResources);
687 XDL_PROC_DEF(2, XRRFreeOutputInfo);
688 XDL_PROC_DEF(2, XRRSetScreenConfig);
689 XDL_PROC_DEF(2, XRRSetCrtcConfig);
690 #endif
691
692 #ifndef XDL_NO_GLX
693 XDL_PROC_DEF(1, glXChooseVisual);
694 XDL_PROC_DEF(1, glXCreateContext);
695 XDL_PROC_DEF(1, glXMakeCurrent);
696 XDL_PROC_DEF(1, glXGetCurrentContext);
697 XDL_PROC_DEF(1, glXSwapBuffers);
698 XDL_PROC_DEF(1, glXSwapIntervalEXT);
699 XDL_PROC_DEF(1, glXGetProcAddress);
700 XDL_PROC_DEF(1, glXGetVisualFromFBConfig);
701 XDL_PROC_DEF(1, glXGetFBConfigAttrib);
702 XDL_PROC_DEF(1, glXGetProcAddressARB);
703 XDL_PROC_DEF(1, glXChooseFBConfig);
704 XDL_PROC_DEF(1, glXDestroyContext);
705 XDL_PROC_DEF(1, glXQueryExtensionsString);
706 #endif
707}
708
709void XDL_close(void) {
710 if (XDL_module[0] != NULL) {
711 /* close the modules and free their data */
712 dlclose(XDL_module[0]);
713 XDL_module[0] = NULL;
714
715 #ifndef XDL_NO_GLX
716 dlclose(XDL_module[1]);
717 #endif
718
719 #ifndef XDL_NO_XRANDR
720 dlclose(XDL_module[2]);
721 #endif
722 }
723}
724#endif
XSizeHints *(* PFN_XAllocSizeHints)(void)
Definition: XDL.h:71
XClassHint *(* PFN_XAllocClassHint)(void)
Definition: XDL.h:70
#define XDisplayWidth
Definition: XDL.h:477
int(* PFN_XMoveWindow)(Display *, Window, int, int)
Definition: XDL.h:120
PFN_XPutImage XPutImageSrc
Definition: XDL.h:339
int(* PFN_XCloseDisplay)(Display *)
Definition: XDL.h:77
PFN_XGetWindowProperty XGetWindowPropertySrc
Definition: XDL.h:265
XkbDescPtr(* PFN_XkbGetKeyboardByName)(Display *, unsigned int, XkbComponentNamesPtr, unsigned int, unsigned int, Bool)
Definition: XDL.h:157
int(* PFN_XNextEvent)(Display *, XEvent *)
Definition: XDL.h:121
PFN_XOpenDisplay XOpenDisplaySrc
Definition: XDL.h:306
PFN_XDeleteProperty XDeletePropertySrc
Definition: XDL.h:241
PFN_XWarpPointer XWarpPointerSrc
Definition: XDL.h:305
XkbDescPtr(* PFN_XkbGetMap)(Display *, unsigned int, unsigned int)
Definition: XDL.h:156
PFN_XGetAtomName XGetAtomNameSrc
Definition: XDL.h:320
#define XConnectionNumber
Definition: XDL.h:475
int(* PFN_XUndefineCursor)(Display *, Window)
Definition: XDL.h:148
Status(* PFN_XkbGetNames)(Display *, unsigned int, XkbDescPtr)
Definition: XDL.h:158
int(* PFN_XDefaultScreen)(Display *)
Definition: XDL.h:173
int(* PFN_XSetSelectionOwner)(Display *, Atom, Window, Time)
Definition: XDL.h:141
int(* PFN_XGetErrorText)(Display *, int, char *, int)
Definition: XDL.h:100
PFN_XMoveResizeWindow XMoveResizeWindowSrc
Definition: XDL.h:272
#define XKeysymToKeycode
Definition: XDL.h:474
char *(* PFN_XDisplayName)(const char *string)
Definition: XDL.h:183
PFN_XUndefineCursor XUndefineCursorSrc
Definition: XDL.h:300
int(* PFN_XFreeGC)(Display *display, GC gc)
Definition: XDL.h:187
PFN_XNextEvent XNextEventSrc
Definition: XDL.h:274
void(* PFN_glXDestroyContext)(Display *dpy, GLXContext ctx)
Definition: XDL.h:219
int(* PFN_XFreeCursor)(Display *, Cursor)
Definition: XDL.h:98
int(* PFN_XDefineCursor)(Display *, Window, Cursor)
Definition: XDL.h:85
PFN_XGrabPointer XGrabPointerSrc
Definition: XDL.h:266
#define XRRGetCrtcInfo
Definition: XDL.h:489
#define XDisplayName
Definition: XDL.h:482
int(* PFN_XResizeWindow)(Display *, Window, unsigned int, unsigned int)
Definition: XDL.h:129
int(* PFN_XSync)(Display *, Bool)
Definition: XDL.h:146
PFN_XRRSetCrtcConfig XRRSetCrtcConfigSrc
Definition: XDL.h:349
Status(* PFN_XRRSetScreenConfig)(Display *dpy, XRRScreenConfiguration *config, Drawable draw, int size_index, Rotation rotation, Time timestamp)
Definition: XDL.h:201
PFN_XEventsQueued XEventsQueuedSrc
Definition: XDL.h:246
int(* PFN_XDisplayHeight)(Display *display, int screen_number)
Definition: XDL.h:178
#define XRRGetOutputInfo
Definition: XDL.h:490
#define glXCreateContext
Definition: XDL.h:501
int(* PFN_XGetScreenSaver)(Display *, int *, int *, int *, int *)
Definition: XDL.h:106
PFN_XCreatePixmap XCreatePixmapSrc
Definition: XDL.h:338
Region(* PFN_XCreateRegion)(void)
Definition: XDL.h:83
Bool(* PFN_glXMakeCurrent)(Display *, GLXDrawable, GLXContext)
Definition: XDL.h:210
PFN_XUngrabPointer XUngrabPointerSrc
Definition: XDL.h:301
int(* PFN_XGetInputFocus)(Display *, Window *, int *)
Definition: XDL.h:104
#define XRRFreeScreenResources
Definition: XDL.h:493
PFN_XDefaultScreen XDefaultScreenSrc
Definition: XDL.h:322
#define XFreeGC
Definition: XDL.h:395
PFN_XDestroyIC XDestroyICSrc
Definition: XDL.h:242
char *(* PFN_XSetLocaleModifiers)(const char *)
Definition: XDL.h:139
void(* PFN_XFreeColors)(Display *display, Colormap colormap, unsigned long *pixels, int npixels, unsigned long planes)
Definition: XDL.h:176
PFN_XrmGetStringDatabase XrmGetStringDatabaseSrc
Definition: XDL.h:328
PFN_XGetInputFocus XGetInputFocusSrc
Definition: XDL.h:258
PFN_XGetKeyboardControl XGetKeyboardControlSrc
Definition: XDL.h:319
PFN_XMatchVisualInfo XMatchVisualInfoSrc
Definition: XDL.h:315
#define XMatchVisualInfo
Definition: XDL.h:472
PFN_XCreateGC XCreateGCSrc
Definition: XDL.h:335
int(* PFN_XRaiseWindow)(Display *, Window)
Definition: XDL.h:127
PFN_glXGetProcAddress glXGetProcAddressSrc
Definition: XDL.h:359
#define glXGetProcAddress
Definition: XDL.h:505
PFN_XAllocSizeHints XAllocSizeHintsSrc
Definition: XDL.h:225
__GLXextFuncPtr(* PFN_glXGetProcAddressARB)(const GLubyte *)
Definition: XDL.h:217
PFN_XSetIMValues XSetIMValuesSrc
Definition: XDL.h:289
PFN_XSetWMNormalHints XSetWMNormalHintsSrc
Definition: XDL.h:295
int(* PFN_XGetKeyboardControl)(Display *, XKeyboardState *)
Definition: XDL.h:170
PFN_XGetWindowAttributes XGetWindowAttributesSrc
Definition: XDL.h:264
Bool(* PFN_XGetEventData)(Display *, XGenericEventCookie *)
Definition: XDL.h:101
#define XkbGetNames
Definition: XDL.h:466
int(* PFN_XWidthOfScreen)(Screen *screen)
Definition: XDL.h:184
#define XPutImage
Definition: XDL.h:485
PFN_XCreateFontCursor XCreateFontCursorSrc
Definition: XDL.h:235
PFN_glXSwapBuffers glXSwapBuffersSrc
Definition: XDL.h:357
PFN_XDeleteContext XDeleteContextSrc
Definition: XDL.h:240
int(* PFN_XPutImage)(Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)
Definition: XDL.h:190
PFN_XFreeEventData XFreeEventDataSrc
Definition: XDL.h:253
PFN_glXQueryExtensionsString glXQueryExtensionsStringSrc
Definition: XDL.h:365
#define glXGetCurrentContext
Definition: XDL.h:503
Window(* PFN_XDefaultRootWindow)(Display *)
Definition: XDL.h:172
PFN_XWidthOfScreen XHeightOfScreenSrc
Definition: XDL.h:334
PFN_XSetLocaleModifiers XSetLocaleModifiersSrc
Definition: XDL.h:291
void(* PFN_XRRFreeCrtcInfo)(XRRCrtcInfo *crtc_info)
Definition: XDL.h:197
char *(* PFN_XResourceManagerString)(Display *)
Definition: XDL.h:130
#define glXGetProcAddressARB
Definition: XDL.h:508
PFN_XFindContext XFindContextSrc
Definition: XDL.h:248
#define glXSwapIntervalEXT
Definition: XDL.h:511
Status(* PFN_XSetWMProtocols)(Display *, Window, Atom *, int)
Definition: XDL.h:144
int(* PFN_XGetSystemContentDPI)(Display *display)
Definition: XDL.h:179
#define XrmGetStringDatabase
Definition: XDL.h:479
char *(* PFN_XGetAtomName)(Display *, Atom)
Definition: XDL.h:171
KeyCode(* PFN_XKeysymToKeycode)(Display *, KeySym)
Definition: XDL.h:175
void(* PFN_XRRFreeOutputInfo)(XRROutputInfo *)
Definition: XDL.h:200
PFN_XCheckIfEvent XCheckIfEventSrc
Definition: XDL.h:229
Status(* PFN_XGetWMNormalHints)(Display *, Window, XSizeHints *, long *)
Definition: XDL.h:109
#define XFreeColors
Definition: XDL.h:476
PFN_XIconifyWindow XIconifyWindowSrc
Definition: XDL.h:267
#define XRRSetScreenConfig
Definition: XDL.h:495
#define XDefaultRootWindow
Definition: XDL.h:470
#define XkbFreeKeyboard
Definition: XDL.h:468
PFN_XStringToKeysym XStringToKeysymSrc
Definition: XDL.h:313
PFN_XAllocClassHint XAllocClassHintSrc
Definition: XDL.h:224
PFN_XRRSetScreenConfig XRRSetScreenConfigSrc
Definition: XDL.h:348
#define XDefaultScreen
Definition: XDL.h:471
#define glXChooseFBConfig
Definition: XDL.h:509
PFN_glXGetVisualFromFBConfig glXGetVisualFromFBConfigSrc
Definition: XDL.h:360
int(* PFN_XDisplayKeycodes)(Display *, int *, int *)
Definition: XDL.h:91
int(* PFN_XConvertSelection)(Display *, Atom, Atom, Atom, Window, Time)
Definition: XDL.h:79
PFN_XCloseIM XCloseIMSrc
Definition: XDL.h:232
Window(* PFN_XCreateWindow)(Display *, Window, int, int, unsigned int, unsigned int, unsigned int, int, unsigned int, Visual *, unsigned long, XSetWindowAttributes *)
Definition: XDL.h:84
Bool(* PFN_XRegisterIMInstantiateCallback)(Display *, void *, char *, char *, XIDProc, XPointer)
Definition: XDL.h:128
PFN_XSendEvent XSendEventSrc
Definition: XDL.h:285
int(* PFN_XFree)(void *)
Definition: XDL.h:96
int(* PFN_XWarpPointer)(Display *, Window, Window, int, int, unsigned int, unsigned int, int, int)
Definition: XDL.h:153
#define XRRGetScreenResources
Definition: XDL.h:492
PFN_XConnectionNumber XConnectionNumberSrc
Definition: XDL.h:314
PFN_XQueryPointer XQueryPointerSrc
Definition: XDL.h:278
Bool(* PFN_XQueryExtension)(Display *, const char *, int *, int *, int *)
Definition: XDL.h:125
PFN_XSaveContext XSaveContextSrc
Definition: XDL.h:283
void(* PFN_XSetICFocus)(XIC)
Definition: XDL.h:136
PFN_XLookupString XLookupStringSrc
Definition: XDL.h:269
char *(* PFN_XKeysymToString)(KeySym)
Definition: XDL.h:169
int(* PFN_XDisplayWidth)(Display *display, int screen_number)
Definition: XDL.h:177
#define XGetKeyboardControl
Definition: XDL.h:473
PFN_glXChooseVisual glXChooseVisualSrc
Definition: XDL.h:353
void(* PFN_glXSwapBuffers)(Display *, GLXDrawable)
Definition: XDL.h:212
PFN_XGetKeyboardMapping XGetKeyboardMappingSrc
Definition: XDL.h:259
void(* PFN_XUnsetICFocus)(XIC)
Definition: XDL.h:151
PFN_glXGetFBConfigAttrib glXGetFBConfigAttribSrc
Definition: XDL.h:361
XRROutputInfo *(* PFN_XRRGetOutputInfo)(Display *display, XRRScreenResources *resources, RROutput output)
Definition: XDL.h:196
Status(* PFN_XMatchVisualInfo)(Display *, int, int, int, XVisualInfo *)
Definition: XDL.h:167
int(* PFN_XUnmapWindow)(Display *, Window)
Definition: XDL.h:150
Bool(* PFN_XFilterEvent)(XEvent *, Window)
Definition: XDL.h:93
PFN_XRRFreeOutputInfo XRRFreeOutputInfoSrc
Definition: XDL.h:347
void(* PFN_XSetWMNormalHints)(Display *, Window, XSizeHints *)
Definition: XDL.h:143
int(* PFN_XUngrabPointer)(Display *, Time)
Definition: XDL.h:149
void(* PFN_XSetWMSizeHints)(Display *, Window, XSizeHints *, Atom)
Definition: XDL.h:168
PFN_XFreeCursor XFreeCursorSrc
Definition: XDL.h:252
Window(* PFN_XGetSelectionOwner)(Display *, Atom)
Definition: XDL.h:107
void(* PFN_XkbFreeNames)(XkbDescPtr, unsigned int, Bool)
Definition: XDL.h:155
PFN_XChangeWindowAttributes XChangeWindowAttributesSrc
Definition: XDL.h:228
int(* PFN_XStoreName)(Display *, Window, const char *)
Definition: XDL.h:166
PFN_XMoveWindow XMoveWindowSrc
Definition: XDL.h:273
int(* PFN_XFindContext)(Display *, XID, XContext, XPointer *)
Definition: XDL.h:94
PFN_XInitThreads XInitThreadsSrc
Definition: XDL.h:307
PFN_XSetSelectionOwner XSetSelectionOwnerSrc
Definition: XDL.h:293
PFN_XCreateImage XCreateImageSrc
Definition: XDL.h:337
XVisualInfo *(* PFN_glXChooseVisual)(Display *, int, int *)
Definition: XDL.h:208
PFN_XDisplayName XDisplayNameSrc
Definition: XDL.h:331
const char *(* PFN_glXQueryExtensionsString)(Display *dpy, int screen)
Definition: XDL.h:220
int(* PFN_XFreeColormap)(Display *, Colormap)
Definition: XDL.h:97
int(* PFN_XSetWMHints)(Display *, Window, XWMHints *)
Definition: XDL.h:142
Bool(* PFN_XCheckTypedWindowEvent)(Display *, Window, int, XEvent *)
Definition: XDL.h:76
PFN_glXGetCurrentContext glXGetCurrentContextSrc
Definition: XDL.h:356
#define XRRGetScreenResourcesCurrent
Definition: XDL.h:488
PFN_XWidthOfScreen XWidthOfScreenSrc
Definition: XDL.h:333
#define XDisplayHeight
Definition: XDL.h:478
int(* PFN_XDestroyWindow)(Display *, Window)
Definition: XDL.h:90
int(* PFN_XDeleteContext)(Display *, XID, XContext)
Definition: XDL.h:86
PFN_XRRGetCrtcInfo XRRGetCrtcInfoSrc
Definition: XDL.h:342
XDLDEF void XDL_close(void)
int(* PFN_XGrabPointer)(Display *, Window, Bool, unsigned int, int, int, Window, Cursor, Time)
Definition: XDL.h:112
XRRCrtcInfo *(* PFN_XRRGetCrtcInfo)(Display *display, XRRScreenResources *resources, RRCrtc crtc)
Definition: XDL.h:195
PFN_XkbGetState XkbGetStateSrc
Definition: XDL.h:332
void(* PFN_XrmDestroyDatabase)(XrmDatabase database)
Definition: XDL.h:182
#define glXGetVisualFromFBConfig
Definition: XDL.h:506
int(* PFN_XChangeWindowAttributes)(Display *, Window, unsigned long, XSetWindowAttributes *)
Definition: XDL.h:74
PFN_XRRFreeScreenResources XRRFreeScreenResourcesSrc
Definition: XDL.h:346
PFN_XGetErrorText XGetErrorTextSrc
Definition: XDL.h:254
#define XRRSetCrtcConfig
Definition: XDL.h:496
int(* PFN_XMoveResizeWindow)(Display *, Window, int, int, unsigned int, unsigned int)
Definition: XDL.h:119
Bool(* PFN_XSupportsLocale)(void)
Definition: XDL.h:145
PFN_XGetScreenSaver XGetScreenSaverSrc
Definition: XDL.h:260
Status(* PFN_XRRSetCrtcConfig)(Display *, XRRScreenResources *, RRCrtc, Time, int, int, RRMode, Rotation, RROutput *, int)
Definition: XDL.h:202
PFN_XGetIMValues XGetIMValuesSrc
Definition: XDL.h:257
PFN_XSetClassHint XSetClassHintSrc
Definition: XDL.h:286
XWMHints *(* PFN_XAllocWMHints)(void)
Definition: XDL.h:72
PFN_XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrentSrc
Definition: XDL.h:341
int(* PFN_XGetWindowProperty)(Display *, Window, Atom, long, long, Bool, Atom, Atom *, int *, unsigned long *, unsigned long *, unsigned char **)
Definition: XDL.h:111
KeySym(* PFN_XStringToKeysym)(char *)
Definition: XDL.h:164
Cursor(* PFN_XCreateFontCursor)(Display *, unsigned int)
Definition: XDL.h:81
#define XGetAtomName
Definition: XDL.h:469
int(* PFN_XDeleteProperty)(Display *, Window, Atom)
Definition: XDL.h:87
Bool(* PFN_XQueryPointer)(Display *, Window, Window *, Window *, int *, int *, int *, int *, unsigned int *)
Definition: XDL.h:126
PFN_XSync XSyncSrc
Definition: XDL.h:298
void(* PFN_XDestroyIC)(XIC)
Definition: XDL.h:88
PFN_XRRGetScreenResources XRRGetScreenResourcesSrc
Definition: XDL.h:345
PFN_XGetWMNormalHints XGetWMNormalHintsSrc
Definition: XDL.h:263
int(* PFN_XChangeProperty)(Display *, Window, Atom, Atom, int, int, const unsigned char *, int)
Definition: XDL.h:73
PFN_XFree XFreeSrc
Definition: XDL.h:250
#define XWidthOfScreen
Definition: XDL.h:392
#define XCreateGC
Definition: XDL.h:394
PFN_XPeekEvent XPeekEventSrc
Definition: XDL.h:275
char *(* PFN_XSetIMValues)(XIM,...)
Definition: XDL.h:137
PFN_XCreateWindow XCreateWindowSrc
Definition: XDL.h:238
int(* PFN_XFlush)(Display *)
Definition: XDL.h:95
PFN_XFreeColors XFreeColorsSrc
Definition: XDL.h:325
PFN_XPending XPendingSrc
Definition: XDL.h:276
PFN_XSupportsLocale XSupportsLocaleSrc
Definition: XDL.h:297
PFN_XGetICValues XGetICValuesSrc
Definition: XDL.h:256
Status(* PFN_XCloseIM)(XIM)
Definition: XDL.h:78
PFN_XGetVisualInfo XGetVisualInfoSrc
Definition: XDL.h:262
PFN_XSetWMProtocols XSetWMProtocolsSrc
Definition: XDL.h:296
XVisualInfo *(* PFN_XGetVisualInfo)(Display *, long, XVisualInfo *, int *)
Definition: XDL.h:108
XrmDatabase(* PFN_XrmGetStringDatabase)(const char *data)
Definition: XDL.h:180
int(* PFN_XLookupString)(XKeyEvent *, char *, int, KeySym *, XComposeStatus *)
Definition: XDL.h:116
PFN_XConvertSelection XConvertSelectionSrc
Definition: XDL.h:233
PFN_XResizeWindow XResizeWindowSrc
Definition: XDL.h:281
PFN_XDisplayKeycodes XDisplayKeycodesSrc
Definition: XDL.h:245
PFN_XDisplayHeight XDisplayHeightSrc
Definition: XDL.h:327
PFN_XFreeGC XFreeGCSrc
Definition: XDL.h:336
GC(* PFN_XCreateGC)(Display *display, Drawable d, unsigned long valuemask, XGCValues *values)
Definition: XDL.h:186
VisualID(* PFN_XVisualIDFromVisual)(Visual *)
Definition: XDL.h:152
XDLDEF void XDL_init(void)
PFN_XRaiseWindow XRaiseWindowSrc
Definition: XDL.h:279
PFN_XkbGetKeyboardByName XkbGetKeyboardByNameSrc
Definition: XDL.h:311
Bool(* PFN_XkbSelectEventDetails)(Display *, unsigned int, unsigned int, unsigned long, unsigned long)
Definition: XDL.h:162
Status(* PFN_XInitThreads)(void)
Definition: XDL.h:114
PFN_XDisplayWidth XDisplayWidthSrc
Definition: XDL.h:326
PFN_glXSwapIntervalEXT glXSwapIntervalEXTSrc
Definition: XDL.h:358
PFN_XCloseDisplay XCloseDisplaySrc
Definition: XDL.h:231
int(* PFN_XDestroyRegion)(Region)
Definition: XDL.h:89
PFN_XkbFreeKeyboard XkbFreeKeyboardSrc
Definition: XDL.h:312
PFN_XSetErrorHandler XSetErrorHandlerSrc
Definition: XDL.h:287
int(* PFN_XSetInputFocus)(Display *, Window, int, Time)
Definition: XDL.h:138
#define XrmDestroyDatabase
Definition: XDL.h:481
Bool(* PFN_XTranslateCoordinates)(Display *, Window, Window, int, int, int *, int *, Window *)
Definition: XDL.h:147
PFN_XRRGetOutputInfo XRRGetOutputInfoSrc
Definition: XDL.h:343
GLXContext(* PFN_glXGetCurrentContext)(void)
Definition: XDL.h:211
#define XkbGetState
Definition: XDL.h:391
PFN_XCreateIC XCreateICSrc
Definition: XDL.h:236
#define XkbGetKeyboardByName
Definition: XDL.h:467
PFN_XFreeColormap XFreeColormapSrc
Definition: XDL.h:251
PFN_XDestroyRegion XDestroyRegionSrc
Definition: XDL.h:243
Status(* PFN_XkbGetState)(Display *, unsigned int, XkbStatePtr)
Definition: XDL.h:159
PFN_glXDestroyContext glXDestroyContextSrc
Definition: XDL.h:364
void(* PFN_XRRFreeScreenResources)(XRRScreenResources *resources)
Definition: XDL.h:199
KeySym *(* PFN_XGetKeyboardMapping)(Display *, KeyCode, int, int *)
Definition: XDL.h:105
PFN_glXChooseFBConfig glXChooseFBConfigSrc
Definition: XDL.h:363
int(* PFN_XMapWindow)(Display *, Window)
Definition: XDL.h:118
PFN_XKeysymToKeycode XKeysymToKeycodeSrc
Definition: XDL.h:324
PFN_XGetSelectionOwner XGetSelectionOwnerSrc
Definition: XDL.h:261
PFN_XCreateRegion XCreateRegionSrc
Definition: XDL.h:237
PFN_XSelectInput XSelectInputSrc
Definition: XDL.h:284
Bool(* PFN_XkbQueryExtension)(Display *, int *, int *, int *, int *, int *)
Definition: XDL.h:161
PFN_XkbKeycodeToKeysym XkbKeycodeToKeysymSrc
Definition: XDL.h:308
#define XKeysymToString
Definition: XDL.h:462
PFNGLXGETVISUALFROMFBCONFIGPROC PFN_glXGetVisualFromFBConfig
Definition: XDL.h:215
int(* PFN_XPending)(Display *)
Definition: XDL.h:124
PFN_XRRFreeCrtcInfo XRRFreeCrtcInfoSrc
Definition: XDL.h:344
PFN_XSetWMSizeHints XSetWMSizeHintsSrc
Definition: XDL.h:316
#define XkbGetMap
Definition: XDL.h:465
int(* PFN_XQueryKeymap)(Display *, char[32])
Definition: XDL.h:174
PFN_XDefaultRootWindow XDefaultRootWindowSrc
Definition: XDL.h:321
int(* PFN_XSetClassHint)(Display *, Window, XClassHint *)
Definition: XDL.h:134
PFN_XCreateColormap XCreateColormapSrc
Definition: XDL.h:234
#define glXMakeCurrent
Definition: XDL.h:502
PFN_XChangeProperty XChangePropertySrc
Definition: XDL.h:227
#define glXQueryExtensionsString
Definition: XDL.h:512
PFN_glXGetProcAddressARB glXGetProcAddressARBSrc
Definition: XDL.h:362
XIC(* PFN_XCreateIC)(XIM,...)
Definition: XDL.h:82
XImage *(* PFN_XCreateImage)(Display *, Visual *, unsigned int, int, int, char *, unsigned int, unsigned int, int, int)
Definition: XDL.h:188
#define XHeightOfScreen
Definition: XDL.h:393
char *(* PFN_XGetIMValues)(XIM,...)
Definition: XDL.h:103
KeySym(* PFN_XkbKeycodeToKeysym)(Display *, KeyCode, int, int)
Definition: XDL.h:160
char *(* PFN_XGetICValues)(XIC,...)
Definition: XDL.h:102
PFN_XAllocWMHints XAllocWMHintsSrc
Definition: XDL.h:226
void(* PFN_XFreeEventData)(Display *, XGenericEventCookie *)
Definition: XDL.h:99
Pixmap(* PFN_XCreatePixmap)(Display *display, Drawable d, unsigned int width, unsigned int height, unsigned int depth)
Definition: XDL.h:189
#define XInitThreads
Definition: XDL.h:463
Display *(* PFN_XOpenDisplay)(const char *)
Definition: XDL.h:122
#define XrmGetResource
Definition: XDL.h:480
PFN_XResourceManagerString XResourceManagerStringSrc
Definition: XDL.h:282
Bool(* PFN_XCheckIfEvent)(Display *, XEvent *, Bool(*)(Display *, XEvent *, XPointer), XPointer)
Definition: XDL.h:75
#define XCreateImage
Definition: XDL.h:483
void *(* PFN_glXGetProcAddress)(const GLubyte *procname)
Definition: XDL.h:214
XRRScreenResources *(* PFN_XRRGetScreenResourcesCurrent)(Display *display, Window window)
Definition: XDL.h:194
PFN_XKeysymToString XKeysymToStringSrc
Definition: XDL.h:318
PFN_XUnmapWindow XUnmapWindowSrc
Definition: XDL.h:302
Colormap(* PFN_XCreateColormap)(Display *, Window, Visual *, int)
Definition: XDL.h:80
PFN_XUnsetICFocus XUnsetICFocusSrc
Definition: XDL.h:303
PFN_XSetWMHints XSetWMHintsSrc
Definition: XDL.h:294
PFN_XrmGetResource XrmGetResourceSrc
Definition: XDL.h:329
PFN_glXMakeCurrent glXMakeCurrentSrc
Definition: XDL.h:355
PFN_XFlush XFlushSrc
Definition: XDL.h:249
PFN_XrmDestroyDatabase XrmDestroyDatabaseSrc
Definition: XDL.h:330
Status(* PFN_XSendEvent)(Display *, Window, Bool, long, XEvent *)
Definition: XDL.h:133
int(* PFN_XEventsQueued)(Display *, int)
Definition: XDL.h:92
PFN_XCheckTypedWindowEvent XCheckTypedWindowEventSrc
Definition: XDL.h:230
int(* PFN_XPeekEvent)(Display *, XEvent *)
Definition: XDL.h:123
Status(* PFN_XIconifyWindow)(Display *, Window, int)
Definition: XDL.h:113
#define glXChooseVisual
Definition: XDL.h:500
PFN_XRegisterIMInstantiateCallback XRegisterIMInstantiateCallbackSrc
Definition: XDL.h:280
PFN_XMapRaised XMapRaisedSrc
Definition: XDL.h:270
Bool(* PFN_XkbSetDetectableAutoRepeat)(Display *, Bool, Bool *)
Definition: XDL.h:163
PFNGLXSWAPINTERVALEXTPROC PFN_glXSwapIntervalEXT
Definition: XDL.h:213
GLXContext(* PFN_glXCreateContext)(Display *, XVisualInfo *, GLXContext, Bool)
Definition: XDL.h:209
#define XCreatePixmap
Definition: XDL.h:484
PFNGLXCHOOSEFBCONFIGPROC PFN_glXChooseFBConfig
Definition: XDL.h:218
PFN_XStoreName XStoreNameSrc
Definition: XDL.h:317
Bool(* PFN_XrmGetResource)(XrmDatabase database, const char *resource_name, const char *resource_class, char **type, XrmValue *value)
Definition: XDL.h:181
PFN_XVisualIDFromVisual XVisualIDFromVisualSrc
Definition: XDL.h:304
PFN_XSetInputFocus XSetInputFocusSrc
Definition: XDL.h:290
PFN_XkbGetMap XkbGetMapSrc
Definition: XDL.h:309
PFN_XDefineCursor XDefineCursorSrc
Definition: XDL.h:239
int(* PFN_XSaveContext)(Display *, XID, XContext, const char *)
Definition: XDL.h:131
PFNGLXGETFBCONFIGATTRIBPROC PFN_glXGetFBConfigAttrib
Definition: XDL.h:216
int(* PFN_XConnectionNumber)(Display *)
Definition: XDL.h:165
PFN_glXCreateContext glXCreateContextSrc
Definition: XDL.h:354
XErrorHandler(* PFN_XSetErrorHandler)(XErrorHandler)
Definition: XDL.h:135
#define XDLDEF
Definition: XDL.h:63
void(* PFN_XkbFreeKeyboard)(XkbDescPtr, unsigned int, Bool)
Definition: XDL.h:154
PFN_XkbGetNames XkbGetNamesSrc
Definition: XDL.h:310
#define XRRFreeCrtcInfo
Definition: XDL.h:491
int(* PFN_XMapRaised)(Display *, Window)
Definition: XDL.h:117
#define glXGetFBConfigAttrib
Definition: XDL.h:507
PFN_XQueryExtension XQueryExtensionSrc
Definition: XDL.h:277
#define glXSwapBuffers
Definition: XDL.h:504
#define XkbKeycodeToKeysym
Definition: XDL.h:464
XRRScreenResources *(* PFN_XRRGetScreenResources)(Display *display, Window window)
Definition: XDL.h:198
int(* PFN_XSetScreenSaver)(Display *, int, int, int, int)
Definition: XDL.h:140
PFN_XTranslateCoordinates XTranslateCoordinatesSrc
Definition: XDL.h:299
Status(* PFN_XGetWindowAttributes)(Display *, Window, XWindowAttributes *)
Definition: XDL.h:110
PFN_XSetScreenSaver XSetScreenSaverSrc
Definition: XDL.h:292
Atom(* PFN_XInternAtom)(Display *, const char *, Bool)
Definition: XDL.h:115
#define XRRFreeOutputInfo
Definition: XDL.h:494
#define glXDestroyContext
Definition: XDL.h:510
PFN_XGetEventData XGetEventDataSrc
Definition: XDL.h:255
PFN_XDestroyWindow XDestroyWindowSrc
Definition: XDL.h:244
PFN_XMapWindow XMapWindowSrc
Definition: XDL.h:271
PFN_XQueryKeymap XQueryKeymapSrc
Definition: XDL.h:323
PFN_XFilterEvent XFilterEventSrc
Definition: XDL.h:247
int(* PFN_XSelectInput)(Display *, Window, long)
Definition: XDL.h:132
int(* PFN_XHeightOfScreen)(Screen *screen)
Definition: XDL.h:185
PFN_XSetICFocus XSetICFocusSrc
Definition: XDL.h:288
PFN_XInternAtom XInternAtomSrc
Definition: XDL.h:268