Arrange xcb bindings properly

This commit is contained in:
2026-07-26 09:48:54 +01:00
parent 9b33f9617a
commit 837d457b10
11 changed files with 395 additions and 104 deletions
+16
View File
@@ -0,0 +1,16 @@
open Ctypes
open Foreign
type t
let typ : t structure typ = structure "xcb_connection_t"
let _xcb_connect =
foreign "xcb_connect" (string_opt @-> ptr int @-> returning (ptr typ))
let disconnect = foreign "xcb_disconnect" (ptr typ @-> returning void)
let flush = foreign "xcb_flush" (ptr typ @-> returning int)
let connect () =
let screen = allocate int 0 in
_xcb_connect None screen