From 25c5eac5e6ca1035db1eddd7bea9ac78531da57e Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 28 Dec 2023 11:23:49 -0500 Subject: Delete manuals! Good riddance! These are hosted on files.dthompson.us now! --- manuals/sly/Window-Creation.html | 177 --------------------------------------- 1 file changed, 177 deletions(-) delete mode 100644 manuals/sly/Window-Creation.html (limited to 'manuals/sly/Window-Creation.html') diff --git a/manuals/sly/Window-Creation.html b/manuals/sly/Window-Creation.html deleted file mode 100644 index 5e6dfc7..0000000 --- a/manuals/sly/Window-Creation.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - -Sly: Window Creation - - - - - - - - - - - - - - - - - - - - -
-

-Next: , Up: Booting   [Contents][Index]

-
-
- -

4.1.1 Window Creation

- -
-
(use-modules (sly window))
-
- -

Sly uses the windowing features of SDL 1.2 under the hood, which -currently restricts Sly applications to using only a single window. -SDL2 support will come in a future release. -

-

The window data structure: -

-
-
Scheme Procedure: make-window [#:title] [#:resolution] [#:fullscreen?]
-

Create a new window object. title is a string to display in -the window’s title bar. resolution is a 2D vector that -specifies the dimensions of the window in pixels. fullscreen? -is a boolean that toggles fullscreen mode. -

- -
-
Scheme Procedure: window? obj
-

Return #t if obj is a window. -

- -
-
Scheme Procedure: window-title window
-

Return the title of window. -

- -
-
Scheme Procedure: window-resolution window
-

Return the resolution of window. -

- -
-
Scheme Procedure: window-fullscreen? window
-

Return #t if window is set to fullscreen mode. -

- -

The following signals hold the state of the current window: -

-
-
Scheme Signal: window-width
-

The width of the current window. -

- -
-
Scheme Signal: window-height
-

The height of the current window. -

- -
-
Scheme Signal: window-size
-

The size of the current window as a 2D vector. -

- -

In addition to signals, the following hooks are triggered upon certain -changes to window state: -

-
-
Scheme Variable: window-resize-hook
-

This hook is run when the current window is resized. Procedures added -to this hook should accept two arguments: Numbers width and -height, the new dimensions of the window in pixels. -

- -
-
Scheme Variable: window-close-hook
-

This hook is run when the close button is clicked. Note that this -event is simply a request from the user to close the window, it does -not mean that the window has actually been closed. Procedures added -to this hook should accept no arguments. -

- -

The following procedures are used to open/close windows: -

-
-
Scheme Procedure: open-window [window]
-

Open the game window using the settings in window. -

- -
-
Scheme Procedure: close-window
-

Close the currently open window. -

- -
-
Scheme Syntax: with-window window body
-

Evaluate body in the context of window. window -is opened before evaluating body, and closed afterwards. -

- -
-
-

-Next: , Up: Booting   [Contents][Index]

-
- - - - - -- cgit v1.2.3