Module Sdl.Window


module Window: sig .. end
Windowing-related functions

SDL provides a small set of window management functions which allow applications to change their title and toggle from windowed mode to fullscreen (if available)


val set_caption : string -> string -> unit
set_caption window_caption taskbar_caption

Sets the title-bar and icon name of the display window.

val get_caption : unit -> string * string
get_caption -> window_caption * taskbar_caption

Gets the title-bar and icon name of the display window.

val set_icon : Sdl.Video.surface -> unit
set_icon surface

Sets the window icon to the surface. In Windows, icons must be 32x32

val iconify_window : unit -> unit
iconify_window

If the application is running in a window managed environment SDL attempts to iconify/minimise it. If iconify_window is successful, the application will receive an APPACTIVE loss event.

val toggle_fullscreen : Sdl.Video.surface -> unit
toggle_fullscreen surface

Toggles the application between windowed and fullscreen mode, if supported. (X11 is the only target currently supported, BeOS support is experimental).

val set_grab_input : bool -> unit
set_grab_input true/false

Grabbing means that the mouse is confined to the application window, and nearly all keyboard input is passed directly to the application, and not interpreted by a window manager, if any. True toggles grabbing on, false toggles it off

val get_grab_input : unit -> bool
get_grab_input

Returns true if the input has been grabbed by the application, else false