diff --git a/packages/x11/src/root.zig b/packages/x11/src/root.zig index f54d8b9..5b80ef0 100644 --- a/packages/x11/src/root.zig +++ b/packages/x11/src/root.zig @@ -274,27 +274,41 @@ pub const Button3 = @as(i32, 3); pub const Button4 = @as(i32, 4); pub const Button5 = @as(i32, 5); -pub const NotifyNormal = @as(i32, 0); -pub const NotifyGrab = @as(i32, 1); -pub const NotifyUngrab = @as(i32, 2); -pub const NotifyWhileGrabbed = @as(i32, 3); -pub const NotifyHint = @as(i32, 1); +pub const NotifyMode = enum(i32) { + NotifyNormal = 0, + NotifyGrab = 1, + NotifyUngrab = 2, + NotifyWhileGrabbed = 3, + _, -pub const NotifyAncestor = @as(i32, 0); -pub const NotifyVirtual = @as(i32, 1); -pub const NotifyInferior = @as(i32, 2); -pub const NotifyNonlinear = @as(i32, 3); -pub const NotifyNonlinearVirtual = @as(i32, 4); -pub const NotifyPointer = @as(i32, 5); -pub const NotifyPointerRoot = @as(i32, 6); -pub const NotifyDetailNone = @as(i32, 7); + /// for MotionNotify events + pub const NotifyHint: NotifyMode = @enumFromInt(1); +}; -pub const VisibilityUnobscured = @as(i32, 0); -pub const VisibilityPartiallyObscured = @as(i32, 1); -pub const VisibilityFullyObscured = @as(i32, 2); +pub const NotifyDetail = enum(i32) { + NotifyAncestor = 0, + NotifyVirtual = 1, + NotifyInferior = 2, + NotifyNonlinear = 3, + NotifyNonlinearVirtual = 4, + NotifyPointer = 5, + NotifyPointerRoot = 6, + NotifyDetailNone = 7, + _, +}; -pub const PlaceOnTop = @as(i32, 0); -pub const PlaceOnBottom = @as(i32, 1); +pub const VisibilityState = enum(i32) { + VisibilityUnobscured = 0, + VisibilityPartiallyObscured = 1, + VisibilityFullyObscured = 2, + _, +}; + +pub const CirculationRequest = enum(i32) { + PlaceOnTop = 0, + PlaceOnBottom = 1, + _, +}; pub const Family = enum(i32) { /// IPv4 @@ -308,11 +322,17 @@ pub const Family = enum(i32) { _, }; -pub const PropertyNewValue = @as(i32, 0); -pub const PropertyDelete = @as(i32, 1); +pub const PropertyNotification = enum(i32) { + PropertyNewValue = 0, + PropertyDelete = 1, + _, +}; -pub const ColormapUninstalled = @as(i32, 0); -pub const ColormapInstalled = @as(i32, 1); +pub const ColormapNotification = enum(i32) { + ColormapUninstalled = 0, + ColormapInstalled = 1, + _, +}; pub const GrabModeSync = @as(i32, 0); pub const GrabModeAsync = @as(i32, 1); @@ -474,11 +494,14 @@ pub const DestroyAll = @as(i32, 0); pub const RetainPermanent = @as(i32, 1); pub const RetainTemporary = @as(i32, 2); -pub const Above = @as(i32, 0); -pub const Below = @as(i32, 1); -pub const TopIf = @as(i32, 2); -pub const BottomIf = @as(i32, 3); -pub const Opposite = @as(i32, 4); +pub const WindowStackingMode = enum(i32) { + Above = 0, + Below = 1, + TopIf = 2, + BottomIf = 3, + Opposite = 4, + _, +}; pub const RaiseLowest = @as(i32, 0); pub const LowerHighest = @as(i32, 1); @@ -636,9 +659,12 @@ pub const MappingSuccess = @as(i32, 0); pub const MappingBusy = @as(i32, 1); pub const MappingFailed = @as(i32, 2); -pub const MappingModifier = @as(i32, 0); -pub const MappingKeyboard = @as(i32, 1); -pub const MappingPointer = @as(i32, 2); +pub const MappingRequest = enum(i32) { + MappingModifier = 0, + MappingKeyboard = 1, + MappingPointer = 2, + _, +}; pub const DontPreferBlanking = @as(i32, 0); pub const PreferBlanking = @as(i32, 1); @@ -1330,70 +1356,289 @@ pub const Display = opaque { // --- ALLOC ID MACRO --- - pub inline fn allocID(dpy: anytype) XID { + pub inline fn allocID(self: *Display) XID { const private: *_XPrivDisplay = @ptrCast(@alignCast(self)); return private.resource_alloc.?(private); } // --- METHODS --- - pub inline fn openDisplay(display_name: ?[*:0]const u8) ?*Display { - return XOpenDisplay(display_name); - } - - pub inline fn closeDisplay(self: *Display) i32 { - return XCloseDisplay(self); - } - - pub inline fn createSimpleWindow(self: *Display, parent: Window, x: i32, y: i32, width: u32, height: u32, border_width: u32, border: u64, background: u64) Window { - return XCreateSimpleWindow(self, parent, x, y, width, height, border_width, border, background); - } - - pub inline fn createWindow(self: *Display, parent: Window, x: i32, y: i32, width: u32, height: u32, border_width: u32, depth: i32, class: u32, visual: ?*Visual, valuemask: ValueMask(XSetWindowAttributes), attributes: *XSetWindowAttributes) Window { - return XCreateWindow(self, parent, x, y, width, height, border_width, depth, class, visual, valuemask, attributes); - } - - pub inline fn destroyWindow(self: *Display, w: Window) i32 { - return XDestroyWindow(self, w); - } - - pub inline fn destroySubwindows(self: *Display, w: Window) i32 { - return XDestroySubwindows(self, w); - } - - pub inline fn storeName(self: *Display, w: Window, window_name: ?[*:0]const u8) i32 { - return XStoreName(self, w, window_name); - } - - pub inline fn createGC(self: *Display, d: Drawable, valuemask: ValueMask(XGCValues), values: ?*XGCValues) ?*GC { - return XCreateGC(self, d, valuemask, values); - } - - pub inline fn freeGC(self: *Display, gc: ?*GC) i32 { - return XFreeGC(self, gc); - } - - pub inline fn internAtom(self: *Display, atom_name: ?[*:0]const u8, only_if_exists: bool) Atom { - return XInternAtom(self, atom_name, @enumFromInt(@intFromBool(only_if_exists))); - } - - pub inline fn setWMProtocols(self: *Display, w: Window, protocols: []Atom) Status { - return XSetWMProtocols(self, w, protocols.ptr, @intCast(protocols.len)); - } - - pub inline fn mapWindow(self: *Display, w: Window) i32 { - return XMapWindow(self, w); - } - - pub inline fn unmapWindow(self: *Display, w: Window) i32 { - return XUnmapWindow(self, w); - } - - pub inline fn nextEvent(self: *Display) XEvent { - var ret: XEvent = undefined; - _ = XNextEvent(self, &ret); - return ret; - } + // TODO + // pub fn activateScreenSaver(display: ?*Display) i32; + // pub fn addConnectionWatch(display: ?*Display, XConnectionWatchProc, ?*anyopaque) i32; + // pub fn addExtension(display: ?*Display) [*c]XExtCodes; + // pub fn addHost(display: ?*Display, [*c]XHostAddress) i32; + // pub fn addHosts(display: ?*Display, [*c]XHostAddress, i32) i32; + // pub fn addToSaveSet(display: ?*Display, Window) i32; + // pub fn allocColor(display: ?*Display, Colormap, [*c]XColor) i32; + // pub fn allocColorCells(display: ?*Display, Colormap, i32, [*c]u64, u32, [*c]u64, u32) i32; + // pub fn allocColorPlanes(display: ?*Display, Colormap, i32, [*c]u64, i32, i32, i32, i32, [*c]u64, [*c]u64, [*c]u64) i32; + // pub fn allocNamedColor(display: ?*Display, Colormap, [*c]const u8, [*c]XColor, [*c]XColor) i32; + // pub fn allowEvents(display: ?*Display, i32, Time) i32; + // pub fn autoRepeatOff(display: ?*Display) i32; + // pub fn autoRepeatOn(display: ?*Display) i32; + // pub fn bell(display: ?*Display, i32) i32; + // pub fn changeActivePointerGrab(display: ?*Display, u32, Cursor, Time) i32; + // pub fn changeGC(display: ?*Display, ?*GC, u64, [*c]XGCValues) i32; + // pub fn changeKeyboardControl(display: ?*Display, u64, [*c]XKeyboardControl) i32; + // pub fn changeKeyboardMapping(display: ?*Display, i32, i32, [*c]KeySym, i32) i32; + // pub fn changePointerControl(display: ?*Display, i32, i32, i32, i32, i32) i32; + // pub fn changeProperty(display: ?*Display, Window, Atom, Atom, i32, i32, [*c]const u8, i32) i32; + // pub fn changeSaveSet(display: ?*Display, Window, i32) i32; + // pub fn changeWindowAttributes(display: ?*Display, Window, u64, [*c]XSetWindowAttributes) i32; + // pub fn checkIfEvent(display: ?*Display, [*c]XEvent, ?*const fn (display: ?*Display, [*c]XEvent, ?*anyopaque) callconv(.c) i32, ?*anyopaque) i32; + // pub fn checkMaskEvent(display: ?*Display, i64, [*c]XEvent) i32; + // pub fn checkTypedEvent(display: ?*Display, i32, [*c]XEvent) i32; + // pub fn checkTypedWindowEvent(display: ?*Display, Window, i32, [*c]XEvent) i32; + // pub fn checkWindowEvent(display: ?*Display, Window, i64, [*c]XEvent) i32; + // pub fn circulateSubwindows(display: ?*Display, Window, i32) i32; + // pub fn circulateSubwindowsDown(display: ?*Display, Window) i32; + // pub fn circulateSubwindowsUp(display: ?*Display, Window) i32; + // pub fn clearArea(display: ?*Display, Window, i32, i32, u32, u32, i32) i32; + // pub fn clearWindow(display: ?*Display, Window) i32; + // pub fn closeDisplay(display: ?*Display) i32; + // pub fn configureWindow(display: ?*Display, Window, u32, [*c]XWindowChanges) i32; + // pub fn convertSelection(display: ?*Display, Atom, Atom, Atom, Window, Time) i32; + // pub fn copyArea(display: ?*Display, Drawable, Drawable, ?*GC, i32, i32, u32, u32, i32, i32) i32; + // pub fn copyColormapAndFree(display: ?*Display, Colormap) Colormap; + // pub fn copyGC(display: ?*Display, ?*GC, u64, ?*GC) i32; + // pub fn copyPlane(display: ?*Display, Drawable, Drawable, ?*GC, i32, i32, u32, u32, i32, i32, u64) i32; + // pub fn createBitmapFromData(display: ?*Display, Drawable, [*c]const u8, u32, u32) Pixmap; + // pub fn createColormap(display: ?*Display, Window, [*c]Visual, i32) Colormap; + // pub fn createFontCursor(display: ?*Display, u32) Cursor; + // pub fn createFontSet(display: ?*Display, [*c]const u8, [*c][*c][*c]u8, [*c]i32, [*c][*c]u8) XFontSet; + // pub fn createGC(display: ?*Display, d: Drawable, valuemask: ValueMask(XGCValues), values: ?*XGCValues) ?*GC; + // pub fn createGlyphCursor(display: ?*Display, Font, Font, u32, u32, [*c]const XColor, [*c]const XColor) Cursor; + // pub fn createImage(display: ?*Display, [*c]Visual, u32, i32, i32, [*c]u8, u32, u32, i32, i32) [*c]XImage; + // pub fn createPixmap(display: ?*Display, Drawable, u32, u32, u32) Pixmap; + // pub fn createPixmapCursor(display: ?*Display, Pixmap, Pixmap, [*c]XColor, [*c]XColor, u32, u32) Cursor; + // pub fn createPixmapFromBitmapData(display: ?*Display, Drawable, [*c]u8, u32, u32, u64, u64, u32) Pixmap; + // pub fn createSimpleWindow(display: ?*Display, parent: Window, x: i32, y: i32, width: u32, height: u32, border_width: u32, border: u64, background: u64) Window; + // pub fn createWindow(display: ?*Display, parent: Window, x: i32, y: i32, width: u32, height: u32, border_width: u32, depth: i32, class: u32, visual: ?*Visual, valuemask: ValueMask(XSetWindowAttributes), attributes: *XSetWindowAttributes) Window; + // pub fn defineCursor(display: ?*Display, Window, Cursor) i32; + // pub fn deleteProperty(display: ?*Display, Window, Atom) i32; + // pub fn destroySubwindows(display: ?*Display, w: Window) i32; + // pub fn destroyWindow(display: ?*Display, w: Window) i32; + // pub fn disableAccessControl(display: ?*Display) i32; + // pub fn displayKeycodes(display: ?*Display, [*c]i32, [*c]i32) i32; + // pub fn displayMotionBufferSize(display: ?*Display) u64; + // pub fn drawArc(display: ?*Display, Drawable, ?*GC, i32, i32, u32, u32, i32, i32) i32; + // pub fn drawArcs(display: ?*Display, Drawable, ?*GC, [*c]XArc, i32) i32; + // pub fn drawImageString(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]const u8, i32) i32; + // pub fn drawImageString16(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]const XChar2b, i32) i32; + // pub fn drawLine(display: ?*Display, Drawable, ?*GC, i32, i32, i32, i32) i32; + // pub fn drawLines(display: ?*Display, Drawable, ?*GC, [*c]XPoint, i32, i32) i32; + // pub fn drawPoint(display: ?*Display, Drawable, ?*GC, i32, i32) i32; + // pub fn drawPoints(display: ?*Display, Drawable, ?*GC, [*c]XPoint, i32, i32) i32; + // pub fn drawRectangle(display: ?*Display, Drawable, ?*GC, i32, i32, u32, u32) i32; + // pub fn drawRectangles(display: ?*Display, Drawable, ?*GC, [*c]XRectangle, i32) i32; + // pub fn drawSegments(display: ?*Display, Drawable, ?*GC, [*c]XSegment, i32) i32; + // pub fn drawString(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]const u8, i32) i32; + // pub fn drawString16(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]const XChar2b, i32) i32; + // pub fn drawText(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]XTextItem, i32) i32; + // pub fn drawText16(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]XTextItem16, i32) i32; + // pub fn enableAccessControl(display: ?*Display) i32; + // pub fn eventsQueued(display: ?*Display, i32) i32; + // pub fn extendedMaxRequestSize(display: ?*Display) i64; + // pub fn fetchBuffer(display: ?*Display, [*c]i32, i32) [*c]u8; + // pub fn fetchBytes(display: ?*Display, [*c]i32) [*c]u8; + // pub fn fetchName(display: ?*Display, Window, [*c][*c]u8) i32; + // pub fn fillArc(display: ?*Display, Drawable, ?*GC, i32, i32, u32, u32, i32, i32) i32; + // pub fn fillArcs(display: ?*Display, Drawable, ?*GC, [*c]XArc, i32) i32; + // pub fn fillPolygon(display: ?*Display, Drawable, ?*GC, [*c]XPoint, i32, i32, i32) i32; + // pub fn fillRectangle(display: ?*Display, Drawable, ?*GC, i32, i32, u32, u32) i32; + // pub fn fillRectangles(display: ?*Display, Drawable, ?*GC, [*c]XRectangle, i32) i32; + // pub fn flush(display: ?*Display) i32; + // pub fn flushGC(display: ?*Display, ?*GC) void; + // pub fn forceScreenSaver(display: ?*Display, i32) i32; + // pub fn freeColormap(display: ?*Display, Colormap) i32; + // pub fn freeColors(display: ?*Display, Colormap, [*c]u64, i32, u64) i32; + // pub fn freeCursor(display: ?*Display, Cursor) i32; + // pub fn freeEventData(display: ?*Display, [*c]XGenericEventCookie) void; + // pub fn freeFont(display: ?*Display, [*c]XFontStruct) i32; + // pub fn freeFontSet(display: ?*Display, XFontSet) void; + // pub fn freeGC(display: ?*Display, gc: ?*GC) i32; + // pub fn freePixmap(display: ?*Display, Pixmap) i32; + // pub fn geometry(display: ?*Display, i32, [*c]const u8, [*c]const u8, u32, u32, u32, i32, i32, [*c]i32, [*c]i32, [*c]i32, [*c]i32) i32; + // pub fn getAtomName(display: ?*Display, Atom) [*c]u8; + // pub fn getAtomNames(display: ?*Display, [*c]Atom, i32, [*c][*c]u8) i32; + // pub fn getCommand(display: ?*Display, Window, [*c][*c][*c]u8, [*c]i32) i32; + // pub fn getDefault(display: ?*Display, [*c]const u8, [*c]const u8) [*c]u8; + // pub fn getErrorDatabaseText(display: ?*Display, [*c]const u8, [*c]const u8, [*c]const u8, [*c]u8, i32) i32; + // pub fn getErrorText(display: ?*Display, i32, [*c]u8, i32) i32; + // pub fn getEventData(display: ?*Display, [*c]XGenericEventCookie) i32; + // pub fn getFontPath(display: ?*Display, [*c]i32) [*c][*c]u8; + // pub fn getGCValues(display: ?*Display, ?*GC, u64, [*c]XGCValues) i32; + // pub fn getGeometry(display: ?*Display, Drawable, [*c]Window, [*c]i32, [*c]i32, [*c]u32, [*c]u32, [*c]u32, [*c]u32) i32; + // pub fn getIconName(display: ?*Display, Window, [*c][*c]u8) i32; + // pub fn getImage(display: ?*Display, Drawable, i32, i32, u32, u32, u64, i32) [*c]XImage; + // pub fn getInputFocus(display: ?*Display, [*c]Window, [*c]i32) i32; + // pub fn getKeyboardControl(display: ?*Display, [*c]XKeyboardState) i32; + // pub fn getKeyboardMapping(display: ?*Display, KeyCode, i32, [*c]i32) [*c]KeySym; + // pub fn getModifierMapping(display: ?*Display) [*c]XModifierKeymap; + // pub fn getMotionEvents(display: ?*Display, Window, Time, Time, [*c]i32) [*c]XTimeCoord; + // pub fn getPointerControl(display: ?*Display, [*c]i32, [*c]i32, [*c]i32) i32; + // pub fn getPointerMapping(display: ?*Display, [*c]u8, i32) i32; + // pub fn getScreenSaver(display: ?*Display, [*c]i32, [*c]i32, [*c]i32, [*c]i32) i32; + // pub fn getSelectionOwner(display: ?*Display, Atom) Window; + // pub fn getSubImage(display: ?*Display, Drawable, i32, i32, u32, u32, u64, i32, [*c]XImage, i32, i32) [*c]XImage; + // pub fn getTransientForHint(display: ?*Display, Window, [*c]Window) i32; + // pub fn getWindowAttributes(display: ?*Display, Window, [*c]XWindowAttributes) i32; + // pub fn getWindowProperty(display: ?*Display, Window, Atom, i64, i64, i32, Atom, [*c]Atom, [*c]i32, [*c]u64, [*c]u64, [*c][*c]u8) i32; + // pub fn getWMColormapWindows(display: ?*Display, Window, [*c][*c]Window, [*c]i32) i32; + // pub fn getWMProtocols(display: ?*Display, Window, [*c][*c]Atom, [*c]i32) i32; + // pub fn grabButton(display: ?*Display, u32, u32, Window, i32, u32, i32, i32, Window, Cursor) i32; + // pub fn grabKey(display: ?*Display, i32, u32, Window, i32, i32, i32) i32; + // pub fn grabKeyboard(display: ?*Display, Window, i32, i32, i32, Time) i32; + // pub fn grabPointer(display: ?*Display, Window, i32, u32, i32, i32, Window, Cursor, Time) i32; + // pub fn grabServer(display: ?*Display) i32; + // pub fn iconifyWindow(display: ?*Display, Window, i32) i32; + // pub fn ifEvent(display: ?*Display, [*c]XEvent, ?*const fn (display: ?*Display, [*c]XEvent, ?*anyopaque) callconv(.c) i32, ?*anyopaque) i32; + // pub fn initExtension(display: ?*Display, [*c]const u8) [*c]XExtCodes; + // pub fn installColormap(display: ?*Display, Colormap) i32; + // pub fn internalConnectionNumbers(display: ?*Display, [*c][*c]i32, [*c]i32) i32; + // pub fn internAtom(display: ?*Display, atom_name: ?[*:0]const u8, only_if_exists: Bool) Atom; + // pub fn internAtoms(display: ?*Display, [*c][*c]u8, i32, i32, [*c]Atom) i32; + // pub fn keycodeToKeysym(display: ?*Display, KeyCode, i32) KeySym; + // pub fn keysymToKeycode(display: ?*Display, KeySym) KeyCode; + // pub fn killClient(display: ?*Display, XID) i32; + // pub fn listDepths(display: ?*Display, i32, [*c]i32) [*c]i32; + // pub fn listExtensions(display: ?*Display, [*c]i32) [*c][*c]u8; + // pub fn listFonts(display: ?*Display, [*c]const u8, i32, [*c]i32) [*c][*c]u8; + // pub fn listFontsWithInfo(display: ?*Display, [*c]const u8, i32, [*c]i32, [*c][*c]XFontStruct) [*c][*c]u8; + // pub fn listHosts(display: ?*Display, [*c]i32, [*c]i32) [*c]XHostAddress; + // pub fn listInstalledColormaps(display: ?*Display, Window, [*c]i32) [*c]Colormap; + // pub fn listPixmapFormats(display: ?*Display, [*c]i32) [*c]XPixmapFormatValues; + // pub fn listProperties(display: ?*Display, Window, [*c]i32) [*c]Atom; + // pub fn loadFont(display: ?*Display, [*c]const u8) Font; + // pub fn loadQueryFont(display: ?*Display, [*c]const u8) [*c]XFontStruct; + // pub fn lockDisplay(display: ?*Display) void; + // pub fn lookupColor(display: ?*Display, Colormap, [*c]const u8, [*c]XColor, [*c]XColor) i32; + // pub fn lowerWindow(display: ?*Display, Window) i32; + // pub fn mapRaised(display: ?*Display, Window) i32; + // pub fn mapSubwindows(display: ?*Display, Window) i32; + // pub fn mapWindow(display: ?*Display, w: Window) i32; + // pub fn maskEvent(display: ?*Display, i64, [*c]XEvent) i32; + // pub fn maxRequestSize(display: ?*Display) i64; + // pub fn mbDrawImageString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; + // pub fn mbDrawString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; + // pub fn mbDrawText(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]XmbTextItem, i32) void; + // pub fn moveResizeWindow(display: ?*Display, Window, i32, i32, u32, u32) i32; + // pub fn moveWindow(display: ?*Display, Window, i32, i32) i32; + // pub fn nextEvent(display: ?*Display, event_return: ?*XEvent) i32; + // pub fn noOp(display: ?*Display) i32; + // pub fn openIM(display: ?*Display, ?*_XrmHashBucketRec, [*c]u8, [*c]u8) XIM; + // pub fn openOM(display: ?*Display, ?*_XrmHashBucketRec, [*c]const u8, [*c]const u8) XOM; + // pub fn parseColor(display: ?*Display, Colormap, [*c]const u8, [*c]XColor) i32; + // pub fn peekEvent(display: ?*Display, [*c]XEvent) i32; + // pub fn peekIfEvent(display: ?*Display, [*c]XEvent, ?*const fn (display: ?*Display, [*c]XEvent, ?*anyopaque) callconv(.c) i32, ?*anyopaque) i32; + // pub fn pending(display: ?*Display) i32; + // pub fn processInternalConnection(display: ?*Display, i32) void; + // pub fn putBackEvent(display: ?*Display, [*c]XEvent) i32; + // pub fn putImage(display: ?*Display, Drawable, ?*GC, [*c]XImage, i32, i32, i32, i32, u32, u32) i32; + // pub fn queryBestCursor(display: ?*Display, Drawable, u32, u32, [*c]u32, [*c]u32) i32; + // pub fn queryBestSize(display: ?*Display, i32, Drawable, u32, u32, [*c]u32, [*c]u32) i32; + // pub fn queryBestStipple(display: ?*Display, Drawable, u32, u32, [*c]u32, [*c]u32) i32; + // pub fn queryBestTile(display: ?*Display, Drawable, u32, u32, [*c]u32, [*c]u32) i32; + // pub fn queryColor(display: ?*Display, Colormap, [*c]XColor) i32; + // pub fn queryColors(display: ?*Display, Colormap, [*c]XColor, i32) i32; + // pub fn queryExtension(display: ?*Display, [*c]const u8, [*c]i32, [*c]i32, [*c]i32) i32; + // pub fn queryFont(display: ?*Display, XID) [*c]XFontStruct; + // pub fn queryKeymap(display: ?*Display, [*c]u8) i32; + // pub fn queryPointer(display: ?*Display, Window, [*c]Window, [*c]Window, [*c]i32, [*c]i32, [*c]i32, [*c]i32, [*c]u32) i32; + // pub fn queryTextExtents(display: ?*Display, XID, [*c]const u8, i32, [*c]i32, [*c]i32, [*c]i32, [*c]XCharStruct) i32; + // pub fn queryTextExtents16(display: ?*Display, XID, [*c]const XChar2b, i32, [*c]i32, [*c]i32, [*c]i32, [*c]XCharStruct) i32; + // pub fn queryTree(display: ?*Display, Window, [*c]Window, [*c]Window, [*c][*c]Window, [*c]u32) i32; + // pub fn raiseWindow(display: ?*Display, Window) i32; + // pub fn readBitmapFile(display: ?*Display, Drawable, [*c]const u8, [*c]u32, [*c]u32, [*c]Pixmap, [*c]i32, [*c]i32) i32; + // pub fn rebindKeysym(display: ?*Display, KeySym, [*c]KeySym, i32, [*c]const u8, i32) i32; + // pub fn recolorCursor(display: ?*Display, Cursor, [*c]XColor, [*c]XColor) i32; + // pub fn reconfigureWMWindow(display: ?*Display, Window, i32, u32, [*c]XWindowChanges) i32; + // pub fn registerIMInstantiateCallback(display: ?*Display, ?*_XrmHashBucketRec, [*c]u8, [*c]u8, XIDProc, ?*anyopaque) i32; + // pub fn removeConnectionWatch(display: ?*Display, XConnectionWatchProc, ?*anyopaque) void; + // pub fn removeFromSaveSet(display: ?*Display, Window) i32; + // pub fn removeHost(display: ?*Display, [*c]XHostAddress) i32; + // pub fn removeHosts(display: ?*Display, [*c]XHostAddress, i32) i32; + // pub fn reparentWindow(display: ?*Display, Window, Window, i32, i32) i32; + // pub fn resetScreenSaver(display: ?*Display) i32; + // pub fn resizeWindow(display: ?*Display, Window, u32, u32) i32; + // pub fn resourceManagerString(display: ?*Display) [*c]u8; + // pub fn restackWindows(display: ?*Display, [*c]Window, i32) i32; + // pub fn rotateBuffers(display: ?*Display, i32) i32; + // pub fn rotateWindowProperties(display: ?*Display, Window, [*c]Atom, i32, i32) i32; + // pub fn selectInput(display: ?*Display, Window, i64) i32; + // pub fn sendEvent(display: ?*Display, Window, i32, i64, [*c]XEvent) i32; + // pub fn setAccessControl(display: ?*Display, i32) i32; + // pub fn setAfterFunction(display: ?*Display, ?*const fn (display: ?*Display) callconv(.c) i32) ?*const fn (display: ?*Display) callconv(.c) i32; + // pub fn setArcMode(display: ?*Display, ?*GC, i32) i32; + // pub fn setBackground(display: ?*Display, ?*GC, u64) i32; + // pub fn setClipMask(display: ?*Display, ?*GC, Pixmap) i32; + // pub fn setClipOrigin(display: ?*Display, ?*GC, i32, i32) i32; + // pub fn setClipRectangles(display: ?*Display, ?*GC, i32, i32, [*c]XRectangle, i32, i32) i32; + // pub fn setCloseDownMode(display: ?*Display, i32) i32; + // pub fn setCommand(display: ?*Display, Window, [*c][*c]u8, i32) i32; + // pub fn setDashes(display: ?*Display, ?*GC, i32, [*c]const u8, i32) i32; + // pub fn setFillRule(display: ?*Display, ?*GC, i32) i32; + // pub fn setFillStyle(display: ?*Display, ?*GC, i32) i32; + // pub fn setFont(display: ?*Display, ?*GC, Font) i32; + // pub fn setFontPath(display: ?*Display, [*c][*c]u8, i32) i32; + // pub fn setForeground(display: ?*Display, ?*GC, u64) i32; + // pub fn setFunction(display: ?*Display, ?*GC, i32) i32; + // pub fn setGraphicsExposures(display: ?*Display, ?*GC, i32) i32; + // pub fn setIconName(display: ?*Display, Window, [*c]const u8) i32; + // pub fn setInputFocus(display: ?*Display, Window, i32, Time) i32; + // pub fn setIOErrorExitHandler(display: ?*Display, XIOErrorExitHandler, ?*anyopaque) void; + // pub fn setLineAttributes(display: ?*Display, ?*GC, u32, i32, i32, i32) i32; + // pub fn setModifierMapping(display: ?*Display, [*c]XModifierKeymap) i32; + // pub fn setPlaneMask(display: ?*Display, ?*GC, u64) i32; + // pub fn setPointerMapping(display: ?*Display, [*c]const u8, i32) i32; + // pub fn setScreenSaver(display: ?*Display, i32, i32, i32, i32) i32; + // pub fn setSelectionOwner(display: ?*Display, Atom, Window, Time) i32; + // pub fn setState(display: ?*Display, ?*GC, u64, u64, i32, u64) i32; + // pub fn setStipple(display: ?*Display, ?*GC, Pixmap) i32; + // pub fn setSubwindowMode(display: ?*Display, ?*GC, i32) i32; + // pub fn setTile(display: ?*Display, ?*GC, Pixmap) i32; + // pub fn setTransientForHint(display: ?*Display, Window, Window) i32; + // pub fn setTSOrigin(display: ?*Display, ?*GC, i32, i32) i32; + // pub fn setWindowBackground(display: ?*Display, Window, u64) i32; + // pub fn setWindowBackgroundPixmap(display: ?*Display, Window, Pixmap) i32; + // pub fn setWindowBorder(display: ?*Display, Window, u64) i32; + // pub fn setWindowBorderPixmap(display: ?*Display, Window, Pixmap) i32; + // pub fn setWindowBorderWidth(display: ?*Display, Window, u32) i32; + // pub fn setWindowColormap(display: ?*Display, Window, Colormap) i32; + // pub fn setWMColormapWindows(display: ?*Display, Window, [*c]Window, i32) i32; + // pub fn setWMProtocols(display: ?*Display, w: Window, protocols: ?[*]Atom, count: i32) Status; + // pub fn storeBuffer(display: ?*Display, [*c]const u8, i32, i32) i32; + // pub fn storeBytes(display: ?*Display, [*c]const u8, i32) i32; + // pub fn storeColor(display: ?*Display, Colormap, [*c]XColor) i32; + // pub fn storeColors(display: ?*Display, Colormap, [*c]XColor, i32) i32; + // pub fn storeName(display: ?*Display, w: Window, window_name: ?[*:0]const u8) i32; + // pub fn storeNamedColor(display: ?*Display, Colormap, [*c]const u8, u64, i32) i32; + // pub fn sync(display: ?*Display, i32) i32; + // pub fn synchronize(display: ?*Display, i32) ?*const fn (display: ?*Display) callconv(.c) i32; + // pub fn translateCoordinates(display: ?*Display, Window, Window, i32, i32, [*c]i32, [*c]i32, [*c]Window) i32; + // pub fn undefineCursor(display: ?*Display, Window) i32; + // pub fn ungrabButton(display: ?*Display, u32, u32, Window) i32; + // pub fn ungrabKey(display: ?*Display, i32, u32, Window) i32; + // pub fn ungrabKeyboard(display: ?*Display, Time) i32; + // pub fn ungrabPointer(display: ?*Display, Time) i32; + // pub fn ungrabServer(display: ?*Display) i32; + // pub fn uninstallColormap(display: ?*Display, Colormap) i32; + // pub fn unloadFont(display: ?*Display, Font) i32; + // pub fn unlockDisplay(display: ?*Display) void; + // pub fn unmapSubwindows(display: ?*Display, Window) i32; + // pub fn unmapWindow(display: ?*Display, w: Window) i32; + // pub fn unregisterIMInstantiateCallback(display: ?*Display, ?*_XrmHashBucketRec, [*c]u8, [*c]u8, XIDProc, ?*anyopaque) i32; + // pub fn utf8DrawImageString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; + // pub fn utf8DrawString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; + // pub fn utf8DrawText(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]XmbTextItem, i32) void; + // pub fn warpPointer(display: ?*Display, Window, Window, i32, i32, u32, u32, i32, i32) i32; + // pub fn wcDrawImageString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const WChar, i32) void; + // pub fn wcDrawString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const WChar, i32) void; + // pub fn wcDrawText(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]XwcTextItem, i32) void; + // pub fn windowEvent(display: ?*Display, Window, i64, [*c]XEvent) i32; + // pub fn withdrawWindow(display: ?*Display, Window, i32) i32; + // pub fn writeBitmapFile(display: ?*Display, [*c]const u8, Pixmap, u32, u32, i32, i32) i32; }; pub const _XPrivate = opaque {}; @@ -1447,7 +1692,7 @@ pub const _XPrivDisplay = extern struct { /// maximum number 32 bit words in request max_request_size: u32 = 0, db: ?*_XrmHashBucketRec = null, - private15: ?*const fn (?*Display) callconv(.c) i32 = null, + private15: ?*const fn (display: ?*Display) callconv(.c) i32 = null, /// "host:display" string used on this connect display_name: ?[*:0]const u8 = null, /// default screen for operations @@ -1482,231 +1727,279 @@ pub const _XPrivDisplay = extern struct { // --- MARK: EVENTS -pub const XKeyPressedEvent = extern struct { - type: EventType = .KeyPress, +pub const XKeyEvent = extern struct { + /// of event + type: EventType, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, + /// "event" window it is reported relative to window: Window = .None, + /// root window that the event occurred on root: Window = .None, + /// child window subwindow: Window = .None, - time: Time = @import("std").mem.zeroes(Time), + /// milliseconds + time: Time = .None, + /// pointer x coordinate in event window x: i32 = 0, + /// pointer y coordinate in event window y: i32 = 0, + /// coordinates relative to root x_root: i32 = 0, + /// coordinates relative to root y_root: i32 = 0, + /// key or button mask state: u32 = 0, + /// detail keycode: u32 = 0, - same_screen: i32 = 0, + /// same screen flag + same_screen: Bool = .False, }; -pub const XKeyReleasedEvent = extern struct { - type: EventType = .KeyRelease, - serial: u64 = 0, - send_event: i32 = 0, - display: ?*Display = null, - window: Window = .None, - root: Window = .None, - subwindow: Window = .None, - time: Time = @import("std").mem.zeroes(Time), - x: i32 = 0, - y: i32 = 0, - x_root: i32 = 0, - y_root: i32 = 0, - state: u32 = 0, - keycode: u32 = 0, - same_screen: i32 = 0, -}; +pub const XKeyPressedEvent = XKeyEvent; +pub const XKeyReleasedEvent = XKeyEvent; -pub const XButtonPressedEvent = extern struct { - type: EventType = .ButtonPress, +pub const XButtonEvent = extern struct { + /// of event + type: EventType, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, + /// "event" window it is reported relative to window: Window = .None, + /// root window that the event occurred on root: Window = .None, + /// child window subwindow: Window = .None, - time: Time = @import("std").mem.zeroes(Time), + /// milliseconds + time: Time = .None, + /// pointer x coordinate in event window x: i32 = 0, + /// pointer y coordinate in event window y: i32 = 0, + /// coordinates relative to root x_root: i32 = 0, + /// coordinates relative to root y_root: i32 = 0, + /// key or button mask state: u32 = 0, + /// detail button: u32 = 0, - same_screen: i32 = 0, + /// same screen flag + same_screen: Bool = .False, }; -pub const XButtonReleasedEvent = extern struct { - type: EventType = .ButtonRelease, - serial: u64 = 0, - send_event: i32 = 0, - display: ?*Display = null, - window: Window = .None, - root: Window = .None, - subwindow: Window = .None, - time: Time = @import("std").mem.zeroes(Time), - x: i32 = 0, - y: i32 = 0, - x_root: i32 = 0, - y_root: i32 = 0, - state: u32 = 0, - button: u32 = 0, - same_screen: i32 = 0, -}; +pub const XButtonPressedEvent = XButtonEvent; +pub const XButtonReleasedEvent = XButtonEvent; -pub const XPointerMovedEvent = extern struct { +pub const XMotionEvent = extern struct { + /// of event type: EventType = .MotionNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, + /// "event" window it is reported relative to window: Window = .None, + /// root window that the event occurred on root: Window = .None, + /// child window subwindow: Window = .None, - time: Time = @import("std").mem.zeroes(Time), + /// milliseconds + time: Time = .None, + /// pointer x coordinate in event window x: i32 = 0, + /// pointer y coordinate in event window y: i32 = 0, + /// coordinates relative to root x_root: i32 = 0, + /// coordinates relative to root y_root: i32 = 0, + /// key or button mask state: u32 = 0, + /// detail is_hint: u8 = 0, - same_screen: i32 = 0, + /// same screen flag + same_screen: Bool = .False, }; -pub const XEnterWindowEvent = extern struct { - type: EventType = .EnterNotify, +pub const XPointerMovedEvent = XMotionEvent; + +pub const XCrossingEvent = extern struct { + /// of event + type: EventType, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, + /// "event" window it is reported relative to window: Window = .None, + /// root window that the event occurred on root: Window = .None, + /// child window subwindow: Window = .None, - time: Time = @import("std").mem.zeroes(Time), + /// milliseconds + time: Time = .None, + /// pointer x coordinate in event window x: i32 = 0, + /// pointer y coordinate in event window y: i32 = 0, + /// coordinates relative to root x_root: i32 = 0, + /// coordinates relative to root y_root: i32 = 0, - mode: i32 = 0, - detail: i32 = 0, - same_screen: i32 = 0, - focus: i32 = 0, + mode: NotifyMode = @enumFromInt(0), + detail: NotifyDetail = @enumFromInt(0), + /// same screen flag + same_screen: Bool = .False, + /// boolean focus + focus: Bool = .False, + /// key or button mask state: u32 = 0, }; -pub const XLeaveWindowEvent = extern struct { - type: EventType = .LeaveNotify, +pub const XEnterWindowEffect = XCrossingEvent; +pub const XLeaveWindowEvent = XCrossingEvent; + +pub const XFocusChangeEvent = extern struct { + type: EventType, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, + /// window of event window: Window = .None, - root: Window = .None, - subwindow: Window = .None, - time: Time = @import("std").mem.zeroes(Time), - x: i32 = 0, - y: i32 = 0, - x_root: i32 = 0, - y_root: i32 = 0, - mode: i32 = 0, - detail: i32 = 0, - same_screen: i32 = 0, - focus: i32 = 0, - state: u32 = 0, + mode: NotifyMode = @enumFromInt(0), + detail: NotifyDetail = @enumFromInt(0), }; -pub const XFocusInEvent = extern struct { - type: EventType = .FocusIn, - serial: u64 = 0, - send_event: i32 = 0, - display: ?*Display = null, - window: Window = .None, - mode: i32 = 0, - detail: i32 = 0, -}; - -pub const XFocusOutEvent = extern struct { - type: EventType = .FocusOut, - serial: u64 = 0, - send_event: i32 = 0, - display: ?*Display = null, - window: Window = .None, - mode: i32 = 0, - detail: i32 = 0, -}; +pub const XFocusInEvent = XFocusChangeEvent; +pub const XFocusOutEvent = XFocusChangeEvent; pub const XKeymapEvent = extern struct { type: EventType = .KeymapNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, window: Window = .None, - key_vector: [32]u8 = @import("std").mem.zeroes([32]u8), + key_vector: [32]u8 = @splat(0), }; pub const XExposeEvent = extern struct { type: EventType = .Expose, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, window: Window = .None, x: i32 = 0, y: i32 = 0, width: i32 = 0, height: i32 = 0, + /// if non-zero, at least this many more count: i32 = 0, }; pub const XGraphicsExposeEvent = extern struct { type: EventType = .GraphicsExpose, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, - drawable: Drawable = @import("std").mem.zeroes(Drawable), + drawable: Drawable = .None, x: i32 = 0, y: i32 = 0, width: i32 = 0, height: i32 = 0, + /// if non-zero, at least this many more count: i32 = 0, + /// core is CopyArea or CopyPlane major_code: i32 = 0, + /// not defined in the core minor_code: i32 = 0, }; pub const XNoExposeEvent = extern struct { type: EventType = .NoExpose, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, - drawable: Drawable = @import("std").mem.zeroes(Drawable), + drawable: Drawable = .None, + /// core is CopyArea or CopyPlane major_code: i32 = 0, + /// not defined in the core minor_code: i32 = 0, }; pub const XVisibilityEvent = extern struct { type: EventType = .VisibilityNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, window: Window = .None, - state: i32 = 0, + /// Visibility state + state: VisibilityState = @enumFromInt(0), }; pub const XCreateWindowEvent = extern struct { type: EventType = .CreateNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, + /// parent of the window parent: Window = .None, + /// window id of window created window: Window = .None, + /// window location x: i32 = 0, + /// window location y: i32 = 0, + /// size of window width: i32 = 0, + /// size of window height: i32 = 0, + /// border width border_width: i32 = 0, + /// creation should be overridden override_redirect: i32 = 0, }; pub const XDestroyWindowEvent = extern struct { type: EventType = .DestroyNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, event: Window = .None, window: Window = .None, @@ -1714,28 +2007,38 @@ pub const XDestroyWindowEvent = extern struct { pub const XUnmapEvent = extern struct { type: EventType = .UnmapNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, event: Window = .None, window: Window = .None, - from_configure: i32 = 0, + from_configure: Bool = .False, }; pub const XMapEvent = extern struct { type: EventType = .MapNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, event: Window = .None, window: Window = .None, - override_redirect: i32 = 0, + /// boolean, is override set... + override_redirect: Bool = .False, }; pub const XMapRequestEvent = extern struct { type: EventType = .MapRequest, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, parent: Window = .None, window: Window = .None, @@ -1743,21 +2046,27 @@ pub const XMapRequestEvent = extern struct { pub const XReparentEvent = extern struct { type: EventType = .ReparentNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, event: Window = .None, window: Window = .None, parent: Window = .None, x: i32 = 0, y: i32 = 0, - override_redirect: i32 = 0, + override_redirect: Bool = .False, }; pub const XConfigureEvent = extern struct { type: EventType = .ConfigureNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, event: Window = .None, window: Window = .None, @@ -1767,13 +2076,16 @@ pub const XConfigureEvent = extern struct { height: i32 = 0, border_width: i32 = 0, above: Window = .None, - override_redirect: i32 = 0, + override_redirect: Bool = .False, }; pub const XGravityEvent = extern struct { type: EventType = .GravityNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, event: Window = .None, window: Window = .None, @@ -1783,8 +2095,11 @@ pub const XGravityEvent = extern struct { pub const XResizeRequestEvent = extern struct { type: EventType = .ResizeRequest, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, window: Window = .None, width: i32 = 0, @@ -1793,8 +2108,11 @@ pub const XResizeRequestEvent = extern struct { pub const XConfigureRequestEvent = extern struct { type: EventType = .ConfigureRequest, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, parent: Window = .None, window: Window = .None, @@ -1804,91 +2122,115 @@ pub const XConfigureRequestEvent = extern struct { height: i32 = 0, border_width: i32 = 0, above: Window = .None, - detail: i32 = 0, + detail: WindowStackingMode = @enumFromInt(0), value_mask: u64 = 0, }; pub const XCirculateEvent = extern struct { type: EventType = .CirculateNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, event: Window = .None, window: Window = .None, - place: i32 = 0, + place: CirculationRequest = @enumFromInt(0), }; pub const XCirculateRequestEvent = extern struct { type: EventType = .CirculateRequest, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, parent: Window = .None, window: Window = .None, - place: i32 = 0, + place: CirculationRequest = @enumFromInt(0), }; pub const XPropertyEvent = extern struct { type: EventType = .PropertyNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, window: Window = .None, atom: Atom = .None, - time: Time = @import("std").mem.zeroes(Time), - state: i32 = 0, + time: Time = .None, + state: PropertyNotification = @enumFromInt(0), }; pub const XSelectionClearEvent = extern struct { type: EventType = .SelectionClear, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, window: Window = .None, selection: Atom = .None, - time: Time = @import("std").mem.zeroes(Time), + time: Time = .None, }; pub const XSelectionRequestEvent = extern struct { type: EventType = .SelectionRequest, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, owner: Window = .None, requestor: Window = .None, selection: Atom = .None, target: Atom = .None, property: Atom = .None, - time: Time = @import("std").mem.zeroes(Time), + time: Time = .None, }; pub const XSelectionEvent = extern struct { type: EventType = .SelectionNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, requestor: Window = .None, selection: Atom = .None, target: Atom = .None, property: Atom = .None, - time: Time = @import("std").mem.zeroes(Time), + time: Time = .None, }; pub const XColormapEvent = extern struct { type: EventType = .ColormapNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, window: Window = .None, colormap: Colormap = .None, - new: i32 = 0, - state: i32 = 0, + new: Bool = .False, + state: ColormapNotification = @enumFromInt(0), }; pub const XClientMessageEvent = extern struct { type: EventType = .ClientMessage, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, window: Window = .None, message_type: Atom = .None, @@ -1909,88 +2251,121 @@ pub const XClientMessageEvent = extern struct { pub const XMappingEvent = extern struct { type: EventType = .MappingNotify, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, + /// unused window: Window = .None, - request: i32 = 0, + request: MappingRequest = @enumFromInt(0), + /// first keycode first_keycode: i32 = 0, + /// defines range of change w. first_keycode count: i32 = 0, }; pub const XErrorEvent = extern struct { - type: EventType = .EnterNotify, + type: EventType, + /// Display the event was read from display: ?*Display = null, + /// resource id resourceid: XID = .None, + /// serial number of failed request serial: u64 = 0, + /// error code of failed request error_code: u8 = 0, + /// Major op-code of failed request request_code: u8 = 0, + /// Minor op-code of failed request minor_code: u8 = 0, }; pub const XAnyEvent = extern struct { - type: EventType = @intFromEnum(0), + type: EventType, + /// # of last request processed by server serial: u64 = 0, - send_event: i32 = 0, + /// true if this came from a SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, + /// window on which event was requested in event mask window: Window = .None, }; pub const XGenericEvent = extern struct { + /// of event. Always GenericEvent type: EventType = .GenericEvent, + /// # of last request processed serial: u64 = 0, - send_event: i32 = 0, + /// true if from SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, + /// major opcode of extension that caused the event extension: i32 = 0, + /// actual event type. evtype: i32 = 0, }; pub const XGenericEventCookie = extern struct { - type: EventType = @intFromEnum(0), + /// of event. Always GenericEvent + type: EventType = .GenericEvent, + /// # of last request processed serial: u64 = 0, - send_event: i32 = 0, + /// true if from SendEvent request + send_event: Bool = .False, + /// Display the event was read from display: ?*Display = null, + /// major opcode of extension that caused the event extension: i32 = 0, + /// actual event type. evtype: i32 = 0, cookie: u32 = 0, data: ?*anyopaque = null, }; +/// this union is defined so Xlib can always use the same sized event structure +/// internally, to avoid memory fragmentation. pub const XEvent = extern union { + /// must not be changed; first element type: EventType, - xany: XAnyEvent, - xkey: XKeyEvent, - xbutton: XButtonEvent, - xmotion: XMotionEvent, - xcrossing: XCrossingEvent, - xfocus: XFocusChangeEvent, - xexpose: XExposeEvent, - xgraphicsexpose: XGraphicsExposeEvent, - xnoexpose: XNoExposeEvent, - xvisibility: XVisibilityEvent, - xcreatewindow: XCreateWindowEvent, - xdestroywindow: XDestroyWindowEvent, - xunmap: XUnmapEvent, - xmap: XMapEvent, - xmaprequest: XMapRequestEvent, - xreparent: XReparentEvent, - xconfigure: XConfigureEvent, - xgravity: XGravityEvent, - xresizerequest: XResizeRequestEvent, - xconfigurerequest: XConfigureRequestEvent, - xcirculate: XCirculateEvent, - xcirculaterequest: XCirculateRequestEvent, - xproperty: XPropertyEvent, - xselectionclear: XSelectionClearEvent, - xselectionrequest: XSelectionRequestEvent, - xselection: XSelectionEvent, - xcolormap: XColormapEvent, - xclient: XClientMessageEvent, - xmapping: XMappingEvent, - xerror: XErrorEvent, - xkeymap: XKeymapEvent, - xgeneric: XGenericEvent, - xcookie: XGenericEventCookie, + + any: XAnyEvent, + key: XKeyEvent, + button: XButtonEvent, + motion: XMotionEvent, + crossing: XCrossingEvent, + focus_change: XFocusChangeEvent, + expose: XExposeEvent, + graphics_expose: XGraphicsExposeEvent, + no_expose: XNoExposeEvent, + visibility: XVisibilityEvent, + create_window: XCreateWindowEvent, + destroy_window: XDestroyWindowEvent, + unmap: XUnmapEvent, + map: XMapEvent, + map_request: XMapRequestEvent, + reparent: XReparentEvent, + configure: XConfigureEvent, + gravity: XGravityEvent, + resize_request: XResizeRequestEvent, + configure_request: XConfigureRequestEvent, + circulate: XCirculateEvent, + circulate_request: XCirculateRequestEvent, + property: XPropertyEvent, + selection_clear: XSelectionClearEvent, + selection_request: XSelectionRequestEvent, + selection: XSelectionEvent, + colormap: XColormapEvent, + client_message: XClientMessageEvent, + mapping: XMappingEvent, + @"error": XErrorEvent, + keymap: XKeymapEvent, + generic: XGenericEvent, + generic_cookie: XGenericEventCookie, + _pad: [24]i64, }; @@ -1998,45 +2373,10 @@ pub const XEvent = extern union { // --- MARK: TRANSLATE-C -pub const XErrorHandler = ?*const fn (?*Display, [*c]XErrorEvent) callconv(.c) i32; -pub const XIOErrorHandler = ?*const fn (?*Display) callconv(.c) i32; -pub const XIOErrorExitHandler = ?*const fn (?*Display, ?*anyopaque) callconv(.c) void; -pub const XConnectionWatchProc = ?*const fn (?*Display, ?*anyopaque, i32, i32, [*c]?*anyopaque) callconv(.c) void; - -pub fn ValueMask(comptime T: type) type { - const fields = @typeInfo(T).@"struct".fields; - var mask_fields: [fields.len + 1]std.builtin.Type.StructField = undefined; - - for (fields, 0..) |field, i| { - mask_fields[i] = .{ - .name = field.name, - .type = bool, - .default_value_ptr = &false, - .is_comptime = false, - .alignment = 0, - }; - } - - const PaddingType = std.meta.Int(.unsigned, 64 - fields.len); - - mask_fields[fields.len] = .{ - .name = "_padding", - .type = PaddingType, - .default_value_ptr = &@as(PaddingType, 0), - .is_comptime = false, - .alignment = 0, - }; - - return @Type(.{ - .@"struct" = .{ - .layout = .@"packed", - .backing_integer = u64, - .fields = &mask_fields, - .decls = &.{}, - .is_tuple = false, - }, - }); -} +pub const XErrorHandler = ?*const fn (display: ?*Display, [*c]XErrorEvent) callconv(.c) i32; +pub const XIOErrorHandler = ?*const fn (display: ?*Display) callconv(.c) i32; +pub const XIOErrorExitHandler = ?*const fn (display: ?*Display, ?*anyopaque) callconv(.c) void; +pub const XConnectionWatchProc = ?*const fn (display: ?*Display, ?*anyopaque, i32, i32, [*c]?*anyopaque) callconv(.c) void; pub const XCharStruct = extern struct { lbearing: i16 = 0, @@ -2138,7 +2478,7 @@ pub const struct__XIC = opaque {}; pub const XIC = ?*struct__XIC; pub const XIMProc = ?*const fn (XIM, ?*anyopaque, ?*anyopaque) callconv(.c) void; pub const XICProc = ?*const fn (XIC, ?*anyopaque, ?*anyopaque) callconv(.c) i32; -pub const XIDProc = ?*const fn (?*Display, ?*anyopaque, ?*anyopaque) callconv(.c) void; +pub const XIDProc = ?*const fn (display: ?*Display, ?*anyopaque, ?*anyopaque) callconv(.c) void; pub const XIMStyle = u64; pub const XIMStyles = extern struct { count_styles: u16 = 0, @@ -2428,415 +2768,415 @@ pub const XIMHotKeyStateOFF = @as(i64, 0x0002); // --- MARK: EXTERN FUNCTIONS pub const import = struct { - pub extern fn XActivateScreenSaver(?*Display) i32; - pub extern fn XAddConnectionWatch(?*Display, XConnectionWatchProc, ?*anyopaque) i32; - pub extern fn XAddExtension(?*Display) [*c]XExtCodes; - pub extern fn XAddHost(?*Display, [*c]XHostAddress) i32; - pub extern fn XAddHosts(?*Display, [*c]XHostAddress, i32) i32; + pub extern fn XActivateScreenSaver(display: ?*Display) i32; + pub extern fn XAddConnectionWatch(display: ?*Display, XConnectionWatchProc, ?*anyopaque) i32; + pub extern fn XAddExtension(display: ?*Display) [*c]XExtCodes; + pub extern fn XAddHost(display: ?*Display, [*c]XHostAddress) i32; + pub extern fn XAddHosts(display: ?*Display, [*c]XHostAddress, i32) i32; pub extern fn XAddToExtensionList([*c][*c]XExtData, [*c]XExtData) i32; - pub extern fn XAddToSaveSet(?*Display, Window) i32; - pub extern fn XAllocColor(?*Display, Colormap, [*c]XColor) i32; - pub extern fn XAllocColorCells(?*Display, Colormap, i32, [*c]u64, u32, [*c]u64, u32) i32; - pub extern fn XAllocColorPlanes(?*Display, Colormap, i32, [*c]u64, i32, i32, i32, i32, [*c]u64, [*c]u64, [*c]u64) i32; - pub extern fn XAllocNamedColor(?*Display, Colormap, [*c]const u8, [*c]XColor, [*c]XColor) i32; - pub extern fn XAllowEvents(?*Display, i32, Time) i32; + pub extern fn XAddToSaveSet(display: ?*Display, Window) i32; + pub extern fn XAllocColor(display: ?*Display, Colormap, [*c]XColor) i32; + pub extern fn XAllocColorCells(display: ?*Display, Colormap, i32, [*c]u64, u32, [*c]u64, u32) i32; + pub extern fn XAllocColorPlanes(display: ?*Display, Colormap, i32, [*c]u64, i32, i32, i32, i32, [*c]u64, [*c]u64, [*c]u64) i32; + pub extern fn XAllocNamedColor(display: ?*Display, Colormap, [*c]const u8, [*c]XColor, [*c]XColor) i32; + pub extern fn XAllowEvents(display: ?*Display, i32, Time) i32; pub extern fn XAllPlanes() u64; - pub extern fn XAutoRepeatOff(?*Display) i32; - pub extern fn XAutoRepeatOn(?*Display) i32; + pub extern fn XAutoRepeatOff(display: ?*Display) i32; + pub extern fn XAutoRepeatOn(display: ?*Display) i32; pub extern fn XBaseFontNameListOfFontSet(XFontSet) [*c]u8; - pub extern fn XBell(?*Display, i32) i32; - pub extern fn XBitmapBitOrder(?*Display) i32; - pub extern fn XBitmapPad(?*Display) i32; - pub extern fn XBitmapUnit(?*Display) i32; - pub extern fn XBlackPixel(?*Display, i32) u64; - pub extern fn XBlackPixelOfScreen([*c]Screen) u64; - pub extern fn XCellsOfScreen([*c]Screen) i32; - pub extern fn XChangeActivePointerGrab(?*Display, u32, Cursor, Time) i32; - pub extern fn XChangeGC(?*Display, ?*GC, u64, [*c]XGCValues) i32; - pub extern fn XChangeKeyboardControl(?*Display, u64, [*c]XKeyboardControl) i32; - pub extern fn XChangeKeyboardMapping(?*Display, i32, i32, [*c]KeySym, i32) i32; - pub extern fn XChangePointerControl(?*Display, i32, i32, i32, i32, i32) i32; - pub extern fn XChangeProperty(?*Display, Window, Atom, Atom, i32, i32, [*c]const u8, i32) i32; - pub extern fn XChangeSaveSet(?*Display, Window, i32) i32; - pub extern fn XChangeWindowAttributes(?*Display, Window, u64, [*c]XSetWindowAttributes) i32; - pub extern fn XCheckIfEvent(?*Display, [*c]XEvent, ?*const fn (?*Display, [*c]XEvent, ?*anyopaque) callconv(.c) i32, ?*anyopaque) i32; - pub extern fn XCheckMaskEvent(?*Display, i64, [*c]XEvent) i32; - pub extern fn XCheckTypedEvent(?*Display, i32, [*c]XEvent) i32; - pub extern fn XCheckTypedWindowEvent(?*Display, Window, i32, [*c]XEvent) i32; - pub extern fn XCheckWindowEvent(?*Display, Window, i64, [*c]XEvent) i32; - pub extern fn XCirculateSubwindows(?*Display, Window, i32) i32; - pub extern fn XCirculateSubwindowsDown(?*Display, Window) i32; - pub extern fn XCirculateSubwindowsUp(?*Display, Window) i32; - pub extern fn XClearArea(?*Display, Window, i32, i32, u32, u32, i32) i32; - pub extern fn XClearWindow(?*Display, Window) i32; + pub extern fn XBell(display: ?*Display, i32) i32; + pub extern fn XBitmapBitOrder(display: ?*Display) i32; + pub extern fn XBitmapPad(display: ?*Display) i32; + pub extern fn XBitmapUnit(display: ?*Display) i32; + pub extern fn XBlackPixel(display: ?*Display, i32) u64; + pub extern fn XBlackPixelOfScreen(screen: ?*Screen) u64; + pub extern fn XCellsOfScreen(screen: ?*Screen) i32; + pub extern fn XChangeActivePointerGrab(display: ?*Display, u32, Cursor, Time) i32; + pub extern fn XChangeGC(display: ?*Display, ?*GC, u64, [*c]XGCValues) i32; + pub extern fn XChangeKeyboardControl(display: ?*Display, u64, [*c]XKeyboardControl) i32; + pub extern fn XChangeKeyboardMapping(display: ?*Display, i32, i32, [*c]KeySym, i32) i32; + pub extern fn XChangePointerControl(display: ?*Display, i32, i32, i32, i32, i32) i32; + pub extern fn XChangeProperty(display: ?*Display, Window, Atom, Atom, i32, i32, [*c]const u8, i32) i32; + pub extern fn XChangeSaveSet(display: ?*Display, Window, i32) i32; + pub extern fn XChangeWindowAttributes(display: ?*Display, Window, u64, [*c]XSetWindowAttributes) i32; + pub extern fn XCheckIfEvent(display: ?*Display, [*c]XEvent, ?*const fn (display: ?*Display, [*c]XEvent, ?*anyopaque) callconv(.c) i32, ?*anyopaque) i32; + pub extern fn XCheckMaskEvent(display: ?*Display, i64, [*c]XEvent) i32; + pub extern fn XCheckTypedEvent(display: ?*Display, i32, [*c]XEvent) i32; + pub extern fn XCheckTypedWindowEvent(display: ?*Display, Window, i32, [*c]XEvent) i32; + pub extern fn XCheckWindowEvent(display: ?*Display, Window, i64, [*c]XEvent) i32; + pub extern fn XCirculateSubwindows(display: ?*Display, Window, i32) i32; + pub extern fn XCirculateSubwindowsDown(display: ?*Display, Window) i32; + pub extern fn XCirculateSubwindowsUp(display: ?*Display, Window) i32; + pub extern fn XClearArea(display: ?*Display, Window, i32, i32, u32, u32, i32) i32; + pub extern fn XClearWindow(display: ?*Display, Window) i32; pub extern fn XCloseDisplay(display: ?*Display) i32; pub extern fn XCloseIM(XIM) i32; pub extern fn XCloseOM(XOM) i32; - pub extern fn XConfigureWindow(?*Display, Window, u32, [*c]XWindowChanges) i32; - pub extern fn XConnectionNumber(?*Display) i32; + pub extern fn XConfigureWindow(display: ?*Display, Window, u32, [*c]XWindowChanges) i32; + pub extern fn XConnectionNumber(display: ?*Display) i32; pub extern fn XContextDependentDrawing(XFontSet) i32; pub extern fn XContextualDrawing(XFontSet) i32; - pub extern fn XConvertSelection(?*Display, Atom, Atom, Atom, Window, Time) i32; - pub extern fn XCopyArea(?*Display, Drawable, Drawable, ?*GC, i32, i32, u32, u32, i32, i32) i32; - pub extern fn XCopyColormapAndFree(?*Display, Colormap) Colormap; - pub extern fn XCopyGC(?*Display, ?*GC, u64, ?*GC) i32; - pub extern fn XCopyPlane(?*Display, Drawable, Drawable, ?*GC, i32, i32, u32, u32, i32, i32, u64) i32; - pub extern fn XCreateBitmapFromData(?*Display, Drawable, [*c]const u8, u32, u32) Pixmap; - pub extern fn XCreateColormap(?*Display, Window, [*c]Visual, i32) Colormap; - pub extern fn XCreateFontCursor(?*Display, u32) Cursor; - pub extern fn XCreateFontSet(?*Display, [*c]const u8, [*c][*c][*c]u8, [*c]i32, [*c][*c]u8) XFontSet; + pub extern fn XConvertSelection(display: ?*Display, Atom, Atom, Atom, Window, Time) i32; + pub extern fn XCopyArea(display: ?*Display, Drawable, Drawable, ?*GC, i32, i32, u32, u32, i32, i32) i32; + pub extern fn XCopyColormapAndFree(display: ?*Display, Colormap) Colormap; + pub extern fn XCopyGC(display: ?*Display, ?*GC, u64, ?*GC) i32; + pub extern fn XCopyPlane(display: ?*Display, Drawable, Drawable, ?*GC, i32, i32, u32, u32, i32, i32, u64) i32; + pub extern fn XCreateBitmapFromData(display: ?*Display, Drawable, [*c]const u8, u32, u32) Pixmap; + pub extern fn XCreateColormap(display: ?*Display, Window, [*c]Visual, i32) Colormap; + pub extern fn XCreateFontCursor(display: ?*Display, u32) Cursor; + pub extern fn XCreateFontSet(display: ?*Display, [*c]const u8, [*c][*c][*c]u8, [*c]i32, [*c][*c]u8) XFontSet; pub extern fn XCreateGC(display: ?*Display, d: Drawable, valuemask: ValueMask(XGCValues), values: ?*XGCValues) ?*GC; - pub extern fn XCreateGlyphCursor(?*Display, Font, Font, u32, u32, [*c]const XColor, [*c]const XColor) Cursor; + pub extern fn XCreateGlyphCursor(display: ?*Display, Font, Font, u32, u32, [*c]const XColor, [*c]const XColor) Cursor; pub extern fn XCreateIC(XIM, ...) XIC; - pub extern fn XCreateImage(?*Display, [*c]Visual, u32, i32, i32, [*c]u8, u32, u32, i32, i32) [*c]XImage; + pub extern fn XCreateImage(display: ?*Display, [*c]Visual, u32, i32, i32, [*c]u8, u32, u32, i32, i32) [*c]XImage; pub extern fn XCreateOC(XOM, ...) XOC; - pub extern fn XCreatePixmap(?*Display, Drawable, u32, u32, u32) Pixmap; - pub extern fn XCreatePixmapCursor(?*Display, Pixmap, Pixmap, [*c]XColor, [*c]XColor, u32, u32) Cursor; - pub extern fn XCreatePixmapFromBitmapData(?*Display, Drawable, [*c]u8, u32, u32, u64, u64, u32) Pixmap; + pub extern fn XCreatePixmap(display: ?*Display, Drawable, u32, u32, u32) Pixmap; + pub extern fn XCreatePixmapCursor(display: ?*Display, Pixmap, Pixmap, [*c]XColor, [*c]XColor, u32, u32) Cursor; + pub extern fn XCreatePixmapFromBitmapData(display: ?*Display, Drawable, [*c]u8, u32, u32, u64, u64, u32) Pixmap; pub extern fn XCreateSimpleWindow(display: ?*Display, parent: Window, x: i32, y: i32, width: u32, height: u32, border_width: u32, border: u64, background: u64) Window; pub extern fn XCreateWindow(display: ?*Display, parent: Window, x: i32, y: i32, width: u32, height: u32, border_width: u32, depth: i32, class: u32, visual: ?*Visual, valuemask: ValueMask(XSetWindowAttributes), attributes: *XSetWindowAttributes) Window; - pub extern fn XDefaultColormap(?*Display, i32) Colormap; - pub extern fn XDefaultColormapOfScreen([*c]Screen) Colormap; - pub extern fn XDefaultDepth(?*Display, i32) i32; - pub extern fn XDefaultDepthOfScreen([*c]Screen) i32; - pub extern fn XDefaultGC(?*Display, i32) ?*GC; - pub extern fn XDefaultGCOfScreen([*c]Screen) ?*GC; - pub extern fn XDefaultRootWindow(?*Display) Window; - pub extern fn XDefaultScreen(?*Display) i32; - pub extern fn XDefaultScreenOfDisplay(?*Display) [*c]Screen; - pub extern fn XDefaultVisual(?*Display, i32) [*c]Visual; - pub extern fn XDefaultVisualOfScreen([*c]Screen) [*c]Visual; - pub extern fn XDefineCursor(?*Display, Window, Cursor) i32; + pub extern fn XDefaultColormap(display: ?*Display, i32) Colormap; + pub extern fn XDefaultColormapOfScreen(screen: ?*Screen) Colormap; + pub extern fn XDefaultDepth(display: ?*Display, i32) i32; + pub extern fn XDefaultDepthOfScreen(screen: ?*Screen) i32; + pub extern fn XDefaultGC(display: ?*Display, i32) ?*GC; + pub extern fn XDefaultGCOfScreen(screen: ?*Screen) ?*GC; + pub extern fn XDefaultRootWindow(display: ?*Display) Window; + pub extern fn XDefaultScreen(display: ?*Display) i32; + pub extern fn XDefaultScreenOfDisplay(display: ?*Display) [*c]Screen; + pub extern fn XDefaultVisual(display: ?*Display, i32) [*c]Visual; + pub extern fn XDefaultVisualOfScreen(screen: ?*Screen) [*c]Visual; + pub extern fn XDefineCursor(display: ?*Display, Window, Cursor) i32; pub extern fn XDeleteModifiermapEntry([*c]XModifierKeymap, KeyCode, i32) [*c]XModifierKeymap; - pub extern fn XDeleteProperty(?*Display, Window, Atom) i32; + pub extern fn XDeleteProperty(display: ?*Display, Window, Atom) i32; pub extern fn XDestroyIC(XIC) void; pub extern fn XDestroyOC(XOC) void; pub extern fn XDestroySubwindows(display: ?*Display, w: Window) i32; pub extern fn XDestroyWindow(display: ?*Display, w: Window) i32; pub extern fn XDirectionalDependentDrawing(XFontSet) i32; - pub extern fn XDisableAccessControl(?*Display) i32; - pub extern fn XDisplayCells(?*Display, i32) i32; - pub extern fn XDisplayHeight(?*Display, i32) i32; - pub extern fn XDisplayHeightMM(?*Display, i32) i32; - pub extern fn XDisplayKeycodes(?*Display, [*c]i32, [*c]i32) i32; - pub extern fn XDisplayMotionBufferSize(?*Display) u64; + pub extern fn XDisableAccessControl(display: ?*Display) i32; + pub extern fn XDisplayCells(display: ?*Display, i32) i32; + pub extern fn XDisplayHeight(display: ?*Display, i32) i32; + pub extern fn XDisplayHeightMM(display: ?*Display, i32) i32; + pub extern fn XDisplayKeycodes(display: ?*Display, [*c]i32, [*c]i32) i32; + pub extern fn XDisplayMotionBufferSize(display: ?*Display) u64; pub extern fn XDisplayName([*c]const u8) [*c]u8; pub extern fn XDisplayOfIM(XIM) ?*Display; pub extern fn XDisplayOfOM(XOM) ?*Display; - pub extern fn XDisplayOfScreen([*c]Screen) ?*Display; - pub extern fn XDisplayPlanes(?*Display, i32) i32; - pub extern fn XDisplayString(?*Display) [*c]u8; - pub extern fn XDisplayWidth(?*Display, i32) i32; - pub extern fn XDisplayWidthMM(?*Display, i32) i32; - pub extern fn XDoesBackingStore([*c]Screen) i32; - pub extern fn XDoesSaveUnders([*c]Screen) i32; - pub extern fn XDrawArc(?*Display, Drawable, ?*GC, i32, i32, u32, u32, i32, i32) i32; - pub extern fn XDrawArcs(?*Display, Drawable, ?*GC, [*c]XArc, i32) i32; - pub extern fn XDrawImageString(?*Display, Drawable, ?*GC, i32, i32, [*c]const u8, i32) i32; - pub extern fn XDrawImageString16(?*Display, Drawable, ?*GC, i32, i32, [*c]const XChar2b, i32) i32; - pub extern fn XDrawLine(?*Display, Drawable, ?*GC, i32, i32, i32, i32) i32; - pub extern fn XDrawLines(?*Display, Drawable, ?*GC, [*c]XPoint, i32, i32) i32; - pub extern fn XDrawPoint(?*Display, Drawable, ?*GC, i32, i32) i32; - pub extern fn XDrawPoints(?*Display, Drawable, ?*GC, [*c]XPoint, i32, i32) i32; - pub extern fn XDrawRectangle(?*Display, Drawable, ?*GC, i32, i32, u32, u32) i32; - pub extern fn XDrawRectangles(?*Display, Drawable, ?*GC, [*c]XRectangle, i32) i32; - pub extern fn XDrawSegments(?*Display, Drawable, ?*GC, [*c]XSegment, i32) i32; - pub extern fn XDrawString(?*Display, Drawable, ?*GC, i32, i32, [*c]const u8, i32) i32; - pub extern fn XDrawString16(?*Display, Drawable, ?*GC, i32, i32, [*c]const XChar2b, i32) i32; - pub extern fn XDrawText(?*Display, Drawable, ?*GC, i32, i32, [*c]XTextItem, i32) i32; - pub extern fn XDrawText16(?*Display, Drawable, ?*GC, i32, i32, [*c]XTextItem16, i32) i32; + pub extern fn XDisplayOfScreen(screen: ?*Screen) ?*Display; + pub extern fn XDisplayPlanes(display: ?*Display, i32) i32; + pub extern fn XDisplayString(display: ?*Display) [*c]u8; + pub extern fn XDisplayWidth(display: ?*Display, i32) i32; + pub extern fn XDisplayWidthMM(display: ?*Display, i32) i32; + pub extern fn XDoesBackingStore(screen: ?*Screen) i32; + pub extern fn XDoesSaveUnders(screen: ?*Screen) i32; + pub extern fn XDrawArc(display: ?*Display, Drawable, ?*GC, i32, i32, u32, u32, i32, i32) i32; + pub extern fn XDrawArcs(display: ?*Display, Drawable, ?*GC, [*c]XArc, i32) i32; + pub extern fn XDrawImageString(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]const u8, i32) i32; + pub extern fn XDrawImageString16(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]const XChar2b, i32) i32; + pub extern fn XDrawLine(display: ?*Display, Drawable, ?*GC, i32, i32, i32, i32) i32; + pub extern fn XDrawLines(display: ?*Display, Drawable, ?*GC, [*c]XPoint, i32, i32) i32; + pub extern fn XDrawPoint(display: ?*Display, Drawable, ?*GC, i32, i32) i32; + pub extern fn XDrawPoints(display: ?*Display, Drawable, ?*GC, [*c]XPoint, i32, i32) i32; + pub extern fn XDrawRectangle(display: ?*Display, Drawable, ?*GC, i32, i32, u32, u32) i32; + pub extern fn XDrawRectangles(display: ?*Display, Drawable, ?*GC, [*c]XRectangle, i32) i32; + pub extern fn XDrawSegments(display: ?*Display, Drawable, ?*GC, [*c]XSegment, i32) i32; + pub extern fn XDrawString(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]const u8, i32) i32; + pub extern fn XDrawString16(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]const XChar2b, i32) i32; + pub extern fn XDrawText(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]XTextItem, i32) i32; + pub extern fn XDrawText16(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]XTextItem16, i32) i32; pub extern fn XEHeadOfExtensionList(XEDataObject) [*c][*c]XExtData; - pub extern fn XEnableAccessControl(?*Display) i32; - pub extern fn XEventMaskOfScreen([*c]Screen) i64; - pub extern fn XEventsQueued(?*Display, i32) i32; - pub extern fn XExtendedMaxRequestSize(?*Display) i64; + pub extern fn XEnableAccessControl(display: ?*Display) i32; + pub extern fn XEventMaskOfScreen(screen: ?*Screen) i64; + pub extern fn XEventsQueued(display: ?*Display, i32) i32; + pub extern fn XExtendedMaxRequestSize(display: ?*Display) i64; pub extern fn XExtentsOfFontSet(XFontSet) [*c]XFontSetExtents; - pub extern fn XFetchBuffer(?*Display, [*c]i32, i32) [*c]u8; - pub extern fn XFetchBytes(?*Display, [*c]i32) [*c]u8; - pub extern fn XFetchName(?*Display, Window, [*c][*c]u8) i32; - pub extern fn XFillArc(?*Display, Drawable, ?*GC, i32, i32, u32, u32, i32, i32) i32; - pub extern fn XFillArcs(?*Display, Drawable, ?*GC, [*c]XArc, i32) i32; - pub extern fn XFillPolygon(?*Display, Drawable, ?*GC, [*c]XPoint, i32, i32, i32) i32; - pub extern fn XFillRectangle(?*Display, Drawable, ?*GC, i32, i32, u32, u32) i32; - pub extern fn XFillRectangles(?*Display, Drawable, ?*GC, [*c]XRectangle, i32) i32; + pub extern fn XFetchBuffer(display: ?*Display, [*c]i32, i32) [*c]u8; + pub extern fn XFetchBytes(display: ?*Display, [*c]i32) [*c]u8; + pub extern fn XFetchName(display: ?*Display, Window, [*c][*c]u8) i32; + pub extern fn XFillArc(display: ?*Display, Drawable, ?*GC, i32, i32, u32, u32, i32, i32) i32; + pub extern fn XFillArcs(display: ?*Display, Drawable, ?*GC, [*c]XArc, i32) i32; + pub extern fn XFillPolygon(display: ?*Display, Drawable, ?*GC, [*c]XPoint, i32, i32, i32) i32; + pub extern fn XFillRectangle(display: ?*Display, Drawable, ?*GC, i32, i32, u32, u32) i32; + pub extern fn XFillRectangles(display: ?*Display, Drawable, ?*GC, [*c]XRectangle, i32) i32; pub extern fn XFilterEvent([*c]XEvent, Window) i32; pub extern fn XFindOnExtensionList([*c][*c]XExtData, i32) [*c]XExtData; - pub extern fn XFlush(?*Display) i32; - pub extern fn XFlushGC(?*Display, ?*GC) void; + pub extern fn XFlush(display: ?*Display) i32; + pub extern fn XFlushGC(display: ?*Display, ?*GC) void; pub extern fn XFontsOfFontSet(XFontSet, [*c][*c][*c]XFontStruct, [*c][*c][*c]u8) i32; - pub extern fn XForceScreenSaver(?*Display, i32) i32; + pub extern fn XForceScreenSaver(display: ?*Display, i32) i32; pub extern fn XFree(?*anyopaque) i32; - pub extern fn XFreeColormap(?*Display, Colormap) i32; - pub extern fn XFreeColors(?*Display, Colormap, [*c]u64, i32, u64) i32; - pub extern fn XFreeCursor(?*Display, Cursor) i32; - pub extern fn XFreeEventData(?*Display, [*c]XGenericEventCookie) void; + pub extern fn XFreeColormap(display: ?*Display, Colormap) i32; + pub extern fn XFreeColors(display: ?*Display, Colormap, [*c]u64, i32, u64) i32; + pub extern fn XFreeCursor(display: ?*Display, Cursor) i32; + pub extern fn XFreeEventData(display: ?*Display, [*c]XGenericEventCookie) void; pub extern fn XFreeExtensionList([*c][*c]u8) i32; - pub extern fn XFreeFont(?*Display, [*c]XFontStruct) i32; + pub extern fn XFreeFont(display: ?*Display, [*c]XFontStruct) i32; pub extern fn XFreeFontInfo([*c][*c]u8, [*c]XFontStruct, i32) i32; pub extern fn XFreeFontNames([*c][*c]u8) i32; pub extern fn XFreeFontPath([*c][*c]u8) i32; - pub extern fn XFreeFontSet(?*Display, XFontSet) void; + pub extern fn XFreeFontSet(display: ?*Display, XFontSet) void; pub extern fn XFreeGC(display: ?*Display, gc: ?*GC) i32; pub extern fn XFreeModifiermap([*c]XModifierKeymap) i32; - pub extern fn XFreePixmap(?*Display, Pixmap) i32; + pub extern fn XFreePixmap(display: ?*Display, Pixmap) i32; pub extern fn XFreeStringList([*c][*c]u8) void; pub extern fn XFreeThreads() i32; pub extern fn XGContextFromGC(?*GC) GContext; - pub extern fn XGeometry(?*Display, i32, [*c]const u8, [*c]const u8, u32, u32, u32, i32, i32, [*c]i32, [*c]i32, [*c]i32, [*c]i32) i32; - pub extern fn XGetAtomName(?*Display, Atom) [*c]u8; - pub extern fn XGetAtomNames(?*Display, [*c]Atom, i32, [*c][*c]u8) i32; - pub extern fn XGetCommand(?*Display, Window, [*c][*c][*c]u8, [*c]i32) i32; - pub extern fn XGetDefault(?*Display, [*c]const u8, [*c]const u8) [*c]u8; - pub extern fn XGetErrorDatabaseText(?*Display, [*c]const u8, [*c]const u8, [*c]const u8, [*c]u8, i32) i32; - pub extern fn XGetErrorText(?*Display, i32, [*c]u8, i32) i32; - pub extern fn XGetEventData(?*Display, [*c]XGenericEventCookie) i32; - pub extern fn XGetFontPath(?*Display, [*c]i32) [*c][*c]u8; + pub extern fn XGeometry(display: ?*Display, i32, [*c]const u8, [*c]const u8, u32, u32, u32, i32, i32, [*c]i32, [*c]i32, [*c]i32, [*c]i32) i32; + pub extern fn XGetAtomName(display: ?*Display, Atom) [*c]u8; + pub extern fn XGetAtomNames(display: ?*Display, [*c]Atom, i32, [*c][*c]u8) i32; + pub extern fn XGetCommand(display: ?*Display, Window, [*c][*c][*c]u8, [*c]i32) i32; + pub extern fn XGetDefault(display: ?*Display, [*c]const u8, [*c]const u8) [*c]u8; + pub extern fn XGetErrorDatabaseText(display: ?*Display, [*c]const u8, [*c]const u8, [*c]const u8, [*c]u8, i32) i32; + pub extern fn XGetErrorText(display: ?*Display, i32, [*c]u8, i32) i32; + pub extern fn XGetEventData(display: ?*Display, [*c]XGenericEventCookie) i32; + pub extern fn XGetFontPath(display: ?*Display, [*c]i32) [*c][*c]u8; pub extern fn XGetFontProperty([*c]XFontStruct, Atom, [*c]u64) i32; - pub extern fn XGetGCValues(?*Display, ?*GC, u64, [*c]XGCValues) i32; - pub extern fn XGetGeometry(?*Display, Drawable, [*c]Window, [*c]i32, [*c]i32, [*c]u32, [*c]u32, [*c]u32, [*c]u32) i32; - pub extern fn XGetIconName(?*Display, Window, [*c][*c]u8) i32; + pub extern fn XGetGCValues(display: ?*Display, ?*GC, u64, [*c]XGCValues) i32; + pub extern fn XGetGeometry(display: ?*Display, Drawable, [*c]Window, [*c]i32, [*c]i32, [*c]u32, [*c]u32, [*c]u32, [*c]u32) i32; + pub extern fn XGetIconName(display: ?*Display, Window, [*c][*c]u8) i32; pub extern fn XGetICValues(XIC, ...) [*c]u8; - pub extern fn XGetImage(?*Display, Drawable, i32, i32, u32, u32, u64, i32) [*c]XImage; + pub extern fn XGetImage(display: ?*Display, Drawable, i32, i32, u32, u32, u64, i32) [*c]XImage; pub extern fn XGetIMValues(XIM, ...) [*c]u8; - pub extern fn XGetInputFocus(?*Display, [*c]Window, [*c]i32) i32; - pub extern fn XGetKeyboardControl(?*Display, [*c]XKeyboardState) i32; - pub extern fn XGetKeyboardMapping(?*Display, KeyCode, i32, [*c]i32) [*c]KeySym; - pub extern fn XGetModifierMapping(?*Display) [*c]XModifierKeymap; - pub extern fn XGetMotionEvents(?*Display, Window, Time, Time, [*c]i32) [*c]XTimeCoord; + pub extern fn XGetInputFocus(display: ?*Display, [*c]Window, [*c]i32) i32; + pub extern fn XGetKeyboardControl(display: ?*Display, [*c]XKeyboardState) i32; + pub extern fn XGetKeyboardMapping(display: ?*Display, KeyCode, i32, [*c]i32) [*c]KeySym; + pub extern fn XGetModifierMapping(display: ?*Display) [*c]XModifierKeymap; + pub extern fn XGetMotionEvents(display: ?*Display, Window, Time, Time, [*c]i32) [*c]XTimeCoord; pub extern fn XGetOCValues(XOC, ...) [*c]u8; pub extern fn XGetOMValues(XOM, ...) [*c]u8; - pub extern fn XGetPointerControl(?*Display, [*c]i32, [*c]i32, [*c]i32) i32; - pub extern fn XGetPointerMapping(?*Display, [*c]u8, i32) i32; - pub extern fn XGetScreenSaver(?*Display, [*c]i32, [*c]i32, [*c]i32, [*c]i32) i32; - pub extern fn XGetSelectionOwner(?*Display, Atom) Window; - pub extern fn XGetSubImage(?*Display, Drawable, i32, i32, u32, u32, u64, i32, [*c]XImage, i32, i32) [*c]XImage; - pub extern fn XGetTransientForHint(?*Display, Window, [*c]Window) i32; - pub extern fn XGetWindowAttributes(?*Display, Window, [*c]XWindowAttributes) i32; - pub extern fn XGetWindowProperty(?*Display, Window, Atom, i64, i64, i32, Atom, [*c]Atom, [*c]i32, [*c]u64, [*c]u64, [*c][*c]u8) i32; - pub extern fn XGetWMColormapWindows(?*Display, Window, [*c][*c]Window, [*c]i32) i32; - pub extern fn XGetWMProtocols(?*Display, Window, [*c][*c]Atom, [*c]i32) i32; - pub extern fn XGrabButton(?*Display, u32, u32, Window, i32, u32, i32, i32, Window, Cursor) i32; - pub extern fn XGrabKey(?*Display, i32, u32, Window, i32, i32, i32) i32; - pub extern fn XGrabKeyboard(?*Display, Window, i32, i32, i32, Time) i32; - pub extern fn XGrabPointer(?*Display, Window, i32, u32, i32, i32, Window, Cursor, Time) i32; - pub extern fn XGrabServer(?*Display) i32; - pub extern fn XHeightMMOfScreen([*c]Screen) i32; - pub extern fn XHeightOfScreen([*c]Screen) i32; - pub extern fn XIconifyWindow(?*Display, Window, i32) i32; - pub extern fn XIfEvent(?*Display, [*c]XEvent, ?*const fn (?*Display, [*c]XEvent, ?*anyopaque) callconv(.c) i32, ?*anyopaque) i32; - pub extern fn XImageByteOrder(?*Display) i32; + pub extern fn XGetPointerControl(display: ?*Display, [*c]i32, [*c]i32, [*c]i32) i32; + pub extern fn XGetPointerMapping(display: ?*Display, [*c]u8, i32) i32; + pub extern fn XGetScreenSaver(display: ?*Display, [*c]i32, [*c]i32, [*c]i32, [*c]i32) i32; + pub extern fn XGetSelectionOwner(display: ?*Display, Atom) Window; + pub extern fn XGetSubImage(display: ?*Display, Drawable, i32, i32, u32, u32, u64, i32, [*c]XImage, i32, i32) [*c]XImage; + pub extern fn XGetTransientForHint(display: ?*Display, Window, [*c]Window) i32; + pub extern fn XGetWindowAttributes(display: ?*Display, Window, [*c]XWindowAttributes) i32; + pub extern fn XGetWindowProperty(display: ?*Display, Window, Atom, i64, i64, i32, Atom, [*c]Atom, [*c]i32, [*c]u64, [*c]u64, [*c][*c]u8) i32; + pub extern fn XGetWMColormapWindows(display: ?*Display, Window, [*c][*c]Window, [*c]i32) i32; + pub extern fn XGetWMProtocols(display: ?*Display, Window, [*c][*c]Atom, [*c]i32) i32; + pub extern fn XGrabButton(display: ?*Display, u32, u32, Window, i32, u32, i32, i32, Window, Cursor) i32; + pub extern fn XGrabKey(display: ?*Display, i32, u32, Window, i32, i32, i32) i32; + pub extern fn XGrabKeyboard(display: ?*Display, Window, i32, i32, i32, Time) i32; + pub extern fn XGrabPointer(display: ?*Display, Window, i32, u32, i32, i32, Window, Cursor, Time) i32; + pub extern fn XGrabServer(display: ?*Display) i32; + pub extern fn XHeightMMOfScreen(screen: ?*Screen) i32; + pub extern fn XHeightOfScreen(screen: ?*Screen) i32; + pub extern fn XIconifyWindow(display: ?*Display, Window, i32) i32; + pub extern fn XIfEvent(display: ?*Display, [*c]XEvent, ?*const fn (display: ?*Display, [*c]XEvent, ?*anyopaque) callconv(.c) i32, ?*anyopaque) i32; + pub extern fn XImageByteOrder(display: ?*Display) i32; pub extern fn XIMOfIC(XIC) XIM; - pub extern fn XInitExtension(?*Display, [*c]const u8) [*c]XExtCodes; + pub extern fn XInitExtension(display: ?*Display, [*c]const u8) [*c]XExtCodes; pub extern fn XInitImage([*c]XImage) i32; pub extern fn XInitThreads() i32; pub extern fn XInsertModifiermapEntry([*c]XModifierKeymap, KeyCode, i32) [*c]XModifierKeymap; - pub extern fn XInstallColormap(?*Display, Colormap) i32; - pub extern fn XInternalConnectionNumbers(?*Display, [*c][*c]i32, [*c]i32) i32; + pub extern fn XInstallColormap(display: ?*Display, Colormap) i32; + pub extern fn XInternalConnectionNumbers(display: ?*Display, [*c][*c]i32, [*c]i32) i32; pub extern fn XInternAtom(display: ?*Display, atom_name: ?[*:0]const u8, only_if_exists: Bool) Atom; - pub extern fn XInternAtoms(?*Display, [*c][*c]u8, i32, i32, [*c]Atom) i32; - pub extern fn XKeycodeToKeysym(?*Display, KeyCode, i32) KeySym; - pub extern fn XKeysymToKeycode(?*Display, KeySym) KeyCode; + pub extern fn XInternAtoms(display: ?*Display, [*c][*c]u8, i32, i32, [*c]Atom) i32; + pub extern fn XKeycodeToKeysym(display: ?*Display, KeyCode, i32) KeySym; + pub extern fn XKeysymToKeycode(display: ?*Display, KeySym) KeyCode; pub extern fn XKeysymToString(KeySym) [*c]u8; - pub extern fn XKillClient(?*Display, XID) i32; - pub extern fn XLastKnownRequestProcessed(?*Display) u64; - pub extern fn XListDepths(?*Display, i32, [*c]i32) [*c]i32; - pub extern fn XListExtensions(?*Display, [*c]i32) [*c][*c]u8; - pub extern fn XListFonts(?*Display, [*c]const u8, i32, [*c]i32) [*c][*c]u8; - pub extern fn XListFontsWithInfo(?*Display, [*c]const u8, i32, [*c]i32, [*c][*c]XFontStruct) [*c][*c]u8; - pub extern fn XListHosts(?*Display, [*c]i32, [*c]i32) [*c]XHostAddress; - pub extern fn XListInstalledColormaps(?*Display, Window, [*c]i32) [*c]Colormap; - pub extern fn XListPixmapFormats(?*Display, [*c]i32) [*c]XPixmapFormatValues; - pub extern fn XListProperties(?*Display, Window, [*c]i32) [*c]Atom; - pub extern fn XLoadFont(?*Display, [*c]const u8) Font; - pub extern fn XLoadQueryFont(?*Display, [*c]const u8) [*c]XFontStruct; + pub extern fn XKillClient(display: ?*Display, XID) i32; + pub extern fn XLastKnownRequestProcessed(display: ?*Display) u64; + pub extern fn XListDepths(display: ?*Display, i32, [*c]i32) [*c]i32; + pub extern fn XListExtensions(display: ?*Display, [*c]i32) [*c][*c]u8; + pub extern fn XListFonts(display: ?*Display, [*c]const u8, i32, [*c]i32) [*c][*c]u8; + pub extern fn XListFontsWithInfo(display: ?*Display, [*c]const u8, i32, [*c]i32, [*c][*c]XFontStruct) [*c][*c]u8; + pub extern fn XListHosts(display: ?*Display, [*c]i32, [*c]i32) [*c]XHostAddress; + pub extern fn XListInstalledColormaps(display: ?*Display, Window, [*c]i32) [*c]Colormap; + pub extern fn XListPixmapFormats(display: ?*Display, [*c]i32) [*c]XPixmapFormatValues; + pub extern fn XListProperties(display: ?*Display, Window, [*c]i32) [*c]Atom; + pub extern fn XLoadFont(display: ?*Display, [*c]const u8) Font; + pub extern fn XLoadQueryFont(display: ?*Display, [*c]const u8) [*c]XFontStruct; pub extern fn XLocaleOfFontSet(XFontSet) [*c]u8; pub extern fn XLocaleOfIM(XIM) [*c]u8; pub extern fn XLocaleOfOM(XOM) [*c]u8; - pub extern fn XLockDisplay(?*Display) void; - pub extern fn XLookupColor(?*Display, Colormap, [*c]const u8, [*c]XColor, [*c]XColor) i32; + pub extern fn XLockDisplay(display: ?*Display) void; + pub extern fn XLookupColor(display: ?*Display, Colormap, [*c]const u8, [*c]XColor, [*c]XColor) i32; pub extern fn XLookupKeysym([*c]XKeyEvent, i32) KeySym; - pub extern fn XLowerWindow(?*Display, Window) i32; - pub extern fn XMapRaised(?*Display, Window) i32; - pub extern fn XMapSubwindows(?*Display, Window) i32; + pub extern fn XLowerWindow(display: ?*Display, Window) i32; + pub extern fn XMapRaised(display: ?*Display, Window) i32; + pub extern fn XMapSubwindows(display: ?*Display, Window) i32; pub extern fn XMapWindow(display: ?*Display, w: Window) i32; - pub extern fn XMaskEvent(?*Display, i64, [*c]XEvent) i32; - pub extern fn XMaxCmapsOfScreen([*c]Screen) i32; - pub extern fn XMaxRequestSize(?*Display) i64; - pub extern fn XmbDrawImageString(?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; - pub extern fn XmbDrawString(?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; - pub extern fn XmbDrawText(?*Display, Drawable, ?*GC, i32, i32, [*c]XmbTextItem, i32) void; + pub extern fn XMaskEvent(display: ?*Display, i64, [*c]XEvent) i32; + pub extern fn XMaxCmapsOfScreen(screen: ?*Screen) i32; + pub extern fn XMaxRequestSize(display: ?*Display) i64; + pub extern fn XmbDrawImageString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; + pub extern fn XmbDrawString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; + pub extern fn XmbDrawText(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]XmbTextItem, i32) void; pub extern fn XmbLookupString(XIC, [*c]XKeyPressedEvent, [*c]u8, i32, [*c]KeySym, [*c]i32) i32; pub extern fn XmbResetIC(XIC) [*c]u8; pub extern fn XmbTextEscapement(XFontSet, [*c]const u8, i32) i32; pub extern fn XmbTextExtents(XFontSet, [*c]const u8, i32, [*c]XRectangle, [*c]XRectangle) i32; pub extern fn XmbTextPerCharExtents(XFontSet, [*c]const u8, i32, [*c]XRectangle, [*c]XRectangle, i32, [*c]i32, [*c]XRectangle, [*c]XRectangle) i32; - pub extern fn XMinCmapsOfScreen([*c]Screen) i32; - pub extern fn XMoveResizeWindow(?*Display, Window, i32, i32, u32, u32) i32; - pub extern fn XMoveWindow(?*Display, Window, i32, i32) i32; + pub extern fn XMinCmapsOfScreen(screen: ?*Screen) i32; + pub extern fn XMoveResizeWindow(display: ?*Display, Window, i32, i32, u32, u32) i32; + pub extern fn XMoveWindow(display: ?*Display, Window, i32, i32) i32; pub extern fn XNewModifiermap(i32) [*c]XModifierKeymap; pub extern fn XNextEvent(display: ?*Display, event_return: ?*XEvent) i32; - pub extern fn XNextRequest(?*Display) u64; - pub extern fn XNoOp(?*Display) i32; + pub extern fn XNextRequest(display: ?*Display) u64; + pub extern fn XNoOp(display: ?*Display) i32; pub extern fn XOMOfOC(XOC) XOM; pub extern fn XOpenDisplay(display_name: ?[*:0]const u8) ?*Display; - pub extern fn XOpenIM(?*Display, ?*_XrmHashBucketRec, [*c]u8, [*c]u8) XIM; - pub extern fn XOpenOM(?*Display, ?*_XrmHashBucketRec, [*c]const u8, [*c]const u8) XOM; - pub extern fn XParseColor(?*Display, Colormap, [*c]const u8, [*c]XColor) i32; + pub extern fn XOpenIM(display: ?*Display, ?*_XrmHashBucketRec, [*c]u8, [*c]u8) XIM; + pub extern fn XOpenOM(display: ?*Display, ?*_XrmHashBucketRec, [*c]const u8, [*c]const u8) XOM; + pub extern fn XParseColor(display: ?*Display, Colormap, [*c]const u8, [*c]XColor) i32; pub extern fn XParseGeometry([*c]const u8, [*c]i32, [*c]i32, [*c]u32, [*c]u32) i32; - pub extern fn XPeekEvent(?*Display, [*c]XEvent) i32; - pub extern fn XPeekIfEvent(?*Display, [*c]XEvent, ?*const fn (?*Display, [*c]XEvent, ?*anyopaque) callconv(.c) i32, ?*anyopaque) i32; - pub extern fn XPending(?*Display) i32; - pub extern fn XPlanesOfScreen([*c]Screen) i32; - pub extern fn XProcessInternalConnection(?*Display, i32) void; - pub extern fn XProtocolRevision(?*Display) i32; - pub extern fn XProtocolVersion(?*Display) i32; - pub extern fn XPutBackEvent(?*Display, [*c]XEvent) i32; - pub extern fn XPutImage(?*Display, Drawable, ?*GC, [*c]XImage, i32, i32, i32, i32, u32, u32) i32; - pub extern fn XQLength(?*Display) i32; - pub extern fn XQueryBestCursor(?*Display, Drawable, u32, u32, [*c]u32, [*c]u32) i32; - pub extern fn XQueryBestSize(?*Display, i32, Drawable, u32, u32, [*c]u32, [*c]u32) i32; - pub extern fn XQueryBestStipple(?*Display, Drawable, u32, u32, [*c]u32, [*c]u32) i32; - pub extern fn XQueryBestTile(?*Display, Drawable, u32, u32, [*c]u32, [*c]u32) i32; - pub extern fn XQueryColor(?*Display, Colormap, [*c]XColor) i32; - pub extern fn XQueryColors(?*Display, Colormap, [*c]XColor, i32) i32; - pub extern fn XQueryExtension(?*Display, [*c]const u8, [*c]i32, [*c]i32, [*c]i32) i32; - pub extern fn XQueryFont(?*Display, XID) [*c]XFontStruct; - pub extern fn XQueryKeymap(?*Display, [*c]u8) i32; - pub extern fn XQueryPointer(?*Display, Window, [*c]Window, [*c]Window, [*c]i32, [*c]i32, [*c]i32, [*c]i32, [*c]u32) i32; - pub extern fn XQueryTextExtents(?*Display, XID, [*c]const u8, i32, [*c]i32, [*c]i32, [*c]i32, [*c]XCharStruct) i32; - pub extern fn XQueryTextExtents16(?*Display, XID, [*c]const XChar2b, i32, [*c]i32, [*c]i32, [*c]i32, [*c]XCharStruct) i32; - pub extern fn XQueryTree(?*Display, Window, [*c]Window, [*c]Window, [*c][*c]Window, [*c]u32) i32; - pub extern fn XRaiseWindow(?*Display, Window) i32; - pub extern fn XReadBitmapFile(?*Display, Drawable, [*c]const u8, [*c]u32, [*c]u32, [*c]Pixmap, [*c]i32, [*c]i32) i32; + pub extern fn XPeekEvent(display: ?*Display, [*c]XEvent) i32; + pub extern fn XPeekIfEvent(display: ?*Display, [*c]XEvent, ?*const fn (display: ?*Display, [*c]XEvent, ?*anyopaque) callconv(.c) i32, ?*anyopaque) i32; + pub extern fn XPending(display: ?*Display) i32; + pub extern fn XPlanesOfScreen(screen: ?*Screen) i32; + pub extern fn XProcessInternalConnection(display: ?*Display, i32) void; + pub extern fn XProtocolRevision(display: ?*Display) i32; + pub extern fn XProtocolVersion(display: ?*Display) i32; + pub extern fn XPutBackEvent(display: ?*Display, [*c]XEvent) i32; + pub extern fn XPutImage(display: ?*Display, Drawable, ?*GC, [*c]XImage, i32, i32, i32, i32, u32, u32) i32; + pub extern fn XQLength(display: ?*Display) i32; + pub extern fn XQueryBestCursor(display: ?*Display, Drawable, u32, u32, [*c]u32, [*c]u32) i32; + pub extern fn XQueryBestSize(display: ?*Display, i32, Drawable, u32, u32, [*c]u32, [*c]u32) i32; + pub extern fn XQueryBestStipple(display: ?*Display, Drawable, u32, u32, [*c]u32, [*c]u32) i32; + pub extern fn XQueryBestTile(display: ?*Display, Drawable, u32, u32, [*c]u32, [*c]u32) i32; + pub extern fn XQueryColor(display: ?*Display, Colormap, [*c]XColor) i32; + pub extern fn XQueryColors(display: ?*Display, Colormap, [*c]XColor, i32) i32; + pub extern fn XQueryExtension(display: ?*Display, [*c]const u8, [*c]i32, [*c]i32, [*c]i32) i32; + pub extern fn XQueryFont(display: ?*Display, XID) [*c]XFontStruct; + pub extern fn XQueryKeymap(display: ?*Display, [*c]u8) i32; + pub extern fn XQueryPointer(display: ?*Display, Window, [*c]Window, [*c]Window, [*c]i32, [*c]i32, [*c]i32, [*c]i32, [*c]u32) i32; + pub extern fn XQueryTextExtents(display: ?*Display, XID, [*c]const u8, i32, [*c]i32, [*c]i32, [*c]i32, [*c]XCharStruct) i32; + pub extern fn XQueryTextExtents16(display: ?*Display, XID, [*c]const XChar2b, i32, [*c]i32, [*c]i32, [*c]i32, [*c]XCharStruct) i32; + pub extern fn XQueryTree(display: ?*Display, Window, [*c]Window, [*c]Window, [*c][*c]Window, [*c]u32) i32; + pub extern fn XRaiseWindow(display: ?*Display, Window) i32; + pub extern fn XReadBitmapFile(display: ?*Display, Drawable, [*c]const u8, [*c]u32, [*c]u32, [*c]Pixmap, [*c]i32, [*c]i32) i32; pub extern fn XReadBitmapFileData([*c]const u8, [*c]u32, [*c]u32, [*c][*c]u8, [*c]i32, [*c]i32) i32; - pub extern fn XRebindKeysym(?*Display, KeySym, [*c]KeySym, i32, [*c]const u8, i32) i32; - pub extern fn XRecolorCursor(?*Display, Cursor, [*c]XColor, [*c]XColor) i32; - pub extern fn XReconfigureWMWindow(?*Display, Window, i32, u32, [*c]XWindowChanges) i32; + pub extern fn XRebindKeysym(display: ?*Display, KeySym, [*c]KeySym, i32, [*c]const u8, i32) i32; + pub extern fn XRecolorCursor(display: ?*Display, Cursor, [*c]XColor, [*c]XColor) i32; + pub extern fn XReconfigureWMWindow(display: ?*Display, Window, i32, u32, [*c]XWindowChanges) i32; pub extern fn XRefreshKeyboardMapping([*c]XMappingEvent) i32; - pub extern fn XRegisterIMInstantiateCallback(?*Display, ?*_XrmHashBucketRec, [*c]u8, [*c]u8, XIDProc, ?*anyopaque) i32; - pub extern fn XRemoveConnectionWatch(?*Display, XConnectionWatchProc, ?*anyopaque) void; - pub extern fn XRemoveFromSaveSet(?*Display, Window) i32; - pub extern fn XRemoveHost(?*Display, [*c]XHostAddress) i32; - pub extern fn XRemoveHosts(?*Display, [*c]XHostAddress, i32) i32; - pub extern fn XReparentWindow(?*Display, Window, Window, i32, i32) i32; - pub extern fn XResetScreenSaver(?*Display) i32; - pub extern fn XResizeWindow(?*Display, Window, u32, u32) i32; - pub extern fn XResourceManagerString(?*Display) [*c]u8; - pub extern fn XRestackWindows(?*Display, [*c]Window, i32) i32; + pub extern fn XRegisterIMInstantiateCallback(display: ?*Display, ?*_XrmHashBucketRec, [*c]u8, [*c]u8, XIDProc, ?*anyopaque) i32; + pub extern fn XRemoveConnectionWatch(display: ?*Display, XConnectionWatchProc, ?*anyopaque) void; + pub extern fn XRemoveFromSaveSet(display: ?*Display, Window) i32; + pub extern fn XRemoveHost(display: ?*Display, [*c]XHostAddress) i32; + pub extern fn XRemoveHosts(display: ?*Display, [*c]XHostAddress, i32) i32; + pub extern fn XReparentWindow(display: ?*Display, Window, Window, i32, i32) i32; + pub extern fn XResetScreenSaver(display: ?*Display) i32; + pub extern fn XResizeWindow(display: ?*Display, Window, u32, u32) i32; + pub extern fn XResourceManagerString(display: ?*Display) [*c]u8; + pub extern fn XRestackWindows(display: ?*Display, [*c]Window, i32) i32; pub extern fn XrmInitialize() void; - pub extern fn XRootWindow(?*Display, i32) Window; - pub extern fn XRootWindowOfScreen([*c]Screen) Window; - pub extern fn XRotateBuffers(?*Display, i32) i32; - pub extern fn XRotateWindowProperties(?*Display, Window, [*c]Atom, i32, i32) i32; - pub extern fn XScreenCount(?*Display) i32; - pub extern fn XScreenNumberOfScreen([*c]Screen) i32; - pub extern fn XScreenOfDisplay(?*Display, i32) [*c]Screen; - pub extern fn XScreenResourceString([*c]Screen) [*c]u8; - pub extern fn XSelectInput(?*Display, Window, i64) i32; - pub extern fn XSendEvent(?*Display, Window, i32, i64, [*c]XEvent) i32; - pub extern fn XServerVendor(?*Display) [*c]u8; - pub extern fn XSetAccessControl(?*Display, i32) i32; - pub extern fn XSetAfterFunction(?*Display, ?*const fn (?*Display) callconv(.c) i32) ?*const fn (?*Display) callconv(.c) i32; - pub extern fn XSetArcMode(?*Display, ?*GC, i32) i32; + pub extern fn XRootWindow(display: ?*Display, i32) Window; + pub extern fn XRootWindowOfScreen(screen: ?*Screen) Window; + pub extern fn XRotateBuffers(display: ?*Display, i32) i32; + pub extern fn XRotateWindowProperties(display: ?*Display, Window, [*c]Atom, i32, i32) i32; + pub extern fn XScreenCount(display: ?*Display) i32; + pub extern fn XScreenNumberOfScreen(screen: ?*Screen) i32; + pub extern fn XScreenOfDisplay(display: ?*Display, i32) [*c]Screen; + pub extern fn XScreenResourceString(screen: ?*Screen) [*c]u8; + pub extern fn XSelectInput(display: ?*Display, Window, i64) i32; + pub extern fn XSendEvent(display: ?*Display, Window, i32, i64, [*c]XEvent) i32; + pub extern fn XServerVendor(display: ?*Display) [*c]u8; + pub extern fn XSetAccessControl(display: ?*Display, i32) i32; + pub extern fn XSetAfterFunction(display: ?*Display, ?*const fn (display: ?*Display) callconv(.c) i32) ?*const fn (display: ?*Display) callconv(.c) i32; + pub extern fn XSetArcMode(display: ?*Display, ?*GC, i32) i32; pub extern fn XSetAuthorization([*c]u8, i32, [*c]u8, i32) void; - pub extern fn XSetBackground(?*Display, ?*GC, u64) i32; - pub extern fn XSetClipMask(?*Display, ?*GC, Pixmap) i32; - pub extern fn XSetClipOrigin(?*Display, ?*GC, i32, i32) i32; - pub extern fn XSetClipRectangles(?*Display, ?*GC, i32, i32, [*c]XRectangle, i32, i32) i32; - pub extern fn XSetCloseDownMode(?*Display, i32) i32; - pub extern fn XSetCommand(?*Display, Window, [*c][*c]u8, i32) i32; - pub extern fn XSetDashes(?*Display, ?*GC, i32, [*c]const u8, i32) i32; + pub extern fn XSetBackground(display: ?*Display, ?*GC, u64) i32; + pub extern fn XSetClipMask(display: ?*Display, ?*GC, Pixmap) i32; + pub extern fn XSetClipOrigin(display: ?*Display, ?*GC, i32, i32) i32; + pub extern fn XSetClipRectangles(display: ?*Display, ?*GC, i32, i32, [*c]XRectangle, i32, i32) i32; + pub extern fn XSetCloseDownMode(display: ?*Display, i32) i32; + pub extern fn XSetCommand(display: ?*Display, Window, [*c][*c]u8, i32) i32; + pub extern fn XSetDashes(display: ?*Display, ?*GC, i32, [*c]const u8, i32) i32; pub extern fn XSetErrorHandler(XErrorHandler) XErrorHandler; - pub extern fn XSetFillRule(?*Display, ?*GC, i32) i32; - pub extern fn XSetFillStyle(?*Display, ?*GC, i32) i32; - pub extern fn XSetFont(?*Display, ?*GC, Font) i32; - pub extern fn XSetFontPath(?*Display, [*c][*c]u8, i32) i32; - pub extern fn XSetForeground(?*Display, ?*GC, u64) i32; - pub extern fn XSetFunction(?*Display, ?*GC, i32) i32; - pub extern fn XSetGraphicsExposures(?*Display, ?*GC, i32) i32; + pub extern fn XSetFillRule(display: ?*Display, ?*GC, i32) i32; + pub extern fn XSetFillStyle(display: ?*Display, ?*GC, i32) i32; + pub extern fn XSetFont(display: ?*Display, ?*GC, Font) i32; + pub extern fn XSetFontPath(display: ?*Display, [*c][*c]u8, i32) i32; + pub extern fn XSetForeground(display: ?*Display, ?*GC, u64) i32; + pub extern fn XSetFunction(display: ?*Display, ?*GC, i32) i32; + pub extern fn XSetGraphicsExposures(display: ?*Display, ?*GC, i32) i32; pub extern fn XSetICFocus(XIC) void; - pub extern fn XSetIconName(?*Display, Window, [*c]const u8) i32; + pub extern fn XSetIconName(display: ?*Display, Window, [*c]const u8) i32; pub extern fn XSetICValues(XIC, ...) [*c]u8; pub extern fn XSetIMValues(XIM, ...) [*c]u8; - pub extern fn XSetInputFocus(?*Display, Window, i32, Time) i32; - pub extern fn XSetIOErrorExitHandler(?*Display, XIOErrorExitHandler, ?*anyopaque) void; + pub extern fn XSetInputFocus(display: ?*Display, Window, i32, Time) i32; + pub extern fn XSetIOErrorExitHandler(display: ?*Display, XIOErrorExitHandler, ?*anyopaque) void; pub extern fn XSetIOErrorHandler(XIOErrorHandler) XIOErrorHandler; - pub extern fn XSetLineAttributes(?*Display, ?*GC, u32, i32, i32, i32) i32; + pub extern fn XSetLineAttributes(display: ?*Display, ?*GC, u32, i32, i32, i32) i32; pub extern fn XSetLocaleModifiers([*c]const u8) [*c]u8; - pub extern fn XSetModifierMapping(?*Display, [*c]XModifierKeymap) i32; + pub extern fn XSetModifierMapping(display: ?*Display, [*c]XModifierKeymap) i32; pub extern fn XSetOCValues(XOC, ...) [*c]u8; pub extern fn XSetOMValues(XOM, ...) [*c]u8; - pub extern fn XSetPlaneMask(?*Display, ?*GC, u64) i32; - pub extern fn XSetPointerMapping(?*Display, [*c]const u8, i32) i32; - pub extern fn XSetScreenSaver(?*Display, i32, i32, i32, i32) i32; - pub extern fn XSetSelectionOwner(?*Display, Atom, Window, Time) i32; - pub extern fn XSetState(?*Display, ?*GC, u64, u64, i32, u64) i32; - pub extern fn XSetStipple(?*Display, ?*GC, Pixmap) i32; - pub extern fn XSetSubwindowMode(?*Display, ?*GC, i32) i32; - pub extern fn XSetTile(?*Display, ?*GC, Pixmap) i32; - pub extern fn XSetTransientForHint(?*Display, Window, Window) i32; - pub extern fn XSetTSOrigin(?*Display, ?*GC, i32, i32) i32; - pub extern fn XSetWindowBackground(?*Display, Window, u64) i32; - pub extern fn XSetWindowBackgroundPixmap(?*Display, Window, Pixmap) i32; - pub extern fn XSetWindowBorder(?*Display, Window, u64) i32; - pub extern fn XSetWindowBorderPixmap(?*Display, Window, Pixmap) i32; - pub extern fn XSetWindowBorderWidth(?*Display, Window, u32) i32; - pub extern fn XSetWindowColormap(?*Display, Window, Colormap) i32; - pub extern fn XSetWMColormapWindows(?*Display, Window, [*c]Window, i32) i32; + pub extern fn XSetPlaneMask(display: ?*Display, ?*GC, u64) i32; + pub extern fn XSetPointerMapping(display: ?*Display, [*c]const u8, i32) i32; + pub extern fn XSetScreenSaver(display: ?*Display, i32, i32, i32, i32) i32; + pub extern fn XSetSelectionOwner(display: ?*Display, Atom, Window, Time) i32; + pub extern fn XSetState(display: ?*Display, ?*GC, u64, u64, i32, u64) i32; + pub extern fn XSetStipple(display: ?*Display, ?*GC, Pixmap) i32; + pub extern fn XSetSubwindowMode(display: ?*Display, ?*GC, i32) i32; + pub extern fn XSetTile(display: ?*Display, ?*GC, Pixmap) i32; + pub extern fn XSetTransientForHint(display: ?*Display, Window, Window) i32; + pub extern fn XSetTSOrigin(display: ?*Display, ?*GC, i32, i32) i32; + pub extern fn XSetWindowBackground(display: ?*Display, Window, u64) i32; + pub extern fn XSetWindowBackgroundPixmap(display: ?*Display, Window, Pixmap) i32; + pub extern fn XSetWindowBorder(display: ?*Display, Window, u64) i32; + pub extern fn XSetWindowBorderPixmap(display: ?*Display, Window, Pixmap) i32; + pub extern fn XSetWindowBorderWidth(display: ?*Display, Window, u32) i32; + pub extern fn XSetWindowColormap(display: ?*Display, Window, Colormap) i32; + pub extern fn XSetWMColormapWindows(display: ?*Display, Window, [*c]Window, i32) i32; pub extern fn XSetWMProtocols(display: ?*Display, w: Window, protocols: ?[*]Atom, count: i32) Status; - pub extern fn XStoreBuffer(?*Display, [*c]const u8, i32, i32) i32; - pub extern fn XStoreBytes(?*Display, [*c]const u8, i32) i32; - pub extern fn XStoreColor(?*Display, Colormap, [*c]XColor) i32; - pub extern fn XStoreColors(?*Display, Colormap, [*c]XColor, i32) i32; + pub extern fn XStoreBuffer(display: ?*Display, [*c]const u8, i32, i32) i32; + pub extern fn XStoreBytes(display: ?*Display, [*c]const u8, i32) i32; + pub extern fn XStoreColor(display: ?*Display, Colormap, [*c]XColor) i32; + pub extern fn XStoreColors(display: ?*Display, Colormap, [*c]XColor, i32) i32; pub extern fn XStoreName(display: ?*Display, w: Window, window_name: ?[*:0]const u8) i32; - pub extern fn XStoreNamedColor(?*Display, Colormap, [*c]const u8, u64, i32) i32; + pub extern fn XStoreNamedColor(display: ?*Display, Colormap, [*c]const u8, u64, i32) i32; pub extern fn XStringToKeysym([*c]const u8) KeySym; pub extern fn XSupportsLocale() i32; - pub extern fn XSync(?*Display, i32) i32; - pub extern fn XSynchronize(?*Display, i32) ?*const fn (?*Display) callconv(.c) i32; + pub extern fn XSync(display: ?*Display, i32) i32; + pub extern fn XSynchronize(display: ?*Display, i32) ?*const fn (display: ?*Display) callconv(.c) i32; pub extern fn XTextExtents([*c]XFontStruct, [*c]const u8, i32, [*c]i32, [*c]i32, [*c]i32, [*c]XCharStruct) i32; pub extern fn XTextExtents16([*c]XFontStruct, [*c]const XChar2b, i32, [*c]i32, [*c]i32, [*c]i32, [*c]XCharStruct) i32; pub extern fn XTextWidth([*c]XFontStruct, [*c]const u8, i32) i32; pub extern fn XTextWidth16([*c]XFontStruct, [*c]const XChar2b, i32) i32; - pub extern fn XTranslateCoordinates(?*Display, Window, Window, i32, i32, [*c]i32, [*c]i32, [*c]Window) i32; - pub extern fn XUndefineCursor(?*Display, Window) i32; - pub extern fn XUngrabButton(?*Display, u32, u32, Window) i32; - pub extern fn XUngrabKey(?*Display, i32, u32, Window) i32; - pub extern fn XUngrabKeyboard(?*Display, Time) i32; - pub extern fn XUngrabPointer(?*Display, Time) i32; - pub extern fn XUngrabServer(?*Display) i32; - pub extern fn XUninstallColormap(?*Display, Colormap) i32; - pub extern fn XUnloadFont(?*Display, Font) i32; - pub extern fn XUnlockDisplay(?*Display) void; - pub extern fn XUnmapSubwindows(?*Display, Window) i32; + pub extern fn XTranslateCoordinates(display: ?*Display, Window, Window, i32, i32, [*c]i32, [*c]i32, [*c]Window) i32; + pub extern fn XUndefineCursor(display: ?*Display, Window) i32; + pub extern fn XUngrabButton(display: ?*Display, u32, u32, Window) i32; + pub extern fn XUngrabKey(display: ?*Display, i32, u32, Window) i32; + pub extern fn XUngrabKeyboard(display: ?*Display, Time) i32; + pub extern fn XUngrabPointer(display: ?*Display, Time) i32; + pub extern fn XUngrabServer(display: ?*Display) i32; + pub extern fn XUninstallColormap(display: ?*Display, Colormap) i32; + pub extern fn XUnloadFont(display: ?*Display, Font) i32; + pub extern fn XUnlockDisplay(display: ?*Display) void; + pub extern fn XUnmapSubwindows(display: ?*Display, Window) i32; pub extern fn XUnmapWindow(display: ?*Display, w: Window) i32; - pub extern fn XUnregisterIMInstantiateCallback(?*Display, ?*_XrmHashBucketRec, [*c]u8, [*c]u8, XIDProc, ?*anyopaque) i32; + pub extern fn XUnregisterIMInstantiateCallback(display: ?*Display, ?*_XrmHashBucketRec, [*c]u8, [*c]u8, XIDProc, ?*anyopaque) i32; pub extern fn XUnsetICFocus(XIC) void; - pub extern fn Xutf8DrawImageString(?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; - pub extern fn Xutf8DrawString(?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; - pub extern fn Xutf8DrawText(?*Display, Drawable, ?*GC, i32, i32, [*c]XmbTextItem, i32) void; + pub extern fn Xutf8DrawImageString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; + pub extern fn Xutf8DrawString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const u8, i32) void; + pub extern fn Xutf8DrawText(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]XmbTextItem, i32) void; pub extern fn Xutf8LookupString(XIC, [*c]XKeyPressedEvent, [*c]u8, i32, [*c]KeySym, [*c]i32) i32; pub extern fn Xutf8ResetIC(XIC) [*c]u8; pub extern fn Xutf8TextEscapement(XFontSet, [*c]const u8, i32) i32; pub extern fn Xutf8TextExtents(XFontSet, [*c]const u8, i32, [*c]XRectangle, [*c]XRectangle) i32; pub extern fn Xutf8TextPerCharExtents(XFontSet, [*c]const u8, i32, [*c]XRectangle, [*c]XRectangle, i32, [*c]i32, [*c]XRectangle, [*c]XRectangle) i32; pub extern fn XVaCreateNestedList(i32, ...) XVaNestedList; - pub extern fn XVendorRelease(?*Display) i32; + pub extern fn XVendorRelease(display: ?*Display) i32; pub extern fn XVisualIDFromVisual([*c]Visual) VisualID; - pub extern fn XWarpPointer(?*Display, Window, Window, i32, i32, u32, u32, i32, i32) i32; - pub extern fn XwcDrawImageString(?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const WChar, i32) void; - pub extern fn XwcDrawString(?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const WChar, i32) void; - pub extern fn XwcDrawText(?*Display, Drawable, ?*GC, i32, i32, [*c]XwcTextItem, i32) void; + pub extern fn XWarpPointer(display: ?*Display, Window, Window, i32, i32, u32, u32, i32, i32) i32; + pub extern fn XwcDrawImageString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const WChar, i32) void; + pub extern fn XwcDrawString(display: ?*Display, Drawable, XFontSet, ?*GC, i32, i32, [*c]const WChar, i32) void; + pub extern fn XwcDrawText(display: ?*Display, Drawable, ?*GC, i32, i32, [*c]XwcTextItem, i32) void; pub extern fn XwcLookupString(XIC, [*c]XKeyPressedEvent, [*c]WChar, i32, [*c]KeySym, [*c]i32) i32; pub extern fn XwcResetIC(XIC) [*c]WChar; pub extern fn XwcTextEscapement(XFontSet, [*c]const WChar, i32) i32; pub extern fn XwcTextExtents(XFontSet, [*c]const WChar, i32, [*c]XRectangle, [*c]XRectangle) i32; pub extern fn XwcTextPerCharExtents(XFontSet, [*c]const WChar, i32, [*c]XRectangle, [*c]XRectangle, i32, [*c]i32, [*c]XRectangle, [*c]XRectangle) i32; - pub extern fn XWhitePixel(?*Display, i32) u64; - pub extern fn XWhitePixelOfScreen([*c]Screen) u64; - pub extern fn XWidthMMOfScreen([*c]Screen) i32; - pub extern fn XWidthOfScreen([*c]Screen) i32; - pub extern fn XWindowEvent(?*Display, Window, i64, [*c]XEvent) i32; - pub extern fn XWithdrawWindow(?*Display, Window, i32) i32; - pub extern fn XWriteBitmapFile(?*Display, [*c]const u8, Pixmap, u32, u32, i32, i32) i32; + pub extern fn XWhitePixel(display: ?*Display, i32) u64; + pub extern fn XWhitePixelOfScreen(screen: ?*Screen) u64; + pub extern fn XWidthMMOfScreen(screen: ?*Screen) i32; + pub extern fn XWidthOfScreen(screen: ?*Screen) i32; + pub extern fn XWindowEvent(display: ?*Display, Window, i64, [*c]XEvent) i32; + pub extern fn XWithdrawWindow(display: ?*Display, Window, i32) i32; + pub extern fn XWriteBitmapFile(display: ?*Display, [*c]const u8, Pixmap, u32, u32, i32, i32) i32; };