sig
type t
type window_style = [ `close | `fullscreen | `resize | `titlebar ]
type video_mode = { width : int; height : int; bitsPerPixel : int; }
type window_settings = {
depthBits : int;
stencilBits : int;
antialiasingLevel : int;
}
val mode :
width:int -> height:int -> bitsPerPixel:int -> SFWindow.video_mode
val settings :
depthBits:int ->
stencilBits:int -> antialiasingLevel:int -> SFWindow.window_settings
external create :
mode:SFWindow.video_mode ->
title:string ->
style:SFWindow.window_style list ->
settings:SFWindow.window_settings -> SFWindow.t = "caml_sfWindow_Create"
external createFromHandle :
handle:nativeint -> settings:SFWindow.window_settings -> SFWindow.t
= "caml_sfWindow_CreateFromHandle"
val make :
?style:SFWindow.window_style list ->
?bpp:int ->
?depth:int ->
?stencil:int -> ?antialiasing:int -> int * int -> string -> SFWindow.t
external isOpened : SFWindow.t -> bool = "caml_sfWindow_IsOpened"
external close : SFWindow.t -> unit = "caml_sfWindow_Close"
external display : SFWindow.t -> unit = "caml_sfWindow_Display"
external destroy : SFWindow.t -> unit = "caml_sfWindow_Destroy"
external getEvent : SFWindow.t -> SFEvent.t option
= "caml_sfWindow_GetEvent"
external getWidth : SFWindow.t -> int = "caml_sfWindow_GetWidth"
external getHeight : SFWindow.t -> int = "caml_sfWindow_GetHeight"
external getSize : SFWindow.t -> int * int = "caml_sfWindow_GetSize"
external setSize : SFWindow.t -> width:int -> height:int -> unit
= "caml_sfWindow_SetSize"
external showMouseCursor : SFWindow.t -> show:bool -> unit
= "caml_sfWindow_ShowMouseCursor"
external setCursorPosition : SFWindow.t -> left:int -> top:int -> unit
= "caml_sfWindow_SetCursorPosition"
external getInput : SFWindow.t -> SFInput.t = "caml_sfWindow_GetInput"
external useVerticalSync : SFWindow.t -> enabled:bool -> unit
= "caml_sfWindow_UseVerticalSync"
external setPosition : SFWindow.t -> left:int -> top:int -> unit
= "caml_sfWindow_SetPosition"
external show : SFWindow.t -> state:bool -> unit = "caml_sfWindow_Show"
external enableKeyRepeat : SFWindow.t -> enabled:bool -> unit
= "caml_sfWindow_EnableKeyRepeat"
external setFramerateLimit : SFWindow.t -> limit:int -> unit
= "caml_sfWindow_SetFramerateLimit"
external setJoystickThreshold : SFWindow.t -> threshold:float -> unit
= "caml_sfWindow_SetJoystickThreshold"
external setActive : SFWindow.t -> active:bool -> bool
= "caml_sfWindow_SetActive"
external getFrameTime : SFWindow.t -> float = "caml_sfWindow_GetFrameTime"
end