Next: , Up: Window Management   [Contents][Index]


3.2.1 Windows

Procedure: make-window [#:title "Guile SDL2 Window"] [#:position (#f #f)] [#:size (640 480)] [#:maximize? #f] [#:minimize? #f] [#:opengl? #f] [#:border? #t] [#:fullscreen? #f] [#:fullscreen-desktop? #f] [#:grab-input? #f] [#:high-dpi? #f]

Create a new window named title with dimensions size located at position on the display. position and size are two-element lists in the form (x y), where each coordinate is measured in pixels. In the case of position, a coordinate may use the special symbol center to indicate that the window should be centered on that axis, or #f to indicate that it does not matter where the window is located on that axis.

Procedure: close-window! window

Close window.

Procedure: call-with-window window proc

Call proc with window, an SDL window object, and close it when proc returns or otherwise exits.

Procedure: window-title window

Return the title for window.

Procedure: window-size window

Return the dimensions of window.

Procedure: window-position window

Return the position of window on the display.

Procedure: window-id window

Return the numeric ID of window.

Procedure: id->window id

Return the window corresponding to ID, a positive integer, or #f if there is no such window.

Procedure: hide-window! window

Hide window.

Procedure: show-window! window

Show window and focus on it.

Procedure: maximize-window! window

Make window as large as possible.

Procedure: minimize-window! window

Shrink window to an iconic representation.

Procedure: raise-window! window

Raise window above all other windows and set input focus.

Procedure: restore-window! window

Restore the size and position of a minimized or maximized window.

Procedure: set-window-border! window border?

When border?, draw the usual border around window, otherwise remove the border.

Procedure: set-window-title! window title

Set the title of window to the string title.

Procedure: set-window-position! window position

Set the position of window to position, a two-element list of (x,y) coordinates measured in pixels.

Procedure: set-window-size! window size

Set the dimensions of window to size, a two-element list of (width,height) coordinates measured in pixels.

Procedure: set-window-fullscreen! window fullscreen? [#:desktop?]

Toggle fullscreen mode on/off for window. If fullscreen?, fullscreen mode is activated, otherwise it is deactivated. If fullscreen? and desktop?, a special "fake" fullscreen mode is used that takes the size of the desktop.


Next: , Up: Window Management   [Contents][Index]