34#include <X11/keysym.h>
36#include <X11/Xresource.h>
37#include <X11/Xcursor/Xcursor.h>
40#include <X11/extensions/Xrandr.h>
43#include <X11/XKBlib.h>
46#include <X11/extensions/Xinerama.h>
49#include <X11/extensions/XInput2.h>
52#include <X11/extensions/shape.h>
54typedef XClassHint* (* PFN_XAllocClassHint)(void);
55typedef XSizeHints* (* PFN_XAllocSizeHints)(void);
56typedef XWMHints* (* PFN_XAllocWMHints)(void);
59typedef Bool (*
PFN_XCheckIfEvent)(Display*,XEvent*,Bool(*)(Display*,XEvent*,XPointer),XPointer);
68typedef Window (*
PFN_XCreateWindow)(Display*,Window,int,int,
unsigned int,
unsigned int,
unsigned int,int,
unsigned int,Visual*,
unsigned long,XSetWindowAttributes*);
86typedef char* (* PFN_XGetICValues)(XIC,...);
87typedef char* (* PFN_XGetIMValues)(XIM,...);
89typedef KeySym* (* PFN_XGetKeyboardMapping)(Display*,KeyCode,int,
int*);
92typedef XVisualInfo* (* PFN_XGetVisualInfo)(Display*,long,XVisualInfo*,
int*);
95typedef int (*
PFN_XGetWindowProperty)(Display*,Window,Atom,long,long,Bool,Atom,Atom*,
int*,
unsigned long*,
unsigned long*,
unsigned char**);
96typedef int (*
PFN_XGrabPointer)(Display*,Window,Bool,
unsigned int,int,int,Window,Cursor,Time);
106typedef Display* (* PFN_XOpenDisplay)(
const char*);
111typedef Bool (*
PFN_XQueryPointer)(Display*,Window,Window*,Window*,
int*,
int*,
int*,
int*,
unsigned int*);
115typedef char* (* PFN_XResourceManagerString)(Display*);
122typedef char* (* PFN_XSetIMValues)(XIM,...);
124typedef char* (* PFN_XSetLocaleModifiers)(
const char*);
138typedef int (*
PFN_XWarpPointer)(Display*,Window,Window,int,int,
unsigned int,
unsigned int,int,int);
156#define XAllocClassHint _glfw.x11.xlib.AllocClassHint
157#define XAllocSizeHints _glfw.x11.xlib.AllocSizeHints
158#define XAllocWMHints _glfw.x11.xlib.AllocWMHints
159#define XChangeProperty _glfw.x11.xlib.ChangeProperty
160#define XChangeWindowAttributes _glfw.x11.xlib.ChangeWindowAttributes
161#define XCheckIfEvent _glfw.x11.xlib.CheckIfEvent
162#define XCheckTypedWindowEvent _glfw.x11.xlib.CheckTypedWindowEvent
163#define XCloseDisplay _glfw.x11.xlib.CloseDisplay
164#define XCloseIM _glfw.x11.xlib.CloseIM
165#define XConvertSelection _glfw.x11.xlib.ConvertSelection
166#define XCreateColormap _glfw.x11.xlib.CreateColormap
167#define XCreateFontCursor _glfw.x11.xlib.CreateFontCursor
168#define XCreateIC _glfw.x11.xlib.CreateIC
169#define XCreateRegion _glfw.x11.xlib.CreateRegion
170#define XCreateWindow _glfw.x11.xlib.CreateWindow
171#define XDefineCursor _glfw.x11.xlib.DefineCursor
172#define XDeleteContext _glfw.x11.xlib.DeleteContext
173#define XDeleteProperty _glfw.x11.xlib.DeleteProperty
174#define XDestroyIC _glfw.x11.xlib.DestroyIC
175#define XDestroyRegion _glfw.x11.xlib.DestroyRegion
176#define XDestroyWindow _glfw.x11.xlib.DestroyWindow
177#define XDisplayKeycodes _glfw.x11.xlib.DisplayKeycodes
178#define XEventsQueued _glfw.x11.xlib.EventsQueued
179#define XFilterEvent _glfw.x11.xlib.FilterEvent
180#define XFindContext _glfw.x11.xlib.FindContext
181#define XFlush _glfw.x11.xlib.Flush
182#define XFree _glfw.x11.xlib.Free
183#define XFreeColormap _glfw.x11.xlib.FreeColormap
184#define XFreeCursor _glfw.x11.xlib.FreeCursor
185#define XFreeEventData _glfw.x11.xlib.FreeEventData
186#define XGetErrorText _glfw.x11.xlib.GetErrorText
187#define XGetEventData _glfw.x11.xlib.GetEventData
188#define XGetICValues _glfw.x11.xlib.GetICValues
189#define XGetIMValues _glfw.x11.xlib.GetIMValues
190#define XGetInputFocus _glfw.x11.xlib.GetInputFocus
191#define XGetKeyboardMapping _glfw.x11.xlib.GetKeyboardMapping
192#define XGetScreenSaver _glfw.x11.xlib.GetScreenSaver
193#define XGetSelectionOwner _glfw.x11.xlib.GetSelectionOwner
194#define XGetVisualInfo _glfw.x11.xlib.GetVisualInfo
195#define XGetWMNormalHints _glfw.x11.xlib.GetWMNormalHints
196#define XGetWindowAttributes _glfw.x11.xlib.GetWindowAttributes
197#define XGetWindowProperty _glfw.x11.xlib.GetWindowProperty
198#define XGrabPointer _glfw.x11.xlib.GrabPointer
199#define XIconifyWindow _glfw.x11.xlib.IconifyWindow
200#define XInitThreads _glfw.x11.xlib.InitThreads
201#define XInternAtom _glfw.x11.xlib.InternAtom
202#define XLookupString _glfw.x11.xlib.LookupString
203#define XMapRaised _glfw.x11.xlib.MapRaised
204#define XMapWindow _glfw.x11.xlib.MapWindow
205#define XMoveResizeWindow _glfw.x11.xlib.MoveResizeWindow
206#define XMoveWindow _glfw.x11.xlib.MoveWindow
207#define XNextEvent _glfw.x11.xlib.NextEvent
208#define XOpenDisplay _glfw.x11.xlib.OpenDisplay
209#define XOpenIM _glfw.x11.xlib.OpenIM
210#define XPeekEvent _glfw.x11.xlib.PeekEvent
211#define XPending _glfw.x11.xlib.Pending
212#define XQueryExtension _glfw.x11.xlib.QueryExtension
213#define XQueryPointer _glfw.x11.xlib.QueryPointer
214#define XRaiseWindow _glfw.x11.xlib.RaiseWindow
215#define XRegisterIMInstantiateCallback _glfw.x11.xlib.RegisterIMInstantiateCallback
216#define XResizeWindow _glfw.x11.xlib.ResizeWindow
217#define XResourceManagerString _glfw.x11.xlib.ResourceManagerString
218#define XSaveContext _glfw.x11.xlib.SaveContext
219#define XSelectInput _glfw.x11.xlib.SelectInput
220#define XSendEvent _glfw.x11.xlib.SendEvent
221#define XSetClassHint _glfw.x11.xlib.SetClassHint
222#define XSetErrorHandler _glfw.x11.xlib.SetErrorHandler
223#define XSetICFocus _glfw.x11.xlib.SetICFocus
224#define XSetIMValues _glfw.x11.xlib.SetIMValues
225#define XSetInputFocus _glfw.x11.xlib.SetInputFocus
226#define XSetLocaleModifiers _glfw.x11.xlib.SetLocaleModifiers
227#define XSetScreenSaver _glfw.x11.xlib.SetScreenSaver
228#define XSetSelectionOwner _glfw.x11.xlib.SetSelectionOwner
229#define XSetWMHints _glfw.x11.xlib.SetWMHints
230#define XSetWMNormalHints _glfw.x11.xlib.SetWMNormalHints
231#define XSetWMProtocols _glfw.x11.xlib.SetWMProtocols
232#define XSupportsLocale _glfw.x11.xlib.SupportsLocale
233#define XSync _glfw.x11.xlib.Sync
234#define XTranslateCoordinates _glfw.x11.xlib.TranslateCoordinates
235#define XUndefineCursor _glfw.x11.xlib.UndefineCursor
236#define XUngrabPointer _glfw.x11.xlib.UngrabPointer
237#define XUnmapWindow _glfw.x11.xlib.UnmapWindow
238#define XUnsetICFocus _glfw.x11.xlib.UnsetICFocus
239#define XVisualIDFromVisual _glfw.x11.xlib.VisualIDFromVisual
240#define XWarpPointer _glfw.x11.xlib.WarpPointer
241#define XkbFreeKeyboard _glfw.x11.xkb.FreeKeyboard
242#define XkbFreeNames _glfw.x11.xkb.FreeNames
243#define XkbGetMap _glfw.x11.xkb.GetMap
244#define XkbGetNames _glfw.x11.xkb.GetNames
245#define XkbGetState _glfw.x11.xkb.GetState
246#define XkbKeycodeToKeysym _glfw.x11.xkb.KeycodeToKeysym
247#define XkbQueryExtension _glfw.x11.xkb.QueryExtension
248#define XkbSelectEventDetails _glfw.x11.xkb.SelectEventDetails
249#define XkbSetDetectableAutoRepeat _glfw.x11.xkb.SetDetectableAutoRepeat
250#define XrmDestroyDatabase _glfw.x11.xrm.DestroyDatabase
251#define XrmGetResource _glfw.x11.xrm.GetResource
252#define XrmGetStringDatabase _glfw.x11.xrm.GetStringDatabase
253#define XrmInitialize _glfw.x11.xrm.Initialize
254#define XrmUniqueQuark _glfw.x11.xrm.UniqueQuark
255#define XUnregisterIMInstantiateCallback _glfw.x11.xlib.UnregisterIMInstantiateCallback
256#define Xutf8LookupString _glfw.x11.xlib.utf8LookupString
257#define Xutf8SetWMProperties _glfw.x11.xlib.utf8SetWMProperties
259typedef XRRCrtcGamma* (* PFN_XRRAllocGamma)(int);
264typedef XRRCrtcGamma* (* PFN_XRRGetCrtcGamma)(Display*,RRCrtc);
266typedef XRRCrtcInfo* (* PFN_XRRGetCrtcInfo) (Display*,XRRScreenResources*,RRCrtc);
267typedef XRROutputInfo* (* PFN_XRRGetOutputInfo)(Display*,XRRScreenResources*,RROutput);
269typedef XRRScreenResources* (* PFN_XRRGetScreenResourcesCurrent)(Display*,Window);
273typedef Status (*
PFN_XRRSetCrtcConfig)(Display*,XRRScreenResources*,RRCrtc,Time,int,int,RRMode,Rotation,RROutput*,int);
276#define XRRAllocGamma _glfw.x11.randr.AllocGamma
277#define XRRFreeCrtcInfo _glfw.x11.randr.FreeCrtcInfo
278#define XRRFreeGamma _glfw.x11.randr.FreeGamma
279#define XRRFreeOutputInfo _glfw.x11.randr.FreeOutputInfo
280#define XRRFreeScreenResources _glfw.x11.randr.FreeScreenResources
281#define XRRGetCrtcGamma _glfw.x11.randr.GetCrtcGamma
282#define XRRGetCrtcGammaSize _glfw.x11.randr.GetCrtcGammaSize
283#define XRRGetCrtcInfo _glfw.x11.randr.GetCrtcInfo
284#define XRRGetOutputInfo _glfw.x11.randr.GetOutputInfo
285#define XRRGetOutputPrimary _glfw.x11.randr.GetOutputPrimary
286#define XRRGetScreenResourcesCurrent _glfw.x11.randr.GetScreenResourcesCurrent
287#define XRRQueryExtension _glfw.x11.randr.QueryExtension
288#define XRRQueryVersion _glfw.x11.randr.QueryVersion
289#define XRRSelectInput _glfw.x11.randr.SelectInput
290#define XRRSetCrtcConfig _glfw.x11.randr.SetCrtcConfig
291#define XRRSetCrtcGamma _glfw.x11.randr.SetCrtcGamma
292#define XRRUpdateConfiguration _glfw.x11.randr.UpdateConfiguration
294typedef XcursorImage* (* PFN_XcursorImageCreate)(int,int);
297typedef char* (* PFN_XcursorGetTheme)(Display*);
299typedef XcursorImage* (* PFN_XcursorLibraryLoadImage)(
const char*,
const char*,int);
300#define XcursorImageCreate _glfw.x11.xcursor.ImageCreate
301#define XcursorImageDestroy _glfw.x11.xcursor.ImageDestroy
302#define XcursorImageLoadCursor _glfw.x11.xcursor.ImageLoadCursor
303#define XcursorGetTheme _glfw.x11.xcursor.GetTheme
304#define XcursorGetDefaultSize _glfw.x11.xcursor.GetDefaultSize
305#define XcursorLibraryLoadImage _glfw.x11.xcursor.LibraryLoadImage
309typedef XineramaScreenInfo* (* PFN_XineramaQueryScreens)(Display*,
int*);
310#define XineramaIsActive _glfw.x11.xinerama.IsActive
311#define XineramaQueryExtension _glfw.x11.xinerama.QueryExtension
312#define XineramaQueryScreens _glfw.x11.xinerama.QueryScreens
318#define XGetXCBConnection _glfw.x11.x11xcb.GetXCBConnection
324#define XF86VidModeQueryExtension _glfw.x11.vidmode.QueryExtension
325#define XF86VidModeGetGammaRamp _glfw.x11.vidmode.GetGammaRamp
326#define XF86VidModeSetGammaRamp _glfw.x11.vidmode.SetGammaRamp
327#define XF86VidModeGetGammaRampSize _glfw.x11.vidmode.GetGammaRampSize
331#define XIQueryVersion _glfw.x11.xi.QueryVersion
332#define XISelectEvents _glfw.x11.xi.SelectEvents
336typedef XRenderPictFormat* (* PFN_XRenderFindVisualFormat)(Display*,Visual
const*);
337#define XRenderQueryExtension _glfw.x11.xrender.QueryExtension
338#define XRenderQueryVersion _glfw.x11.xrender.QueryVersion
339#define XRenderFindVisualFormat _glfw.x11.xrender.FindVisualFormat
346#define XShapeQueryExtension _glfw.x11.xshape.QueryExtension
347#define XShapeQueryVersion _glfw.x11.xshape.QueryVersion
348#define XShapeCombineRegion _glfw.x11.xshape.ShapeCombineRegion
349#define XShapeCombineMask _glfw.x11.xshape.ShapeCombineMask
381#if defined(__linux__)
387#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)
388#define _glfw_dlclose(handle) dlclose(handle)
389#define _glfw_dlsym(handle, name) dlsym(handle, name)
391#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowX11 x11
392#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryX11 x11
393#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorX11 x11
394#define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorX11 x11
789 unsigned char** value);
#define APIENTRY
Compiler- and platform-specific preprocessor work.
char keynames[GLFW_KEY_LAST+1][5]
PFN_XDefineCursor DefineCursor
Atom NET_SUPPORTING_WM_CHECK
Atom NET_WM_BYPASS_COMPOSITOR
PFN_XCreateRegion CreateRegion
PFN_XShapeQueryVersion QueryVersion
PFN_XRRGetCrtcGamma GetCrtcGamma
PFN_XQueryPointer QueryPointer
PFN_XRRQueryVersion QueryVersion
PFN_Xutf8SetWMProperties utf8SetWMProperties
PFN_XSetLocaleModifiers SetLocaleModifiers
PFN_XrmGetStringDatabase GetStringDatabase
PFN_XineramaIsActive IsActive
PFN_XineramaQueryExtension QueryExtension
PFN_XSetScreenSaver SetScreenSaver
PFN_XCreateFontCursor CreateFontCursor
PFN_XCreateColormap CreateColormap
PFN_XGetWMNormalHints GetWMNormalHints
PFN_XcursorLibraryLoadImage LibraryLoadImage
PFN_XRRSelectInput SelectInput
struct _GLFWlibraryX11::@42 randr
PFN_XOpenDisplay OpenDisplay
short int scancodes[GLFW_KEY_LAST+1]
PFN_XFreeColormap FreeColormap
struct _GLFWlibraryX11::@41 xrm
PFN_XcursorGetDefaultSize GetDefaultSize
struct _GLFWlibraryX11::@49 vidmode
PFN_XSaveContext SaveContext
PFN_XkbSelectEventDetails SelectEventDetails
PFN_XQueryExtension QueryExtension
PFN_XRRUpdateConfiguration UpdateConfiguration
PFN_XGetWindowAttributes GetWindowAttributes
PFN_XGetScreenSaver GetScreenSaver
PFN_XF86VidModeQueryExtension QueryExtension
_GLFWwindow * disabledCursorWindow
PFN_XSetInputFocus SetInputFocus
PFN_XIQueryVersion QueryVersion
PFN_XGetWindowProperty GetWindowProperty
PFN_XRenderQueryVersion QueryVersion
PFN_XCheckIfEvent CheckIfEvent
PFN_XInternAtom InternAtom
PFN_XRRGetOutputInfo GetOutputInfo
PFN_XDeleteContext DeleteContext
PFN_XSetWMNormalHints SetWMNormalHints
PFN_XGetInputFocus GetInputFocus
struct _GLFWlibraryX11::@48 x11xcb
PFN_XCloseDisplay CloseDisplay
PFN_XVisualIDFromVisual VisualIDFromVisual
PFN_XDestroyRegion DestroyRegion
PFN_XcursorImageLoadCursor ImageLoadCursor
PFN_XGrabPointer GrabPointer
PFN_XRRGetCrtcInfo GetCrtcInfo
Window helperWindowHandle
PFN_XGetEventData GetEventData
PFN_XSetWMProtocols SetWMProtocols
PFN_XRenderFindVisualFormat FindVisualFormat
PFN_XSetSelectionOwner SetSelectionOwner
PFN_XkbQueryExtension QueryExtension
PFN_XRRSetCrtcConfig SetCrtcConfig
PFN_XrmInitialize Initialize
PFN_XResizeWindow ResizeWindow
PFN_XFilterEvent FilterEvent
PFN_XRegisterIMInstantiateCallback RegisterIMInstantiateCallback
char * primarySelectionString
PFN_XLookupString LookupString
PFN_XineramaQueryScreens QueryScreens
PFN_XResourceManagerString ResourceManagerString
PFN_XkbKeycodeToKeysym KeycodeToKeysym
PFN_XRRSetCrtcGamma SetCrtcGamma
PFN_XChangeProperty ChangeProperty
PFN_XcursorGetTheme GetTheme
PFN_XInitThreads InitThreads
PFN_XCheckTypedWindowEvent CheckTypedWindowEvent
PFN_XIconifyWindow IconifyWindow
PFN_XGetKeyboardMapping GetKeyboardMapping
struct _GLFWlibraryX11::@51 xrender
PFN_XRRGetOutputPrimary GetOutputPrimary
PFN_XMoveResizeWindow MoveResizeWindow
struct _GLFWlibraryX11::@43 xkb
PFN_XkbFreeKeyboard FreeKeyboard
PFN_XrmDestroyDatabase DestroyDatabase
PFN_XFindContext FindContext
PFN_XcursorImageCreate ImageCreate
PFN_XF86VidModeGetGammaRampSize GetGammaRampSize
struct _GLFWlibraryX11::@50 xi
struct _GLFWlibraryX11::@45 xdnd
PFN_XShapeCombineMask ShapeCombineMask
PFN_XkbSetDetectableAutoRepeat SetDetectableAutoRepeat
PFN_XSupportsLocale SupportsLocale
PFN_XFreeCursor FreeCursor
PFN_XUnregisterIMInstantiateCallback UnregisterIMInstantiateCallback
PFN_XGetSelectionOwner GetSelectionOwner
PFN_XGetErrorText GetErrorText
PFN_XCreateWindow CreateWindow
PFN_XrmUniqueQuark UniqueQuark
PFN_XkbFreeNames FreeNames
PFN_XChangeWindowAttributes ChangeWindowAttributes
PFN_XTranslateCoordinates TranslateCoordinates
PFN_XSetIMValues SetIMValues
PFN_XGetXCBConnection GetXCBConnection
PFN_XSelectInput SelectInput
PFN_XSetClassHint SetClassHint
PFN_XDisplayKeycodes DisplayKeycodes
Atom NET_WM_STATE_MAXIMIZED_HORZ
PFN_XFreeEventData FreeEventData
PFN_XUndefineCursor UndefineCursor
PFN_XSetErrorHandler SetErrorHandler
Atom NET_WM_WINDOW_OPACITY
PFN_XUngrabPointer UngrabPointer
PFN_XRRFreeScreenResources FreeScreenResources
struct _GLFWlibraryX11::@40 xlib
Atom NET_REQUEST_FRAME_EXTENTS
PFN_XAllocSizeHints AllocSizeHints
PFN_XRRGetCrtcGammaSize GetCrtcGammaSize
Atom NET_WM_FULLSCREEN_MONITORS
PFN_XUnmapWindow UnmapWindow
PFN_XSetWMHints SetWMHints
PFN_XAllocClassHint AllocClassHint
PFN_XUnsetICFocus UnsetICFocus
struct _GLFWlibraryX11::@47 xinerama
PFN_XRRFreeCrtcInfo FreeCrtcInfo
PFN_XShapeQueryExtension QueryExtension
PFN_XcursorImageDestroy ImageDestroy
PFN_XWarpPointer WarpPointer
PFN_XConvertSelection ConvertSelection
PFN_XDestroyWindow DestroyWindow
struct _GLFWlibraryX11::@46 xcursor
Atom NET_WM_STATE_FULLSCREEN
struct _GLFWlibraryX11::@52 xshape
PFN_XF86VidModeSetGammaRamp SetGammaRamp
PFN_XRRAllocGamma AllocGamma
PFN_XGetICValues GetICValues
PFN_XAllocWMHints AllocWMHints
PFN_XRaiseWindow RaiseWindow
PFN_XGetVisualInfo GetVisualInfo
PFN_Xutf8LookupString utf8LookupString
PFN_XISelectEvents SelectEvents
Atom NET_WM_WINDOW_TYPE_NORMAL
struct _GLFWlibraryX11::@44 saver
Atom NET_WM_STATE_DEMANDS_ATTENTION
PFN_XSetICFocus SetICFocus
PFN_XMoveWindow MoveWindow
PFN_XEventsQueued EventsQueued
PFN_XRRFreeOutputInfo FreeOutputInfo
PFN_XDeleteProperty DeleteProperty
Atom NET_WM_STATE_MAXIMIZED_VERT
PFN_XShapeCombineRegion ShapeCombineRegion
Cursor hiddenCursorHandle
PFN_XRRFreeGamma FreeGamma
PFN_XGetIMValues GetIMValues
PFN_XF86VidModeGetGammaRamp GetGammaRamp
PFN_XrmGetResource GetResource
PFN_XRRQueryExtension QueryExtension
PFN_XRRGetScreenResourcesCurrent GetScreenResourcesCurrent
PFN_XRenderQueryExtension QueryExtension
GLFWbool overrideRedirect
VkXcbSurfaceCreateFlagsKHR flags
xcb_connection_t * connection
VkXlibSurfaceCreateFlagsKHR flags