Arrange xcb bindings properly
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user