--[[
DO NOT EDIT
This file is autogenerated from gen_lib.lua
To regenerate this file, run `nvim -l gen_lib.lua`
--]]

local ffi=require"ffi"
ffi.cdef[=[
enum {AnyButton=0};
enum {AnyModifier=32768};
enum {ButtonPress=4};
enum {ButtonPressMask=4};
enum {ButtonRelease=5};
enum {CirculateNotify=26};
enum {CirculateRequest=27};
enum {ClientMessage=33};
enum {ColormapNotify=32};
enum {ConfigureNotify=22};
enum {ConfigureRequest=23};
enum {ControlMask=4};
enum {CreateNotify=16};
enum {CurrentTime=0};
enum {DestroyNotify=17};
enum {EnterNotify=7};
enum {Expose=12};
enum {FocusIn=9};
enum {FocusOut=10};
enum {GenericEvent=35};
enum {GrabModeAsync=1};
enum {GrabModeSync=0};
enum {GraphicsExpose=13};
enum {GravityNotify=24};
enum {IsViewable=2};
enum {KeyPress=2};
enum {KeyRelease=3};
enum {KeymapNotify=11};
enum {LASTEvent=36};
enum {LeaveNotify=8};
enum {LockMask=2};
enum {MapNotify=19};
enum {MapRequest=20};
enum {MappingNotify=34};
enum {Mod1Mask=8};
enum {Mod2Mask=16};
enum {Mod3Mask=32};
enum {Mod4Mask=64};
enum {Mod5Mask=128};
enum {MotionNotify=6};
enum {NoExpose=14};
enum {PropertyNotify=28};
enum {ReparentNotify=21};
enum {ReplayPointer=2};
enum {ResizeRequest=25};
enum {RevertToParent=2};
enum {SelectionClear=29};
enum {SelectionNotify=31};
enum {SelectionRequest=30};
enum {ShiftMask=1};
enum {StructureNotifyMask=131072};
enum {SubstructureNotifyMask=524288};
enum {SubstructureRedirectMask=1048576};
enum {UnmapNotify=18};
enum {VisibilityNotify=15};
typedef unsigned long XID;;
typedef XID Window;;
struct _XDisplay;
typedef struct _XDisplay Display;;
typedef unsigned long Time;;
extern int XAllowEvents( Display* , int , Time );;
extern int XCloseDisplay( Display* );;
typedef struct { int x, y; int width, height; int border_width; Window sibling; int stack_mode; } XWindowChanges;;
extern int XConfigureWindow( Display* , Window , unsigned int , XWindowChanges* );;
extern int XDefaultScreen( Display* );;
typedef char *XPointer;;
typedef struct _XExtData { int number; struct _XExtData *next; int (*free_private)( struct _XExtData *extension ); XPointer private_data; } XExtData;;
typedef unsigned long VisualID;;
typedef struct { XExtData *ext_data; VisualID visualid; int class; unsigned long red_mask, green_mask, blue_mask; int bits_per_rgb; int map_entries; } Visual;;
typedef struct { int depth; int nvisuals; Visual *visuals; } Depth;;
typedef struct _XGC *GC;;
typedef XID Colormap;;
typedef struct { XExtData *ext_data; struct _XDisplay *display; Window root; int width, height; int mwidth, mheight; int ndepths; Depth *depths; int root_depth; Visual *root_visual; GC default_gc; Colormap cmap; unsigned long white_pixel; unsigned long black_pixel; int max_maps, min_maps; int backing_store; int save_unders; long root_input_mask; } Screen;;
extern Screen *XDefaultScreenOfDisplay( Display* );;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; } XAnyEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; Window root; Window subwindow; Time time; int x, y; int x_root, y_root; unsigned int state; unsigned int keycode; int same_screen; } XKeyEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; Window root; Window subwindow; Time time; int x, y; int x_root, y_root; unsigned int state; unsigned int button; int same_screen; } XButtonEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; Window root; Window subwindow; Time time; int x, y; int x_root, y_root; unsigned int state; char is_hint; int same_screen; } XMotionEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; Window root; Window subwindow; Time time; int x, y; int x_root, y_root; int mode; int detail; int same_screen; int focus; unsigned int state; } XCrossingEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; int mode; int detail; } XFocusChangeEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; int x, y; int width, height; int count; } XExposeEvent;;
typedef XID Drawable;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Drawable drawable; int x, y; int width, height; int count; int major_code; int minor_code; } XGraphicsExposeEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Drawable drawable; int major_code; int minor_code; } XNoExposeEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; int state; } XVisibilityEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window parent; Window window; int x, y; int width, height; int border_width; int override_redirect; } XCreateWindowEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window event; Window window; } XDestroyWindowEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window event; Window window; int from_configure; } XUnmapEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window event; Window window; int override_redirect; } XMapEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window parent; Window window; } XMapRequestEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window event; Window window; Window parent; int x, y; int override_redirect; } XReparentEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window event; Window window; int x, y; int width, height; int border_width; Window above; int override_redirect; } XConfigureEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window event; Window window; int x, y; } XGravityEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; int width, height; } XResizeRequestEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window parent; Window window; int x, y; int width, height; int border_width; Window above; int detail; unsigned long value_mask; } XConfigureRequestEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window event; Window window; int place; } XCirculateEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window parent; Window window; int place; } XCirculateRequestEvent;;
typedef unsigned long Atom;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; Atom atom; Time time; int state; } XPropertyEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; Atom selection; Time time; } XSelectionClearEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window owner; Window requestor; Atom selection; Atom target; Atom property; Time time; } XSelectionRequestEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window requestor; Atom selection; Atom target; Atom property; Time time; } XSelectionEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; Colormap colormap; int new; int state; } XColormapEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; Atom message_type; int format; union { char b[20]; short s[10]; long l[5]; } data; } XClientMessageEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; int request; int first_keycode; int count; } XMappingEvent;;
typedef struct { int type; Display *display; XID resourceid; unsigned long serial; unsigned char error_code; unsigned char request_code; unsigned char minor_code; } XErrorEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; Window window; char key_vector[32]; } XKeymapEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; int extension; int evtype; } XGenericEvent;;
typedef struct { int type; unsigned long serial; int send_event; Display *display; int extension; int evtype; unsigned int cookie; void *data; } XGenericEventCookie;;
typedef union _XEvent { int type; XAnyEvent xany; XKeyEvent xkey; XButtonEvent xbutton; XMotionEvent xmotion; XCrossingEvent xcrossing; XFocusChangeEvent xfocus; XExposeEvent xexpose; XGraphicsExposeEvent xgraphicsexpose; XNoExposeEvent xnoexpose; XVisibilityEvent xvisibility; XCreateWindowEvent xcreatewindow; XDestroyWindowEvent xdestroywindow; XUnmapEvent xunmap; XMapEvent xmap; XMapRequestEvent xmaprequest; XReparentEvent xreparent; XConfigureEvent xconfigure; XGravityEvent xgravity; XResizeRequestEvent xresizerequest; XConfigureRequestEvent xconfigurerequest; XCirculateEvent xcirculate; XCirculateRequestEvent xcirculaterequest; XPropertyEvent xproperty; XSelectionClearEvent xselectionclear; XSelectionRequestEvent xselectionrequest; XSelectionEvent xselection; XColormapEvent xcolormap; XClientMessageEvent xclient; XMappingEvent xmapping; XErrorEvent xerror; XKeymapEvent xkeymap; XGenericEvent xgeneric; XGenericEventCookie xcookie; long pad[24]; } XEvent;;
extern int XFree( void* );;
extern int XGetInputFocus( Display* , Window* , int* );;
typedef struct { int x, y; int width, height; int border_width; int depth; Visual *visual; Window root; int class; int bit_gravity; int win_gravity; int backing_store; unsigned long backing_planes; unsigned long backing_pixel; int save_under; Colormap colormap; int map_installed; int map_state; long all_event_masks; long your_event_mask; long do_not_propagate_mask; int override_redirect; Screen *screen; } XWindowAttributes;;
extern int XGetWindowAttributes( Display* , Window , XWindowAttributes* );;
typedef XID Cursor;;
extern int XGrabButton( Display* , unsigned int , unsigned int , Window , int , unsigned int , int , int , Window , Cursor );;
extern int XGrabKey( Display* , int , unsigned int , Window , int , int , int );;
extern Atom XInternAtom( Display* , const char* , int );;
typedef unsigned char KeyCode;;
typedef XID KeySym;;
extern KeyCode XKeysymToKeycode( Display* , KeySym );;
extern int XMapWindow( Display* , Window );;
extern int XMoveResizeWindow( Display* , Window , int , int , unsigned int , unsigned int );;
extern int XNextEvent( Display* , XEvent* );;
extern Display *XOpenDisplay( const char* );;
extern int XPending( Display* );;
extern int XQueryTree( Display* , Window , Window* , Window* , Window** , unsigned int* );;
typedef struct { short x, y; unsigned short width, height; } XRectangle;;
extern Window XRootWindow( Display* , int );;
extern int XSelectInput( Display* , Window , long );;
extern int XSendEvent( Display* , Window , int , long , XEvent* );;
extern int XSetInputFocus( Display* , Window , int , Time );;
extern KeySym XStringToKeysym( const char* );;
extern int XSync( Display* , int );;
extern int XUnmapWindow( Display* , Window );;
]=]
return ffi.load"X11" --[[@as table]]
