16 lines
386 B
OCaml
16 lines
386 B
OCaml
open Ctypes
|
|
open Foreign
|
|
|
|
let _xcb_connect =
|
|
foreign "xcb_connect"
|
|
(string_opt @-> ptr int @-> returning (ptr Types.Connection.typ))
|
|
|
|
let disconnect =
|
|
foreign "xcb_disconnect" (ptr Types.Connection.typ @-> returning void)
|
|
|
|
let flush = foreign "xcb_flush" (ptr Types.Connection.typ @-> returning int)
|
|
|
|
let connect () =
|
|
let screen = allocate int 0 in
|
|
_xcb_connect None screen
|