Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,24 @@
open Xlib
let () =
let d = xOpenDisplay "" in
let s = xDefaultScreen d in
let w = xCreateSimpleWindow d (xRootWindow d s) 10 10 100 100 1
(xBlackPixel d s) (xWhitePixel d s) in
xSelectInput d w [ExposureMask; KeyPressMask];
xMapWindow d w;
let msg = "Hello, World!" in
let rec main_loop() =
match xEventType(xNextEventFun d) with
| Expose ->
xFillRectangle d w (xDefaultGC d s) 20 20 10 10;
xDrawString d w (xDefaultGC d s) 10 50 msg;
main_loop()
| KeyPress -> () (* exit main loop *)
| _ -> main_loop()
in
main_loop();
xCloseDisplay d;
;;