Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions vendor/x11/xlib/xlib_const.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#+build linux, freebsd, openbsd
package xlib

XNClientWindow: cstring : "clientWindow"
XNInputStyle: cstring : "inputStyle"
XNFocusWindow: cstring : "focusWindow"
XNSpotLocation: cstring : "spotLocation"
XNPreeditAttributes: cstring : "preeditAttributes"

XIMPreeditNothing :: 0x0008
XIMStatusNothing :: 0x0400

/* ---- X11/extensions/XKB.h ---------------------------------------------------------*/

XkbMinLegalKeyCode :: 8
Expand Down Expand Up @@ -138,6 +147,14 @@ Status :: enum i32 {
LastExtensionError = 255,
}

LookupStringStatus :: enum i32 {
BufferOverflow = -1,
LookupNone = 1,
LookupChars = 2,
LookupKeySym = 3,
LookupBoth = 4,
}

ByteOrder :: enum i32 {
LSBFirst = 0,
MSBFirst = 1,
Expand Down
29 changes: 28 additions & 1 deletion vendor/x11/xlib/xlib_procs.odin
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ foreign xlib {
SetSelectionOwner :: proc(
display: ^Display,
selection: Atom,
owber: Window,
owner: Window,
time: Time,
) ---
GetSelectionOwner :: proc(
Expand Down Expand Up @@ -1030,6 +1030,7 @@ foreign xlib {
Pending :: proc(display: ^Display) -> i32 ---
NextEvent :: proc(display: ^Display, event: ^XEvent) ---
PeekEvent :: proc(display: ^Display, event: ^XEvent) ---
FilterEvent :: proc(event: ^XEvent, window: Window) -> b32 ---
GetEventData :: proc(display: ^Display, cookie: ^XGenericEventCookie) -> b32 ---
FreeEventData :: proc(display: ^Display, cookie: ^XGenericEventCookie) ---
// Selecting events using a predicate procedure
Expand Down Expand Up @@ -1697,6 +1698,24 @@ foreign xlib {
res_class: cstring,
) -> XIM ---
SetLocaleModifiers :: proc(modifiers: cstring) -> cstring ---
CreateIC :: proc(
im: XIM,
#c_vararg args: ..any,
) -> XIC ---
SetICFocus :: proc(
ic: XIC,
) ---
UnsetICFocus :: proc(
ic: XIC,
) ---
SetICValues :: proc(
ic: XIC,
#c_vararg args: ..any,
) -> cstring ---
VaCreateNestedList :: proc(
unused: i32,
#c_vararg args: ..any,
) -> XVaNestedList ---
}

@(default_calling_convention="c")
Expand Down Expand Up @@ -2046,4 +2065,12 @@ foreign xlib {
num: u32,
xkb: XkbDescPtr,
) -> Status ---
Xutf8LookupString :: proc(
ic: XIC,
event: ^XKeyPressedEvent,
buffer_return: ^cstring,
bytes_buffer: i32,
keysym_return: ^KeySym,
status_return: ^LookupStringStatus,
) -> i32 ---
}
Loading