diff --git a/packages/sciter/.gitignore b/packages/sciter/.gitignore new file mode 100644 index 0000000..5418d48 --- /dev/null +++ b/packages/sciter/.gitignore @@ -0,0 +1 @@ +/sciter-js-sdk diff --git a/packages/sciter/build.zig b/packages/sciter/build.zig index b1751c6..3228fc7 100644 --- a/packages/sciter/build.zig +++ b/packages/sciter/build.zig @@ -71,8 +71,10 @@ pub fn build(b: *std.Build) void { if (b.args) |args| { run_cmd.addArgs(args); } + // TODO It does not look like the cleanest solution, however, the build + // system code is too cryptic to come up with a better solution and the + // Internet is surprisingly silent about this very basic use case. run_cmd.setCwd(.{ .cwd_relative = b.exe_dir }); - //run_cmd.setCwd(exe.getEmittedBinDirectory()); const run_step = b.step("run", "Run the app"); run_step.dependOn(&run_cmd.step); diff --git a/packages/sciter/src/main.zig b/packages/sciter/src/main.zig index 879c75d..4439f87 100644 --- a/packages/sciter/src/main.zig +++ b/packages/sciter/src/main.zig @@ -77,7 +77,7 @@ pub fn wWinMain( std.posix.exit(1); }; - _ = sciter_api.SciterSetOption(0, 10, 1); + _ = sciter_api.SciterSetOption(null, 10, 1); sciter_api.SciterSetupDebugOutput(hwnd, null, &sciterDebugOutputProc); _ = sciter_api.SciterLoadHtml(hwnd, html, html.len, L("/")); _ = wam.ShowWindow(hwnd, @bitCast(nCmdShow)); @@ -140,53 +140,62 @@ pub fn main() void { std.debug.print("Sciter API version is: 0x{X:0>8}\n", .{sciter_api.version}); - const display = x11.XOpenDisplay(null) orelse { + const display = x11.Display.openDisplay(null) orelse { _ = std.posix.write(std.posix.STDERR_FILENO, "Couldn't open connection to X server.\n") catch {}; std.posix.exit(1); }; - defer _ = x11.XCloseDisplay(display); + defer _ = display.closeDisplay(); - const window = x11.XCreateSimpleWindow( - display, - x11.DefaultRootWindow(display), + const screen = display.defaultScreen(); + + var attributes: x11.XSetWindowAttributes = .{ + .background_pixel = display.blackPixel(screen), + .event_mask = .{ + .exposure = true, + .key_press = true, + }, + }; + + const window = display.createWindow( + display.rootWindow(screen), 0, 0, 720, 480, 0, - x11.BlackPixel(display, x11.DefaultScreen(display)), - x11.BlackPixel(display, x11.DefaultScreen(display)), + display.defaultDepth(screen), + x11.InputOutput, + display.defaultVisual(screen), + .{ + .background_pixel = true, + .event_mask = true, + }, + &attributes, ); - defer _ = x11.XDestroyWindow(display, window); + defer _ = display.destroyWindow(window); - const event_mask = x11.KeyPressMask | - x11.KeyReleaseMask | - x11.ButtonPressMask | - x11.ButtonReleaseMask | - x11.EnterWindowMask | - x11.LeaveWindowMask | - x11.PointerMotionMask; - _ = x11.XSelectInput(display, window, event_mask); + _ = display.storeName(window, "Sciter Demo"); - _ = x11.XStoreName(display, window, "Sciter Demo"); + const gc = display.createGC(@enumFromInt(@intFromEnum(window)), .{}, null); + _ = display.freeGC(gc); - const wm_delete_window = x11.XInternAtom(display, "WM_DELETE_WINDOW", x11.False); - _ = x11.XSetWMProtocols(display, window, @constCast(&wm_delete_window), 1); + const wm_delete_window = display.internAtom("WM_DELETE_WINDOW", false); + var protocols = [_]x11.Atom{wm_delete_window}; + _ = display.setWMProtocols(window, &protocols); - _ = x11.XMapWindow(display, window); - defer _ = x11.XUnmapWindow(display, window); + _ = display.mapWindow(window); + defer _ = display.unmapWindow(window); - _ = sciter_api.SciterSetOption(0, 10, 1); + _ = sciter_api.SciterSetOption(.null_handle, 10, 1); sciter_api.SciterSetupDebugOutput(window, null, &sciterDebugOutputProc); _ = sciter_api.SciterLoadHtml(window, html, html.len, L("/")); - var event: x11.XEvent = undefined; var running = true; while (running) { - _ = x11.XNextEvent(display, &event); + const event = display.nextEvent(); switch (event.type) { x11.ClientMessage => { - const atom: x11.Atom = @bitCast(event.xclient.data.l[0]); + const atom: x11.Atom = @enumFromInt(event.xclient.data.l[0]); if (atom == wm_delete_window) { running = false; } diff --git a/packages/sciter/src/x11.zig b/packages/sciter/src/x11.zig index 6f706ff..7e985dc 100644 --- a/packages/sciter/src/x11.zig +++ b/packages/sciter/src/x11.zig @@ -1,690 +1,867 @@ -pub const XID = c_ulong; -pub const Mask = c_ulong; -pub const Atom = c_ulong; -pub const VisualID = c_ulong; -pub const Time = c_ulong; -pub const Window = XID; -pub const Drawable = XID; -pub const Font = XID; -pub const Pixmap = XID; -pub const Cursor = XID; -pub const Colormap = XID; -pub const GContext = XID; -pub const KeySym = XID; -pub const KeyCode = u8; -pub const ptrdiff_t = c_long; -pub const wchar_t = c_int; -pub extern fn _Xmblen(str: [*c]u8, len: c_int) c_int; -pub const XPointer = [*c]u8; -pub const struct__XExtData = extern struct { - number: c_int = @import("std").mem.zeroes(c_int), - next: [*c]struct__XExtData = @import("std").mem.zeroes([*c]struct__XExtData), - free_private: ?*const fn ([*c]struct__XExtData) callconv(.c) c_int = @import("std").mem.zeroes(?*const fn ([*c]struct__XExtData) callconv(.c) c_int), - private_data: XPointer = @import("std").mem.zeroes(XPointer), +const std = @import("std"); + +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 Atom = enum(u64) { + null_handle = 0, + _, }; -pub const XExtData = struct__XExtData; + +pub const Colormap = enum(u64) { + null_handle = 0, + _, +}; + +pub const Cursor = enum(u64) { + null_handle = 0, + _, +}; + +pub const Drawable = enum(u64) { + null_handle = 0, + _, +}; + +pub const Font = enum(u64) { + null_handle = 0, + _, +}; + +pub const GContext = enum(u64) { + null_handle = 0, + _, +}; + +pub const KeySym = enum(u64) { + null_handle = 0, + _, +}; + +pub const Pixmap = enum(u64) { + null_handle = 0, + _, +}; + +pub const XID = enum(u64) { + null_handle = 0, + _, +}; + +pub const VisualID = enum(u64) { + null_handle = 0, + _, +}; + +pub const Window = enum(u64) { + null_handle = 0, + _, +}; + +pub const KeyCode = enum(u8) { _ }; +pub const Time = enum(u64) { _ }; +pub const Status = enum(u32) { _ }; +pub const WChar = u32; + +pub const XExtData = extern struct { + number: i32 = 0, + next: ?*XExtData = null, + free_private: ?*const fn (extension: ?*XExtData) callconv(.c) i32 = null, + private_data: ?*anyopaque = null, +}; + pub const XExtCodes = extern struct { - extension: c_int = @import("std").mem.zeroes(c_int), - major_opcode: c_int = @import("std").mem.zeroes(c_int), - first_event: c_int = @import("std").mem.zeroes(c_int), - first_error: c_int = @import("std").mem.zeroes(c_int), + extension: i32 = 0, + major_opcode: i32 = 0, + first_event: i32 = 0, + first_error: i32 = 0, }; + pub const XPixmapFormatValues = extern struct { - depth: c_int = @import("std").mem.zeroes(c_int), - bits_per_pixel: c_int = @import("std").mem.zeroes(c_int), - scanline_pad: c_int = @import("std").mem.zeroes(c_int), + depth: i32 = 0, + bits_per_pixel: i32 = 0, + scanline_pad: i32 = 0, }; + pub const XGCValues = extern struct { - function: c_int = @import("std").mem.zeroes(c_int), - plane_mask: c_ulong = @import("std").mem.zeroes(c_ulong), - foreground: c_ulong = @import("std").mem.zeroes(c_ulong), - background: c_ulong = @import("std").mem.zeroes(c_ulong), - line_width: c_int = @import("std").mem.zeroes(c_int), - line_style: c_int = @import("std").mem.zeroes(c_int), - cap_style: c_int = @import("std").mem.zeroes(c_int), - join_style: c_int = @import("std").mem.zeroes(c_int), - fill_style: c_int = @import("std").mem.zeroes(c_int), - fill_rule: c_int = @import("std").mem.zeroes(c_int), - arc_mode: c_int = @import("std").mem.zeroes(c_int), - tile: Pixmap = @import("std").mem.zeroes(Pixmap), - stipple: Pixmap = @import("std").mem.zeroes(Pixmap), - ts_x_origin: c_int = @import("std").mem.zeroes(c_int), - ts_y_origin: c_int = @import("std").mem.zeroes(c_int), - font: Font = @import("std").mem.zeroes(Font), - subwindow_mode: c_int = @import("std").mem.zeroes(c_int), - graphics_exposures: c_int = @import("std").mem.zeroes(c_int), - clip_x_origin: c_int = @import("std").mem.zeroes(c_int), - clip_y_origin: c_int = @import("std").mem.zeroes(c_int), - clip_mask: Pixmap = @import("std").mem.zeroes(Pixmap), - dash_offset: c_int = @import("std").mem.zeroes(c_int), - dashes: u8 = @import("std").mem.zeroes(u8), + function: i32 = 0, + plane_mask: u64 = 0, + foreground: u64 = 0, + background: u64 = 0, + line_width: i32 = 0, + line_style: i32 = 0, + cap_style: i32 = 0, + join_style: i32 = 0, + fill_style: i32 = 0, + fill_rule: i32 = 0, + arc_mode: i32 = 0, + tile: Pixmap = .null_handle, + stipple: Pixmap = .null_handle, + ts_x_origin: i32 = 0, + ts_y_origin: i32 = 0, + font: Font = .null_handle, + subwindow_mode: i32 = 0, + graphics_exposures: i32 = 0, + clip_x_origin: i32 = 0, + clip_y_origin: i32 = 0, + clip_mask: Pixmap = .null_handle, + dash_offset: i32 = 0, + dashes: u8 = 0, }; -pub const struct__XGC = opaque {}; -pub const GC = ?*struct__XGC; + +pub const GC = ?*opaque {}; + pub const Visual = extern struct { - ext_data: [*c]XExtData = @import("std").mem.zeroes([*c]XExtData), - visualid: VisualID = @import("std").mem.zeroes(VisualID), - class: c_int = @import("std").mem.zeroes(c_int), - red_mask: c_ulong = @import("std").mem.zeroes(c_ulong), - green_mask: c_ulong = @import("std").mem.zeroes(c_ulong), - blue_mask: c_ulong = @import("std").mem.zeroes(c_ulong), - bits_per_rgb: c_int = @import("std").mem.zeroes(c_int), - map_entries: c_int = @import("std").mem.zeroes(c_int), + ext_data: ?*XExtData = null, + visualid: VisualID = .null_handle, + class: i32 = 0, + red_mask: u64 = 0, + green_mask: u64 = 0, + blue_mask: u64 = 0, + bits_per_rgb: i32 = 0, + map_entries: i32 = 0, }; + pub const Depth = extern struct { - depth: c_int = @import("std").mem.zeroes(c_int), - nvisuals: c_int = @import("std").mem.zeroes(c_int), + depth: i32 = 0, + nvisuals: i32 = 0, visuals: [*c]Visual = @import("std").mem.zeroes([*c]Visual), }; -pub const struct__XDisplay = opaque {}; + +pub const Display = opaque { + 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 defaultScreen(self: *Display) i32 { + const private: *XPrivDisplay = @ptrCast(@alignCast(self)); + return private.default_screen; + } + + pub inline fn screenOfDisplay(self: *Display, screen: i32) *Screen { + const private: *XPrivDisplay = @ptrCast(@alignCast(self)); + return &private.screens.?[@intCast(screen)]; + } + + pub inline fn blackPixel(self: *Display, screen: i32) u64 { + return self.screenOfDisplay(screen).black_pixel; + } + + pub inline fn rootWindow(self: *Display, screen: i32) Window { + return self.screenOfDisplay(screen).root; + } + + pub inline fn defaultDepth(self: *Display, screen: i32) i32 { + return self.screenOfDisplay(screen).root_depth; + } + + pub inline fn defaultVisual(self: *Display, screen: i32) ?*Visual { + return self.screenOfDisplay(screen).root_visual; + } + + 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; + } +}; + pub const Screen = extern struct { - ext_data: [*c]XExtData = @import("std").mem.zeroes([*c]XExtData), - display: ?*struct__XDisplay = @import("std").mem.zeroes(?*struct__XDisplay), - root: Window = @import("std").mem.zeroes(Window), - width: c_int = @import("std").mem.zeroes(c_int), - height: c_int = @import("std").mem.zeroes(c_int), - mwidth: c_int = @import("std").mem.zeroes(c_int), - mheight: c_int = @import("std").mem.zeroes(c_int), - ndepths: c_int = @import("std").mem.zeroes(c_int), - depths: [*c]Depth = @import("std").mem.zeroes([*c]Depth), - root_depth: c_int = @import("std").mem.zeroes(c_int), - root_visual: [*c]Visual = @import("std").mem.zeroes([*c]Visual), - default_gc: GC = @import("std").mem.zeroes(GC), - cmap: Colormap = @import("std").mem.zeroes(Colormap), - white_pixel: c_ulong = @import("std").mem.zeroes(c_ulong), - black_pixel: c_ulong = @import("std").mem.zeroes(c_ulong), - max_maps: c_int = @import("std").mem.zeroes(c_int), - min_maps: c_int = @import("std").mem.zeroes(c_int), - backing_store: c_int = @import("std").mem.zeroes(c_int), - save_unders: c_int = @import("std").mem.zeroes(c_int), - root_input_mask: c_long = @import("std").mem.zeroes(c_long), + ext_data: ?*XExtData = null, + display: ?*Display = null, + root: Window = .null_handle, + width: i32 = 0, + height: i32 = 0, + mwidth: i32 = 0, + mheight: i32 = 0, + ndepths: i32 = 0, + depths: ?[*]Depth = null, + root_depth: i32 = 0, + root_visual: ?*Visual = null, + default_gc: GC = null, + cmap: Colormap = .null_handle, + white_pixel: u64 = 0, + black_pixel: u64 = 0, + max_maps: i32 = 0, + min_maps: i32 = 0, + backing_store: i32 = 0, + save_unders: i32 = 0, + root_input_mask: i64 = 0, }; + pub const ScreenFormat = extern struct { - ext_data: [*c]XExtData = @import("std").mem.zeroes([*c]XExtData), - depth: c_int = @import("std").mem.zeroes(c_int), - bits_per_pixel: c_int = @import("std").mem.zeroes(c_int), - scanline_pad: c_int = @import("std").mem.zeroes(c_int), + ext_data: ?*XExtData = null, + depth: i32 = 0, + bits_per_pixel: i32 = 0, + scanline_pad: i32 = 0, }; + pub const XSetWindowAttributes = extern struct { - background_pixmap: Pixmap = @import("std").mem.zeroes(Pixmap), - background_pixel: c_ulong = @import("std").mem.zeroes(c_ulong), - border_pixmap: Pixmap = @import("std").mem.zeroes(Pixmap), - border_pixel: c_ulong = @import("std").mem.zeroes(c_ulong), - bit_gravity: c_int = @import("std").mem.zeroes(c_int), - win_gravity: c_int = @import("std").mem.zeroes(c_int), - backing_store: c_int = @import("std").mem.zeroes(c_int), - backing_planes: c_ulong = @import("std").mem.zeroes(c_ulong), - backing_pixel: c_ulong = @import("std").mem.zeroes(c_ulong), - save_under: c_int = @import("std").mem.zeroes(c_int), - event_mask: c_long = @import("std").mem.zeroes(c_long), - do_not_propagate_mask: c_long = @import("std").mem.zeroes(c_long), - override_redirect: c_int = @import("std").mem.zeroes(c_int), - colormap: Colormap = @import("std").mem.zeroes(Colormap), - cursor: Cursor = @import("std").mem.zeroes(Cursor), + background_pixmap: Pixmap = .null_handle, + background_pixel: u64 = 0, + border_pixmap: Pixmap = .null_handle, + border_pixel: u64 = 0, + bit_gravity: i32 = 0, + win_gravity: i32 = 0, + backing_store: i32 = 0, + backing_planes: u64 = 0, + backing_pixel: u64 = 0, + save_under: i32 = 0, + event_mask: EventMask = .{}, + do_not_propagate_mask: i64 = 0, + override_redirect: i32 = 0, + colormap: Colormap = .null_handle, + cursor: Cursor = .null_handle, }; + pub const XWindowAttributes = extern struct { - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - width: c_int = @import("std").mem.zeroes(c_int), - height: c_int = @import("std").mem.zeroes(c_int), - border_width: c_int = @import("std").mem.zeroes(c_int), - depth: c_int = @import("std").mem.zeroes(c_int), + x: i32 = 0, + y: i32 = 0, + width: i32 = 0, + height: i32 = 0, + border_width: i32 = 0, + depth: i32 = 0, visual: [*c]Visual = @import("std").mem.zeroes([*c]Visual), - root: Window = @import("std").mem.zeroes(Window), - class: c_int = @import("std").mem.zeroes(c_int), - bit_gravity: c_int = @import("std").mem.zeroes(c_int), - win_gravity: c_int = @import("std").mem.zeroes(c_int), - backing_store: c_int = @import("std").mem.zeroes(c_int), - backing_planes: c_ulong = @import("std").mem.zeroes(c_ulong), - backing_pixel: c_ulong = @import("std").mem.zeroes(c_ulong), - save_under: c_int = @import("std").mem.zeroes(c_int), - colormap: Colormap = @import("std").mem.zeroes(Colormap), - map_installed: c_int = @import("std").mem.zeroes(c_int), - map_state: c_int = @import("std").mem.zeroes(c_int), - all_event_masks: c_long = @import("std").mem.zeroes(c_long), - your_event_mask: c_long = @import("std").mem.zeroes(c_long), - do_not_propagate_mask: c_long = @import("std").mem.zeroes(c_long), - override_redirect: c_int = @import("std").mem.zeroes(c_int), + root: Window = .null_handle, + class: i32 = 0, + bit_gravity: i32 = 0, + win_gravity: i32 = 0, + backing_store: i32 = 0, + backing_planes: u64 = 0, + backing_pixel: u64 = 0, + save_under: i32 = 0, + colormap: Colormap = .null_handle, + map_installed: i32 = 0, + map_state: i32 = 0, + all_event_masks: i64 = 0, + your_event_mask: i64 = 0, + do_not_propagate_mask: i64 = 0, + override_redirect: i32 = 0, screen: [*c]Screen = @import("std").mem.zeroes([*c]Screen), }; + pub const XHostAddress = extern struct { - family: c_int = @import("std").mem.zeroes(c_int), - length: c_int = @import("std").mem.zeroes(c_int), + family: i32 = 0, + length: i32 = 0, address: [*c]u8 = @import("std").mem.zeroes([*c]u8), }; + pub const XServerInterpretedAddress = extern struct { - typelength: c_int = @import("std").mem.zeroes(c_int), - valuelength: c_int = @import("std").mem.zeroes(c_int), + typelength: i32 = 0, + valuelength: i32 = 0, type: [*c]u8 = @import("std").mem.zeroes([*c]u8), value: [*c]u8 = @import("std").mem.zeroes([*c]u8), }; pub const struct_funcs_2 = extern struct { - create_image: ?*const fn (?*struct__XDisplay, [*c]Visual, c_uint, c_int, c_int, [*c]u8, c_uint, c_uint, c_int, c_int) callconv(.c) [*c]struct__XImage = @import("std").mem.zeroes(?*const fn (?*struct__XDisplay, [*c]Visual, c_uint, c_int, c_int, [*c]u8, c_uint, c_uint, c_int, c_int) callconv(.c) [*c]struct__XImage), - destroy_image: ?*const fn ([*c]struct__XImage) callconv(.c) c_int = @import("std").mem.zeroes(?*const fn ([*c]struct__XImage) callconv(.c) c_int), - get_pixel: ?*const fn ([*c]struct__XImage, c_int, c_int) callconv(.c) c_ulong = @import("std").mem.zeroes(?*const fn ([*c]struct__XImage, c_int, c_int) callconv(.c) c_ulong), - put_pixel: ?*const fn ([*c]struct__XImage, c_int, c_int, c_ulong) callconv(.c) c_int = @import("std").mem.zeroes(?*const fn ([*c]struct__XImage, c_int, c_int, c_ulong) callconv(.c) c_int), - sub_image: ?*const fn ([*c]struct__XImage, c_int, c_int, c_uint, c_uint) callconv(.c) [*c]struct__XImage = @import("std").mem.zeroes(?*const fn ([*c]struct__XImage, c_int, c_int, c_uint, c_uint) callconv(.c) [*c]struct__XImage), - add_pixel: ?*const fn ([*c]struct__XImage, c_long) callconv(.c) c_int = @import("std").mem.zeroes(?*const fn ([*c]struct__XImage, c_long) callconv(.c) c_int), + create_image: ?*const fn (?*Display, [*c]Visual, u32, i32, i32, [*c]u8, u32, u32, i32, i32) callconv(.c) [*c]struct__XImage = @import("std").mem.zeroes(?*const fn (?*Display, [*c]Visual, u32, i32, i32, [*c]u8, u32, u32, i32, i32) callconv(.c) [*c]struct__XImage), + destroy_image: ?*const fn ([*c]struct__XImage) callconv(.c) i32 = @import("std").mem.zeroes(?*const fn ([*c]struct__XImage) callconv(.c) i32), + get_pixel: ?*const fn ([*c]struct__XImage, i32, i32) callconv(.c) u64 = @import("std").mem.zeroes(?*const fn ([*c]struct__XImage, i32, i32) callconv(.c) u64), + put_pixel: ?*const fn ([*c]struct__XImage, i32, i32, u64) callconv(.c) i32 = @import("std").mem.zeroes(?*const fn ([*c]struct__XImage, i32, i32, u64) callconv(.c) i32), + sub_image: ?*const fn ([*c]struct__XImage, i32, i32, u32, u32) callconv(.c) [*c]struct__XImage = @import("std").mem.zeroes(?*const fn ([*c]struct__XImage, i32, i32, u32, u32) callconv(.c) [*c]struct__XImage), + add_pixel: ?*const fn ([*c]struct__XImage, i64) callconv(.c) i32 = @import("std").mem.zeroes(?*const fn ([*c]struct__XImage, i64) callconv(.c) i32), }; pub const struct__XImage = extern struct { - width: c_int = @import("std").mem.zeroes(c_int), - height: c_int = @import("std").mem.zeroes(c_int), - xoffset: c_int = @import("std").mem.zeroes(c_int), - format: c_int = @import("std").mem.zeroes(c_int), + width: i32 = 0, + height: i32 = 0, + xoffset: i32 = 0, + format: i32 = 0, data: [*c]u8 = @import("std").mem.zeroes([*c]u8), - byte_order: c_int = @import("std").mem.zeroes(c_int), - bitmap_unit: c_int = @import("std").mem.zeroes(c_int), - bitmap_bit_order: c_int = @import("std").mem.zeroes(c_int), - bitmap_pad: c_int = @import("std").mem.zeroes(c_int), - depth: c_int = @import("std").mem.zeroes(c_int), - bytes_per_line: c_int = @import("std").mem.zeroes(c_int), - bits_per_pixel: c_int = @import("std").mem.zeroes(c_int), - red_mask: c_ulong = @import("std").mem.zeroes(c_ulong), - green_mask: c_ulong = @import("std").mem.zeroes(c_ulong), - blue_mask: c_ulong = @import("std").mem.zeroes(c_ulong), - obdata: XPointer = @import("std").mem.zeroes(XPointer), + byte_order: i32 = 0, + bitmap_unit: i32 = 0, + bitmap_bit_order: i32 = 0, + bitmap_pad: i32 = 0, + depth: i32 = 0, + bytes_per_line: i32 = 0, + bits_per_pixel: i32 = 0, + red_mask: u64 = 0, + green_mask: u64 = 0, + blue_mask: u64 = 0, + obdata: ?*anyopaque = null, f: struct_funcs_2 = @import("std").mem.zeroes(struct_funcs_2), }; pub const XImage = struct__XImage; pub const XWindowChanges = extern struct { - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - width: c_int = @import("std").mem.zeroes(c_int), - height: c_int = @import("std").mem.zeroes(c_int), - border_width: c_int = @import("std").mem.zeroes(c_int), - sibling: Window = @import("std").mem.zeroes(Window), - stack_mode: c_int = @import("std").mem.zeroes(c_int), + x: i32 = 0, + y: i32 = 0, + width: i32 = 0, + height: i32 = 0, + border_width: i32 = 0, + sibling: Window = .null_handle, + stack_mode: i32 = 0, }; pub const XColor = extern struct { - pixel: c_ulong = @import("std").mem.zeroes(c_ulong), - red: c_ushort = @import("std").mem.zeroes(c_ushort), - green: c_ushort = @import("std").mem.zeroes(c_ushort), - blue: c_ushort = @import("std").mem.zeroes(c_ushort), - flags: u8 = @import("std").mem.zeroes(u8), - pad: u8 = @import("std").mem.zeroes(u8), + pixel: u64 = 0, + red: u16 = 0, + green: u16 = 0, + blue: u16 = 0, + flags: u8 = 0, + pad: u8 = 0, }; pub const XSegment = extern struct { - x1: c_short = @import("std").mem.zeroes(c_short), - y1: c_short = @import("std").mem.zeroes(c_short), - x2: c_short = @import("std").mem.zeroes(c_short), - y2: c_short = @import("std").mem.zeroes(c_short), + x1: i16 = 0, + y1: i16 = 0, + x2: i16 = 0, + y2: i16 = 0, }; pub const XPoint = extern struct { - x: c_short = @import("std").mem.zeroes(c_short), - y: c_short = @import("std").mem.zeroes(c_short), + x: i16 = 0, + y: i16 = 0, }; pub const XRectangle = extern struct { - x: c_short = @import("std").mem.zeroes(c_short), - y: c_short = @import("std").mem.zeroes(c_short), - width: c_ushort = @import("std").mem.zeroes(c_ushort), - height: c_ushort = @import("std").mem.zeroes(c_ushort), + x: i16 = 0, + y: i16 = 0, + width: u16 = 0, + height: u16 = 0, }; pub const XArc = extern struct { - x: c_short = @import("std").mem.zeroes(c_short), - y: c_short = @import("std").mem.zeroes(c_short), - width: c_ushort = @import("std").mem.zeroes(c_ushort), - height: c_ushort = @import("std").mem.zeroes(c_ushort), - angle1: c_short = @import("std").mem.zeroes(c_short), - angle2: c_short = @import("std").mem.zeroes(c_short), + x: i16 = 0, + y: i16 = 0, + width: u16 = 0, + height: u16 = 0, + angle1: i16 = 0, + angle2: i16 = 0, }; pub const XKeyboardControl = extern struct { - key_click_percent: c_int = @import("std").mem.zeroes(c_int), - bell_percent: c_int = @import("std").mem.zeroes(c_int), - bell_pitch: c_int = @import("std").mem.zeroes(c_int), - bell_duration: c_int = @import("std").mem.zeroes(c_int), - led: c_int = @import("std").mem.zeroes(c_int), - led_mode: c_int = @import("std").mem.zeroes(c_int), - key: c_int = @import("std").mem.zeroes(c_int), - auto_repeat_mode: c_int = @import("std").mem.zeroes(c_int), + key_click_percent: i32 = 0, + bell_percent: i32 = 0, + bell_pitch: i32 = 0, + bell_duration: i32 = 0, + led: i32 = 0, + led_mode: i32 = 0, + key: i32 = 0, + auto_repeat_mode: i32 = 0, }; pub const XKeyboardState = extern struct { - key_click_percent: c_int = @import("std").mem.zeroes(c_int), - bell_percent: c_int = @import("std").mem.zeroes(c_int), - bell_pitch: c_uint = @import("std").mem.zeroes(c_uint), - bell_duration: c_uint = @import("std").mem.zeroes(c_uint), - led_mask: c_ulong = @import("std").mem.zeroes(c_ulong), - global_auto_repeat: c_int = @import("std").mem.zeroes(c_int), + key_click_percent: i32 = 0, + bell_percent: i32 = 0, + bell_pitch: u32 = 0, + bell_duration: u32 = 0, + led_mask: u64 = 0, + global_auto_repeat: i32 = 0, auto_repeats: [32]u8 = @import("std").mem.zeroes([32]u8), }; pub const XTimeCoord = extern struct { time: Time = @import("std").mem.zeroes(Time), - x: c_short = @import("std").mem.zeroes(c_short), - y: c_short = @import("std").mem.zeroes(c_short), + x: i16 = 0, + y: i16 = 0, }; pub const XModifierKeymap = extern struct { - max_keypermod: c_int = @import("std").mem.zeroes(c_int), + max_keypermod: i32 = 0, modifiermap: [*c]KeyCode = @import("std").mem.zeroes([*c]KeyCode), }; -pub const Display = struct__XDisplay; pub const struct__XPrivate = opaque {}; pub const struct__XrmHashBucketRec = opaque {}; -const struct_unnamed_3 = extern struct { - ext_data: [*c]XExtData = @import("std").mem.zeroes([*c]XExtData), + +const XPrivDisplay = extern struct { + ext_data: ?*XExtData = null, private1: ?*struct__XPrivate = @import("std").mem.zeroes(?*struct__XPrivate), - fd: c_int = @import("std").mem.zeroes(c_int), - private2: c_int = @import("std").mem.zeroes(c_int), - proto_major_version: c_int = @import("std").mem.zeroes(c_int), - proto_minor_version: c_int = @import("std").mem.zeroes(c_int), + fd: i32 = 0, + private2: i32 = 0, + proto_major_version: i32 = 0, + proto_minor_version: i32 = 0, vendor: [*c]u8 = @import("std").mem.zeroes([*c]u8), - private3: XID = @import("std").mem.zeroes(XID), - private4: XID = @import("std").mem.zeroes(XID), - private5: XID = @import("std").mem.zeroes(XID), - private6: c_int = @import("std").mem.zeroes(c_int), - resource_alloc: ?*const fn (?*struct__XDisplay) callconv(.c) XID = @import("std").mem.zeroes(?*const fn (?*struct__XDisplay) callconv(.c) XID), - byte_order: c_int = @import("std").mem.zeroes(c_int), - bitmap_unit: c_int = @import("std").mem.zeroes(c_int), - bitmap_pad: c_int = @import("std").mem.zeroes(c_int), - bitmap_bit_order: c_int = @import("std").mem.zeroes(c_int), - nformats: c_int = @import("std").mem.zeroes(c_int), + private3: XID = .null_handle, + private4: XID = .null_handle, + private5: XID = .null_handle, + private6: i32 = 0, + resource_alloc: ?*const fn (?*Display) callconv(.c) XID = @import("std").mem.zeroes(?*const fn (?*Display) callconv(.c) XID), + byte_order: i32 = 0, + bitmap_unit: i32 = 0, + bitmap_pad: i32 = 0, + bitmap_bit_order: i32 = 0, + nformats: i32 = 0, pixmap_format: [*c]ScreenFormat = @import("std").mem.zeroes([*c]ScreenFormat), - private8: c_int = @import("std").mem.zeroes(c_int), - release: c_int = @import("std").mem.zeroes(c_int), + private8: i32 = 0, + release: i32 = 0, private9: ?*struct__XPrivate = @import("std").mem.zeroes(?*struct__XPrivate), private10: ?*struct__XPrivate = @import("std").mem.zeroes(?*struct__XPrivate), - qlen: c_int = @import("std").mem.zeroes(c_int), - last_request_read: c_ulong = @import("std").mem.zeroes(c_ulong), - request: c_ulong = @import("std").mem.zeroes(c_ulong), - private11: XPointer = @import("std").mem.zeroes(XPointer), - private12: XPointer = @import("std").mem.zeroes(XPointer), - private13: XPointer = @import("std").mem.zeroes(XPointer), - private14: XPointer = @import("std").mem.zeroes(XPointer), - max_request_size: c_uint = @import("std").mem.zeroes(c_uint), + qlen: i32 = 0, + last_request_read: u64 = 0, + request: u64 = 0, + private11: ?*anyopaque = null, + private12: ?*anyopaque = null, + private13: ?*anyopaque = null, + private14: ?*anyopaque = null, + max_request_size: u32 = 0, db: ?*struct__XrmHashBucketRec = @import("std").mem.zeroes(?*struct__XrmHashBucketRec), - private15: ?*const fn (?*struct__XDisplay) callconv(.c) c_int = @import("std").mem.zeroes(?*const fn (?*struct__XDisplay) callconv(.c) c_int), + private15: ?*const fn (?*Display) callconv(.c) i32 = @import("std").mem.zeroes(?*const fn (?*Display) callconv(.c) i32), display_name: [*c]u8 = @import("std").mem.zeroes([*c]u8), - default_screen: c_int = @import("std").mem.zeroes(c_int), - nscreens: c_int = @import("std").mem.zeroes(c_int), - screens: [*c]Screen = @import("std").mem.zeroes([*c]Screen), - motion_buffer: c_ulong = @import("std").mem.zeroes(c_ulong), - private16: c_ulong = @import("std").mem.zeroes(c_ulong), - min_keycode: c_int = @import("std").mem.zeroes(c_int), - max_keycode: c_int = @import("std").mem.zeroes(c_int), - private17: XPointer = @import("std").mem.zeroes(XPointer), - private18: XPointer = @import("std").mem.zeroes(XPointer), - private19: c_int = @import("std").mem.zeroes(c_int), + default_screen: i32 = 0, + nscreens: i32 = 0, + screens: ?[*]Screen = null, + motion_buffer: u64 = 0, + private16: u64 = 0, + min_keycode: i32 = 0, + max_keycode: i32 = 0, + private17: ?*anyopaque = null, + private18: ?*anyopaque = null, + private19: i32 = 0, xdefaults: [*c]u8 = @import("std").mem.zeroes([*c]u8), }; -pub const _XPrivDisplay = [*c]struct_unnamed_3; + +pub const _XPrivDisplay = [*c]XPrivDisplay; + pub const XKeyEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - root: Window = @import("std").mem.zeroes(Window), - subwindow: Window = @import("std").mem.zeroes(Window), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + root: Window = .null_handle, + subwindow: Window = .null_handle, time: Time = @import("std").mem.zeroes(Time), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - x_root: c_int = @import("std").mem.zeroes(c_int), - y_root: c_int = @import("std").mem.zeroes(c_int), - state: c_uint = @import("std").mem.zeroes(c_uint), - keycode: c_uint = @import("std").mem.zeroes(c_uint), - same_screen: c_int = @import("std").mem.zeroes(c_int), + 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 XButtonEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - root: Window = @import("std").mem.zeroes(Window), - subwindow: Window = @import("std").mem.zeroes(Window), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + root: Window = .null_handle, + subwindow: Window = .null_handle, time: Time = @import("std").mem.zeroes(Time), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - x_root: c_int = @import("std").mem.zeroes(c_int), - y_root: c_int = @import("std").mem.zeroes(c_int), - state: c_uint = @import("std").mem.zeroes(c_uint), - button: c_uint = @import("std").mem.zeroes(c_uint), - same_screen: c_int = @import("std").mem.zeroes(c_int), + 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 XMotionEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - root: Window = @import("std").mem.zeroes(Window), - subwindow: Window = @import("std").mem.zeroes(Window), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + root: Window = .null_handle, + subwindow: Window = .null_handle, time: Time = @import("std").mem.zeroes(Time), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - x_root: c_int = @import("std").mem.zeroes(c_int), - y_root: c_int = @import("std").mem.zeroes(c_int), - state: c_uint = @import("std").mem.zeroes(c_uint), - is_hint: u8 = @import("std").mem.zeroes(u8), - same_screen: c_int = @import("std").mem.zeroes(c_int), + x: i32 = 0, + y: i32 = 0, + x_root: i32 = 0, + y_root: i32 = 0, + state: u32 = 0, + is_hint: u8 = 0, + same_screen: i32 = 0, }; pub const XPointerMovedEvent = XMotionEvent; pub const XCrossingEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - root: Window = @import("std").mem.zeroes(Window), - subwindow: Window = @import("std").mem.zeroes(Window), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + root: Window = .null_handle, + subwindow: Window = .null_handle, time: Time = @import("std").mem.zeroes(Time), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - x_root: c_int = @import("std").mem.zeroes(c_int), - y_root: c_int = @import("std").mem.zeroes(c_int), - mode: c_int = @import("std").mem.zeroes(c_int), - detail: c_int = @import("std").mem.zeroes(c_int), - same_screen: c_int = @import("std").mem.zeroes(c_int), - focus: c_int = @import("std").mem.zeroes(c_int), - state: c_uint = @import("std").mem.zeroes(c_uint), + 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, }; pub const XEnterWindowEvent = XCrossingEvent; pub const XLeaveWindowEvent = XCrossingEvent; pub const XFocusChangeEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - mode: c_int = @import("std").mem.zeroes(c_int), - detail: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + mode: i32 = 0, + detail: i32 = 0, }; pub const XFocusInEvent = XFocusChangeEvent; pub const XFocusOutEvent = XFocusChangeEvent; pub const XKeymapEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, key_vector: [32]u8 = @import("std").mem.zeroes([32]u8), }; pub const XExposeEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - width: c_int = @import("std").mem.zeroes(c_int), - height: c_int = @import("std").mem.zeroes(c_int), - count: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + x: i32 = 0, + y: i32 = 0, + width: i32 = 0, + height: i32 = 0, + count: i32 = 0, }; pub const XGraphicsExposeEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, drawable: Drawable = @import("std").mem.zeroes(Drawable), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - width: c_int = @import("std").mem.zeroes(c_int), - height: c_int = @import("std").mem.zeroes(c_int), - count: c_int = @import("std").mem.zeroes(c_int), - major_code: c_int = @import("std").mem.zeroes(c_int), - minor_code: c_int = @import("std").mem.zeroes(c_int), + x: i32 = 0, + y: i32 = 0, + width: i32 = 0, + height: i32 = 0, + count: i32 = 0, + major_code: i32 = 0, + minor_code: i32 = 0, }; pub const XNoExposeEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, drawable: Drawable = @import("std").mem.zeroes(Drawable), - major_code: c_int = @import("std").mem.zeroes(c_int), - minor_code: c_int = @import("std").mem.zeroes(c_int), + major_code: i32 = 0, + minor_code: i32 = 0, }; pub const XVisibilityEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - state: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + state: i32 = 0, }; pub const XCreateWindowEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - parent: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - width: c_int = @import("std").mem.zeroes(c_int), - height: c_int = @import("std").mem.zeroes(c_int), - border_width: c_int = @import("std").mem.zeroes(c_int), - override_redirect: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + parent: Window = .null_handle, + window: Window = .null_handle, + x: i32 = 0, + y: i32 = 0, + width: i32 = 0, + height: i32 = 0, + border_width: i32 = 0, + override_redirect: i32 = 0, }; pub const XDestroyWindowEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - event: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + event: Window = .null_handle, + window: Window = .null_handle, }; pub const XUnmapEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - event: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), - from_configure: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + event: Window = .null_handle, + window: Window = .null_handle, + from_configure: i32 = 0, }; pub const XMapEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - event: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), - override_redirect: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + event: Window = .null_handle, + window: Window = .null_handle, + override_redirect: i32 = 0, }; pub const XMapRequestEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - parent: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + parent: Window = .null_handle, + window: Window = .null_handle, }; pub const XReparentEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - event: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), - parent: Window = @import("std").mem.zeroes(Window), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - override_redirect: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + event: Window = .null_handle, + window: Window = .null_handle, + parent: Window = .null_handle, + x: i32 = 0, + y: i32 = 0, + override_redirect: i32 = 0, }; pub const XConfigureEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - event: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - width: c_int = @import("std").mem.zeroes(c_int), - height: c_int = @import("std").mem.zeroes(c_int), - border_width: c_int = @import("std").mem.zeroes(c_int), - above: Window = @import("std").mem.zeroes(Window), - override_redirect: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + event: Window = .null_handle, + window: Window = .null_handle, + x: i32 = 0, + y: i32 = 0, + width: i32 = 0, + height: i32 = 0, + border_width: i32 = 0, + above: Window = .null_handle, + override_redirect: i32 = 0, }; pub const XGravityEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - event: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + event: Window = .null_handle, + window: Window = .null_handle, + x: i32 = 0, + y: i32 = 0, }; pub const XResizeRequestEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - width: c_int = @import("std").mem.zeroes(c_int), - height: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + width: i32 = 0, + height: i32 = 0, }; pub const XConfigureRequestEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - parent: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), - x: c_int = @import("std").mem.zeroes(c_int), - y: c_int = @import("std").mem.zeroes(c_int), - width: c_int = @import("std").mem.zeroes(c_int), - height: c_int = @import("std").mem.zeroes(c_int), - border_width: c_int = @import("std").mem.zeroes(c_int), - above: Window = @import("std").mem.zeroes(Window), - detail: c_int = @import("std").mem.zeroes(c_int), - value_mask: c_ulong = @import("std").mem.zeroes(c_ulong), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + parent: Window = .null_handle, + window: Window = .null_handle, + x: i32 = 0, + y: i32 = 0, + width: i32 = 0, + height: i32 = 0, + border_width: i32 = 0, + above: Window = .null_handle, + detail: i32 = 0, + value_mask: u64 = 0, }; pub const XCirculateEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - event: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), - place: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + event: Window = .null_handle, + window: Window = .null_handle, + place: i32 = 0, }; pub const XCirculateRequestEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - parent: Window = @import("std").mem.zeroes(Window), - window: Window = @import("std").mem.zeroes(Window), - place: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + parent: Window = .null_handle, + window: Window = .null_handle, + place: i32 = 0, }; pub const XPropertyEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - atom: Atom = @import("std").mem.zeroes(Atom), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + atom: Atom = .null_handle, time: Time = @import("std").mem.zeroes(Time), - state: c_int = @import("std").mem.zeroes(c_int), + state: i32 = 0, }; pub const XSelectionClearEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - selection: Atom = @import("std").mem.zeroes(Atom), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + selection: Atom = .null_handle, time: Time = @import("std").mem.zeroes(Time), }; pub const XSelectionRequestEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - owner: Window = @import("std").mem.zeroes(Window), - requestor: Window = @import("std").mem.zeroes(Window), - selection: Atom = @import("std").mem.zeroes(Atom), - target: Atom = @import("std").mem.zeroes(Atom), - property: Atom = @import("std").mem.zeroes(Atom), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + owner: Window = .null_handle, + requestor: Window = .null_handle, + selection: Atom = .null_handle, + target: Atom = .null_handle, + property: Atom = .null_handle, time: Time = @import("std").mem.zeroes(Time), }; pub const XSelectionEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - requestor: Window = @import("std").mem.zeroes(Window), - selection: Atom = @import("std").mem.zeroes(Atom), - target: Atom = @import("std").mem.zeroes(Atom), - property: Atom = @import("std").mem.zeroes(Atom), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + requestor: Window = .null_handle, + selection: Atom = .null_handle, + target: Atom = .null_handle, + property: Atom = .null_handle, time: Time = @import("std").mem.zeroes(Time), }; pub const XColormapEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - colormap: Colormap = @import("std").mem.zeroes(Colormap), - new: c_int = @import("std").mem.zeroes(c_int), - state: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + colormap: Colormap = .null_handle, + new: i32 = 0, + state: i32 = 0, }; const union_unnamed_4 = extern union { b: [20]u8, - s: [10]c_short, - l: [5]c_long, + s: [10]i16, + l: [5]i64, }; pub const XClientMessageEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - message_type: Atom = @import("std").mem.zeroes(Atom), - format: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + message_type: Atom = .null_handle, + format: i32 = 0, data: union_unnamed_4 = @import("std").mem.zeroes(union_unnamed_4), }; pub const XMappingEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), - request: c_int = @import("std").mem.zeroes(c_int), - first_keycode: c_int = @import("std").mem.zeroes(c_int), - count: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, + request: i32 = 0, + first_keycode: i32 = 0, + count: i32 = 0, }; pub const XErrorEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - resourceid: XID = @import("std").mem.zeroes(XID), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - error_code: u8 = @import("std").mem.zeroes(u8), - request_code: u8 = @import("std").mem.zeroes(u8), - minor_code: u8 = @import("std").mem.zeroes(u8), + type: i32 = 0, + display: ?*Display = null, + resourceid: XID = .null_handle, + serial: u64 = 0, + error_code: u8 = 0, + request_code: u8 = 0, + minor_code: u8 = 0, }; pub const XAnyEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - window: Window = @import("std").mem.zeroes(Window), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + window: Window = .null_handle, }; pub const XGenericEvent = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - extension: c_int = @import("std").mem.zeroes(c_int), - evtype: c_int = @import("std").mem.zeroes(c_int), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + extension: i32 = 0, + evtype: i32 = 0, }; pub const XGenericEventCookie = extern struct { - type: c_int = @import("std").mem.zeroes(c_int), - serial: c_ulong = @import("std").mem.zeroes(c_ulong), - send_event: c_int = @import("std").mem.zeroes(c_int), - display: ?*Display = @import("std").mem.zeroes(?*Display), - extension: c_int = @import("std").mem.zeroes(c_int), - evtype: c_int = @import("std").mem.zeroes(c_int), - cookie: c_uint = @import("std").mem.zeroes(c_uint), - data: ?*anyopaque = @import("std").mem.zeroes(?*anyopaque), + type: i32 = 0, + serial: u64 = 0, + send_event: i32 = 0, + display: ?*Display = null, + extension: i32 = 0, + evtype: i32 = 0, + cookie: u32 = 0, + data: ?*anyopaque = null, }; -pub const union__XEvent = extern union { - type: c_int, + +pub const XEvent = extern union { + type: i32, xany: XAnyEvent, xkey: XKeyEvent, xbutton: XButtonEvent, @@ -718,54 +895,54 @@ pub const union__XEvent = extern union { xkeymap: XKeymapEvent, xgeneric: XGenericEvent, xcookie: XGenericEventCookie, - pad: [24]c_long, + pad: [24]i64, }; -pub const XEvent = union__XEvent; + pub const XCharStruct = extern struct { - lbearing: c_short = @import("std").mem.zeroes(c_short), - rbearing: c_short = @import("std").mem.zeroes(c_short), - width: c_short = @import("std").mem.zeroes(c_short), - ascent: c_short = @import("std").mem.zeroes(c_short), - descent: c_short = @import("std").mem.zeroes(c_short), - attributes: c_ushort = @import("std").mem.zeroes(c_ushort), + lbearing: i16 = 0, + rbearing: i16 = 0, + width: i16 = 0, + ascent: i16 = 0, + descent: i16 = 0, + attributes: u16 = 0, }; pub const XFontProp = extern struct { - name: Atom = @import("std").mem.zeroes(Atom), - card32: c_ulong = @import("std").mem.zeroes(c_ulong), + name: Atom = .null_handle, + card32: u64 = 0, }; pub const XFontStruct = extern struct { - ext_data: [*c]XExtData = @import("std").mem.zeroes([*c]XExtData), - fid: Font = @import("std").mem.zeroes(Font), - direction: c_uint = @import("std").mem.zeroes(c_uint), - min_char_or_byte2: c_uint = @import("std").mem.zeroes(c_uint), - max_char_or_byte2: c_uint = @import("std").mem.zeroes(c_uint), - min_byte1: c_uint = @import("std").mem.zeroes(c_uint), - max_byte1: c_uint = @import("std").mem.zeroes(c_uint), - all_chars_exist: c_int = @import("std").mem.zeroes(c_int), - default_char: c_uint = @import("std").mem.zeroes(c_uint), - n_properties: c_int = @import("std").mem.zeroes(c_int), + ext_data: ?*XExtData = null, + fid: Font = .null_handle, + direction: u32 = 0, + min_char_or_byte2: u32 = 0, + max_char_or_byte2: u32 = 0, + min_byte1: u32 = 0, + max_byte1: u32 = 0, + all_chars_exist: i32 = 0, + default_char: u32 = 0, + n_properties: i32 = 0, properties: [*c]XFontProp = @import("std").mem.zeroes([*c]XFontProp), min_bounds: XCharStruct = @import("std").mem.zeroes(XCharStruct), max_bounds: XCharStruct = @import("std").mem.zeroes(XCharStruct), per_char: [*c]XCharStruct = @import("std").mem.zeroes([*c]XCharStruct), - ascent: c_int = @import("std").mem.zeroes(c_int), - descent: c_int = @import("std").mem.zeroes(c_int), + ascent: i32 = 0, + descent: i32 = 0, }; pub const XTextItem = extern struct { chars: [*c]u8 = @import("std").mem.zeroes([*c]u8), - nchars: c_int = @import("std").mem.zeroes(c_int), - delta: c_int = @import("std").mem.zeroes(c_int), - font: Font = @import("std").mem.zeroes(Font), + nchars: i32 = 0, + delta: i32 = 0, + font: Font = .null_handle, }; pub const XChar2b = extern struct { - byte1: u8 = @import("std").mem.zeroes(u8), - byte2: u8 = @import("std").mem.zeroes(u8), + byte1: u8 = 0, + byte2: u8 = 0, }; pub const XTextItem16 = extern struct { chars: [*c]XChar2b = @import("std").mem.zeroes([*c]XChar2b), - nchars: c_int = @import("std").mem.zeroes(c_int), - delta: c_int = @import("std").mem.zeroes(c_int), - font: Font = @import("std").mem.zeroes(Font), + nchars: i32 = 0, + delta: i32 = 0, + font: Font = .null_handle, }; pub const XEDataObject = extern union { display: ?*Display, @@ -786,32 +963,32 @@ pub const XOC = ?*struct__XOC; pub const XFontSet = ?*struct__XOC; pub const XmbTextItem = extern struct { chars: [*c]u8 = @import("std").mem.zeroes([*c]u8), - nchars: c_int = @import("std").mem.zeroes(c_int), - delta: c_int = @import("std").mem.zeroes(c_int), + nchars: i32 = 0, + delta: i32 = 0, font_set: XFontSet = @import("std").mem.zeroes(XFontSet), }; pub const XwcTextItem = extern struct { - chars: [*c]wchar_t = @import("std").mem.zeroes([*c]wchar_t), - nchars: c_int = @import("std").mem.zeroes(c_int), - delta: c_int = @import("std").mem.zeroes(c_int), + chars: [*c]WChar = @import("std").mem.zeroes([*c]WChar), + nchars: i32 = 0, + delta: i32 = 0, font_set: XFontSet = @import("std").mem.zeroes(XFontSet), }; pub const XOMCharSetList = extern struct { - charset_count: c_int = @import("std").mem.zeroes(c_int), + charset_count: i32 = 0, charset_list: [*c][*c]u8 = @import("std").mem.zeroes([*c][*c]u8), }; -pub const XOMOrientation_LTR_TTB: c_int = 0; -pub const XOMOrientation_RTL_TTB: c_int = 1; -pub const XOMOrientation_TTB_LTR: c_int = 2; -pub const XOMOrientation_TTB_RTL: c_int = 3; -pub const XOMOrientation_Context: c_int = 4; -pub const XOrientation = c_uint; +pub const XOMOrientation_LTR_TTB: i32 = 0; +pub const XOMOrientation_RTL_TTB: i32 = 1; +pub const XOMOrientation_TTB_LTR: i32 = 2; +pub const XOMOrientation_TTB_RTL: i32 = 3; +pub const XOMOrientation_Context: i32 = 4; +pub const XOrientation = u32; pub const XOMOrientation = extern struct { - num_orientation: c_int = @import("std").mem.zeroes(c_int), + num_orientation: i32 = 0, orientation: [*c]XOrientation = @import("std").mem.zeroes([*c]XOrientation), }; pub const XOMFontInfo = extern struct { - num_font: c_int = @import("std").mem.zeroes(c_int), + num_font: i32 = 0, font_struct_list: [*c][*c]XFontStruct = @import("std").mem.zeroes([*c][*c]XFontStruct), font_name_list: [*c][*c]u8 = @import("std").mem.zeroes([*c][*c]u8), }; @@ -819,97 +996,97 @@ pub const struct__XIM = opaque {}; pub const XIM = ?*struct__XIM; pub const struct__XIC = opaque {}; pub const XIC = ?*struct__XIC; -pub const XIMProc = ?*const fn (XIM, XPointer, XPointer) callconv(.c) void; -pub const XICProc = ?*const fn (XIC, XPointer, XPointer) callconv(.c) c_int; -pub const XIDProc = ?*const fn (?*Display, XPointer, XPointer) callconv(.c) void; -pub const XIMStyle = c_ulong; +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 XIMStyle = u64; pub const XIMStyles = extern struct { - count_styles: c_ushort = @import("std").mem.zeroes(c_ushort), + count_styles: u16 = 0, supported_styles: [*c]XIMStyle = @import("std").mem.zeroes([*c]XIMStyle), }; pub const XVaNestedList = ?*anyopaque; pub const XIMCallback = extern struct { - client_data: XPointer = @import("std").mem.zeroes(XPointer), + client_data: ?*anyopaque = null, callback: XIMProc = @import("std").mem.zeroes(XIMProc), }; pub const XICCallback = extern struct { - client_data: XPointer = @import("std").mem.zeroes(XPointer), + client_data: ?*anyopaque = null, callback: XICProc = @import("std").mem.zeroes(XICProc), }; -pub const XIMFeedback = c_ulong; +pub const XIMFeedback = u64; const union_unnamed_5 = extern union { multi_byte: [*c]u8, - wide_char: [*c]wchar_t, + wide_char: [*c]WChar, }; pub const struct__XIMText = extern struct { - length: c_ushort = @import("std").mem.zeroes(c_ushort), + length: u16 = 0, feedback: [*c]XIMFeedback = @import("std").mem.zeroes([*c]XIMFeedback), - encoding_is_wchar: c_int = @import("std").mem.zeroes(c_int), + encoding_is_wchar: i32 = 0, string: union_unnamed_5 = @import("std").mem.zeroes(union_unnamed_5), }; pub const XIMText = struct__XIMText; -pub const XIMPreeditState = c_ulong; +pub const XIMPreeditState = u64; pub const struct__XIMPreeditStateNotifyCallbackStruct = extern struct { state: XIMPreeditState = @import("std").mem.zeroes(XIMPreeditState), }; pub const XIMPreeditStateNotifyCallbackStruct = struct__XIMPreeditStateNotifyCallbackStruct; -pub const XIMResetState = c_ulong; -pub const XIMStringConversionFeedback = c_ulong; +pub const XIMResetState = u64; +pub const XIMStringConversionFeedback = u64; const union_unnamed_6 = extern union { mbs: [*c]u8, - wcs: [*c]wchar_t, + wcs: [*c]WChar, }; pub const struct__XIMStringConversionText = extern struct { - length: c_ushort = @import("std").mem.zeroes(c_ushort), + length: u16 = 0, feedback: [*c]XIMStringConversionFeedback = @import("std").mem.zeroes([*c]XIMStringConversionFeedback), - encoding_is_wchar: c_int = @import("std").mem.zeroes(c_int), + encoding_is_wchar: i32 = 0, string: union_unnamed_6 = @import("std").mem.zeroes(union_unnamed_6), }; pub const XIMStringConversionText = struct__XIMStringConversionText; -pub const XIMStringConversionPosition = c_ushort; -pub const XIMStringConversionType = c_ushort; -pub const XIMStringConversionOperation = c_ushort; -pub const XIMForwardChar: c_int = 0; -pub const XIMBackwardChar: c_int = 1; -pub const XIMForwardWord: c_int = 2; -pub const XIMBackwardWord: c_int = 3; -pub const XIMCaretUp: c_int = 4; -pub const XIMCaretDown: c_int = 5; -pub const XIMNextLine: c_int = 6; -pub const XIMPreviousLine: c_int = 7; -pub const XIMLineStart: c_int = 8; -pub const XIMLineEnd: c_int = 9; -pub const XIMAbsolutePosition: c_int = 10; -pub const XIMDontChange: c_int = 11; -pub const XIMCaretDirection = c_uint; +pub const XIMStringConversionPosition = u16; +pub const XIMStringConversionType = u16; +pub const XIMStringConversionOperation = u16; +pub const XIMForwardChar: i32 = 0; +pub const XIMBackwardChar: i32 = 1; +pub const XIMForwardWord: i32 = 2; +pub const XIMBackwardWord: i32 = 3; +pub const XIMCaretUp: i32 = 4; +pub const XIMCaretDown: i32 = 5; +pub const XIMNextLine: i32 = 6; +pub const XIMPreviousLine: i32 = 7; +pub const XIMLineStart: i32 = 8; +pub const XIMLineEnd: i32 = 9; +pub const XIMAbsolutePosition: i32 = 10; +pub const XIMDontChange: i32 = 11; +pub const XIMCaretDirection = u32; pub const struct__XIMStringConversionCallbackStruct = extern struct { position: XIMStringConversionPosition = @import("std").mem.zeroes(XIMStringConversionPosition), direction: XIMCaretDirection = @import("std").mem.zeroes(XIMCaretDirection), operation: XIMStringConversionOperation = @import("std").mem.zeroes(XIMStringConversionOperation), - factor: c_ushort = @import("std").mem.zeroes(c_ushort), + factor: u16 = 0, text: [*c]XIMStringConversionText = @import("std").mem.zeroes([*c]XIMStringConversionText), }; pub const XIMStringConversionCallbackStruct = struct__XIMStringConversionCallbackStruct; pub const struct__XIMPreeditDrawCallbackStruct = extern struct { - caret: c_int = @import("std").mem.zeroes(c_int), - chg_first: c_int = @import("std").mem.zeroes(c_int), - chg_length: c_int = @import("std").mem.zeroes(c_int), + caret: i32 = 0, + chg_first: i32 = 0, + chg_length: i32 = 0, text: [*c]XIMText = @import("std").mem.zeroes([*c]XIMText), }; pub const XIMPreeditDrawCallbackStruct = struct__XIMPreeditDrawCallbackStruct; -pub const XIMIsInvisible: c_int = 0; -pub const XIMIsPrimary: c_int = 1; -pub const XIMIsSecondary: c_int = 2; -pub const XIMCaretStyle = c_uint; +pub const XIMIsInvisible: i32 = 0; +pub const XIMIsPrimary: i32 = 1; +pub const XIMIsSecondary: i32 = 2; +pub const XIMCaretStyle = u32; pub const struct__XIMPreeditCaretCallbackStruct = extern struct { - position: c_int = @import("std").mem.zeroes(c_int), + position: i32 = 0, direction: XIMCaretDirection = @import("std").mem.zeroes(XIMCaretDirection), style: XIMCaretStyle = @import("std").mem.zeroes(XIMCaretStyle), }; pub const XIMPreeditCaretCallbackStruct = struct__XIMPreeditCaretCallbackStruct; -pub const XIMTextType: c_int = 0; -pub const XIMBitmapType: c_int = 1; -pub const XIMStatusDataType = c_uint; +pub const XIMTextType: i32 = 0; +pub const XIMBitmapType: i32 = 1; +pub const XIMStatusDataType = u32; const union_unnamed_7 = extern union { text: [*c]XIMText, bitmap: Pixmap, @@ -921,369 +1098,369 @@ pub const struct__XIMStatusDrawCallbackStruct = extern struct { pub const XIMStatusDrawCallbackStruct = struct__XIMStatusDrawCallbackStruct; pub const struct__XIMHotKeyTrigger = extern struct { keysym: KeySym = @import("std").mem.zeroes(KeySym), - modifier: c_int = @import("std").mem.zeroes(c_int), - modifier_mask: c_int = @import("std").mem.zeroes(c_int), + modifier: i32 = 0, + modifier_mask: i32 = 0, }; pub const XIMHotKeyTrigger = struct__XIMHotKeyTrigger; pub const struct__XIMHotKeyTriggers = extern struct { - num_hot_key: c_int = @import("std").mem.zeroes(c_int), + num_hot_key: i32 = 0, key: [*c]XIMHotKeyTrigger = @import("std").mem.zeroes([*c]XIMHotKeyTrigger), }; pub const XIMHotKeyTriggers = struct__XIMHotKeyTriggers; -pub const XIMHotKeyState = c_ulong; +pub const XIMHotKeyState = u64; pub const XIMValuesList = extern struct { - count_values: c_ushort = @import("std").mem.zeroes(c_ushort), + count_values: u16 = 0, supported_values: [*c][*c]u8 = @import("std").mem.zeroes([*c][*c]u8), }; -pub extern var _Xdebug: c_int; +pub extern var _Xdebug: i32; pub extern fn XLoadQueryFont(?*Display, [*c]const u8) [*c]XFontStruct; pub extern fn XQueryFont(?*Display, XID) [*c]XFontStruct; -pub extern fn XGetMotionEvents(?*Display, Window, Time, Time, [*c]c_int) [*c]XTimeCoord; -pub extern fn XDeleteModifiermapEntry([*c]XModifierKeymap, KeyCode, c_int) [*c]XModifierKeymap; +pub extern fn XGetMotionEvents(?*Display, Window, Time, Time, [*c]i32) [*c]XTimeCoord; +pub extern fn XDeleteModifiermapEntry([*c]XModifierKeymap, KeyCode, i32) [*c]XModifierKeymap; pub extern fn XGetModifierMapping(?*Display) [*c]XModifierKeymap; -pub extern fn XInsertModifiermapEntry([*c]XModifierKeymap, KeyCode, c_int) [*c]XModifierKeymap; -pub extern fn XNewModifiermap(c_int) [*c]XModifierKeymap; -pub extern fn XCreateImage(?*Display, [*c]Visual, c_uint, c_int, c_int, [*c]u8, c_uint, c_uint, c_int, c_int) [*c]XImage; -pub extern fn XInitImage([*c]XImage) c_int; -pub extern fn XGetImage(?*Display, Drawable, c_int, c_int, c_uint, c_uint, c_ulong, c_int) [*c]XImage; -pub extern fn XGetSubImage(?*Display, Drawable, c_int, c_int, c_uint, c_uint, c_ulong, c_int, [*c]XImage, c_int, c_int) [*c]XImage; -pub extern fn XOpenDisplay([*c]const u8) ?*Display; +pub extern fn XInsertModifiermapEntry([*c]XModifierKeymap, KeyCode, i32) [*c]XModifierKeymap; +pub extern fn XNewModifiermap(i32) [*c]XModifierKeymap; +pub extern fn XCreateImage(?*Display, [*c]Visual, u32, i32, i32, [*c]u8, u32, u32, i32, i32) [*c]XImage; +pub extern fn XInitImage([*c]XImage) i32; +pub extern fn XGetImage(?*Display, Drawable, i32, i32, u32, u32, u64, i32) [*c]XImage; +pub extern fn XGetSubImage(?*Display, Drawable, i32, i32, u32, u32, u64, i32, [*c]XImage, i32, i32) [*c]XImage; +pub extern fn XOpenDisplay(display_name: ?[*:0]const u8) ?*Display; pub extern fn XrmInitialize() void; -pub extern fn XFetchBytes(?*Display, [*c]c_int) [*c]u8; -pub extern fn XFetchBuffer(?*Display, [*c]c_int, c_int) [*c]u8; +pub extern fn XFetchBytes(?*Display, [*c]i32) [*c]u8; +pub extern fn XFetchBuffer(?*Display, [*c]i32, i32) [*c]u8; pub extern fn XGetAtomName(?*Display, Atom) [*c]u8; -pub extern fn XGetAtomNames(?*Display, [*c]Atom, c_int, [*c][*c]u8) c_int; +pub extern fn XGetAtomNames(?*Display, [*c]Atom, i32, [*c][*c]u8) i32; pub extern fn XGetDefault(?*Display, [*c]const u8, [*c]const u8) [*c]u8; pub extern fn XDisplayName([*c]const u8) [*c]u8; pub extern fn XKeysymToString(KeySym) [*c]u8; -pub extern fn XSynchronize(?*Display, c_int) ?*const fn (?*Display) callconv(.c) c_int; -pub extern fn XSetAfterFunction(?*Display, ?*const fn (?*Display) callconv(.c) c_int) ?*const fn (?*Display) callconv(.c) c_int; -pub extern fn XInternAtom(?*Display, [*c]const u8, c_int) Atom; -pub extern fn XInternAtoms(?*Display, [*c][*c]u8, c_int, c_int, [*c]Atom) c_int; +pub extern fn XSynchronize(?*Display, i32) ?*const fn (?*Display) callconv(.c) i32; +pub extern fn XSetAfterFunction(?*Display, ?*const fn (?*Display) callconv(.c) i32) ?*const fn (?*Display) callconv(.c) 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 XCopyColormapAndFree(?*Display, Colormap) Colormap; -pub extern fn XCreateColormap(?*Display, Window, [*c]Visual, c_int) Colormap; -pub extern fn XCreatePixmapCursor(?*Display, Pixmap, Pixmap, [*c]XColor, [*c]XColor, c_uint, c_uint) Cursor; -pub extern fn XCreateGlyphCursor(?*Display, Font, Font, c_uint, c_uint, [*c]const XColor, [*c]const XColor) Cursor; -pub extern fn XCreateFontCursor(?*Display, c_uint) Cursor; +pub extern fn XCreateColormap(?*Display, Window, [*c]Visual, i32) Colormap; +pub extern fn XCreatePixmapCursor(?*Display, Pixmap, Pixmap, [*c]XColor, [*c]XColor, u32, u32) Cursor; +pub extern fn XCreateGlyphCursor(?*Display, Font, Font, u32, u32, [*c]const XColor, [*c]const XColor) Cursor; +pub extern fn XCreateFontCursor(?*Display, u32) Cursor; pub extern fn XLoadFont(?*Display, [*c]const u8) Font; -pub extern fn XCreateGC(?*Display, Drawable, c_ulong, [*c]XGCValues) GC; +pub extern fn XCreateGC(display: ?*Display, d: Drawable, valuemask: ValueMask(XGCValues), values: ?*XGCValues) GC; pub extern fn XGContextFromGC(GC) GContext; pub extern fn XFlushGC(?*Display, GC) void; -pub extern fn XCreatePixmap(?*Display, Drawable, c_uint, c_uint, c_uint) Pixmap; -pub extern fn XCreateBitmapFromData(?*Display, Drawable, [*c]const u8, c_uint, c_uint) Pixmap; -pub extern fn XCreatePixmapFromBitmapData(?*Display, Drawable, [*c]u8, c_uint, c_uint, c_ulong, c_ulong, c_uint) Pixmap; -pub extern fn XCreateSimpleWindow(?*Display, Window, c_int, c_int, c_uint, c_uint, c_uint, c_ulong, c_ulong) Window; +pub extern fn XCreatePixmap(?*Display, Drawable, u32, u32, u32) Pixmap; +pub extern fn XCreateBitmapFromData(?*Display, Drawable, [*c]const u8, u32, u32) Pixmap; +pub extern fn XCreatePixmapFromBitmapData(?*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 XGetSelectionOwner(?*Display, Atom) Window; -pub extern fn XCreateWindow(?*Display, Window, c_int, c_int, c_uint, c_uint, c_uint, c_int, c_uint, [*c]Visual, c_ulong, [*c]XSetWindowAttributes) Window; -pub extern fn XListInstalledColormaps(?*Display, Window, [*c]c_int) [*c]Colormap; -pub extern fn XListFonts(?*Display, [*c]const u8, c_int, [*c]c_int) [*c][*c]u8; -pub extern fn XListFontsWithInfo(?*Display, [*c]const u8, c_int, [*c]c_int, [*c][*c]XFontStruct) [*c][*c]u8; -pub extern fn XGetFontPath(?*Display, [*c]c_int) [*c][*c]u8; -pub extern fn XListExtensions(?*Display, [*c]c_int) [*c][*c]u8; -pub extern fn XListProperties(?*Display, Window, [*c]c_int) [*c]Atom; -pub extern fn XListHosts(?*Display, [*c]c_int, [*c]c_int) [*c]XHostAddress; -pub extern fn XKeycodeToKeysym(?*Display, KeyCode, c_int) KeySym; -pub extern fn XLookupKeysym([*c]XKeyEvent, c_int) KeySym; -pub extern fn XGetKeyboardMapping(?*Display, KeyCode, c_int, [*c]c_int) [*c]KeySym; +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 XListInstalledColormaps(?*Display, Window, [*c]i32) [*c]Colormap; +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 XGetFontPath(?*Display, [*c]i32) [*c][*c]u8; +pub extern fn XListExtensions(?*Display, [*c]i32) [*c][*c]u8; +pub extern fn XListProperties(?*Display, Window, [*c]i32) [*c]Atom; +pub extern fn XListHosts(?*Display, [*c]i32, [*c]i32) [*c]XHostAddress; +pub extern fn XKeycodeToKeysym(?*Display, KeyCode, i32) KeySym; +pub extern fn XLookupKeysym([*c]XKeyEvent, i32) KeySym; +pub extern fn XGetKeyboardMapping(?*Display, KeyCode, i32, [*c]i32) [*c]KeySym; pub extern fn XStringToKeysym([*c]const u8) KeySym; -pub extern fn XMaxRequestSize(?*Display) c_long; -pub extern fn XExtendedMaxRequestSize(?*Display) c_long; +pub extern fn XMaxRequestSize(?*Display) i64; +pub extern fn XExtendedMaxRequestSize(?*Display) i64; pub extern fn XResourceManagerString(?*Display) [*c]u8; pub extern fn XScreenResourceString([*c]Screen) [*c]u8; -pub extern fn XDisplayMotionBufferSize(?*Display) c_ulong; +pub extern fn XDisplayMotionBufferSize(?*Display) u64; pub extern fn XVisualIDFromVisual([*c]Visual) VisualID; -pub extern fn XInitThreads() c_int; -pub extern fn XFreeThreads() c_int; +pub extern fn XInitThreads() i32; +pub extern fn XFreeThreads() i32; pub extern fn XLockDisplay(?*Display) void; pub extern fn XUnlockDisplay(?*Display) void; pub extern fn XInitExtension(?*Display, [*c]const u8) [*c]XExtCodes; pub extern fn XAddExtension(?*Display) [*c]XExtCodes; -pub extern fn XFindOnExtensionList([*c][*c]XExtData, c_int) [*c]XExtData; +pub extern fn XFindOnExtensionList([*c][*c]XExtData, i32) [*c]XExtData; pub extern fn XEHeadOfExtensionList(XEDataObject) [*c][*c]XExtData; -pub extern fn XRootWindow(?*Display, c_int) Window; +pub extern fn XRootWindow(?*Display, i32) Window; pub extern fn XDefaultRootWindow(?*Display) Window; pub extern fn XRootWindowOfScreen([*c]Screen) Window; -pub extern fn XDefaultVisual(?*Display, c_int) [*c]Visual; +pub extern fn XDefaultVisual(?*Display, i32) [*c]Visual; pub extern fn XDefaultVisualOfScreen([*c]Screen) [*c]Visual; -pub extern fn XDefaultGC(?*Display, c_int) GC; +pub extern fn XDefaultGC(?*Display, i32) GC; pub extern fn XDefaultGCOfScreen([*c]Screen) GC; -pub extern fn XBlackPixel(?*Display, c_int) c_ulong; -pub extern fn XWhitePixel(?*Display, c_int) c_ulong; -pub extern fn XAllPlanes() c_ulong; -pub extern fn XBlackPixelOfScreen([*c]Screen) c_ulong; -pub extern fn XWhitePixelOfScreen([*c]Screen) c_ulong; -pub extern fn XNextRequest(?*Display) c_ulong; -pub extern fn XLastKnownRequestProcessed(?*Display) c_ulong; +pub extern fn XBlackPixel(?*Display, i32) u64; +pub extern fn XWhitePixel(?*Display, i32) u64; +pub extern fn XAllPlanes() u64; +pub extern fn XBlackPixelOfScreen([*c]Screen) u64; +pub extern fn XWhitePixelOfScreen([*c]Screen) u64; +pub extern fn XNextRequest(?*Display) u64; +pub extern fn XLastKnownRequestProcessed(?*Display) u64; pub extern fn XServerVendor(?*Display) [*c]u8; pub extern fn XDisplayString(?*Display) [*c]u8; -pub extern fn XDefaultColormap(?*Display, c_int) Colormap; +pub extern fn XDefaultColormap(?*Display, i32) Colormap; pub extern fn XDefaultColormapOfScreen([*c]Screen) Colormap; pub extern fn XDisplayOfScreen([*c]Screen) ?*Display; -pub extern fn XScreenOfDisplay(?*Display, c_int) [*c]Screen; +pub extern fn XScreenOfDisplay(?*Display, i32) [*c]Screen; pub extern fn XDefaultScreenOfDisplay(?*Display) [*c]Screen; -pub extern fn XEventMaskOfScreen([*c]Screen) c_long; -pub extern fn XScreenNumberOfScreen([*c]Screen) c_int; -pub const XErrorHandler = ?*const fn (?*Display, [*c]XErrorEvent) callconv(.c) c_int; +pub extern fn XEventMaskOfScreen([*c]Screen) i64; +pub extern fn XScreenNumberOfScreen([*c]Screen) i32; +pub const XErrorHandler = ?*const fn (?*Display, [*c]XErrorEvent) callconv(.c) i32; pub extern fn XSetErrorHandler(XErrorHandler) XErrorHandler; -pub const XIOErrorHandler = ?*const fn (?*Display) callconv(.c) c_int; +pub const XIOErrorHandler = ?*const fn (?*Display) callconv(.c) i32; pub extern fn XSetIOErrorHandler(XIOErrorHandler) XIOErrorHandler; pub const XIOErrorExitHandler = ?*const fn (?*Display, ?*anyopaque) callconv(.c) void; pub extern fn XSetIOErrorExitHandler(?*Display, XIOErrorExitHandler, ?*anyopaque) void; -pub extern fn XListPixmapFormats(?*Display, [*c]c_int) [*c]XPixmapFormatValues; -pub extern fn XListDepths(?*Display, c_int, [*c]c_int) [*c]c_int; -pub extern fn XReconfigureWMWindow(?*Display, Window, c_int, c_uint, [*c]XWindowChanges) c_int; -pub extern fn XGetWMProtocols(?*Display, Window, [*c][*c]Atom, [*c]c_int) c_int; -pub extern fn XSetWMProtocols(?*Display, Window, [*c]Atom, c_int) c_int; -pub extern fn XIconifyWindow(?*Display, Window, c_int) c_int; -pub extern fn XWithdrawWindow(?*Display, Window, c_int) c_int; -pub extern fn XGetCommand(?*Display, Window, [*c][*c][*c]u8, [*c]c_int) c_int; -pub extern fn XGetWMColormapWindows(?*Display, Window, [*c][*c]Window, [*c]c_int) c_int; -pub extern fn XSetWMColormapWindows(?*Display, Window, [*c]Window, c_int) c_int; +pub extern fn XListPixmapFormats(?*Display, [*c]i32) [*c]XPixmapFormatValues; +pub extern fn XListDepths(?*Display, i32, [*c]i32) [*c]i32; +pub extern fn XReconfigureWMWindow(?*Display, Window, i32, u32, [*c]XWindowChanges) i32; +pub extern fn XGetWMProtocols(?*Display, Window, [*c][*c]Atom, [*c]i32) i32; +pub extern fn XSetWMProtocols(display: ?*Display, w: Window, protocols: ?[*]Atom, count: i32) Status; +pub extern fn XIconifyWindow(?*Display, Window, i32) i32; +pub extern fn XWithdrawWindow(?*Display, Window, i32) i32; +pub extern fn XGetCommand(?*Display, Window, [*c][*c][*c]u8, [*c]i32) i32; +pub extern fn XGetWMColormapWindows(?*Display, Window, [*c][*c]Window, [*c]i32) i32; +pub extern fn XSetWMColormapWindows(?*Display, Window, [*c]Window, i32) i32; pub extern fn XFreeStringList([*c][*c]u8) void; -pub extern fn XSetTransientForHint(?*Display, Window, Window) c_int; -pub extern fn XActivateScreenSaver(?*Display) c_int; -pub extern fn XAddHost(?*Display, [*c]XHostAddress) c_int; -pub extern fn XAddHosts(?*Display, [*c]XHostAddress, c_int) c_int; -pub extern fn XAddToExtensionList([*c][*c]struct__XExtData, [*c]XExtData) c_int; -pub extern fn XAddToSaveSet(?*Display, Window) c_int; -pub extern fn XAllocColor(?*Display, Colormap, [*c]XColor) c_int; -pub extern fn XAllocColorCells(?*Display, Colormap, c_int, [*c]c_ulong, c_uint, [*c]c_ulong, c_uint) c_int; -pub extern fn XAllocColorPlanes(?*Display, Colormap, c_int, [*c]c_ulong, c_int, c_int, c_int, c_int, [*c]c_ulong, [*c]c_ulong, [*c]c_ulong) c_int; -pub extern fn XAllocNamedColor(?*Display, Colormap, [*c]const u8, [*c]XColor, [*c]XColor) c_int; -pub extern fn XAllowEvents(?*Display, c_int, Time) c_int; -pub extern fn XAutoRepeatOff(?*Display) c_int; -pub extern fn XAutoRepeatOn(?*Display) c_int; -pub extern fn XBell(?*Display, c_int) c_int; -pub extern fn XBitmapBitOrder(?*Display) c_int; -pub extern fn XBitmapPad(?*Display) c_int; -pub extern fn XBitmapUnit(?*Display) c_int; -pub extern fn XCellsOfScreen([*c]Screen) c_int; -pub extern fn XChangeActivePointerGrab(?*Display, c_uint, Cursor, Time) c_int; -pub extern fn XChangeGC(?*Display, GC, c_ulong, [*c]XGCValues) c_int; -pub extern fn XChangeKeyboardControl(?*Display, c_ulong, [*c]XKeyboardControl) c_int; -pub extern fn XChangeKeyboardMapping(?*Display, c_int, c_int, [*c]KeySym, c_int) c_int; -pub extern fn XChangePointerControl(?*Display, c_int, c_int, c_int, c_int, c_int) c_int; -pub extern fn XChangeProperty(?*Display, Window, Atom, Atom, c_int, c_int, [*c]const u8, c_int) c_int; -pub extern fn XChangeSaveSet(?*Display, Window, c_int) c_int; -pub extern fn XChangeWindowAttributes(?*Display, Window, c_ulong, [*c]XSetWindowAttributes) c_int; -pub extern fn XCheckIfEvent(?*Display, [*c]XEvent, ?*const fn (?*Display, [*c]XEvent, XPointer) callconv(.c) c_int, XPointer) c_int; -pub extern fn XCheckMaskEvent(?*Display, c_long, [*c]XEvent) c_int; -pub extern fn XCheckTypedEvent(?*Display, c_int, [*c]XEvent) c_int; -pub extern fn XCheckTypedWindowEvent(?*Display, Window, c_int, [*c]XEvent) c_int; -pub extern fn XCheckWindowEvent(?*Display, Window, c_long, [*c]XEvent) c_int; -pub extern fn XCirculateSubwindows(?*Display, Window, c_int) c_int; -pub extern fn XCirculateSubwindowsDown(?*Display, Window) c_int; -pub extern fn XCirculateSubwindowsUp(?*Display, Window) c_int; -pub extern fn XClearArea(?*Display, Window, c_int, c_int, c_uint, c_uint, c_int) c_int; -pub extern fn XClearWindow(?*Display, Window) c_int; -pub extern fn XCloseDisplay(?*Display) c_int; -pub extern fn XConfigureWindow(?*Display, Window, c_uint, [*c]XWindowChanges) c_int; -pub extern fn XConnectionNumber(?*Display) c_int; -pub extern fn XConvertSelection(?*Display, Atom, Atom, Atom, Window, Time) c_int; -pub extern fn XCopyArea(?*Display, Drawable, Drawable, GC, c_int, c_int, c_uint, c_uint, c_int, c_int) c_int; -pub extern fn XCopyGC(?*Display, GC, c_ulong, GC) c_int; -pub extern fn XCopyPlane(?*Display, Drawable, Drawable, GC, c_int, c_int, c_uint, c_uint, c_int, c_int, c_ulong) c_int; -pub extern fn XDefaultDepth(?*Display, c_int) c_int; -pub extern fn XDefaultDepthOfScreen([*c]Screen) c_int; -pub extern fn XDefaultScreen(?*Display) c_int; -pub extern fn XDefineCursor(?*Display, Window, Cursor) c_int; -pub extern fn XDeleteProperty(?*Display, Window, Atom) c_int; -pub extern fn XDestroyWindow(?*Display, Window) c_int; -pub extern fn XDestroySubwindows(?*Display, Window) c_int; -pub extern fn XDoesBackingStore([*c]Screen) c_int; -pub extern fn XDoesSaveUnders([*c]Screen) c_int; -pub extern fn XDisableAccessControl(?*Display) c_int; -pub extern fn XDisplayCells(?*Display, c_int) c_int; -pub extern fn XDisplayHeight(?*Display, c_int) c_int; -pub extern fn XDisplayHeightMM(?*Display, c_int) c_int; -pub extern fn XDisplayKeycodes(?*Display, [*c]c_int, [*c]c_int) c_int; -pub extern fn XDisplayPlanes(?*Display, c_int) c_int; -pub extern fn XDisplayWidth(?*Display, c_int) c_int; -pub extern fn XDisplayWidthMM(?*Display, c_int) c_int; -pub extern fn XDrawArc(?*Display, Drawable, GC, c_int, c_int, c_uint, c_uint, c_int, c_int) c_int; -pub extern fn XDrawArcs(?*Display, Drawable, GC, [*c]XArc, c_int) c_int; -pub extern fn XDrawImageString(?*Display, Drawable, GC, c_int, c_int, [*c]const u8, c_int) c_int; -pub extern fn XDrawImageString16(?*Display, Drawable, GC, c_int, c_int, [*c]const XChar2b, c_int) c_int; -pub extern fn XDrawLine(?*Display, Drawable, GC, c_int, c_int, c_int, c_int) c_int; -pub extern fn XDrawLines(?*Display, Drawable, GC, [*c]XPoint, c_int, c_int) c_int; -pub extern fn XDrawPoint(?*Display, Drawable, GC, c_int, c_int) c_int; -pub extern fn XDrawPoints(?*Display, Drawable, GC, [*c]XPoint, c_int, c_int) c_int; -pub extern fn XDrawRectangle(?*Display, Drawable, GC, c_int, c_int, c_uint, c_uint) c_int; -pub extern fn XDrawRectangles(?*Display, Drawable, GC, [*c]XRectangle, c_int) c_int; -pub extern fn XDrawSegments(?*Display, Drawable, GC, [*c]XSegment, c_int) c_int; -pub extern fn XDrawString(?*Display, Drawable, GC, c_int, c_int, [*c]const u8, c_int) c_int; -pub extern fn XDrawString16(?*Display, Drawable, GC, c_int, c_int, [*c]const XChar2b, c_int) c_int; -pub extern fn XDrawText(?*Display, Drawable, GC, c_int, c_int, [*c]XTextItem, c_int) c_int; -pub extern fn XDrawText16(?*Display, Drawable, GC, c_int, c_int, [*c]XTextItem16, c_int) c_int; -pub extern fn XEnableAccessControl(?*Display) c_int; -pub extern fn XEventsQueued(?*Display, c_int) c_int; -pub extern fn XFetchName(?*Display, Window, [*c][*c]u8) c_int; -pub extern fn XFillArc(?*Display, Drawable, GC, c_int, c_int, c_uint, c_uint, c_int, c_int) c_int; -pub extern fn XFillArcs(?*Display, Drawable, GC, [*c]XArc, c_int) c_int; -pub extern fn XFillPolygon(?*Display, Drawable, GC, [*c]XPoint, c_int, c_int, c_int) c_int; -pub extern fn XFillRectangle(?*Display, Drawable, GC, c_int, c_int, c_uint, c_uint) c_int; -pub extern fn XFillRectangles(?*Display, Drawable, GC, [*c]XRectangle, c_int) c_int; -pub extern fn XFlush(?*Display) c_int; -pub extern fn XForceScreenSaver(?*Display, c_int) c_int; -pub extern fn XFree(?*anyopaque) c_int; -pub extern fn XFreeColormap(?*Display, Colormap) c_int; -pub extern fn XFreeColors(?*Display, Colormap, [*c]c_ulong, c_int, c_ulong) c_int; -pub extern fn XFreeCursor(?*Display, Cursor) c_int; -pub extern fn XFreeExtensionList([*c][*c]u8) c_int; -pub extern fn XFreeFont(?*Display, [*c]XFontStruct) c_int; -pub extern fn XFreeFontInfo([*c][*c]u8, [*c]XFontStruct, c_int) c_int; -pub extern fn XFreeFontNames([*c][*c]u8) c_int; -pub extern fn XFreeFontPath([*c][*c]u8) c_int; -pub extern fn XFreeGC(?*Display, GC) c_int; -pub extern fn XFreeModifiermap([*c]XModifierKeymap) c_int; -pub extern fn XFreePixmap(?*Display, Pixmap) c_int; -pub extern fn XGeometry(?*Display, c_int, [*c]const u8, [*c]const u8, c_uint, c_uint, c_uint, c_int, c_int, [*c]c_int, [*c]c_int, [*c]c_int, [*c]c_int) c_int; -pub extern fn XGetErrorDatabaseText(?*Display, [*c]const u8, [*c]const u8, [*c]const u8, [*c]u8, c_int) c_int; -pub extern fn XGetErrorText(?*Display, c_int, [*c]u8, c_int) c_int; -pub extern fn XGetFontProperty([*c]XFontStruct, Atom, [*c]c_ulong) c_int; -pub extern fn XGetGCValues(?*Display, GC, c_ulong, [*c]XGCValues) c_int; -pub extern fn XGetGeometry(?*Display, Drawable, [*c]Window, [*c]c_int, [*c]c_int, [*c]c_uint, [*c]c_uint, [*c]c_uint, [*c]c_uint) c_int; -pub extern fn XGetIconName(?*Display, Window, [*c][*c]u8) c_int; -pub extern fn XGetInputFocus(?*Display, [*c]Window, [*c]c_int) c_int; -pub extern fn XGetKeyboardControl(?*Display, [*c]XKeyboardState) c_int; -pub extern fn XGetPointerControl(?*Display, [*c]c_int, [*c]c_int, [*c]c_int) c_int; -pub extern fn XGetPointerMapping(?*Display, [*c]u8, c_int) c_int; -pub extern fn XGetScreenSaver(?*Display, [*c]c_int, [*c]c_int, [*c]c_int, [*c]c_int) c_int; -pub extern fn XGetTransientForHint(?*Display, Window, [*c]Window) c_int; -pub extern fn XGetWindowProperty(?*Display, Window, Atom, c_long, c_long, c_int, Atom, [*c]Atom, [*c]c_int, [*c]c_ulong, [*c]c_ulong, [*c][*c]u8) c_int; -pub extern fn XGetWindowAttributes(?*Display, Window, [*c]XWindowAttributes) c_int; -pub extern fn XGrabButton(?*Display, c_uint, c_uint, Window, c_int, c_uint, c_int, c_int, Window, Cursor) c_int; -pub extern fn XGrabKey(?*Display, c_int, c_uint, Window, c_int, c_int, c_int) c_int; -pub extern fn XGrabKeyboard(?*Display, Window, c_int, c_int, c_int, Time) c_int; -pub extern fn XGrabPointer(?*Display, Window, c_int, c_uint, c_int, c_int, Window, Cursor, Time) c_int; -pub extern fn XGrabServer(?*Display) c_int; -pub extern fn XHeightMMOfScreen([*c]Screen) c_int; -pub extern fn XHeightOfScreen([*c]Screen) c_int; -pub extern fn XIfEvent(?*Display, [*c]XEvent, ?*const fn (?*Display, [*c]XEvent, XPointer) callconv(.c) c_int, XPointer) c_int; -pub extern fn XImageByteOrder(?*Display) c_int; -pub extern fn XInstallColormap(?*Display, Colormap) c_int; +pub extern fn XSetTransientForHint(?*Display, Window, Window) i32; +pub extern fn XActivateScreenSaver(?*Display) i32; +pub extern fn XAddHost(?*Display, [*c]XHostAddress) i32; +pub extern fn XAddHosts(?*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 XAutoRepeatOff(?*Display) i32; +pub extern fn XAutoRepeatOn(?*Display) i32; +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 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 XCloseDisplay(display: ?*Display) i32; +pub extern fn XConfigureWindow(?*Display, Window, u32, [*c]XWindowChanges) i32; +pub extern fn XConnectionNumber(?*Display) 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 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 XDefaultDepth(?*Display, i32) i32; +pub extern fn XDefaultDepthOfScreen([*c]Screen) i32; +pub extern fn XDefaultScreen(?*Display) i32; +pub extern fn XDefineCursor(?*Display, Window, Cursor) i32; +pub extern fn XDeleteProperty(?*Display, Window, Atom) i32; +pub extern fn XDestroyWindow(display: ?*Display, w: Window) i32; +pub extern fn XDestroySubwindows(display: ?*Display, w: Window) i32; +pub extern fn XDoesBackingStore([*c]Screen) i32; +pub extern fn XDoesSaveUnders([*c]Screen) 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 XDisplayPlanes(?*Display, i32) i32; +pub extern fn XDisplayWidth(?*Display, i32) i32; +pub extern fn XDisplayWidthMM(?*Display, i32) 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 XEnableAccessControl(?*Display) i32; +pub extern fn XEventsQueued(?*Display, i32) i32; +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 XFlush(?*Display) i32; +pub extern fn XForceScreenSaver(?*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 XFreeExtensionList([*c][*c]u8) i32; +pub extern fn XFreeFont(?*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 XFreeGC(display: ?*Display, gc: GC) i32; +pub extern fn XFreeModifiermap([*c]XModifierKeymap) i32; +pub extern fn XFreePixmap(?*Display, Pixmap) i32; +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 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 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 XGetInputFocus(?*Display, [*c]Window, [*c]i32) i32; +pub extern fn XGetKeyboardControl(?*Display, [*c]XKeyboardState) i32; +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 XGetTransientForHint(?*Display, Window, [*c]Window) 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 XGetWindowAttributes(?*Display, Window, [*c]XWindowAttributes) 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 XIfEvent(?*Display, [*c]XEvent, ?*const fn (?*Display, [*c]XEvent, ?*anyopaque) callconv(.c) i32, ?*anyopaque) i32; +pub extern fn XImageByteOrder(?*Display) i32; +pub extern fn XInstallColormap(?*Display, Colormap) i32; pub extern fn XKeysymToKeycode(?*Display, KeySym) KeyCode; -pub extern fn XKillClient(?*Display, XID) c_int; -pub extern fn XLookupColor(?*Display, Colormap, [*c]const u8, [*c]XColor, [*c]XColor) c_int; -pub extern fn XLowerWindow(?*Display, Window) c_int; -pub extern fn XMapRaised(?*Display, Window) c_int; -pub extern fn XMapSubwindows(?*Display, Window) c_int; -pub extern fn XMapWindow(?*Display, Window) c_int; -pub extern fn XMaskEvent(?*Display, c_long, [*c]XEvent) c_int; -pub extern fn XMaxCmapsOfScreen([*c]Screen) c_int; -pub extern fn XMinCmapsOfScreen([*c]Screen) c_int; -pub extern fn XMoveResizeWindow(?*Display, Window, c_int, c_int, c_uint, c_uint) c_int; -pub extern fn XMoveWindow(?*Display, Window, c_int, c_int) c_int; -pub extern fn XNextEvent(?*Display, [*c]XEvent) c_int; -pub extern fn XNoOp(?*Display) c_int; -pub extern fn XParseColor(?*Display, Colormap, [*c]const u8, [*c]XColor) c_int; -pub extern fn XParseGeometry([*c]const u8, [*c]c_int, [*c]c_int, [*c]c_uint, [*c]c_uint) c_int; -pub extern fn XPeekEvent(?*Display, [*c]XEvent) c_int; -pub extern fn XPeekIfEvent(?*Display, [*c]XEvent, ?*const fn (?*Display, [*c]XEvent, XPointer) callconv(.c) c_int, XPointer) c_int; -pub extern fn XPending(?*Display) c_int; -pub extern fn XPlanesOfScreen([*c]Screen) c_int; -pub extern fn XProtocolRevision(?*Display) c_int; -pub extern fn XProtocolVersion(?*Display) c_int; -pub extern fn XPutBackEvent(?*Display, [*c]XEvent) c_int; -pub extern fn XPutImage(?*Display, Drawable, GC, [*c]XImage, c_int, c_int, c_int, c_int, c_uint, c_uint) c_int; -pub extern fn XQLength(?*Display) c_int; -pub extern fn XQueryBestCursor(?*Display, Drawable, c_uint, c_uint, [*c]c_uint, [*c]c_uint) c_int; -pub extern fn XQueryBestSize(?*Display, c_int, Drawable, c_uint, c_uint, [*c]c_uint, [*c]c_uint) c_int; -pub extern fn XQueryBestStipple(?*Display, Drawable, c_uint, c_uint, [*c]c_uint, [*c]c_uint) c_int; -pub extern fn XQueryBestTile(?*Display, Drawable, c_uint, c_uint, [*c]c_uint, [*c]c_uint) c_int; -pub extern fn XQueryColor(?*Display, Colormap, [*c]XColor) c_int; -pub extern fn XQueryColors(?*Display, Colormap, [*c]XColor, c_int) c_int; -pub extern fn XQueryExtension(?*Display, [*c]const u8, [*c]c_int, [*c]c_int, [*c]c_int) c_int; -pub extern fn XQueryKeymap(?*Display, [*c]u8) c_int; -pub extern fn XQueryPointer(?*Display, Window, [*c]Window, [*c]Window, [*c]c_int, [*c]c_int, [*c]c_int, [*c]c_int, [*c]c_uint) c_int; -pub extern fn XQueryTextExtents(?*Display, XID, [*c]const u8, c_int, [*c]c_int, [*c]c_int, [*c]c_int, [*c]XCharStruct) c_int; -pub extern fn XQueryTextExtents16(?*Display, XID, [*c]const XChar2b, c_int, [*c]c_int, [*c]c_int, [*c]c_int, [*c]XCharStruct) c_int; -pub extern fn XQueryTree(?*Display, Window, [*c]Window, [*c]Window, [*c][*c]Window, [*c]c_uint) c_int; -pub extern fn XRaiseWindow(?*Display, Window) c_int; -pub extern fn XReadBitmapFile(?*Display, Drawable, [*c]const u8, [*c]c_uint, [*c]c_uint, [*c]Pixmap, [*c]c_int, [*c]c_int) c_int; -pub extern fn XReadBitmapFileData([*c]const u8, [*c]c_uint, [*c]c_uint, [*c][*c]u8, [*c]c_int, [*c]c_int) c_int; -pub extern fn XRebindKeysym(?*Display, KeySym, [*c]KeySym, c_int, [*c]const u8, c_int) c_int; -pub extern fn XRecolorCursor(?*Display, Cursor, [*c]XColor, [*c]XColor) c_int; -pub extern fn XRefreshKeyboardMapping([*c]XMappingEvent) c_int; -pub extern fn XRemoveFromSaveSet(?*Display, Window) c_int; -pub extern fn XRemoveHost(?*Display, [*c]XHostAddress) c_int; -pub extern fn XRemoveHosts(?*Display, [*c]XHostAddress, c_int) c_int; -pub extern fn XReparentWindow(?*Display, Window, Window, c_int, c_int) c_int; -pub extern fn XResetScreenSaver(?*Display) c_int; -pub extern fn XResizeWindow(?*Display, Window, c_uint, c_uint) c_int; -pub extern fn XRestackWindows(?*Display, [*c]Window, c_int) c_int; -pub extern fn XRotateBuffers(?*Display, c_int) c_int; -pub extern fn XRotateWindowProperties(?*Display, Window, [*c]Atom, c_int, c_int) c_int; -pub extern fn XScreenCount(?*Display) c_int; -pub extern fn XSelectInput(?*Display, Window, c_long) c_int; -pub extern fn XSendEvent(?*Display, Window, c_int, c_long, [*c]XEvent) c_int; -pub extern fn XSetAccessControl(?*Display, c_int) c_int; -pub extern fn XSetArcMode(?*Display, GC, c_int) c_int; -pub extern fn XSetBackground(?*Display, GC, c_ulong) c_int; -pub extern fn XSetClipMask(?*Display, GC, Pixmap) c_int; -pub extern fn XSetClipOrigin(?*Display, GC, c_int, c_int) c_int; -pub extern fn XSetClipRectangles(?*Display, GC, c_int, c_int, [*c]XRectangle, c_int, c_int) c_int; -pub extern fn XSetCloseDownMode(?*Display, c_int) c_int; -pub extern fn XSetCommand(?*Display, Window, [*c][*c]u8, c_int) c_int; -pub extern fn XSetDashes(?*Display, GC, c_int, [*c]const u8, c_int) c_int; -pub extern fn XSetFillRule(?*Display, GC, c_int) c_int; -pub extern fn XSetFillStyle(?*Display, GC, c_int) c_int; -pub extern fn XSetFont(?*Display, GC, Font) c_int; -pub extern fn XSetFontPath(?*Display, [*c][*c]u8, c_int) c_int; -pub extern fn XSetForeground(?*Display, GC, c_ulong) c_int; -pub extern fn XSetFunction(?*Display, GC, c_int) c_int; -pub extern fn XSetGraphicsExposures(?*Display, GC, c_int) c_int; -pub extern fn XSetIconName(?*Display, Window, [*c]const u8) c_int; -pub extern fn XSetInputFocus(?*Display, Window, c_int, Time) c_int; -pub extern fn XSetLineAttributes(?*Display, GC, c_uint, c_int, c_int, c_int) c_int; -pub extern fn XSetModifierMapping(?*Display, [*c]XModifierKeymap) c_int; -pub extern fn XSetPlaneMask(?*Display, GC, c_ulong) c_int; -pub extern fn XSetPointerMapping(?*Display, [*c]const u8, c_int) c_int; -pub extern fn XSetScreenSaver(?*Display, c_int, c_int, c_int, c_int) c_int; -pub extern fn XSetSelectionOwner(?*Display, Atom, Window, Time) c_int; -pub extern fn XSetState(?*Display, GC, c_ulong, c_ulong, c_int, c_ulong) c_int; -pub extern fn XSetStipple(?*Display, GC, Pixmap) c_int; -pub extern fn XSetSubwindowMode(?*Display, GC, c_int) c_int; -pub extern fn XSetTSOrigin(?*Display, GC, c_int, c_int) c_int; -pub extern fn XSetTile(?*Display, GC, Pixmap) c_int; -pub extern fn XSetWindowBackground(?*Display, Window, c_ulong) c_int; -pub extern fn XSetWindowBackgroundPixmap(?*Display, Window, Pixmap) c_int; -pub extern fn XSetWindowBorder(?*Display, Window, c_ulong) c_int; -pub extern fn XSetWindowBorderPixmap(?*Display, Window, Pixmap) c_int; -pub extern fn XSetWindowBorderWidth(?*Display, Window, c_uint) c_int; -pub extern fn XSetWindowColormap(?*Display, Window, Colormap) c_int; -pub extern fn XStoreBuffer(?*Display, [*c]const u8, c_int, c_int) c_int; -pub extern fn XStoreBytes(?*Display, [*c]const u8, c_int) c_int; -pub extern fn XStoreColor(?*Display, Colormap, [*c]XColor) c_int; -pub extern fn XStoreColors(?*Display, Colormap, [*c]XColor, c_int) c_int; -pub extern fn XStoreName(?*Display, Window, [*c]const u8) c_int; -pub extern fn XStoreNamedColor(?*Display, Colormap, [*c]const u8, c_ulong, c_int) c_int; -pub extern fn XSync(?*Display, c_int) c_int; -pub extern fn XTextExtents([*c]XFontStruct, [*c]const u8, c_int, [*c]c_int, [*c]c_int, [*c]c_int, [*c]XCharStruct) c_int; -pub extern fn XTextExtents16([*c]XFontStruct, [*c]const XChar2b, c_int, [*c]c_int, [*c]c_int, [*c]c_int, [*c]XCharStruct) c_int; -pub extern fn XTextWidth([*c]XFontStruct, [*c]const u8, c_int) c_int; -pub extern fn XTextWidth16([*c]XFontStruct, [*c]const XChar2b, c_int) c_int; -pub extern fn XTranslateCoordinates(?*Display, Window, Window, c_int, c_int, [*c]c_int, [*c]c_int, [*c]Window) c_int; -pub extern fn XUndefineCursor(?*Display, Window) c_int; -pub extern fn XUngrabButton(?*Display, c_uint, c_uint, Window) c_int; -pub extern fn XUngrabKey(?*Display, c_int, c_uint, Window) c_int; -pub extern fn XUngrabKeyboard(?*Display, Time) c_int; -pub extern fn XUngrabPointer(?*Display, Time) c_int; -pub extern fn XUngrabServer(?*Display) c_int; -pub extern fn XUninstallColormap(?*Display, Colormap) c_int; -pub extern fn XUnloadFont(?*Display, Font) c_int; -pub extern fn XUnmapSubwindows(?*Display, Window) c_int; -pub extern fn XUnmapWindow(?*Display, Window) c_int; -pub extern fn XVendorRelease(?*Display) c_int; -pub extern fn XWarpPointer(?*Display, Window, Window, c_int, c_int, c_uint, c_uint, c_int, c_int) c_int; -pub extern fn XWidthMMOfScreen([*c]Screen) c_int; -pub extern fn XWidthOfScreen([*c]Screen) c_int; -pub extern fn XWindowEvent(?*Display, Window, c_long, [*c]XEvent) c_int; -pub extern fn XWriteBitmapFile(?*Display, [*c]const u8, Pixmap, c_uint, c_uint, c_int, c_int) c_int; -pub extern fn XSupportsLocale() c_int; +pub extern fn XKillClient(?*Display, XID) i32; +pub extern fn XLookupColor(?*Display, Colormap, [*c]const u8, [*c]XColor, [*c]XColor) i32; +pub extern fn XLowerWindow(?*Display, Window) i32; +pub extern fn XMapRaised(?*Display, Window) i32; +pub extern fn XMapSubwindows(?*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 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 XNextEvent(display: ?*Display, event_return: ?*XEvent) i32; +pub extern fn XNoOp(?*Display) i32; +pub extern fn XParseColor(?*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 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 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 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 XRefreshKeyboardMapping([*c]XMappingEvent) i32; +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 XRestackWindows(?*Display, [*c]Window, i32) i32; +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 XSelectInput(?*Display, Window, i64) i32; +pub extern fn XSendEvent(?*Display, Window, i32, i64, [*c]XEvent) i32; +pub extern fn XSetAccessControl(?*Display, i32) i32; +pub extern fn XSetArcMode(?*Display, GC, i32) i32; +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 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 XSetIconName(?*Display, Window, [*c]const u8) i32; +pub extern fn XSetInputFocus(?*Display, Window, i32, Time) i32; +pub extern fn XSetLineAttributes(?*Display, GC, u32, i32, i32, i32) i32; +pub extern fn XSetModifierMapping(?*Display, [*c]XModifierKeymap) i32; +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 XSetTSOrigin(?*Display, GC, i32, i32) i32; +pub extern fn XSetTile(?*Display, GC, Pixmap) 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 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 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 XSync(?*Display, i32) 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 XUnmapSubwindows(?*Display, Window) i32; +pub extern fn XUnmapWindow(display: ?*Display, w: Window) i32; +pub extern fn XVendorRelease(?*Display) i32; +pub extern fn XWarpPointer(?*Display, Window, Window, i32, i32, u32, u32, i32, i32) i32; +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 XWriteBitmapFile(?*Display, [*c]const u8, Pixmap, u32, u32, i32, i32) i32; +pub extern fn XSupportsLocale() i32; pub extern fn XSetLocaleModifiers([*c]const u8) [*c]u8; pub extern fn XOpenOM(?*Display, ?*struct__XrmHashBucketRec, [*c]const u8, [*c]const u8) XOM; -pub extern fn XCloseOM(XOM) c_int; +pub extern fn XCloseOM(XOM) i32; pub extern fn XSetOMValues(XOM, ...) [*c]u8; pub extern fn XGetOMValues(XOM, ...) [*c]u8; pub extern fn XDisplayOfOM(XOM) ?*Display; @@ -1293,35 +1470,35 @@ pub extern fn XDestroyOC(XOC) void; pub extern fn XOMOfOC(XOC) XOM; pub extern fn XSetOCValues(XOC, ...) [*c]u8; pub extern fn XGetOCValues(XOC, ...) [*c]u8; -pub extern fn XCreateFontSet(?*Display, [*c]const u8, [*c][*c][*c]u8, [*c]c_int, [*c][*c]u8) XFontSet; +pub extern fn XCreateFontSet(?*Display, [*c]const u8, [*c][*c][*c]u8, [*c]i32, [*c][*c]u8) XFontSet; pub extern fn XFreeFontSet(?*Display, XFontSet) void; -pub extern fn XFontsOfFontSet(XFontSet, [*c][*c][*c]XFontStruct, [*c][*c][*c]u8) c_int; +pub extern fn XFontsOfFontSet(XFontSet, [*c][*c][*c]XFontStruct, [*c][*c][*c]u8) i32; pub extern fn XBaseFontNameListOfFontSet(XFontSet) [*c]u8; pub extern fn XLocaleOfFontSet(XFontSet) [*c]u8; -pub extern fn XContextDependentDrawing(XFontSet) c_int; -pub extern fn XDirectionalDependentDrawing(XFontSet) c_int; -pub extern fn XContextualDrawing(XFontSet) c_int; +pub extern fn XContextDependentDrawing(XFontSet) i32; +pub extern fn XDirectionalDependentDrawing(XFontSet) i32; +pub extern fn XContextualDrawing(XFontSet) i32; pub extern fn XExtentsOfFontSet(XFontSet) [*c]XFontSetExtents; -pub extern fn XmbTextEscapement(XFontSet, [*c]const u8, c_int) c_int; -pub extern fn XwcTextEscapement(XFontSet, [*c]const wchar_t, c_int) c_int; -pub extern fn Xutf8TextEscapement(XFontSet, [*c]const u8, c_int) c_int; -pub extern fn XmbTextExtents(XFontSet, [*c]const u8, c_int, [*c]XRectangle, [*c]XRectangle) c_int; -pub extern fn XwcTextExtents(XFontSet, [*c]const wchar_t, c_int, [*c]XRectangle, [*c]XRectangle) c_int; -pub extern fn Xutf8TextExtents(XFontSet, [*c]const u8, c_int, [*c]XRectangle, [*c]XRectangle) c_int; -pub extern fn XmbTextPerCharExtents(XFontSet, [*c]const u8, c_int, [*c]XRectangle, [*c]XRectangle, c_int, [*c]c_int, [*c]XRectangle, [*c]XRectangle) c_int; -pub extern fn XwcTextPerCharExtents(XFontSet, [*c]const wchar_t, c_int, [*c]XRectangle, [*c]XRectangle, c_int, [*c]c_int, [*c]XRectangle, [*c]XRectangle) c_int; -pub extern fn Xutf8TextPerCharExtents(XFontSet, [*c]const u8, c_int, [*c]XRectangle, [*c]XRectangle, c_int, [*c]c_int, [*c]XRectangle, [*c]XRectangle) c_int; -pub extern fn XmbDrawText(?*Display, Drawable, GC, c_int, c_int, [*c]XmbTextItem, c_int) void; -pub extern fn XwcDrawText(?*Display, Drawable, GC, c_int, c_int, [*c]XwcTextItem, c_int) void; -pub extern fn Xutf8DrawText(?*Display, Drawable, GC, c_int, c_int, [*c]XmbTextItem, c_int) void; -pub extern fn XmbDrawString(?*Display, Drawable, XFontSet, GC, c_int, c_int, [*c]const u8, c_int) void; -pub extern fn XwcDrawString(?*Display, Drawable, XFontSet, GC, c_int, c_int, [*c]const wchar_t, c_int) void; -pub extern fn Xutf8DrawString(?*Display, Drawable, XFontSet, GC, c_int, c_int, [*c]const u8, c_int) void; -pub extern fn XmbDrawImageString(?*Display, Drawable, XFontSet, GC, c_int, c_int, [*c]const u8, c_int) void; -pub extern fn XwcDrawImageString(?*Display, Drawable, XFontSet, GC, c_int, c_int, [*c]const wchar_t, c_int) void; -pub extern fn Xutf8DrawImageString(?*Display, Drawable, XFontSet, GC, c_int, c_int, [*c]const u8, c_int) void; +pub extern fn XmbTextEscapement(XFontSet, [*c]const u8, i32) i32; +pub extern fn XwcTextEscapement(XFontSet, [*c]const WChar, i32) i32; +pub extern fn Xutf8TextEscapement(XFontSet, [*c]const u8, i32) i32; +pub extern fn XmbTextExtents(XFontSet, [*c]const u8, i32, [*c]XRectangle, [*c]XRectangle) i32; +pub extern fn XwcTextExtents(XFontSet, [*c]const WChar, i32, [*c]XRectangle, [*c]XRectangle) i32; +pub extern fn Xutf8TextExtents(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 XwcTextPerCharExtents(XFontSet, [*c]const WChar, i32, [*c]XRectangle, [*c]XRectangle, i32, [*c]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 XmbDrawText(?*Display, Drawable, GC, i32, i32, [*c]XmbTextItem, i32) void; +pub extern fn XwcDrawText(?*Display, Drawable, GC, i32, i32, [*c]XwcTextItem, i32) void; +pub extern fn Xutf8DrawText(?*Display, Drawable, GC, i32, i32, [*c]XmbTextItem, i32) void; +pub extern fn XmbDrawString(?*Display, Drawable, XFontSet, GC, i32, i32, [*c]const u8, i32) void; +pub extern fn XwcDrawString(?*Display, Drawable, XFontSet, GC, i32, i32, [*c]const WChar, i32) void; +pub extern fn Xutf8DrawString(?*Display, Drawable, XFontSet, GC, i32, i32, [*c]const u8, i32) void; +pub extern fn XmbDrawImageString(?*Display, Drawable, XFontSet, GC, i32, i32, [*c]const u8, i32) void; +pub extern fn XwcDrawImageString(?*Display, Drawable, XFontSet, GC, i32, i32, [*c]const WChar, i32) void; +pub extern fn Xutf8DrawImageString(?*Display, Drawable, XFontSet, GC, i32, i32, [*c]const u8, i32) void; pub extern fn XOpenIM(?*Display, ?*struct__XrmHashBucketRec, [*c]u8, [*c]u8) XIM; -pub extern fn XCloseIM(XIM) c_int; +pub extern fn XCloseIM(XIM) i32; pub extern fn XGetIMValues(XIM, ...) [*c]u8; pub extern fn XSetIMValues(XIM, ...) [*c]u8; pub extern fn XDisplayOfIM(XIM) ?*Display; @@ -1330,392 +1507,363 @@ pub extern fn XCreateIC(XIM, ...) XIC; pub extern fn XDestroyIC(XIC) void; pub extern fn XSetICFocus(XIC) void; pub extern fn XUnsetICFocus(XIC) void; -pub extern fn XwcResetIC(XIC) [*c]wchar_t; +pub extern fn XwcResetIC(XIC) [*c]WChar; pub extern fn XmbResetIC(XIC) [*c]u8; pub extern fn Xutf8ResetIC(XIC) [*c]u8; pub extern fn XSetICValues(XIC, ...) [*c]u8; pub extern fn XGetICValues(XIC, ...) [*c]u8; pub extern fn XIMOfIC(XIC) XIM; -pub extern fn XFilterEvent([*c]XEvent, Window) c_int; -pub extern fn XmbLookupString(XIC, [*c]XKeyPressedEvent, [*c]u8, c_int, [*c]KeySym, [*c]c_int) c_int; -pub extern fn XwcLookupString(XIC, [*c]XKeyPressedEvent, [*c]wchar_t, c_int, [*c]KeySym, [*c]c_int) c_int; -pub extern fn Xutf8LookupString(XIC, [*c]XKeyPressedEvent, [*c]u8, c_int, [*c]KeySym, [*c]c_int) c_int; -pub extern fn XVaCreateNestedList(c_int, ...) XVaNestedList; -pub extern fn XRegisterIMInstantiateCallback(?*Display, ?*struct__XrmHashBucketRec, [*c]u8, [*c]u8, XIDProc, XPointer) c_int; -pub extern fn XUnregisterIMInstantiateCallback(?*Display, ?*struct__XrmHashBucketRec, [*c]u8, [*c]u8, XIDProc, XPointer) c_int; -pub const XConnectionWatchProc = ?*const fn (?*Display, XPointer, c_int, c_int, [*c]XPointer) callconv(.c) void; -pub extern fn XInternalConnectionNumbers(?*Display, [*c][*c]c_int, [*c]c_int) c_int; -pub extern fn XProcessInternalConnection(?*Display, c_int) void; -pub extern fn XAddConnectionWatch(?*Display, XConnectionWatchProc, XPointer) c_int; -pub extern fn XRemoveConnectionWatch(?*Display, XConnectionWatchProc, XPointer) void; -pub extern fn XSetAuthorization([*c]u8, c_int, [*c]u8, c_int) void; -pub extern fn _Xmbtowc([*c]wchar_t, [*c]u8, c_int) c_int; -pub extern fn _Xwctomb([*c]u8, wchar_t) c_int; -pub extern fn XGetEventData(?*Display, [*c]XGenericEventCookie) c_int; +pub extern fn XFilterEvent([*c]XEvent, Window) i32; +pub extern fn XmbLookupString(XIC, [*c]XKeyPressedEvent, [*c]u8, i32, [*c]KeySym, [*c]i32) i32; +pub extern fn XwcLookupString(XIC, [*c]XKeyPressedEvent, [*c]WChar, i32, [*c]KeySym, [*c]i32) i32; +pub extern fn Xutf8LookupString(XIC, [*c]XKeyPressedEvent, [*c]u8, i32, [*c]KeySym, [*c]i32) i32; +pub extern fn XVaCreateNestedList(i32, ...) XVaNestedList; +pub extern fn XRegisterIMInstantiateCallback(?*Display, ?*struct__XrmHashBucketRec, [*c]u8, [*c]u8, XIDProc, ?*anyopaque) i32; +pub extern fn XUnregisterIMInstantiateCallback(?*Display, ?*struct__XrmHashBucketRec, [*c]u8, [*c]u8, XIDProc, ?*anyopaque) i32; +pub const XConnectionWatchProc = ?*const fn (?*Display, ?*anyopaque, i32, i32, [*c]?*anyopaque) callconv(.c) void; +pub extern fn XInternalConnectionNumbers(?*Display, [*c][*c]i32, [*c]i32) i32; +pub extern fn XProcessInternalConnection(?*Display, i32) void; +pub extern fn XAddConnectionWatch(?*Display, XConnectionWatchProc, ?*anyopaque) i32; +pub extern fn XRemoveConnectionWatch(?*Display, XConnectionWatchProc, ?*anyopaque) void; +pub extern fn XSetAuthorization([*c]u8, i32, [*c]u8, i32) void; +pub extern fn _Xmbtowc([*c]WChar, [*c]u8, i32) i32; +pub extern fn _Xwctomb([*c]u8, WChar) i32; +pub extern fn XGetEventData(?*Display, [*c]XGenericEventCookie) i32; pub extern fn XFreeEventData(?*Display, [*c]XGenericEventCookie) void; -pub const X_PROTOCOL = @as(c_int, 11); -pub const X_PROTOCOL_REVISION = @as(c_int, 0); -pub const None = @as(c_long, 0); -pub const ParentRelative = @as(c_long, 1); -pub const CopyFromParent = @as(c_long, 0); -pub const PointerWindow = @as(c_long, 0); -pub const InputFocus = @as(c_long, 1); -pub const PointerRoot = @as(c_long, 1); -pub const AnyPropertyType = @as(c_long, 0); -pub const AnyKey = @as(c_long, 0); -pub const AnyButton = @as(c_long, 0); -pub const AllTemporary = @as(c_long, 0); -pub const CurrentTime = @as(c_long, 0); -pub const NoSymbol = @as(c_long, 0); -pub const NoEventMask = @as(c_long, 0); -pub const KeyPressMask = @as(c_long, 1) << @as(c_int, 0); -pub const KeyReleaseMask = @as(c_long, 1) << @as(c_int, 1); -pub const ButtonPressMask = @as(c_long, 1) << @as(c_int, 2); -pub const ButtonReleaseMask = @as(c_long, 1) << @as(c_int, 3); -pub const EnterWindowMask = @as(c_long, 1) << @as(c_int, 4); -pub const LeaveWindowMask = @as(c_long, 1) << @as(c_int, 5); -pub const PointerMotionMask = @as(c_long, 1) << @as(c_int, 6); -pub const PointerMotionHintMask = @as(c_long, 1) << @as(c_int, 7); -pub const Button1MotionMask = @as(c_long, 1) << @as(c_int, 8); -pub const Button2MotionMask = @as(c_long, 1) << @as(c_int, 9); -pub const Button3MotionMask = @as(c_long, 1) << @as(c_int, 10); -pub const Button4MotionMask = @as(c_long, 1) << @as(c_int, 11); -pub const Button5MotionMask = @as(c_long, 1) << @as(c_int, 12); -pub const ButtonMotionMask = @as(c_long, 1) << @as(c_int, 13); -pub const KeymapStateMask = @as(c_long, 1) << @as(c_int, 14); -pub const ExposureMask = @as(c_long, 1) << @as(c_int, 15); -pub const VisibilityChangeMask = @as(c_long, 1) << @as(c_int, 16); -pub const StructureNotifyMask = @as(c_long, 1) << @as(c_int, 17); -pub const ResizeRedirectMask = @as(c_long, 1) << @as(c_int, 18); -pub const SubstructureNotifyMask = @as(c_long, 1) << @as(c_int, 19); -pub const SubstructureRedirectMask = @as(c_long, 1) << @as(c_int, 20); -pub const FocusChangeMask = @as(c_long, 1) << @as(c_int, 21); -pub const PropertyChangeMask = @as(c_long, 1) << @as(c_int, 22); -pub const ColormapChangeMask = @as(c_long, 1) << @as(c_int, 23); -pub const OwnerGrabButtonMask = @as(c_long, 1) << @as(c_int, 24); -pub const KeyPress = @as(c_int, 2); -pub const KeyRelease = @as(c_int, 3); -pub const ButtonPress = @as(c_int, 4); -pub const ButtonRelease = @as(c_int, 5); -pub const MotionNotify = @as(c_int, 6); -pub const EnterNotify = @as(c_int, 7); -pub const LeaveNotify = @as(c_int, 8); -pub const FocusIn = @as(c_int, 9); -pub const FocusOut = @as(c_int, 10); -pub const KeymapNotify = @as(c_int, 11); -pub const Expose = @as(c_int, 12); -pub const GraphicsExpose = @as(c_int, 13); -pub const NoExpose = @as(c_int, 14); -pub const VisibilityNotify = @as(c_int, 15); -pub const CreateNotify = @as(c_int, 16); -pub const DestroyNotify = @as(c_int, 17); -pub const UnmapNotify = @as(c_int, 18); -pub const MapNotify = @as(c_int, 19); -pub const MapRequest = @as(c_int, 20); -pub const ReparentNotify = @as(c_int, 21); -pub const ConfigureNotify = @as(c_int, 22); -pub const ConfigureRequest = @as(c_int, 23); -pub const GravityNotify = @as(c_int, 24); -pub const ResizeRequest = @as(c_int, 25); -pub const CirculateNotify = @as(c_int, 26); -pub const CirculateRequest = @as(c_int, 27); -pub const PropertyNotify = @as(c_int, 28); -pub const SelectionClear = @as(c_int, 29); -pub const SelectionRequest = @as(c_int, 30); -pub const SelectionNotify = @as(c_int, 31); -pub const ColormapNotify = @as(c_int, 32); -pub const ClientMessage = @as(c_int, 33); -pub const MappingNotify = @as(c_int, 34); -pub const GenericEvent = @as(c_int, 35); -pub const LASTEvent = @as(c_int, 36); -pub const ShiftMask = @as(c_int, 1) << @as(c_int, 0); -pub const LockMask = @as(c_int, 1) << @as(c_int, 1); -pub const ControlMask = @as(c_int, 1) << @as(c_int, 2); -pub const Mod1Mask = @as(c_int, 1) << @as(c_int, 3); -pub const Mod2Mask = @as(c_int, 1) << @as(c_int, 4); -pub const Mod3Mask = @as(c_int, 1) << @as(c_int, 5); -pub const Mod4Mask = @as(c_int, 1) << @as(c_int, 6); -pub const Mod5Mask = @as(c_int, 1) << @as(c_int, 7); -pub const ShiftMapIndex = @as(c_int, 0); -pub const LockMapIndex = @as(c_int, 1); -pub const ControlMapIndex = @as(c_int, 2); -pub const Mod1MapIndex = @as(c_int, 3); -pub const Mod2MapIndex = @as(c_int, 4); -pub const Mod3MapIndex = @as(c_int, 5); -pub const Mod4MapIndex = @as(c_int, 6); -pub const Mod5MapIndex = @as(c_int, 7); -pub const Button1Mask = @as(c_int, 1) << @as(c_int, 8); -pub const Button2Mask = @as(c_int, 1) << @as(c_int, 9); -pub const Button3Mask = @as(c_int, 1) << @as(c_int, 10); -pub const Button4Mask = @as(c_int, 1) << @as(c_int, 11); -pub const Button5Mask = @as(c_int, 1) << @as(c_int, 12); -pub const AnyModifier = @as(c_int, 1) << @as(c_int, 15); -pub const Button1 = @as(c_int, 1); -pub const Button2 = @as(c_int, 2); -pub const Button3 = @as(c_int, 3); -pub const Button4 = @as(c_int, 4); -pub const Button5 = @as(c_int, 5); -pub const NotifyNormal = @as(c_int, 0); -pub const NotifyGrab = @as(c_int, 1); -pub const NotifyUngrab = @as(c_int, 2); -pub const NotifyWhileGrabbed = @as(c_int, 3); -pub const NotifyHint = @as(c_int, 1); -pub const NotifyAncestor = @as(c_int, 0); -pub const NotifyVirtual = @as(c_int, 1); -pub const NotifyInferior = @as(c_int, 2); -pub const NotifyNonlinear = @as(c_int, 3); -pub const NotifyNonlinearVirtual = @as(c_int, 4); -pub const NotifyPointer = @as(c_int, 5); -pub const NotifyPointerRoot = @as(c_int, 6); -pub const NotifyDetailNone = @as(c_int, 7); -pub const VisibilityUnobscured = @as(c_int, 0); -pub const VisibilityPartiallyObscured = @as(c_int, 1); -pub const VisibilityFullyObscured = @as(c_int, 2); -pub const PlaceOnTop = @as(c_int, 0); -pub const PlaceOnBottom = @as(c_int, 1); -pub const FamilyInternet = @as(c_int, 0); -pub const FamilyDECnet = @as(c_int, 1); -pub const FamilyChaos = @as(c_int, 2); -pub const FamilyInternet6 = @as(c_int, 6); -pub const FamilyServerInterpreted = @as(c_int, 5); -pub const PropertyNewValue = @as(c_int, 0); -pub const PropertyDelete = @as(c_int, 1); -pub const ColormapUninstalled = @as(c_int, 0); -pub const ColormapInstalled = @as(c_int, 1); -pub const GrabModeSync = @as(c_int, 0); -pub const GrabModeAsync = @as(c_int, 1); -pub const GrabSuccess = @as(c_int, 0); -pub const AlreadyGrabbed = @as(c_int, 1); -pub const GrabInvalidTime = @as(c_int, 2); -pub const GrabNotViewable = @as(c_int, 3); -pub const GrabFrozen = @as(c_int, 4); -pub const AsyncPointer = @as(c_int, 0); -pub const SyncPointer = @as(c_int, 1); -pub const ReplayPointer = @as(c_int, 2); -pub const AsyncKeyboard = @as(c_int, 3); -pub const SyncKeyboard = @as(c_int, 4); -pub const ReplayKeyboard = @as(c_int, 5); -pub const AsyncBoth = @as(c_int, 6); -pub const SyncBoth = @as(c_int, 7); -pub const RevertToNone = @import("std").zig.c_translation.cast(c_int, None); -pub const RevertToPointerRoot = @import("std").zig.c_translation.cast(c_int, PointerRoot); -pub const RevertToParent = @as(c_int, 2); -pub const Success = @as(c_int, 0); -pub const BadRequest = @as(c_int, 1); -pub const BadValue = @as(c_int, 2); -pub const BadWindow = @as(c_int, 3); -pub const BadPixmap = @as(c_int, 4); -pub const BadAtom = @as(c_int, 5); -pub const BadCursor = @as(c_int, 6); -pub const BadFont = @as(c_int, 7); -pub const BadMatch = @as(c_int, 8); -pub const BadDrawable = @as(c_int, 9); -pub const BadAccess = @as(c_int, 10); -pub const BadAlloc = @as(c_int, 11); -pub const BadColor = @as(c_int, 12); -pub const BadGC = @as(c_int, 13); -pub const BadIDChoice = @as(c_int, 14); -pub const BadName = @as(c_int, 15); -pub const BadLength = @as(c_int, 16); -pub const BadImplementation = @as(c_int, 17); -pub const FirstExtensionError = @as(c_int, 128); -pub const LastExtensionError = @as(c_int, 255); -pub const InputOutput = @as(c_int, 1); -pub const InputOnly = @as(c_int, 2); -pub const CWBackPixmap = @as(c_long, 1) << @as(c_int, 0); -pub const CWBackPixel = @as(c_long, 1) << @as(c_int, 1); -pub const CWBorderPixmap = @as(c_long, 1) << @as(c_int, 2); -pub const CWBorderPixel = @as(c_long, 1) << @as(c_int, 3); -pub const CWBitGravity = @as(c_long, 1) << @as(c_int, 4); -pub const CWWinGravity = @as(c_long, 1) << @as(c_int, 5); -pub const CWBackingStore = @as(c_long, 1) << @as(c_int, 6); -pub const CWBackingPlanes = @as(c_long, 1) << @as(c_int, 7); -pub const CWBackingPixel = @as(c_long, 1) << @as(c_int, 8); -pub const CWOverrideRedirect = @as(c_long, 1) << @as(c_int, 9); -pub const CWSaveUnder = @as(c_long, 1) << @as(c_int, 10); -pub const CWEventMask = @as(c_long, 1) << @as(c_int, 11); -pub const CWDontPropagate = @as(c_long, 1) << @as(c_int, 12); -pub const CWColormap = @as(c_long, 1) << @as(c_int, 13); -pub const CWCursor = @as(c_long, 1) << @as(c_int, 14); -pub const CWX = @as(c_int, 1) << @as(c_int, 0); -pub const CWY = @as(c_int, 1) << @as(c_int, 1); -pub const CWWidth = @as(c_int, 1) << @as(c_int, 2); -pub const CWHeight = @as(c_int, 1) << @as(c_int, 3); -pub const CWBorderWidth = @as(c_int, 1) << @as(c_int, 4); -pub const CWSibling = @as(c_int, 1) << @as(c_int, 5); -pub const CWStackMode = @as(c_int, 1) << @as(c_int, 6); -pub const ForgetGravity = @as(c_int, 0); -pub const NorthWestGravity = @as(c_int, 1); -pub const NorthGravity = @as(c_int, 2); -pub const NorthEastGravity = @as(c_int, 3); -pub const WestGravity = @as(c_int, 4); -pub const CenterGravity = @as(c_int, 5); -pub const EastGravity = @as(c_int, 6); -pub const SouthWestGravity = @as(c_int, 7); -pub const SouthGravity = @as(c_int, 8); -pub const SouthEastGravity = @as(c_int, 9); -pub const StaticGravity = @as(c_int, 10); -pub const UnmapGravity = @as(c_int, 0); -pub const NotUseful = @as(c_int, 0); -pub const WhenMapped = @as(c_int, 1); -pub const Always = @as(c_int, 2); -pub const IsUnmapped = @as(c_int, 0); -pub const IsUnviewable = @as(c_int, 1); -pub const IsViewable = @as(c_int, 2); -pub const SetModeInsert = @as(c_int, 0); -pub const SetModeDelete = @as(c_int, 1); -pub const DestroyAll = @as(c_int, 0); -pub const RetainPermanent = @as(c_int, 1); -pub const RetainTemporary = @as(c_int, 2); -pub const Above = @as(c_int, 0); -pub const Below = @as(c_int, 1); -pub const TopIf = @as(c_int, 2); -pub const BottomIf = @as(c_int, 3); -pub const Opposite = @as(c_int, 4); -pub const RaiseLowest = @as(c_int, 0); -pub const LowerHighest = @as(c_int, 1); -pub const PropModeReplace = @as(c_int, 0); -pub const PropModePrepend = @as(c_int, 1); -pub const PropModeAppend = @as(c_int, 2); -pub const GXclear = @as(c_int, 0x0); -pub const GXand = @as(c_int, 0x1); -pub const GXandReverse = @as(c_int, 0x2); -pub const GXcopy = @as(c_int, 0x3); -pub const GXandInverted = @as(c_int, 0x4); -pub const GXnoop = @as(c_int, 0x5); -pub const GXxor = @as(c_int, 0x6); -pub const GXor = @as(c_int, 0x7); -pub const GXnor = @as(c_int, 0x8); -pub const GXequiv = @as(c_int, 0x9); -pub const GXinvert = @as(c_int, 0xa); -pub const GXorReverse = @as(c_int, 0xb); -pub const GXcopyInverted = @as(c_int, 0xc); -pub const GXorInverted = @as(c_int, 0xd); -pub const GXnand = @as(c_int, 0xe); -pub const GXset = @as(c_int, 0xf); -pub const LineSolid = @as(c_int, 0); -pub const LineOnOffDash = @as(c_int, 1); -pub const LineDoubleDash = @as(c_int, 2); -pub const CapNotLast = @as(c_int, 0); -pub const CapButt = @as(c_int, 1); -pub const CapRound = @as(c_int, 2); -pub const CapProjecting = @as(c_int, 3); -pub const JoinMiter = @as(c_int, 0); -pub const JoinRound = @as(c_int, 1); -pub const JoinBevel = @as(c_int, 2); -pub const FillSolid = @as(c_int, 0); -pub const FillTiled = @as(c_int, 1); -pub const FillStippled = @as(c_int, 2); -pub const FillOpaqueStippled = @as(c_int, 3); -pub const EvenOddRule = @as(c_int, 0); -pub const WindingRule = @as(c_int, 1); -pub const ClipByChildren = @as(c_int, 0); -pub const IncludeInferiors = @as(c_int, 1); -pub const Unsorted = @as(c_int, 0); -pub const YSorted = @as(c_int, 1); -pub const YXSorted = @as(c_int, 2); -pub const YXBanded = @as(c_int, 3); -pub const CoordModeOrigin = @as(c_int, 0); -pub const CoordModePrevious = @as(c_int, 1); -pub const Complex = @as(c_int, 0); -pub const Nonconvex = @as(c_int, 1); -pub const Convex = @as(c_int, 2); -pub const ArcChord = @as(c_int, 0); -pub const ArcPieSlice = @as(c_int, 1); -pub const GCFunction = @as(c_long, 1) << @as(c_int, 0); -pub const GCPlaneMask = @as(c_long, 1) << @as(c_int, 1); -pub const GCForeground = @as(c_long, 1) << @as(c_int, 2); -pub const GCBackground = @as(c_long, 1) << @as(c_int, 3); -pub const GCLineWidth = @as(c_long, 1) << @as(c_int, 4); -pub const GCLineStyle = @as(c_long, 1) << @as(c_int, 5); -pub const GCCapStyle = @as(c_long, 1) << @as(c_int, 6); -pub const GCJoinStyle = @as(c_long, 1) << @as(c_int, 7); -pub const GCFillStyle = @as(c_long, 1) << @as(c_int, 8); -pub const GCFillRule = @as(c_long, 1) << @as(c_int, 9); -pub const GCTile = @as(c_long, 1) << @as(c_int, 10); -pub const GCStipple = @as(c_long, 1) << @as(c_int, 11); -pub const GCTileStipXOrigin = @as(c_long, 1) << @as(c_int, 12); -pub const GCTileStipYOrigin = @as(c_long, 1) << @as(c_int, 13); -pub const GCFont = @as(c_long, 1) << @as(c_int, 14); -pub const GCSubwindowMode = @as(c_long, 1) << @as(c_int, 15); -pub const GCGraphicsExposures = @as(c_long, 1) << @as(c_int, 16); -pub const GCClipXOrigin = @as(c_long, 1) << @as(c_int, 17); -pub const GCClipYOrigin = @as(c_long, 1) << @as(c_int, 18); -pub const GCClipMask = @as(c_long, 1) << @as(c_int, 19); -pub const GCDashOffset = @as(c_long, 1) << @as(c_int, 20); -pub const GCDashList = @as(c_long, 1) << @as(c_int, 21); -pub const GCArcMode = @as(c_long, 1) << @as(c_int, 22); -pub const GCLastBit = @as(c_int, 22); -pub const FontLeftToRight = @as(c_int, 0); -pub const FontRightToLeft = @as(c_int, 1); -pub const FontChange = @as(c_int, 255); -pub const XYBitmap = @as(c_int, 0); -pub const XYPixmap = @as(c_int, 1); -pub const ZPixmap = @as(c_int, 2); -pub const AllocNone = @as(c_int, 0); -pub const AllocAll = @as(c_int, 1); -pub const DoRed = @as(c_int, 1) << @as(c_int, 0); -pub const DoGreen = @as(c_int, 1) << @as(c_int, 1); -pub const DoBlue = @as(c_int, 1) << @as(c_int, 2); -pub const CursorShape = @as(c_int, 0); -pub const TileShape = @as(c_int, 1); -pub const StippleShape = @as(c_int, 2); -pub const AutoRepeatModeOff = @as(c_int, 0); -pub const AutoRepeatModeOn = @as(c_int, 1); -pub const AutoRepeatModeDefault = @as(c_int, 2); -pub const LedModeOff = @as(c_int, 0); -pub const LedModeOn = @as(c_int, 1); -pub const KBKeyClickPercent = @as(c_long, 1) << @as(c_int, 0); -pub const KBBellPercent = @as(c_long, 1) << @as(c_int, 1); -pub const KBBellPitch = @as(c_long, 1) << @as(c_int, 2); -pub const KBBellDuration = @as(c_long, 1) << @as(c_int, 3); -pub const KBLed = @as(c_long, 1) << @as(c_int, 4); -pub const KBLedMode = @as(c_long, 1) << @as(c_int, 5); -pub const KBKey = @as(c_long, 1) << @as(c_int, 6); -pub const KBAutoRepeatMode = @as(c_long, 1) << @as(c_int, 7); -pub const MappingSuccess = @as(c_int, 0); -pub const MappingBusy = @as(c_int, 1); -pub const MappingFailed = @as(c_int, 2); -pub const MappingModifier = @as(c_int, 0); -pub const MappingKeyboard = @as(c_int, 1); -pub const MappingPointer = @as(c_int, 2); -pub const DontPreferBlanking = @as(c_int, 0); -pub const PreferBlanking = @as(c_int, 1); -pub const DefaultBlanking = @as(c_int, 2); -pub const DisableScreenSaver = @as(c_int, 0); -pub const DisableScreenInterval = @as(c_int, 0); -pub const DontAllowExposures = @as(c_int, 0); -pub const AllowExposures = @as(c_int, 1); -pub const DefaultExposures = @as(c_int, 2); -pub const ScreenSaverReset = @as(c_int, 0); -pub const ScreenSaverActive = @as(c_int, 1); -pub const HostInsert = @as(c_int, 0); -pub const HostDelete = @as(c_int, 1); -pub const EnableAccess = @as(c_int, 1); -pub const DisableAccess = @as(c_int, 0); -pub const StaticGray = @as(c_int, 0); -pub const GrayScale = @as(c_int, 1); -pub const StaticColor = @as(c_int, 2); -pub const PseudoColor = @as(c_int, 3); -pub const TrueColor = @as(c_int, 4); -pub const DirectColor = @as(c_int, 5); -pub const LSBFirst = @as(c_int, 0); -pub const MSBFirst = @as(c_int, 1); -pub const NeedFunctionPrototypes = @as(c_int, 1); -pub const NeedVarargsPrototypes = @as(c_int, 1); -pub const NeedNestedPrototypes = @as(c_int, 1); +pub const X_PROTOCOL = @as(i32, 11); +pub const X_PROTOCOL_REVISION = @as(i32, 0); +pub const None = @as(i64, 0); +pub const ParentRelative = @as(i64, 1); +pub const CopyFromParent = @as(i64, 0); +pub const PointerWindow = @as(i64, 0); +pub const InputFocus = @as(i64, 1); +pub const PointerRoot = @as(i64, 1); +pub const AnyPropertyType = @as(i64, 0); +pub const AnyKey = @as(i64, 0); +pub const AnyButton = @as(i64, 0); +pub const AllTemporary = @as(i64, 0); +pub const CurrentTime = @as(i64, 0); +pub const NoSymbol = @as(i64, 0); + +pub const EventMask = packed struct(u64) { + pub const no_event: EventMask = .{}; + + key_press: bool = false, + key_release: bool = false, + button_press: bool = false, + button_release: bool = false, + enter_window: bool = false, + leave_window: bool = false, + pointer_motion: bool = false, + pointer_motion_hint: bool = false, + button1_motion: bool = false, + button2_motion: bool = false, + button3_motion: bool = false, + button4_motion: bool = false, + button5_motion: bool = false, + button_motion: bool = false, + keymap_state: bool = false, + exposure: bool = false, + visibility_change: bool = false, + structure_notify: bool = false, + resize_redirect: bool = false, + substructure_notify: bool = false, + substructure_redirect: bool = false, + focus_change: bool = false, + property_change: bool = false, + colormap_change: bool = false, + owner_grab_button: bool = false, + + _pad25: u39 = 0, +}; + +pub const KeyPress = @as(i32, 2); +pub const KeyRelease = @as(i32, 3); +pub const ButtonPress = @as(i32, 4); +pub const ButtonRelease = @as(i32, 5); +pub const MotionNotify = @as(i32, 6); +pub const EnterNotify = @as(i32, 7); +pub const LeaveNotify = @as(i32, 8); +pub const FocusIn = @as(i32, 9); +pub const FocusOut = @as(i32, 10); +pub const KeymapNotify = @as(i32, 11); +pub const Expose = @as(i32, 12); +pub const GraphicsExpose = @as(i32, 13); +pub const NoExpose = @as(i32, 14); +pub const VisibilityNotify = @as(i32, 15); +pub const CreateNotify = @as(i32, 16); +pub const DestroyNotify = @as(i32, 17); +pub const UnmapNotify = @as(i32, 18); +pub const MapNotify = @as(i32, 19); +pub const MapRequest = @as(i32, 20); +pub const ReparentNotify = @as(i32, 21); +pub const ConfigureNotify = @as(i32, 22); +pub const ConfigureRequest = @as(i32, 23); +pub const GravityNotify = @as(i32, 24); +pub const ResizeRequest = @as(i32, 25); +pub const CirculateNotify = @as(i32, 26); +pub const CirculateRequest = @as(i32, 27); +pub const PropertyNotify = @as(i32, 28); +pub const SelectionClear = @as(i32, 29); +pub const SelectionRequest = @as(i32, 30); +pub const SelectionNotify = @as(i32, 31); +pub const ColormapNotify = @as(i32, 32); +pub const ClientMessage = @as(i32, 33); +pub const MappingNotify = @as(i32, 34); +pub const GenericEvent = @as(i32, 35); +pub const LASTEvent = @as(i32, 36); + +pub const ShiftMask = @as(i32, 1) << @as(i32, 0); +pub const LockMask = @as(i32, 1) << @as(i32, 1); +pub const ControlMask = @as(i32, 1) << @as(i32, 2); +pub const Mod1Mask = @as(i32, 1) << @as(i32, 3); +pub const Mod2Mask = @as(i32, 1) << @as(i32, 4); +pub const Mod3Mask = @as(i32, 1) << @as(i32, 5); +pub const Mod4Mask = @as(i32, 1) << @as(i32, 6); +pub const Mod5Mask = @as(i32, 1) << @as(i32, 7); +pub const ShiftMapIndex = @as(i32, 0); +pub const LockMapIndex = @as(i32, 1); +pub const ControlMapIndex = @as(i32, 2); +pub const Mod1MapIndex = @as(i32, 3); +pub const Mod2MapIndex = @as(i32, 4); +pub const Mod3MapIndex = @as(i32, 5); +pub const Mod4MapIndex = @as(i32, 6); +pub const Mod5MapIndex = @as(i32, 7); +pub const Button1Mask = @as(i32, 1) << @as(i32, 8); +pub const Button2Mask = @as(i32, 1) << @as(i32, 9); +pub const Button3Mask = @as(i32, 1) << @as(i32, 10); +pub const Button4Mask = @as(i32, 1) << @as(i32, 11); +pub const Button5Mask = @as(i32, 1) << @as(i32, 12); +pub const AnyModifier = @as(i32, 1) << @as(i32, 15); +pub const Button1 = @as(i32, 1); +pub const Button2 = @as(i32, 2); +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 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); +pub const VisibilityUnobscured = @as(i32, 0); +pub const VisibilityPartiallyObscured = @as(i32, 1); +pub const VisibilityFullyObscured = @as(i32, 2); +pub const PlaceOnTop = @as(i32, 0); +pub const PlaceOnBottom = @as(i32, 1); +pub const FamilyInternet = @as(i32, 0); +pub const FamilyDECnet = @as(i32, 1); +pub const FamilyChaos = @as(i32, 2); +pub const FamilyInternet6 = @as(i32, 6); +pub const FamilyServerInterpreted = @as(i32, 5); +pub const PropertyNewValue = @as(i32, 0); +pub const PropertyDelete = @as(i32, 1); +pub const ColormapUninstalled = @as(i32, 0); +pub const ColormapInstalled = @as(i32, 1); +pub const GrabModeSync = @as(i32, 0); +pub const GrabModeAsync = @as(i32, 1); +pub const GrabSuccess = @as(i32, 0); +pub const AlreadyGrabbed = @as(i32, 1); +pub const GrabInvalidTime = @as(i32, 2); +pub const GrabNotViewable = @as(i32, 3); +pub const GrabFrozen = @as(i32, 4); +pub const AsyncPointer = @as(i32, 0); +pub const SyncPointer = @as(i32, 1); +pub const ReplayPointer = @as(i32, 2); +pub const AsyncKeyboard = @as(i32, 3); +pub const SyncKeyboard = @as(i32, 4); +pub const ReplayKeyboard = @as(i32, 5); +pub const AsyncBoth = @as(i32, 6); +pub const SyncBoth = @as(i32, 7); +pub const RevertToNone = @import("std").zig.c_translation.cast(i32, None); +pub const RevertToPointerRoot = @import("std").zig.c_translation.cast(i32, PointerRoot); +pub const RevertToParent = @as(i32, 2); +pub const Success = @as(i32, 0); +pub const BadRequest = @as(i32, 1); +pub const BadValue = @as(i32, 2); +pub const BadWindow = @as(i32, 3); +pub const BadPixmap = @as(i32, 4); +pub const BadAtom = @as(i32, 5); +pub const BadCursor = @as(i32, 6); +pub const BadFont = @as(i32, 7); +pub const BadMatch = @as(i32, 8); +pub const BadDrawable = @as(i32, 9); +pub const BadAccess = @as(i32, 10); +pub const BadAlloc = @as(i32, 11); +pub const BadColor = @as(i32, 12); +pub const BadGC = @as(i32, 13); +pub const BadIDChoice = @as(i32, 14); +pub const BadName = @as(i32, 15); +pub const BadLength = @as(i32, 16); +pub const BadImplementation = @as(i32, 17); +pub const FirstExtensionError = @as(i32, 128); +pub const LastExtensionError = @as(i32, 255); +pub const InputOutput = @as(i32, 1); +pub const InputOnly = @as(i32, 2); +pub const CWX = @as(i32, 1) << @as(i32, 0); +pub const CWY = @as(i32, 1) << @as(i32, 1); +pub const CWWidth = @as(i32, 1) << @as(i32, 2); +pub const CWHeight = @as(i32, 1) << @as(i32, 3); +pub const CWBorderWidth = @as(i32, 1) << @as(i32, 4); +pub const CWSibling = @as(i32, 1) << @as(i32, 5); +pub const CWStackMode = @as(i32, 1) << @as(i32, 6); +pub const ForgetGravity = @as(i32, 0); +pub const NorthWestGravity = @as(i32, 1); +pub const NorthGravity = @as(i32, 2); +pub const NorthEastGravity = @as(i32, 3); +pub const WestGravity = @as(i32, 4); +pub const CenterGravity = @as(i32, 5); +pub const EastGravity = @as(i32, 6); +pub const SouthWestGravity = @as(i32, 7); +pub const SouthGravity = @as(i32, 8); +pub const SouthEastGravity = @as(i32, 9); +pub const StaticGravity = @as(i32, 10); +pub const UnmapGravity = @as(i32, 0); +pub const NotUseful = @as(i32, 0); +pub const WhenMapped = @as(i32, 1); +pub const Always = @as(i32, 2); +pub const IsUnmapped = @as(i32, 0); +pub const IsUnviewable = @as(i32, 1); +pub const IsViewable = @as(i32, 2); +pub const SetModeInsert = @as(i32, 0); +pub const SetModeDelete = @as(i32, 1); +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 RaiseLowest = @as(i32, 0); +pub const LowerHighest = @as(i32, 1); +pub const PropModeReplace = @as(i32, 0); +pub const PropModePrepend = @as(i32, 1); +pub const PropModeAppend = @as(i32, 2); +pub const GXclear = @as(i32, 0x0); +pub const GXand = @as(i32, 0x1); +pub const GXandReverse = @as(i32, 0x2); +pub const GXcopy = @as(i32, 0x3); +pub const GXandInverted = @as(i32, 0x4); +pub const GXnoop = @as(i32, 0x5); +pub const GXxor = @as(i32, 0x6); +pub const GXor = @as(i32, 0x7); +pub const GXnor = @as(i32, 0x8); +pub const GXequiv = @as(i32, 0x9); +pub const GXinvert = @as(i32, 0xa); +pub const GXorReverse = @as(i32, 0xb); +pub const GXcopyInverted = @as(i32, 0xc); +pub const GXorInverted = @as(i32, 0xd); +pub const GXnand = @as(i32, 0xe); +pub const GXset = @as(i32, 0xf); +pub const LineSolid = @as(i32, 0); +pub const LineOnOffDash = @as(i32, 1); +pub const LineDoubleDash = @as(i32, 2); +pub const CapNotLast = @as(i32, 0); +pub const CapButt = @as(i32, 1); +pub const CapRound = @as(i32, 2); +pub const CapProjecting = @as(i32, 3); +pub const JoinMiter = @as(i32, 0); +pub const JoinRound = @as(i32, 1); +pub const JoinBevel = @as(i32, 2); +pub const FillSolid = @as(i32, 0); +pub const FillTiled = @as(i32, 1); +pub const FillStippled = @as(i32, 2); +pub const FillOpaqueStippled = @as(i32, 3); +pub const EvenOddRule = @as(i32, 0); +pub const WindingRule = @as(i32, 1); +pub const ClipByChildren = @as(i32, 0); +pub const IncludeInferiors = @as(i32, 1); +pub const Unsorted = @as(i32, 0); +pub const YSorted = @as(i32, 1); +pub const YXSorted = @as(i32, 2); +pub const YXBanded = @as(i32, 3); +pub const CoordModeOrigin = @as(i32, 0); +pub const CoordModePrevious = @as(i32, 1); +pub const Complex = @as(i32, 0); +pub const Nonconvex = @as(i32, 1); +pub const Convex = @as(i32, 2); +pub const ArcChord = @as(i32, 0); +pub const ArcPieSlice = @as(i32, 1); + +pub const FontLeftToRight = @as(i32, 0); +pub const FontRightToLeft = @as(i32, 1); +pub const FontChange = @as(i32, 255); +pub const XYBitmap = @as(i32, 0); +pub const XYPixmap = @as(i32, 1); +pub const ZPixmap = @as(i32, 2); +pub const AllocNone = @as(i32, 0); +pub const AllocAll = @as(i32, 1); +pub const DoRed = @as(i32, 1) << @as(i32, 0); +pub const DoGreen = @as(i32, 1) << @as(i32, 1); +pub const DoBlue = @as(i32, 1) << @as(i32, 2); +pub const CursorShape = @as(i32, 0); +pub const TileShape = @as(i32, 1); +pub const StippleShape = @as(i32, 2); +pub const AutoRepeatModeOff = @as(i32, 0); +pub const AutoRepeatModeOn = @as(i32, 1); +pub const AutoRepeatModeDefault = @as(i32, 2); +pub const LedModeOff = @as(i32, 0); +pub const LedModeOn = @as(i32, 1); +pub const KBKeyClickPercent = @as(i64, 1) << @as(i32, 0); +pub const KBBellPercent = @as(i64, 1) << @as(i32, 1); +pub const KBBellPitch = @as(i64, 1) << @as(i32, 2); +pub const KBBellDuration = @as(i64, 1) << @as(i32, 3); +pub const KBLed = @as(i64, 1) << @as(i32, 4); +pub const KBLedMode = @as(i64, 1) << @as(i32, 5); +pub const KBKey = @as(i64, 1) << @as(i32, 6); +pub const KBAutoRepeatMode = @as(i64, 1) << @as(i32, 7); +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 DontPreferBlanking = @as(i32, 0); +pub const PreferBlanking = @as(i32, 1); +pub const DefaultBlanking = @as(i32, 2); +pub const DisableScreenSaver = @as(i32, 0); +pub const DisableScreenInterval = @as(i32, 0); +pub const DontAllowExposures = @as(i32, 0); +pub const AllowExposures = @as(i32, 1); +pub const DefaultExposures = @as(i32, 2); +pub const ScreenSaverReset = @as(i32, 0); +pub const ScreenSaverActive = @as(i32, 1); +pub const HostInsert = @as(i32, 0); +pub const HostDelete = @as(i32, 1); +pub const EnableAccess = @as(i32, 1); +pub const DisableAccess = @as(i32, 0); +pub const StaticGray = @as(i32, 0); +pub const GrayScale = @as(i32, 1); +pub const StaticColor = @as(i32, 2); +pub const PseudoColor = @as(i32, 3); +pub const TrueColor = @as(i32, 4); +pub const DirectColor = @as(i32, 5); +pub const LSBFirst = @as(i32, 0); +pub const MSBFirst = @as(i32, 1); +pub const NeedFunctionPrototypes = @as(i32, 1); +pub const NeedVarargsPrototypes = @as(i32, 1); +pub const NeedNestedPrototypes = @as(i32, 1); // /usr/include/X11/Xfuncproto.h:47:9 -pub const FUNCPROTO = @as(c_int, 15); -pub const NeedWidePrototypes = @as(c_int, 0); +pub const FUNCPROTO = @as(i32, 15); +pub const NeedWidePrototypes = @as(i32, 0); // /home/renati/.zig/lib/include/__stddef_offsetof.h:16:9 -pub const X_HAVE_UTF8_STRING = @as(c_int, 1); -pub const Bool = c_int; -pub const Status = c_int; -pub const True = @as(c_int, 1); -pub const False = @as(c_int, 0); -pub const QueuedAlready = @as(c_int, 0); -pub const QueuedAfterReading = @as(c_int, 1); -pub const QueuedAfterFlush = @as(c_int, 2); +pub const X_HAVE_UTF8_STRING = @as(i32, 1); +pub const Bool = enum(u32) { + false = 0, + true = 1, + _, +}; +pub const QueuedAlready = @as(i32, 0); +pub const QueuedAfterReading = @as(i32, 1); +pub const QueuedAfterFlush = @as(i32, 2); pub inline fn ConnectionNumber(dpy: anytype) @TypeOf(@import("std").zig.c_translation.cast(_XPrivDisplay, dpy).*.fd) { _ = &dpy; return @import("std").zig.c_translation.cast(_XPrivDisplay, dpy).*.fd; @@ -1753,7 +1901,7 @@ pub inline fn WhitePixel(dpy: anytype, scr: anytype) @TypeOf(ScreenOfDisplay(dpy _ = &scr; return ScreenOfDisplay(dpy, scr).*.white_pixel; } -pub const AllPlanes = @import("std").zig.c_translation.cast(c_ulong, ~@as(c_long, 0)); +pub const AllPlanes = @import("std").zig.c_translation.cast(u64, ~@as(i64, 0)); pub inline fn QLength(dpy: anytype) @TypeOf(@import("std").zig.c_translation.cast(_XPrivDisplay, dpy).*.qlen) { _ = &dpy; return @import("std").zig.c_translation.cast(_XPrivDisplay, dpy).*.qlen; @@ -1838,9 +1986,9 @@ pub inline fn ImageByteOrder(dpy: anytype) @TypeOf(@import("std").zig.c_translat _ = &dpy; return @import("std").zig.c_translation.cast(_XPrivDisplay, dpy).*.byte_order; } -pub inline fn NextRequest(dpy: anytype) @TypeOf(@import("std").zig.c_translation.cast(_XPrivDisplay, dpy).*.request + @as(c_int, 1)) { +pub inline fn NextRequest(dpy: anytype) @TypeOf(@import("std").zig.c_translation.cast(_XPrivDisplay, dpy).*.request + @as(i32, 1)) { _ = &dpy; - return @import("std").zig.c_translation.cast(_XPrivDisplay, dpy).*.request + @as(c_int, 1); + return @import("std").zig.c_translation.cast(_XPrivDisplay, dpy).*.request + @as(i32, 1); } pub inline fn LastKnownRequestProcessed(dpy: anytype) @TypeOf(@import("std").zig.c_translation.cast(_XPrivDisplay, dpy).*.last_request_read) { _ = &dpy; @@ -1945,15 +2093,15 @@ pub const XNOrientation = "orientation"; pub const XNDirectionalDependentDrawing = "directionalDependentDrawing"; pub const XNContextualDrawing = "contextualDrawing"; pub const XNFontInfo = "fontInfo"; -pub const XIMPreeditArea = @as(c_long, 0x0001); -pub const XIMPreeditCallbacks = @as(c_long, 0x0002); -pub const XIMPreeditPosition = @as(c_long, 0x0004); -pub const XIMPreeditNothing = @as(c_long, 0x0008); -pub const XIMPreeditNone = @as(c_long, 0x0010); -pub const XIMStatusArea = @as(c_long, 0x0100); -pub const XIMStatusCallbacks = @as(c_long, 0x0200); -pub const XIMStatusNothing = @as(c_long, 0x0400); -pub const XIMStatusNone = @as(c_long, 0x0800); +pub const XIMPreeditArea = @as(i64, 0x0001); +pub const XIMPreeditCallbacks = @as(i64, 0x0002); +pub const XIMPreeditPosition = @as(i64, 0x0004); +pub const XIMPreeditNothing = @as(i64, 0x0008); +pub const XIMPreeditNone = @as(i64, 0x0010); +pub const XIMStatusArea = @as(i64, 0x0100); +pub const XIMStatusCallbacks = @as(i64, 0x0200); +pub const XIMStatusNothing = @as(i64, 0x0400); +pub const XIMStatusNone = @as(i64, 0x0800); pub const XNVaNestedList = "XNVaNestedList"; pub const XNQueryInputStyle = "queryInputStyle"; pub const XNClientWindow = "clientWindow"; @@ -1996,56 +2144,36 @@ pub const XNHotKey = "hotKey"; pub const XNHotKeyState = "hotKeyState"; pub const XNPreeditState = "preeditState"; pub const XNSeparatorofNestedList = "separatorofNestedList"; -pub const XBufferOverflow = -@as(c_int, 1); -pub const XLookupNone = @as(c_int, 1); -pub const XLookupChars = @as(c_int, 2); -pub const XLookupKeySym = @as(c_int, 3); -pub const XLookupBoth = @as(c_int, 4); -pub const XIMReverse = @as(c_long, 1); -pub const XIMUnderline = @as(c_long, 1) << @as(c_int, 1); -pub const XIMHighlight = @as(c_long, 1) << @as(c_int, 2); -pub const XIMPrimary = @as(c_long, 1) << @as(c_int, 5); -pub const XIMSecondary = @as(c_long, 1) << @as(c_int, 6); -pub const XIMTertiary = @as(c_long, 1) << @as(c_int, 7); -pub const XIMVisibleToForward = @as(c_long, 1) << @as(c_int, 8); -pub const XIMVisibleToBackword = @as(c_long, 1) << @as(c_int, 9); -pub const XIMVisibleToCenter = @as(c_long, 1) << @as(c_int, 10); -pub const XIMPreeditUnKnown = @as(c_long, 0); -pub const XIMPreeditEnable = @as(c_long, 1); -pub const XIMPreeditDisable = @as(c_long, 1) << @as(c_int, 1); -pub const XIMInitialState = @as(c_long, 1); -pub const XIMPreserveState = @as(c_long, 1) << @as(c_int, 1); -pub const XIMStringConversionLeftEdge = @as(c_int, 0x00000001); -pub const XIMStringConversionRightEdge = @as(c_int, 0x00000002); -pub const XIMStringConversionTopEdge = @as(c_int, 0x00000004); -pub const XIMStringConversionBottomEdge = @as(c_int, 0x00000008); -pub const XIMStringConversionConcealed = @as(c_int, 0x00000010); -pub const XIMStringConversionWrapped = @as(c_int, 0x00000020); -pub const XIMStringConversionBuffer = @as(c_int, 0x0001); -pub const XIMStringConversionLine = @as(c_int, 0x0002); -pub const XIMStringConversionWord = @as(c_int, 0x0003); -pub const XIMStringConversionChar = @as(c_int, 0x0004); -pub const XIMStringConversionSubstitution = @as(c_int, 0x0001); -pub const XIMStringConversionRetrieval = @as(c_int, 0x0002); -pub const XIMHotKeyStateON = @as(c_long, 0x0001); -pub const XIMHotKeyStateOFF = @as(c_long, 0x0002); -pub const _XExtData = struct__XExtData; -pub const _XGC = struct__XGC; -pub const _XDisplay = struct__XDisplay; -pub const _XImage = struct__XImage; -pub const _XPrivate = struct__XPrivate; -pub const _XrmHashBucketRec = struct__XrmHashBucketRec; -pub const _XEvent = union__XEvent; -pub const _XOM = struct__XOM; -pub const _XOC = struct__XOC; -pub const _XIM = struct__XIM; -pub const _XIC = struct__XIC; -pub const _XIMText = struct__XIMText; -pub const _XIMPreeditStateNotifyCallbackStruct = struct__XIMPreeditStateNotifyCallbackStruct; -pub const _XIMStringConversionText = struct__XIMStringConversionText; -pub const _XIMStringConversionCallbackStruct = struct__XIMStringConversionCallbackStruct; -pub const _XIMPreeditDrawCallbackStruct = struct__XIMPreeditDrawCallbackStruct; -pub const _XIMPreeditCaretCallbackStruct = struct__XIMPreeditCaretCallbackStruct; -pub const _XIMStatusDrawCallbackStruct = struct__XIMStatusDrawCallbackStruct; -pub const _XIMHotKeyTrigger = struct__XIMHotKeyTrigger; -pub const _XIMHotKeyTriggers = struct__XIMHotKeyTriggers; +pub const XBufferOverflow = -@as(i32, 1); +pub const XLookupNone = @as(i32, 1); +pub const XLookupChars = @as(i32, 2); +pub const XLookupKeySym = @as(i32, 3); +pub const XLookupBoth = @as(i32, 4); +pub const XIMReverse = @as(i64, 1); +pub const XIMUnderline = @as(i64, 1) << @as(i32, 1); +pub const XIMHighlight = @as(i64, 1) << @as(i32, 2); +pub const XIMPrimary = @as(i64, 1) << @as(i32, 5); +pub const XIMSecondary = @as(i64, 1) << @as(i32, 6); +pub const XIMTertiary = @as(i64, 1) << @as(i32, 7); +pub const XIMVisibleToForward = @as(i64, 1) << @as(i32, 8); +pub const XIMVisibleToBackword = @as(i64, 1) << @as(i32, 9); +pub const XIMVisibleToCenter = @as(i64, 1) << @as(i32, 10); +pub const XIMPreeditUnKnown = @as(i64, 0); +pub const XIMPreeditEnable = @as(i64, 1); +pub const XIMPreeditDisable = @as(i64, 1) << @as(i32, 1); +pub const XIMInitialState = @as(i64, 1); +pub const XIMPreserveState = @as(i64, 1) << @as(i32, 1); +pub const XIMStringConversionLeftEdge = @as(i32, 0x00000001); +pub const XIMStringConversionRightEdge = @as(i32, 0x00000002); +pub const XIMStringConversionTopEdge = @as(i32, 0x00000004); +pub const XIMStringConversionBottomEdge = @as(i32, 0x00000008); +pub const XIMStringConversionConcealed = @as(i32, 0x00000010); +pub const XIMStringConversionWrapped = @as(i32, 0x00000020); +pub const XIMStringConversionBuffer = @as(i32, 0x0001); +pub const XIMStringConversionLine = @as(i32, 0x0002); +pub const XIMStringConversionWord = @as(i32, 0x0003); +pub const XIMStringConversionChar = @as(i32, 0x0004); +pub const XIMStringConversionSubstitution = @as(i32, 0x0001); +pub const XIMStringConversionRetrieval = @as(i32, 0x0002); +pub const XIMHotKeyStateON = @as(i64, 0x0001); +pub const XIMHotKeyStateOFF = @as(i64, 0x0002);