Created
June 29, 2022 02:31
-
-
Save camlspotter/255ef887457ff9f75b875171dccc31c8 to your computer and use it in GitHub Desktop.
Small program to detect window resize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let () = | |
ignore @@ GMain.Main.init (); | |
let window = GWindow.window ~width:100 ~height:100 () in | |
ignore @@ window#event#connect#configure ~callback:(fun ev -> | |
let open GdkEvent.Configure in | |
prerr_endline (Printf.sprintf "Configure %dx%d+%d+%d" | |
(width ev) | |
(height ev) | |
(x ev) | |
(y ev)); | |
false); | |
window#show (); | |
GMain.Main.main () | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment