Files
sml-projects/dotscape/ffi/glfw-import.sml
Humza Shahid f3a4e15ed5 Add 'dotscape/' from commit 'f306501a68a51b634e895c5fdac70788ae899d75'
git-subtree-dir: dotscape
git-subtree-mainline: 6b91d64fc3
git-subtree-split: f306501a68
2026-04-24 00:30:08 +01:00

26 lines
1.0 KiB
Standard ML

structure Glfw =
struct
type window = MLton.Pointer.t
(* Window hint constants. *)
val (CONTEXT_VERSION_MAJOR, _) =
_symbol "CONTEXT_VERSION_MAJOR" public : ( unit -> int ) * ( int -> unit );
val (DEPRECATED, _) =
_symbol "DEPRECATED" public : ( unit -> int ) * ( int -> unit );
val (FALSE, _) =
_symbol "GLFW_FFI_FALSE" public : ( unit -> int ) * ( int -> unit );
val (SAMPLES, _) =
_symbol "SAMPLES" public : ( unit -> int ) * ( int -> unit );
(* GLFW functions. *)
val init = _import "init" public : unit -> unit;
val windowHint = _import "windowHint" public : int * int -> unit;
val createWindow =
_import "createWindow" public : int * int * string -> window;
val terminate = _import "terminate" public : unit -> unit;
val makeContextCurrent = _import "makeContextCurrent" public : window -> unit;
val windowShouldClose = _import "windowShouldClose" public : window -> bool;
val pollEvents = _import "pollEvents" public reentrant : unit -> unit;
val swapBuffers = _import "swapBuffers" public : window -> unit;
end