lispbuilder

API Reference

lispbuilder-lexer

A lexical-analyzer-generator called DEFLEXER, which is built on top of both REGEX and CLAWK

LISPBUILDER-LEXER

  • Macro TOKENIZE (str pos-var &rest rules)
  • Macro DEFLEXER (name &rest rules)
    Create a lexical analyser. This analyser function takes a string :position, :end, :end-token and :end-value keyword parameters, and returns a function of no arguments that returns the next token and value each time it is called, or (values end-token end-value) when the input string is exhausted. By default, position = 0, end = length of str, and end-token and end-value = nil.
  • Generic-Function NUM (x)
  • Method NUM ((x string))
  • Generic-Function INT (x)
  • Method INT ((x number))
  • Method INT ((x string))

lispbuilder-net

lispbuilder-net: asynchronous sockets library

LISPBUILDER-NET

The main package of `lispbuilder-net'.
No exported symbols.

lispbuilder-net-cffi

lispbuilder-net-cffi: Basic Lisp wrapper for the net library.

LISPBUILDER-NET-CFFI

The basic wrapper package of `lispbuilder-net'.
  • Variable NET_STARTUP_FAILED
    -1
  • Variable NET_CLEANUP_FAILED
    -2
  • Variable NET_BIND_FAILED
    -3
  • Variable NET_CREATE_SOCKET_FAILED
    -4
  • Variable NET_GET_HOST_BY_NAME_FAILED
    -5
  • Variable NET_LISTEN_FAILED
    -6
  • Variable NET_ACCEPT_FAILED
    -7
  • Variable NET_CLOSE_SOCKET_FAILED
    -8
  • Variable NET_CONNECT_FAILED
    -9
  • Variable NET_WOULD_BLOCK
    -10
  • Variable NET_WRITE_FAILED
    -11
  • Variable NET_READ_FAILED
    -12
  • Variable NET_LOOP_FAILED
    -13
  • Cffi-Function NETREGISTERREADCALLBACK
  • Function NETREGISTERREADCALLBACK (callback)
  • Cffi-Function NETREGISTERWRITECALLBACK
  • Function NETREGISTERWRITECALLBACK (callback)
  • Cffi-Function NETREGISTERERRORCALLBACK
  • Function NETREGISTERERRORCALLBACK (callback)
  • Cffi-Function NETSTARTUP
  • Function NETSTARTUP
  • Cffi-Function NETCLEANUP
  • Function NETCLEANUP
  • Cffi-Function NETCREATESOCKET
  • Function NETCREATESOCKET (sockethandle)
  • Cffi-Function NETCREATESERVERSOCKET
  • Function NETCREATESERVERSOCKET (address port sockethandle)
  • Cffi-Function NETLISTEN
  • Function NETLISTEN (serversocket backlog)
  • Cffi-Function NETCONNECT
  • Function NETCONNECT (socket address port)
  • Cffi-Function NETACCEPT
  • Function NETACCEPT (serversocket ipaddress sockethandle)
  • Cffi-Function NETCLOSESOCKET
  • Function NETCLOSESOCKET (socket)
  • Cffi-Function NETWAIT
  • Function NETWAIT (millisecondstimeout)
  • Cffi-Function NETWRITE
  • Function NETWRITE (socket data size)
  • Cffi-Function NETREAD
  • Function NETREAD (socket data size)
  • Cffi-Function NETSLEEP
  • Function NETSLEEP (milliseconds)
  • Cffi-Function NETFREE
  • Function NETFREE (pointer)

lispbuilder-opengl-1-1

lispbuilder-opengl: gl Mesa v6.4.2 library wrapper and tools

LISPBUILDER-OPENGL

The main package of `lispbuilder-opengl'.
No exported symbols.

lispbuilder-regex

A pretty full-featured matcher

LISPBUILDER-REGEX

  • Function COMPILE-VERBOSE (&optional (flag t))
  • Function MATCH-SIMPLE-STRINGS-ONLY (&optional (flag t))
  • Function FORCE-SAFE-MATCH (&optional (flag t))
  • Function ESCAPE-SPECIAL-CHARS (&optional (flag t))
  • Function DOT-MATCHES-NEWLINE (&optional (flag t))
  • Function ALLOW-BACKMATCH (&optional (flag t))
  • Function ALLOW-RANGEMATCH (&optional (flag t))
  • Function ALLOW-NONGREEDY-QUANTIFIERS (&optional (flag t))
  • Function ALLOW-NONREGISTER-GROUPS (&optional (flag t))
  • Function REGISTERS-MATCH-RIGHTMOST (&optional (flag t))
  • Function MAKE-CHAR-NODE (chr)
  • Function CHAR-NODE-P (node)
  • Function CHAR-NODE-CHAR (char-node)
  • Function MAKE-STRING-NODE (str)
  • Function STRING-NODE-P (node)
  • Function STRING-NODE-STRING (string-node)
  • Function MAKE-BACKMATCH-NODE (regnum)
  • Function BACKMATCH-NODE-P (node)
  • Function BACKMATCH-NODE-REGNUM (backmatch-node)
  • Function MAKE-SEQ-NODE-LIST (child-nodes)
  • Function MAKE-SEQ-NODE-ARGS (&rest child-nodes)
  • Function SEQ-NODE-P (node)
  • Function SEQ-NODE-CHILDREN (seq-node)
  • Function SEQ-NODE-NUMCHILDREN (seq-node)
  • Function SEQ-NODE-CHILD (seq-node idx)
  • Function MAKE-KLEENE-NODE (child-node greedyp)
  • Function KLEENE-NODE-P (node)
  • Function KLEENE-NODE-GREEDY-P (node)
  • Function KLEENE-NODE-NONGREEDY-P (node)
  • Function KLEENE-NODE-CHILD (kleene-node)
  • Function MAKE-PKLEENE-NODE (child-node greedyp)
  • Function PKLEENE-NODE-P (node)
  • Function PKLEENE-NODE-GREEDY-P (node)
  • Function PKLEENE-NODE-NONGREEDY-P (node)
  • Function PKLEENE-NODE-CHILD (pkleene-node)
  • Function MAKE-OPTIONAL-NODE (child-node greedyp)
  • Function OPTIONAL-NODE-P (node)
  • Function OPTIONAL-NODE-GREEDY-P (node)
  • Function OPTIONAL-NODE-NONGREEDY-P (node)
  • Function OPTIONAL-NODE-CHILD (optional-node)
  • Function MAKE-RANGE-NODE (child-node min max greedyp)
  • Function RANGE-NODE-P (node)
  • Function RANGE-NODE-GREEDY-P (node)
  • Function RANGE-NODE-NONGREEDY-P (node)
  • Function RANGE-NODE-MIN (range-node)
  • Function RANGE-NODE-MAX (range-node)
  • Function RANGE-NODE-CHILD (range-node)
  • Function MAKE-ALT-NODE-LIST (child-nodes)
  • Function MAKE-ALT-NODE-ARGS (&rest child-nodes)
  • Function ALT-NODE-P (node)
  • Function ALT-NODE-CHILDREN (alt-node)
  • Function ALT-NODE-NUMCHILDREN (alt-node)
  • Function ALT-NODE-FIRST (alt-node)
  • Function ALT-NODE-SECOND (alt-node)
  • Function ALT-NODE-CHILD (alt-node idx)
  • Function MAKE-REGISTER-NODE (regnum child)
  • Function REGISTER-NODE-P (node)
  • Function REGISTER-NODE-REGNUM (reg-node)
  • Function REGISTER-NODE-CHILD (reg-node)
  • Function MAKE-REGSTART-NODE (regnum)
  • Function REGSTART-NODE-P (node)
  • Function REGSTART-NODE-REGNUM (rstart-node)
  • Function MAKE-REGEND-NODE (regnum)
  • Function REGEND-NODE-P (node)
  • Function REGEND-NODE-REGNUM (rend-node)
  • Function MAKE-CHARCLASS-NODE (chars &key negated)
  • Function CHARCLASS-NODE-P (node)
  • Function CHARCLASS-NODE-NEGATED-P (charclass-node)
  • Function CHARCLASS-NODE-CHARS (charclass-node)
  • Function MAKE-SPECCLASS-NODE (class &key negated)
  • Function SPECCLASS-NODE-P (node)
  • Function SPECCLASS-NODE-NEGATED-P (specclass-node)
  • Function SPECCLASS-NODE-CLASS (specclass-node)
  • Function MAKE-START-ANCHOR-NODE
  • Function START-ANCHOR-NODE-P (node)
  • Function MAKE-END-ANCHOR-NODE
  • Function END-ANCHOR-NODE-P (node)
  • Function MAKE-HOOK-NODE (fxn-id)
  • Function HOOK-NODE-P (node)
  • Function HOOK-NODE-FUNCTION (hook-node)
  • Function HOOK-NODE-SYMBOL-P (hook-node)
  • Function HOOK-NODE-FUNCTION-P (hook-node)
  • Function HOOK-NODE-INDEX-P (hook-node)
  • Function MAKE-SUCCESS-NODE (rc)
  • Function SUCCESS-NODE-P (node)
  • Function SUCCESS-NODE-RC (success-node)
  • Function MAKE-REGS (n)
  • Function REGISTER-START (regs n)
  • Function REGISTER-END (regs n)
  • Function REGISTER-MATCHED-P (regs n)
  • Struct MATCHER
    SIMPLE-STRING-MATCHFN
    STRING-MATCHFN
    NUMREGS
    MATCHSTR
    MATCHEXPR
    ACCEPTFN
  • Function MATCHER-P (object)
  • Function MATCHER-NUMREGS (instance)
  • Function (setf MATCHER-NUMREGS) (value instance)
  • Function CLEAR-PATTERN-CACHE
  • Function PARSE-STR (str)
    Parse a string into a parse tree.
  • Function COMPILE-STR (patstr)
    Parse a string regex expression, and compile it into matcher object. Uses the pattern cache.
  • Function COMPILE-EXPR (regexpr)
    Parse a string regex expression, and compile it into matcher object. Uses the pattern cache.
  • Function MACROEXPAND-REGEX-STR (patstr)
  • Macro DEFREGEX (name patstr &rest rest)
  • Macro MACROEXPAND-REGEX-EXPR (regex-expr)
  • Function MATCH-STR (matcher candstr &key (regs (make-regs (matcher-numregs matcher))) (start 0) (length (- (length candstr) start)) (start-is-anchor (= start 0)) (end-is-anchor (= length (length candstr))) acceptfn hooks)
    Run a matcher against a candidate string, without scanning (so it is implicitly anchored). Returns (values t start end regs) on success, nil on failure.
  • Function SCAN-STR (matcher candstr &key (regs (make-regs (matcher-numregs matcher))) (start 0) (length (length candstr)) (start-is-anchor (= start 0)) (end-is-anchor (= length (length candstr))) acceptfn hooks)
    Run a matcher against a candidate string, scanning forward if necessary. Returns (values t start end regs) on success, nil on failure.

Also exports

  • COMMON-LISP:SPACE

LISPBUILDER-REGEX-TEST

  • Function RUN-TESTS

lispbuilder-sdl

lispbuilder-sdl: Wrapper and tools for SDL 1.2.14

LISPBUILDER-SDL

The main package of `lispbuilder-sdl'.
  • Variable *DEFAULT-SURFACE*
    nil
    Functions that accept the `KEY`word parameter `:SURFACE` will most likely bind to the symbol `*DEFAULT-SURFACE*` by default if `SURFACE` is not specified. A surface is bound to `*DEFAULT-SURFACE*` by the following macros: [WITH-SURFACE](#with-surface), and [WITH-SURFACES](#with-surfaces). ##### Example (DRAW-SURFACE SURF-1 :SURFACE SDL:*DEFAULT-DISPLAY*) (DRAW-SURFACE SURF-2 :SURFACE SDL:*DEFAULT-DISPLAY*) (DRAW-SURFACE SURF-2 :SURFACE SDL:*DEFAULT-DISPLAY*) The above can be shortened using by setting the `*DEFAULT-SURFACE*` to the display surface. (WITH-SURFACE (DISP SDL:*DEFAULT-DISPLAY*) (DRAW-SURFACE SURF-1) (DRAW-SURFACE SURF-2) (DRAW-SURFACE SURF-2))
  • Variable *DEFAULT-DISPLAY*
    nil
    The symbol `*DEFAULT-DISPLAY*` is bound to the current display surface [DISPLAY-SURFACE](#display-surface)) by the function [WINDOW](#WINDOW)).
  • Variable *DEFAULT-COLOR*
    nil
    Functions that accept the `KEY`word parameter `COLOR` will most likely bind to the symbol `*DEFAULT-COLOR*` by default if `COLOR` is not specified. A color is bound to `*DEFAULT-COLOR*` by the following macro: [WITH-COLOR](#with-color). ##### Example (DRAW-BOX A-BOX :SURFACE SDL:DEFAULT-DISPLAY* :COLOR SDL:*BLACK*) (DRAW-BOX B-BOX :SURFACE SDL:DEFAULT-DISPLAY* :COLOR SDL:*BLACK*) (DRAW-BOX C-BOX :SURFACE SDL:DEFAULT-DISPLAY* :COLOR SDL:*BLACK*) The above can be shortened by setting `*DEFAULT-COLOR*` to `*BLACK*`. (WITH-SURFACE (DISP SDL:*DEFAULT-DISPLAY*) (WITH-COLOR (COL SDL:*BLACK*) (DRAW-BOX A-BOX) (DRAW-BOX B-BOX) (DRAW-BOX C-BOX)))
  • Variable *DEFAULT-FONT*
    nil
    Functions that accept the `KEY`word parameter `FONT` will most likely bind to the symbol `*DEFAULT-FONT*` by default if `FONT` is not specified. A font is bound to `*DEFAULT-FONT*` by the following; [WITH-DEFAULT-FONT](#with-default-font), [WITH-FONT](#with-font) and [INITIALISE-DEFAULT-FONT](#initialise-default-font). ##### Example (draw-string-solid-* "draw string centered" 100 100 :justify :center :color sdl:*white* :font a-font) (draw-string-solid-* "draw string left" 100 100 :justify :left :color sdl:*white* :font a-font) (draw-string-solid-* "draw string right" 100 100 :justify :right :color sdl:*white* :font a-font) The above can be shortened by setting `*DEFAULT-FONT*` to `a-font`. (WITH-DEFAULT-FONT (a-font) (WITH-COLOR (COL SDL:*WHITE*) (DRAW-STRING-SOLID-* "draw string centered" 100 100 :JUSTIFY :CENTER) (DRAW-STRING-SOLID-* "draw string left" 100 100 :JUSTIFY :LEFT) (DRAW-STRING-SOLID-* "draw string right" 100 100 :JUSTIFY :RIGHT)))
  • Variable *DEFAULT-POSITION*
    nil
  • Variable *DEFAULT-RECTANGLE*
    nil
  • Variable *EXTERNAL-INIT-SUBSYSTEMS-ON-STARTUP*
    nil
    The list of functions that are called from [INIT-SDL](#init-sdl).
  • Variable *EXTERNAL-QUIT-SUBSYSTEMS-ON-EXIT*
    nil
    The list of functions that are called from [QUIT-SDL](#quit-sdl).
  • Variable *QUIT-ON-EXIT*
    t
  • Variable *DEFAULT-TTF-FONT*
    (merge-pathnames "vera.ttf" lispbuilder-sdl-assets::*default-asset-path*)
  • Variable *DEFAULT-FONT-PATH*
    lispbuilder-sdl-assets::*default-asset-path*
  • Variable *DEFAULT-IMAGE-PATH*
    lispbuilder-sdl-assets::*default-asset-path*
  • Variable *DEFAULT-AUDIO-PATH*
    lispbuilder-sdl-assets::*default-asset-path*
  • Variable *MIXER*
    nil
  • Variable *MANAGED-AUDIO*
    nil
  • Variable +DEFAULT-FORMAT+
    lispbuilder-sdl-cffi::audio-s16sys
  • Variable +CHANNELS+
    8
  • Variable +DEFAULT-FREQUENCY+
    22050
  • Variable +DEFAULT-CHANNELS+
    2
  • Variable +MAX-VOLUME+
    128
  • Variable +DEFAULT-SAMPLE-BUFFER+
    4096
    Default size of the sample output buffer is `4096` bytes
  • Variable +CHANNEL-POST+
    -2
  • Variable +MAX-AUDIO-16+
    (- (ash 1 (- 16 1)) 1)
  • Variable +MIN-AUDIO-16+
    (* -1 (ash 1 (- 16 1)))
  • Variable +MAX-AUDIO-8+
    (- (ash 1 (- 8 1)) 1)
  • Variable +MIN-AUDIO-8+
    (* -1 (ash 1 (- 8 1)))
  • Variable *ALLOW-CONVERT-TO-DISPLAY-FORMAT*
    t
    `CONVERT-TO-DISPLAY-FORMAT` will convert the input surface to the display format when `T`, and copy to a new surface when `NIL`.
  • Variable *DEFAULT-FPSMANAGER*
    nil
  • Variable *SDL-EVENT*
    nil
  • Generic-Function R (color)
  • Generic-Function G (color)
  • Generic-Function B (color)
  • Generic-Function A (color)
  • Generic-Function (setf R) (value color)
    Sets/Returns the red color component of the object.
  • Generic-Function (setf G) (value color)
    Sets/Returns the green color component of the object.
  • Generic-Function (setf B) (value color)
    Sets/Returns the blue color component of the object.
  • Generic-Function (setf A) (value color)
    Sets/Returns the alpha color component of the object.
  • Generic-Function PACK-COLOR (color)
    Packs [COLOR](#color) or [COLOR-A](#color-a) into a four byte `INTEGER`.
  • Generic-Function MAP-COLOR (color &optional surface)
    Maps [COLOR](#color) or [COLOR-A](#color-a) to the pixel format of [SURFACE](#surface) and returns the pixel value that best approximates the color value of the surface. If the surface has a palette (8-bit) the index of the closest matching color in the palette will be returned. If the surface has an alpha component it will be returned as all `1` bits (fully opaque). If the surface color depth is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).
  • Generic-Function MAP-COLOR-* (r g b a &optional surface)
    Maps the color specified by the `R`, `G`, `B`, and `A` color components to the pixel format of [SURFACE](#surface) and returns the pixel value that best approximates the color value of the surface. If `A` is not `NIL` then the color is assumed to contain an alpha component. See [MAP-COLOR](#map-color) for more details.
  • Generic-Function COLOR-* (color)
    Returns the `RGB/A` color components as a spread. [COLOR-A](#color-a) returns `(VALUES R G B A)`. [COLOR](#color) returns `(VALUES R G B)`
  • Generic-Function SET-COLOR (dst src)
    Copies the `RGB/A` color components to the destination `DST` from the source `SRC`.
  • Generic-Function SET-COLOR-* (color &key r g b a)
    Sets `COLOR` to the red `R`, green `G`, blue `B` and alpha `A` color components.
  • Generic-Function POINT-* (point)
    Returns the `X` and `Y` coordinates of the object as a spread. The `RESULT` is `(VALUES X Y)`
  • Generic-Function SET-POINT (dst src)
    Copies the `X` and `Y` coordinates to the destination `DST` from the source `SRC`.
  • Generic-Function SET-POINT-* (obj &key x y)
    Sets the `X` and `Y` coordinates of the object `OBJ`. `X` and `Y` are `KEY`word parameters.
  • Generic-Function GET-POINT (object)
    Returns the `X` and `Y` coordinates of object `OBJ` as a `POINT`.
  • Generic-Function POSITION-* (obj)
    See [POINT-*](#point-*)
  • Generic-Function SET-POSITION (dst src)
    See [SET-POINT](#set-point)
  • Generic-Function SET-POSITION-* (obj &key x y)
    See [SET-POINT-*](#set-point-*)
  • Generic-Function GET-POSITION (object)
    See [GET-POINT](#get-POINT)
  • Generic-Function RECTANGLE-* (obj)
    Returns the `X`, `Y`, `WIDTH` and `HEIGHT` coordinates of the object as a spread. The `RESULT` is `(VALUES X Y WIDTH HEIGHT)`
  • Generic-Function SET-RECTANGLE (dst src)
    Copies the `X`, `Y`, `WIDTH` and `HEIGHT` coordinates to the destination rectangle `DST` from the source rectangle `SRC`.
  • Generic-Function SET-RECTANGLE-* (rectangle &key x y w h)
    Sets the `X`, `Y`, `WIDTH` and `HEIGHT` coordinates of the rectangle `RECTANGLE`. `X`, `Y`, `WIDTH` and `HEIGHT` are `KEY`word parameters having default values of `0` if unspecified.
  • Generic-Function GET-RECTANGLE (obj)
    Returns the rectangle `RECTANGLE`.
  • Generic-Function SET-SURFACE (surface position)
    Sets the coordinates of the surface SURFACE to `POSITION`, where position is of type `POINT`.
  • Generic-Function SET-SURFACE-* (surface &key x y)
    Sets the coordinates of the surface `SURFACE`. `X` and `Y` are `KEY`word parameters having default values of `0` if unspecified.
  • Generic-Function WIDTH (obj)
  • Generic-Function HEIGHT (obj)
  • Generic-Function X (obj)
  • Generic-Function Y (obj)
  • Generic-Function X2 (obj)
  • Generic-Function Y2 (obj)
  • Generic-Function (setf WIDTH) (value obj)
    Sets/Returns the width of the object, as an `INTEGER`.
  • Generic-Function (setf HEIGHT) (value obj)
    Sets/Returns the height of the object, as an `INTEGER`.
  • Generic-Function (setf X) (value obj)
    Sets/Returns the `X` coordinate of the object, as an `INTEGER`.
  • Generic-Function (setf Y) (value obj)
    Sets/Returns the `Y` coordinate of the object, as an `INTEGER`.
  • Generic-Function (setf X2) (value obj)
    Returns `(+ X WIDTH)` of the object, as an `INTEGER`. Sets the WIDTH of the object to `(- X2 X)`
  • Generic-Function (setf Y2) (value obj)
    Returns `(+ Y HEIGHT)` of the object, as an `INTEGER`. Sets the HEIGHT of the object to `(- Y2 Y)`
  • Generic-Function DRAW-FONT (&key font surface)
    Blit the cached [SURFACE](#surface) in [font](#FONT) to the destination `SURFACE`. The cached surface is created during a previous call to any of the DRAW-STRING* functions. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_, and _LISPBUILDER-SDL-TTF_
  • Generic-Function DRAW-FONT-AT (position &key font surface)
    See [DRAW-FONT](#draw-font). The cached surface is rendered at `POSITION` [POINT](#point). ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_, and _LISPBUILDER-SDL-TTF_
  • Generic-Function DRAW-FONT-AT-* (x y &key font surface)
    See [DRAW-FONT](#draw-font). The cached surface is rendered at poisition `X` and `Y`. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_, and _LISPBUILDER-SDL-TTF_
  • Generic-Function COLOR= (color1 color2)
    Returns `T` if the `RGB`<->`RGB` or `RGBA`<->`RGBA` color components in `COLOR1` and `COLOR2` match. Returns `NIL` otherwise.
  • Generic-Function ANY-COLOR-BUT-THIS (color)
    Returns a new color that is different to `COLOR`.
  • Generic-Function LOAD-IMAGE (source &key color-key alpha image-type force free-rwops color-key-at)
    Creates and returns a new `SURFACE` from the image in `SOURCE`, or returns `NIL` if `SOURCE` does not contain a valid image or the image type cannot be determined. The *magic number* if present is be used to determine the image type. To load an image when the *magic number* is unavailable (image formats such as `TGA` do not contain a *magic number*), specify the image type using `:IMAGE-TYPE`. All non-magicable image formats, such as `TGA`, must be specified using `IMAGE-TYPE`. To load a TGA image use `:IMAGE-TYPE :TGA` ##### Parameters * `SOURCE` is an image. * `COLOR-KEY` sets the color key, and turns on color keying. * 'COLOR-KEY-AT' uses the pixel color at `POINT` x/y as the color key, and turns on color keying. * `ALPHA` sets the transparency level for the surface, and turns on alpha blending. Must be in the range 0-255, where 255 is opaque and 0 is transparent. * `IMAGE-TYPE` specifies the image type. May be `:BMP`, `:GIF`, `:JPG`, `:LBM`, `:PCX`, `:PNG`, `:PNM`, `:TGA`, `:TIF`, `:XCF`, `:XPM` or `:XV`. The image type is determined using the *magic number* when present in the image if `NIL`. If the *magic number* is available and does not match `IMAGE-TYPE`, then `IMAGE-TYPE` is ignored. * `FORCE` when `T` will ignore any *magic number* present in the image and load an image as `:IMAGE-TYPE`. Images of type `TGA` must be loaded using `:FORCE T`. * `FREE-RWOPS` will free a RWOPS passed as a parameter in `SOURCE`. Default is `T` ##### Example * To load a `BMP` image using the *magic number* (LOAD-IMAGE "image.bmp") * To load a `TGA` image (LOAD-IMAGE "image.tga" :IMAGE-TYPE :TGA) * Try to load a `BMP` image as `TGA` (LOAD-IMAGE "image.bmp" :IMAGE-TYPE :BMP :FORCE T) ##### Packages * Also supported in _LISPBUILDER-SDL-IMAGE_ * _LISPBUILDER-SDL_ only supports `BMP` images. Any alpha channel present in the source image is ignored. The new `SURFACE` is created as an `RGB` surface, not `RGBA`. * _LISPBUILDER-SDL-IMAGE_ supports the following image formats, `BMP`, `GIF`, `JPG`, `LBM`, `PCX`, `PNG`, `PNM`, `TIF`, `XCF`, `XPM`, `XV`. `BMP` and `TGA`. Alpha channels are supported. The new `SURFACE` is created as `RGB` or `RGBA` as appropriate. * `:IMAGE-TYPE` and `:FORCE` are ignored for _LISPBUILDER-SDL_.
  • Generic-Function IMAGE-P (source image-type)
    Returns `T` when the image type in `SOURCE` is of `IMAGE-TYPE`. Returns `NIL` otherwise. Attempts to detect the image type using the *magic number* contained in the image if one is available. `NIL` is always returned for images of type `TGA` as a `TGA` image does not contain a *magic number*. `IMAGE-TYPE` must be one of `:BMP`, `:GIF`, `:JPG`, `:LBM`, `:PCX`, `:PNG`, `:PNM`, `:TIF`, `:XCF`, `:XPM` or `:XV`. ##### Example (RWOPS-P SOURCE :IMAGE-TYPE :BMP) (IMAGE-P "image.bmp" :IMAGE-TYPE :BMP) ##### Packages * Supported in _LISPBUILDER-SDL-IMAGE_
  • Generic-Function IMAGE-TYPE-OF (source)
    Returns the type of image in source `SOURCE`. Attempts to detect the image type using the *magic number* contained in the image if one is available. Returns one of `:BMP`, `:GIF`, `:JPG`, `:LBM`, `:PCX`, `:PNG`, `:PNM`, `:TIF`, `:XCF`, `:XPM` or `:XV`, if the image type can be determined. Returns `NIL` if the image cannot be determined (The *magic number* is not supported or the *magic number* is not found). `NIL` is always returned for images of type `TGA` as a `TGA` image does not contain a *magic number*. ##### Example (IMAGE-TYPE-OF SOURCE) (IMAGE-TYPE-OF "image.bmp") ##### Packages * Supported in _LISPBUILDER-SDL-IMAGE_
  • Generic-Function ALPHA-ENABLED-P (surface)
  • Generic-Function (setf ALPHA-ENABLED-P) (value surface)
    Manage alpha blending for a `SURFACE`. Returns `T` when alpha blending is enabled for `SURFACE`, and `NIL` when disabled. Enable surface alpha blending for when `T`. Disable surface alpha blending when `NIL`. A `SURFACE` need not have a pixel alpha component (RGBA) to use surface alpha blending.
  • Generic-Function ALPHA (surface)
  • Generic-Function (setf ALPHA) (value surface)
    Manages per-surface alpha. Returns the per-surface alpha value. 0 is transparent, and 255 is opaque. Sets the per-surface alpha value. 0 is transparent, and 255 is opaque. *Note*: The per-surface alpha value of 128 is considered a special case and is optimised, so it's much faster than other per-surface values. *Note*: A surface need not have an alpha channel to use alpha blending. *Note*: When blitting, the presence or absence of [SDL-SRC-ALPHA](#sdl-src-alpha) is relevant only on the source surface, not the destination. *Note*: Per-pixel and per-surface alpha cannot be combined; the per-pixel alpha is always used if available.
  • Generic-Function COLOR-KEY-ENABLED-P (surface)
  • Generic-Function (setf COLOR-KEY-ENABLED-P) (value surface)
    Manages colorkeying for a `SURFACE`. Returns `T` when color keying is enabled, and `NIL` when color keying is disabled. Enables color keying when `T`. Disable color keying when `NIL`
  • Generic-Function COLOR-KEY (surface)
  • Generic-Function (setf COLOR-KEY) (value surface)
    Manages the colorkey for a `SURFACE`. Returns the current color key (transparent pixel) as [COLOR](#color). Set the (RGB) [COLOR](#color) key (transparent pixel).
  • Generic-Function PIXEL-ALPHA-ENABLED-P (surface)
    Returns `T` if a pixel alpha component (RGBA) is available, or `NIL` if unavailable (RGB). *Note*: The pixel alpha component differs from the surface alpha component which is retrieved using [ALPHA-ENABLED-P](#alpha-enabled-p).
  • Generic-Function RLE-ACCEL-ENABLED-P (surface)
  • Generic-Function (setf RLE-ACCEL-ENABLED-P) (value surface)
    Manages RLE acceleration for a `SURFACE`. Returns `T` if RLE acceleration is enabled, and `NIL` when RLE is disabled. Enables RLE blit acceleration when `T`, disables RLE acceleration when `NIL`. RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i.e., pixels that match the key color).
  • Generic-Function CLIP-RECT (surface)
  • Generic-Function (setf CLIP-RECT) (value surface)
    Manages the clipping `RECTANGLE` for a`SURFACE`. Returns the clipping `RECTANGLE` for `SURFACE`. Sets the clipping [RECTANGLE](#rectangle) for the `SURFACE`. Removes the clipping rectangle when `NIL`. When `SURFACE` is the destination of a blit, only the area within the clipping rectangle is drawn into.
  • Generic-Function INITIALISE-FONT (font-definition)
    Returns a new [SDL-BITMAP-FONT](#sdl-bitmap-font) initialized from `FONT-DEFINITION` data, or `NIL` if the font cannot be created. `FONT-DEFINITION` must be one of the following built-in fonts: `*FONT-10X20*`, `*FONT-5X7*`, `*FONT-5X8*`, `*FONT-6X10*`, `*FONT-6X12*`, `*FONT-6X13*`, `*FONT-6X13B*`, `*FONT-6X13O*`, `*FONT-6X9*`, `*FONT-7X13*`, `*FONT-7X13B*`, `*FONT-7X13O*`, `*FONT-7X14*`, `*FONT-7X14B*`, `*FONT-8X13*`, `*FONT-8X13B*`, `*FONT-8X13O*`, `*FONT-8X8*`, `*FONT-9X15*`, `*FONT-9X15B*`, `*FONT-9X18*` OR `*FONT-9X18B*`. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Generic-Function SET-DEFAULT-FONT (font)
    Sets the font `FONT` as the default font to be used for subsequent font rendering or drawing operations. Binds the symbol `*DEFAULT-FONT*` to font. Functions that take a `FONT` argument use `*DEFAULT-FONT*` unless otherwise specified. Returns a new `FONT`, or `NIL` if unsuccessful.
  • Generic-Function CHAR-WIDTH (font)
  • Generic-Function CHAR-HEIGHT (font)
  • Generic-Function FREE-CACHED-SURFACE (font)
  • Generic-Function WINDOW (width height &key bpp flags sw hw fullscreen async-blit any-format palette double-buffer opengl resizable no-frame title-caption icon-caption fps position video-driver audio-driver opengl-attributes event-filter)
    Creates a new SDL window of pixel width `WIDTH` and height `HEIGHT` using SDL_SetVideoMode. Use `SDL-SW-SURFACE` if you plan on doing per-pixel manipulations, or blit surfaces with alpha channels, and require a high framerate. When you use hardware surfaces like `SDL-HW-SURFACE`, SDL copies the surfaces from video memory to system memory when you lock them, and back when you unlock them. This can cause a major performance hit. (Be aware that you may request a hardware surface, but receive a software surface. Many platforms can only provide a hardware surface when using `SDL-FULL-SCREEN.) `SDL-HW-SURFACE` is best used when the surfaces you'll be blitting can also be stored in video memory. *Note:* To control the position on the screen when creating a windowed surface, set the environment variables `SDL_VIDEO_CENTERED=center` or `SDL_VIDEO_WINDOW_POS=x,y`. These may be set using [SDL-PUT-ENV](#sdl-put-env). ##### Parameters * `WIDTH` the pixel width of the window, of type `INTEGER`. * `HEIGHT` the pixel height of the window, of type `INTEGER`. If `WIDTH` and `HEIGHT` are both `0`, then the width and height of the current video mode is used (or the desktop mode, if no mode has been set). * `BPP` the number of bits per pixel. Defaults to `0` which is the current display bits per pixel. *Note:* A `BPP` of `24` uses the packed representation of 3 bytes/pixel. For the more common 4 bytes/pixel mode, use a `BPP` of 32. * `FLAGS` is a bitmasked logior of one or more of the following; [SDL-SW-SURFACE](#sdl-sw-surface), [SDL-HW-SURFACE](#sdl-hw-surface), [SDL-ASYNC-BLIT](#sdl-async-blit), [SDL-ANY-FORMAT](#sdl-any-format), [SDL-HW-PALETTE](#sdl-hw-palette), [SDL-DOUBLEBUF](#sdl-doublebuf), [SDL-FULLSCREEN](#sdl-fullscreen), [SDL-OPENGL](#sdl-opengl), [SDL-RESIZABLE](#sdl-resizable) and [SDL-NO-FRAME](#SDL-NO-FRAME). * `TITLE-CAPTION` is the title that appears in the Window title bar, of type `STRING`. * `ICON-CAPTION` is the title that appears when the Window is minimized, of type `STRING`. * `POSITION` is the x and y display positions of the window. When `NIL` will use the previous x and y positions, when `T` will center the window on the screen, when `(VECTOR x y)` will set the window to the specified x and y positions. ##### Returns * Returns a new `DISPLAY-SURFACE` if successful, `NIL` if unsuccessful. Whatever flags SDL_SetVideoMode could satisfy are set in the flags member of `SURFACE`. The `SURFACE` returned is freed by SDL and should never be freed by the caller. This rule includes consecutive calls to `WINDOW` (i.e. upon resize or resolution change) - any existing surface will be released automatically by SDL. ##### Example (WINDOW 320 240 :TITLE-CAPTION "Random-Rects" :ICON-CAPTION "Random-Rects" :FLAGS '(SDL-DOUBLEBUF SDL-FULLSCREEN))
  • Generic-Function RESIZE-WINDOW (width height &key flags sw hw fullscreen async-blit any-format palette double-buffer opengl resizable no-frame title-caption icon-caption bpp opengl-attributes)
    Resizes the current display to the specified `WIDTH` and `HEIGHT`. The pixel depth, title and icon captions, and surface flags will remain the same
  • Generic-Function FP (foreign-object)
    Returns the foreign pointer in FOREIGN-OBJECT
  • Generic-Function FREE (foreign-object)
    The general explicit cleanup method for the FOREIGN-OBJECT wrapper class. Objects that subclass FOREIGN-OBJECT should specify an :AFTER method on FREE to clean up any additional fields, if necessary.
  • Generic-Function (setf GC-P) (value foreign-object)
    Turns on garbage collection for the FOREIGN-OBJECT when T, or turns off garbage collection when NIL.
  • Method FREE ((self foreign-object))
  • Method (setf GC-P) (value (self foreign-object))
  • Function RANDOM+1 (rnd)
    Returns a random number in the range 0 > num <= rnd.
  • Function TO-RADIAN (degree)
    Converts degrees to radians.
  • Function TO-DEGREE (radian)
    Converts radians to degrees.
  • Function CREATE-LIST-IF-NOT (var)
    If `VAR` is not already a list, then returns `(LIST VAR)`.
  • Macro CAST (type value)
    Coerces the value `VALUE` to the type `TYPE`.
  • Macro CAST-TO-INT (value)
    Casts the value `VALUE` to a `FIXNUM`.
  • Macro CAST-ALL-TO-INT (&rest values)
    Casts the values in `REST` to `FIXNUM`s.
  • Macro ALL-INTEGERS? (&rest values)
    Returns `T` if all values are `INTEGERS`.
  • Macro CHECK-TYPES (type &rest rest)
    Performs `CHECK-TYPE` on items in rest.
  • Function CREATE-PATH (filename &optional path)
    Creates a new path from `FILENAME` and `PATH`.
  • Function WITHIN-RANGE (p1 p2 distance)
    Returns true `T`, if the distance between the `POINT`s `P1` `P2` is <= the distance `DISTANCE`.
  • Function WITHIN-RANGE-* (x1 y1 x2 y2 distance)
    Returns true `T`, if the distance between the coordinates `X1`, `Y1` and `X2`, `Y2` is <= the distance `DISTANCE`.
  • Function DISTANCE (p1 p2)
    Returns the distance between the `POINT`s `P1` and `P2`.
  • Function DISTANCE-* (x1 y1 x2 y2)
    Returns the distance between the coordinates `X1`, `Y1` and `X2`, `Y2`.
  • Macro WITH-INIT (flags &body body)
    `WITH-INIT` is a convenience macro that will attempt to initialise the SDL library and SDL subsystems prior to executing the forms in `BODY`. Upon exit `WITH-INIT` will uninitialize the SDL library and SDL subsystems. The lispbuilder-sdl initialization routines are somewhat complicated by the fact that a Lisp development environment will load a foreign library once but then initialise and uninitialise the library multiple times. A C/C++ development environment will open and then close a library after each execution, freeing all resources left hanging by incomplete or buggy uninitialise functions. C libraries may therefore frequently core dump in a Lisp environment when resources are not feed properly prior to the library being reinitialized. LISPBUILDER-SDL provides functionality affording the programmer a finer granularity of control of the initialisation/uninitialisation of foreign libraries. The fuctions that provide these capabilities are as follows: * [INIT-SUBSYSTEMS](#init-subsystems) * [QUIT-SUBSYSTEMS](#quit-subsystems) * [INIT-SDL](#init-sdl) * [QUIT-SDL](#quit-sdl) * [LIST-SUBSYSTEMS](#list-subsystems) * [RETURN-SUBSYSTEMS-OF-STATUS](#return-subsystems-of-status) ##### Defaults `WITH-INIT` will initialize the SDL subsystem and additional subsystems in `:FLAGS` if specified. If `:FLAGS` is not specified, then initializes the subsystems specified by [INITIALIZE-SUBSYSTEMS-ON-STARTUP](#initialize-subsystems-on-startup). `WITH-INIT` will uninitialize the SDL subsystem and additional subsystems in `:FLAGS` if specified. ###### Initialisation/Uninitialisation of the SDL library The SDL library is initialized only: * If the library is not yet already initialized. The SDL library is uninitialized only: * When [*QUIT-ON-EXIT*](#*quit-on-exit*) is `T`. ###### Initialisation/Uninitialisation of external libraries Hooks are provided to allow external libraries to be initialized or uninitialised automatically following the initialisation or uninitialisation of the SDL library. To initialise an external library, push a function that initialises the external library onto `*EXTERNAL-INIT-SUBSYSTEMS-ON-STARTUP*`. The function must take no arguments. For example: (defun init-ttf () (if (is-init) t (sdl-ttf-cffi::ttf-init))) (pushnew 'init-ttf sdl:*external-init-subsystems-on-startup*) To uninitialise an external library, push a function that uninitialises the external library onto `*EXTERNAL-QUIT-SUBSYSTEMS-ON-EXIT*`. The function must take no arguments. For example: (defun quit-ttf () (if (is-init) (sdl-ttf-cffi::ttf-quit))) (pushnew 'quit-ttf sdl:*external-quit-subsystems-on-exit*) ##### Parameters * `FLAGS` may be one or more of: `SDL-INIT-VIDEO`, `SDL-INIT-CDROM`, `SDL-INIT-AUDIO`, `SDL-INIT-JOYSTICK`, and `SDL-INIT-NOPARACHUTE`. *Note*: When `FLAGS` is set by `WITH-INIT`, subsequent calls to [INITIALIZE-SUBSYSTEMS-ON-STARTUP](#initialize-subsystems-on-startup) and [QUIT-SUBSYSTEMS-ON-EXIT](#quit-subsystems-on-exit) are ignored. `WITH-INIT` will only initialize and uninitialize the subsytems specified in `FLAGS`. ##### Example (with-init (SDL-INIT-VIDEO SDL-INIT-CDROM SDL-INIT-AUDIO) ....) (with-init () (INITIALIZE-SUBSYSTEMS-ON-STARTUP SDL-INIT-VIDEO SDL-INIT-CDROM SDL-INIT-AUDIO) (QUIT-SUBSYSTEMS-ON-EXIT SDL-INIT-VIDEO SDL-INIT-CDROM SDL-INIT-AUDIO) ....)
  • Function QUIT-ON-EXIT-P
    Returns `T` if the SDL library will be uninitialised in a call to [QUIT-SDL](#quit-sdl), or [WITH-INIT](#with-init). Returns `NIL` otherwise.
  • Function INITIALIZE-SUBSYSTEMS-ON-STARTUP (&rest flags)
    Sets the SDL subsystems that must be initialized in calls to [INIT-SUBSYSTEMS](#init-subsystems). ##### Parameters * `FLAGS` may be one or more of: `SDL-INIT-VIDEO`, `SDL-INIT-CDROM`, `SDL-INIT-AUDIO`, `SDL-INIT-JOYSTICK` and `SDL-INIT-NOPARACHUTE`, or `NIL` to not initialize any subsystems. ##### Returns * Returns an INTEGER bitmask of the SDL subsystems in `FLAGS`. ##### Example (INITIALIZE-SUBSYSTEMS-ON-STARTUP SDL:SDL-INIT-VIDEO SDL:SDL-INIT-CDROM)
  • Function QUIT-SUBSYSTEMS-ON-EXIT (&rest flags)
    Sets one or more SDL subsystems that must *not* be uninitialized in calls to [QUIT-SUBSYSTEMS](#quit-subsystems). ##### Parameters * `FLAGS` may be one or more of: `SDL-INIT-VIDEO`, `SDL-INIT-CDROM`, `SDL-INIT-AUDIO`, `SDL-INIT-JOYSTICK` and `SDL-INIT-NOPARACHUTE` , or `NIL` to not uninitialize any subsystems. ##### Returns * Returns an INTEGER bitmask of the SDL subsystems in `FLAGS`. ##### Example (QUIT-SUBSYSTEMS-ON-EXIT SDL:SDL-INIT-VIDEO SDL:SDL-INIT-CDROM)
  • Function LIST-SUBSYSTEMS (flag)
    Returns a list of SDL subsystems that are specified in `FLAGS`. `FLAGS` is an `INTEGER` bitmask containing the logior of zero or more of: `SDL-INIT-VIDEO`, `SDL-INIT-CDROM`, `SDL-INIT-AUDIO`, `SDL-INIT-JOYSTICK` and `SDL-INIT-NOPARACHUTE`.
  • Function RETURN-SUBSYSTEMS-OF-STATUS (flags status)
    Returns the `STATUS` of the the specified SDL subsystems in `FLAGS`. ##### Parameters * `FLAGS` must contain one or more of: `SDL-INIT-VIDEO`, `SDL-INIT-CDROM`, `SDL-INIT-AUDIO`, `SDL-INIT-JOYSTICK`. * `STATUS` when `T` returns the specified initialized subsystems. `STATUS` when `NIL`, returns the specified uninitialised subsystems.
  • Function INIT-SUBSYSTEMS (subsystems &optional force)
    Initializes only the SDL subsystems specified in `FLAGS` that are not already initialized. `subsystems` is a list containing the one or more of: `SDL-INIT-VIDEO`, `SDL-INIT-CDROM`, `SDL-INIT-AUDIO`, `SDL-INIT-JOYSTICK`, and `SDL-INIT-NOPARACHUTE`. `INIT-SUBSYSTEMS` can be called only after SDL is succesfully initialized by [INIT-SDL](#init-sdl).
  • Function QUIT-SUBSYSTEMS (subsystems &optional force)
    Uninitializes only the SDL subsystems specified in the `FLAGS` that are already initialized. `subsystems` is a list containing the one or more of: `SDL-INIT-VIDEO`, `SDL-INIT-CDROM`, `SDL-INIT-AUDIO`, `SDL-INIT-JOYSTICK` and `SDL-INIT-NOPARACHUTE`. `QUIT-SUBSYSTEMS` can be called only after SDL is successfully intialized using [INIT-SDL](#init-sdl).
  • Function INITIALIZED-SUBSYSTEMS-P (&optional subsystem)
    Returns a list of the initialized SDL subsystems.
  • Function INIT-SDL (&key flags force video cdrom audio joystick no-parachute)
    Initalizes the SDL library.
  • Function QUIT-SDL (&key flags force video cdrom audio joystick no-parachute)
  • Function SDL-INIT-P
  • Function VIDEO-INIT-P
  • Function AUDIO-INIT-P
  • Function JOYSTICK-INIT-P
  • Function CDROM-INIT-P
  • Function INIT-VIDEO (&optional force)
  • Function INIT-AUDIO (&optional force)
  • Function INIT-CDROM (&optional force)
  • Function QUIT-VIDEO (&optional force)
  • Function QUIT-AUDIO (&optional force)
  • Function QUIT-CDROM (&optional force)
  • Function LOAD-LIBRARY
  • Variable MOUSE-LEFT
    lispbuilder-sdl-cffi::sdl-button-left
  • Variable MOUSE-MIDDLE
    lispbuilder-sdl-cffi::sdl-button-middle
  • Variable MOUSE-RIGHT
    lispbuilder-sdl-cffi::sdl-button-right
  • Variable MOUSE-WHEEL-UP
    lispbuilder-sdl-cffi::sdl-button-wheel-up
  • Variable MOUSE-WHEEL-DOWN
    lispbuilder-sdl-cffi::sdl-button-wheel-down
  • Variable MOUSE-X1
    lispbuilder-sdl-cffi::sdl-button-x1
  • Variable MOUSE-X2
    lispbuilder-sdl-cffi::sdl-button-x2
  • Function MOUSE-X
    Returns the absolute mouse x curser position.
  • Function MOUSE-Y
    Returns the absolute mouse y curser position.
  • Function MOUSE-POSITION
    Returns the absolute mouse x and y curser position as a `VECTOR`.
  • Function MOUSE-RELATIVE-POSITION
    Returns the relative mouse x and y curser position since the last call to `MOUSE-RELATIVE-POSITION`.
  • Function MOUSE-BUTTONS (&optional (button (get-mouse-button)))
    Returns a list of the currently depressed mouse buttons.
  • Function MOUSE-LEFT-P (&optional (button (get-mouse-button)))
    Returns `T` when the left mouse button is depressed.
  • Function MOUSE-RIGHT-P (&optional (button (get-mouse-button)))
    Returns `T` when the right mouse button is depressed.
  • Function MOUSE-MIDDLE-P (&optional (button (get-mouse-button)))
    Returns `T` when the middle mouse button is depressed.
  • Function MOUSE-WHEEL-UP-P (&optional (button (get-mouse-button)))
    Returns `T` when the mouse wheel has been moved up.
  • Function MOUSE-WHEEL-DOWN-P (&optional (button (get-mouse-button)))
    Returns `T` when the mouse wheel has been moved down.
  • Function MOUSE-X1-P (&optional (button (get-mouse-button)))
    Returns `T` when the X1 mouse button is depressed.
  • Function MOUSE-X2-P (&optional (button (get-mouse-button)))
    Returns `T` when the X2 mouse button is depressed.
  • Function INITIALISE-INPUT-UTIL
    Initialises the input util system. This just creates the data structure that input status information is stored in, and maintains a global variable to track initialisation status. ##### Parameters ##### Returns
  • Function UPDATE-INPUT-UTIL (time)
    This must be called once for each time period you are updating the application, in order to update key, mouse button & joystick information. ##### Parameters * `TIME` is the time in seconds this update represents ##### Returns
  • Function QUIT-INPUT-UTIL
    This is called when you quit your app to free up input information data ##### Parameters ##### Returns
  • Function HANDLE-KEY-UP (key)
    You must call this when a key up event occurs ##### Parameters * `KEY` is the SDL key definition for the key that is now up (for example :SDL-KEY-ESCAPE) ##### Returns
  • Function HANDLE-KEY-DOWN (key)
    You must call this when a key up event occurs ##### Parameters * `KEY` is the SDL key definition for the key that is now down (for example :SDL-KEY-ESCAPE) ##### Returns
  • Function KEY-HELD-P (key)
    Returns the time that the key has been held for, which means it has either just been pressed, or it has been pressed and held for a while. ##### Parameters * `KEY` is the SDL key definition (for example :SDL-KEY-ESCAPE) ##### Returns `T` if the key is held
  • Function KEY-PRESSED-P (key)
    Returns `T` if a key has just been pressed ##### Parameters * `KEY` is the SDL key definition (for example :SDL-KEY-ESCAPE) ##### Returns `T` if the key was just pressed
  • Function KEY-RELEASED-P (key)
    Returns `T` if a key has just been released ##### Parameters * `KEY` is the SDL key definition (for example :SDL-KEY-ESCAPE) ##### Returns `T` if the key was just pressed
  • Function KEY-TIME-IN-CURRENT-STATE (key)
    Returns time a key has been in current state ##### Parameters * `KEY` is the SDL key definition (for example :SDL-KEY-ESCAPE) ##### Returns Time key is in current state
  • Function KEY-TIME-IN-PREVIOUS-STATE (key)
    Returns time key was in a previous state ##### Parameters * `KEY` is the SDL key definition (for example :SDL-KEY-ESCAPE) ##### Returns Time key was in previous state
  • Function HANDLE-MOUSE-UP (button)
    You must call this when a mouse button up event occurs ##### Parameters * `BUTTON` is the SDL mouse button definition for the button that is now up. This can be one of MOUSE-LEFT, MOUSE-MIDDLE, MOUSE-RIGHT, MOUSE-WHEEL-UP, MOUSE-WHEEL-DOWN, MOUSE-X1, or MOUSE-X2. ##### Returns
  • Function HANDLE-MOUSE-DOWN (button)
    You must call this when a mouse button down event occurs ##### Parameters * `BUTTON` is the SDL mouse button definition for the button that is now down. This can be one of MOUSE-LEFT, MOUSE-MIDDLE, MOUSE-RIGHT, MOUSE-WHEEL-UP, MOUSE-WHEEL-DOWN, MOUSE-X1, or MOUSE-X2. ##### Returns
  • Function MOUSE-HELD-P (button)
    Returns the time that the mouse `BUTTON` has been held, which means the mouse button has either just been pressed, or it has been pressed and held for a while. ##### Parameters * `BUTTON` can be one of MOUSE-LEFT, MOUSE-MIDDLE, MOUSE-RIGHT, MOUSE-WHEEL-UP, MOUSE-WHEEL-DOWN, MOUSE-X1, or MOUSE-X2. ##### Returns `T` if the mouse button is held
  • Function MOUSE-PRESSED-P (button)
    Returns `T` if the mouse `BUTTON` has just been pressed ##### Parameters * `BUTTON` can be one of MOUSE-LEFT, MOUSE-MIDDLE, MOUSE-RIGHT, MOUSE-WHEEL-UP, MOUSE-WHEEL-DOWN, MOUSE-X1, or MOUSE-X2. ##### Returns `T` if the mouse was just pressed
  • Function MOUSE-RELEASED-P (button)
    Returns `T` if the mouse `BUTTON` has just been released ##### Parameters * `BUTTON` can be one of MOUSE-LEFT, MOUSE-MIDDLE, MOUSE-RIGHT, MOUSE-WHEEL-UP, MOUSE-WHEEL-DOWN, MOUSE-X1, or MOUSE-X2. ##### Returns `T` if the mouse was just pressed
  • Function MOUSE-TIME-IN-CURRENT-STATE (button)
    Returns time a mouse `BUTTON` has been in current state ##### Parameters * `BUTTON` can be one of MOUSE-LEFT, MOUSE-MIDDLE, MOUSE-RIGHT, MOUSE-WHEEL-UP, MOUSE-WHEEL-DOWN, MOUSE-X1, or MOUSE-X2. ##### Returns Time mouse is in current state
  • Function MOUSE-TIME-IN-PREVIOUS-STATE (button)
    Returns time mouse button was in a previous state ##### Parameters * `BUTTON` can be one of MOUSE-LEFT, MOUSE-MIDDLE, MOUSE-RIGHT, MOUSE-WHEEL-UP, MOUSE-WHEEL-DOWN, MOUSE-X1, or MOUSE-X2. ##### Returns Time mouse was in previous state
  • Class FPS-FIXED  (FPS-MANAGER)
    TARGET-FRAME-RATE   Reader: TARGET-FRAME-RATE
    FRAME-COUNT   Accessor: FRAME-COUNT
    RATE-TICKS   Accessor: RATE-TICKS
    DELAY-TICKS   Accessor: DELAY-TICKS
    UPPER-LIMIT   Accessor: UPPER-LIMIT
    LOWER-LIMIT   Accessor: LOWER-LIMIT
    MAX-DT
  • Class FPS-TIMESTEP  (FPS-MANAGER)
    FPS-TICKS   Accessor: FPS-TICKS
    DT   Reader: _DT_
    MAX-DT
    ACCUMULATOR   Accessor: ACCUMULATOR
  • Class FPS-MIXED  (FPS-TIMESTEP, FPS-FIXED)
    FPS-TICKS   Accessor: FPS-TICKS
    DT   Reader: _DT_
    MAX-DT
    ACCUMULATOR   Accessor: ACCUMULATOR
  • Class FPS-UNLOCKED  (FPS-TIMESTEP)
    PHYSICS-HOOK-FUNCTION   Accessor: PS-FN
  • Function (setf FRAME-RATE) (rate &optional (fpsmanager *default-fpsmanager*))
  • Function FRAME-RATE (&optional (fpsmanager *default-fpsmanager*))
    Manage the target frame rate for the game loop. `RATE` > `0` will lock the game loop to the specified frame rate, and calculate the average frame rate over a number of frames. `RATE` = `0` will unlock the frame rate, and calculate the average frame rate over a number of frames. `RATE` < `0` will unlock the frame rate. The average frane rate is not calculated. See [WITH-EVENTS](#with-events), and [AVERAGE-FPS](#average-fps).
  • Function TIME-SCALE (&optional (fpsmanager *default-fpsmanager*))
  • Function FRAME-TIME (&optional (fpsmanager *default-fpsmanager*))
    Returns how long current frame time is
  • Function AVERAGE-FPS (&optional (fpsmanager *default-fpsmanager*))
    Returns the average frame rate of the event loop calculated over a sliding window of 'n' frames.
  • Function DT (&optional (fpsmanager *default-fpsmanager*))
  • Function MAX-DT (&optional (fpsmanager *default-fpsmanager*))
  • Function TICKS (&optional (fpsmanager *default-fpsmanager*))
  • Function PHYSICS-HOOK-P (&optional (fpsmanager *default-fpsmanager*))
  • Function SET-PHYSICS-HOOK (fn &optional (fpsmanager *default-fpsmanager*))
  • Function SYSTEM-TICKS
  • Macro WITH-TIMESTEP (&body body)
  • Macro WITH-FRAME-RATE (&body body)
  • Function GET-EVENT-TYPE (sdl-event)
  • Function EVENT-TYPE (sdl-event)
  • Function EVENT= (sdl-event event-type &optional event-type-end)
    Returns `T` if `SDL-EVENT` is of `EVENT-TYPE`. `EVENT-TYPE` must be one of :NO-EVENT, :ACTIVE-EVENT, :KEY-DOWN-EVENT, :KEY-UP-EVENT, :MOUSE-MOTION-EVENT, :MOUSE-BUTTON-DOWN-EVENT, :MOUSE-BUTTON-UP-EVENT, :JOY-AXIS-MOTION-EVENT, :JOY-BALL-MOTION-EVENT, :JOY-HAT-MOTION-EVENT, :JOY-BUTTON-DOWN-EVENT, :JOY-BUTTON-UP-EVENT, :QUIT-EVENT, :SYS-WM-EVENT, :VIDEO-RESIZE-EVENT, :VIDEO-EXPOSE-EVENT, :USER-EVENT.
  • Function ACTIVE-EVENT-P (event)
  • Function KEY-DOWN-EVENT-P (event)
  • Function KEY-UP-EVENT-P (event)
  • Function MOUSE-MOTION-EVENT-P (event)
  • Function MOUSE-BUTTON-DOWN-EVENT-P (event)
  • Function MOUSE-BUTTON-UP-EVENT-P (event)
  • Function JOY-AXIS-MOTION-EVENT-P (event)
  • Function JOY-BUTTON-DOWN-EVENT-P (event)
  • Function JOY-BUTTON-UP-EVENT-P (event)
  • Function JOY-HAT-MOTION-EVENT-P (event)
  • Function JOY-BALL-MOTION-EVENT-P (event)
  • Function VIDEO-RESIZE-EVENT-P (event)
  • Function VIDEO-EXPOSE-EVENT-P (event)
  • Function SYS-WM-EVENT-P (event)
  • Function QUIT-EVENT-P (event)
  • Function USER-EVENT-P (event)
  • Function IDLE-EVENT-P (event)
  • Macro WITH-ACTIVE-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-KEY-DOWN-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-KEY-UP-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-MOUSE-MOTION-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-MOUSE-BUTTON-DOWN-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-MOUSE-BUTTON-UP-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-JOY-AXIS-MOTION-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-JOY-BUTTON-DOWN-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-JOY-BUTTON-UP-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-JOY-HAT-MOTION-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-JOY-BALL-MOTION-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-VIDEO-RESIZE-EVENT ((&rest params) event-fp &body body)
  • Macro WITH-USER-EVENT ((&rest params) event-fp &body body)
  • Function SET-EVENT-FILTER (event event-filter-hook)
    Sets the callback function that handles the event filter. Return `NIL` if the event is to be removed from the event queue. Return `T` if the event is to remain on the event queue. `EVENT-FILTER-HOOK` must use the following template; #'(LAMBDA (SDL-EVENT) t) For example; (setf (SDL:SET-EVENT-FILTER :QUIT-EVENT #(LAMBDA (EVENT) t))
  • Function REMOVE-EVENT-FILTER (sdl-event)
    Removes any existing event filters. that were set with `SET-EVENT-FILTERS`
  • Function REMOVE-ALL-EVENT-FILTERS
    Removes any existing event filters. that were set with `SET-EVENT-FILTERS`
  • Function ENABLE-EVENT-FILTERS
    Enables event filters.
  • Function DISABLE-EVENT-FILTERS
    Disables event filters.
  • Function PUMP-EVENTS
    Pumps the event loop, gathering events from the input devices. `PUMP-EVENTS` gathers all the pending input information from devices and places it on the event queue. Without calls to SDL_PumpEvents no events would ever be placed on the queue. Often the need for calls to SDL_PumpEvents is hidden from the user since [SDL-POLL-EVENT](#sdl-poll-event) and [SDL-WAIT-EVENT](#sdl-wait-event) implicitly call `PUMP-EVENTS`. However, if you are not polling or waiting for events (e.g. you are filtering them), then you must call `PUMP-EVENTS` to force an event queue update. Note: Only call this function in the thread that set the video mode.
  • Function NEW-EVENT (&optional (event-type :no-event))
    Creates a new `SDL_Event` and of `EVENT-TYPE`. An event of type `:NO-EVENT` is created if the `OPTIONAL` event type `EVENT-TYPE` is unspecified. ##### Example (NEW-EVENT :QUIT-EVENT)
  • Function FREE-EVENT (event*)
  • Function GET-EVENT (event)
  • Function PUSH-QUIT-EVENT
    Pushes a new `SDL_Event` of type `:QUIT-EVENT` onto the event queue.
  • Function QUIT-REQUESTED-P
    Returns the number of quit-events on the queue or `NIL` otherwise.
  • Function PUSH-USER-EVENT (&key (code 0) (data1 nil) (data2 nil))
    Pushes a new `SDL_Event` of type `:USER-EVENT` onto the event queue.
  • Macro WITH-EVENTS ((&optional (type :poll)) &body events)
    `WITH-EVENTS` is a convenience macro for managing the main game loop. It processes incoming SDL events and limits the game loop to the specified number of frames per second. Both the [SDL-POLL-EVENT](#sdl-poll-event) and [SDL-WAIT-EVENT](#sdl-wait-event) event mechanisms are supported by specifying the `TYPE` as `:POLL` or `:WAIT` respectively. *NOTE:* `WITH-EVENTS` must be called in the same thread used to set the video mode. ##### Example (SDL:WITH-EVENTS (:POLL) (:QUIT-EVENT () T) (:KEY-DOWN-EVENT (:KEY KEY) (WHEN (SDL:KEY= KEY :SDL-KEY-ESCAPE) (SDL:PUSH-QUIT-EVENT))) (:VIDEO-EXPOSE-EVENT () (SDL:UPDATE-DISPLAY)))))) ##### Frame Rate Limiting The frame rate is specified using [FRAME-RATE](#frame-rate). For example to set the frame rate to 60 frames per second: (SETF (SDL:FRAME-RATE) 60) ##### Event Syntax Events are specified using the format `(:EVENT-TYPE (&KEYS KEYS))` * `EVENT-TYPE` must be one of the following `KEY`words; `:ACTIVE-EVENT, :KEY-DOWN-EVENT, :KEY-UP-EVENT, :MOUSE-MOTION-EVENT, :MOUSE-BUTTON-DOWN-EVENT, :MOUSE-BUTTON-UP-EVENT, :JOY-AXIS-MOTION-EVENT, :JOY-BUTTON-DOWN-EVENT, :JOY-BUTTON-UP-EVENT, :JOY-HAT-MOTION-EVENT, :JOY-BALL-MOTION-EVENT, :VIDEO-RESIZE-EVENT, :VIDEO-EXPOSE-EVENT, :SYS-WM-EVENT, :QUIT-EVENT, :USER-EVENT` or `:IDLE`. * `KEYS` specify the members of the event to return and are specific to each event type. These are discussed in detail below. *NOTE:* `:QUIT-EVENT` must return `T` to exit the `WITH-EVENT` macro. *NOTE:* `:IDLE` is ignored when `TYPE` is `:WAIT`. ##### Polling for Events When `TYPE` is `:POLL`, `WITH-EVENTS` will continually poll for currently pending events. If no events are available then the game loop is run and the forms in `:IDLE` are executed. ##### Waiting for Events When `TYPE` is `:WAIT`, `WITH-EVENTS` will sleep indefinitely for the next available event. If no events are available then the game loop is paused. ##### The :IDLE Event (:IDLE () &BODY BODY) The `:IDLE` event is special in that it is not generated by SDL. Rather the forms in `:IDLE` are executed once each game loop after event queue is emptied. `:IDLE` is ignored when the event mechanism specified by `TYPE` is `:WAIT`. ##### Active Event (:ACTIVE-EVENT (:GAIN GAIN :STATE STATE) &BODY BODY) When the mouse leaves or enters the window area an `SDL-APP-MOUSE-FOCUS` type activation event is generated. If the mouse has entered the window then `GAIN` will be `1`, otherwise `GAIN` will be `0`. An `SDL-APP-INPUT-FOCUS` type activation event occurs when the application loses or gains keyboard focus, usually when a different application is made active. Finally, an `SDL-APP-ACTIVE` type event occurs when the application is either minimised/iconified, `GAIN` is `0`, or restored. A single event can have multiple values set in `STATE`. *Note:* This event does not occur when an application window is first created. * `GAIN` is `0` if the event is a loss or `1` if it is a gain. * `STATE` a bitmask of the following values: `SDL-APP-MOUSE-FOCUS` if mouse focus was gained or lost, `SDL-APP-INPUT-FOCUS` if input focus was gained or lost, and `SDL-APP-ACTIVE` if the application was iconified, `GAIN` is `0`, or restored `GAIN` is `1`. ##### Keyboard Events (:KEY-DOWN-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :MOD-KEY MOD-KEY :UNICODE UNICODE) &BODY BODY) (:KEY-UP-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :MOD-KEY MOD-KEY :UNICODE UNICODE) &BODY BODY) A keyboard event generally occurs when a key is released or when a key is pressed. The information on the key that generated the event is stored in `KEY` and `MOD`. The `SDL-CAPS-LOCK` and `SDL-NUM-LOCK` keys are special cases and report an `SDL-KEY-DOWN` when first pressed, then an `SDL-RELEASED` when released and pressed again. These keys KEYUP and KEYDOWN events are therefore analogous to the state of the caps lock and num lock LEDs rather than the keys themselves. These special cases are required for compatibility with Sun workstations. *Note:* Repeating `SDL-KEY-DOWN` events will occur if key repeat is enabled using [SDL-ENABLE-KEY-REPEAT](#sdl-enable-key-repeat). * `STATE` is `SDL-PRESSED` or `SDL-RELEASED` if the key is pressed or released respectively. * `SCANCODE` is the hardware-dependent scancode returned by the keyboard. * `KEY` is is the SDL-defined value of the key that generated the event. The SDL-defined value for `KEY` generally takes the following format: `:SDL-KEY-0` to `:SDL-KEY-1` for numeric keys. `SDL-KEY-a` to `SDL-KEY-z` for alpha keys in the range a-z. Other keys are generally spelled out, for example `SDL-KEY-PAGEDOWN`, `SDL-KEY-F1` or `SDL-KEY-NUMLOCK` . * `MOD` is the keyboard modifier state returned as an `INTEGER`. * `MOD-KEY` is the current state of the keyboard modifiers as explained in SDL_GetModState. Returned as a `LIST` of one or more of `:SDL-KEY-MOD-LSHIFT, :SDL-KEY-MOD-RSHIFT, :SDL-KEY-MOD-LCTRL, :SDL-KEY-MOD-RCTRL, :SDL-KEY-MOD-LALT, :SDL-KEY-MOD-RALT, :SDL-KEY-MOD-LMETA, :SDL-KEY-MOD-RMETA, :SDL-KEY-MOD-NUM, :SDL-KEY-MOD-CAPS, :SDL-KEY-MOD-MODE or :SDL-KEY-MOD-RESERVED`. * `UNICODE` is the translated character. The unicode field is only used when UNICODE translation is enabled with SDL_EnableUNICODE. If unicode is non-zero then this is the UNICODE character corresponding to the keypress. If the high 9 bits of the character are 0, then this maps to the equivalent ASCII character. ##### Mouse Motion Event (:MOUSE-MOTION-EVENT (:STATE STATE :X X :Y Y :X-REL X-REL :Y-REL Y-REL) &BODY BODY) A `MOUSE-MOTION-EVENT` event occurs when the mouse moves within the application window or when [SDL-WARP-MOUSE](#SDL-WARP-MOUSE) is called. Both the absolute `X` and `Y` and relative `X-REL` and `Y-REL` coordinates are reported along with the current button state `STATE`. The button state can be interpreted using [SDL-BUTTON](#sdl-button), see [SDL-GET-MOUSE-STATE](#sdl-get-mouse-state). If the cursor is hidden using [SDL-SHOW-CURSOR](#sdl-show-cursor) and the input is grabbed using [SDL-WM-GRAB-INPUT](#sdl-wm-grab-input), then the mouse will give relative motion events even when the cursor reaches the edge of the screen. This is currently only implemented on Windows and Linux/Unix-alikes. * `STATE` is the current button state. * `X` is the `X` coordinates of the mouse * `Y` is the `Y` coordinates of the mouse * `X-REL` is the relative motion in the `X` direction * `Y-REL` is the relative motion in the `Y` direction ##### Mouse Button Events (:MOUSE-BUTTON-DOWN-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y) &BODY BODY) (:MOUSE-BUTTON-UP-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y) &BODY BODY) When a mouse button press or release is detected the number of the button pressed (from 1 to 255, with 1 usually being the left button and 2 the right) is placed into `BUTTON`, the position of the mouse when this event occured is stored in the `X` and the `Y` fields. Mouse wheel events are reported as buttons 4 (up) and 5 (down). Two events are generated i.e. a `SDL-MOUSE-BUTTON-DOWN` followed by a `SDL-MOUSE-BUTTON-UP` event. * `BUTTON` is the mouse button index which is one of `SDL-BUTTON-LEFT`, `SDL-BUTTON-MIDDLE`, `SDL-BUTTON-RIGHT`, `SDL-BUTTON-WHEELUP` or `SDL-BUTTON-WHEELDOWN`. * `STATE` is the state of the button which is `SDL-PRESSED` or `SDL-RELEASED`. * `X` is the `X` coordinates of the mouse at press/release time. * `Y` is the `Y` coordinates of the mouse at press/release time. ##### Joystick Motion Event (:JOY-AXIS-MOTION-EVENT (:WHICH WHICH :AXIS AXIS :VALUE VALUE) &BODY BODY) A JOY-AXIS-MOTION-EVENT event occurs whenever a user moves an axis on the joystick. * `WHICH` is the joystick device index. The index of the joystick that reported the event. * `AXIS` is the joystick axis index * `VALUE` is the current position of the axis (range: -32768 to 32767) ##### Joystick Button Events (:JOY-BUTTON-DOWN-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE) &BODY BODY) (:JOY-BUTTON-UP-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE) &BODY BODY) A `JOY-BUTTON-DOWN-EVENT` or `JOY-BUTTON-DOWN-EVENT` event occurs whenever a user presses or releases a button on a joystick. * `WHICH` is the index of the joystick that reported the event. * `BUTTON` is the button pressed that caused the event. * `STATE` is the current state of the button and is either `SDL-PRESSED` or `SDL-RELEASED`. ##### Joystick Hat Motion Event (:JOY-HAT-MOTION-EVENT (:WHICH WHICH :HAT HAT :VALUE VALUE) &BODY BODY) A `JOY-HAT-MOTION-EVENT` event occurs when ever a user moves a hat on the joystick. * `WHICH` is the index of the joystick that reported the event. * `HAT` is the index of the hat that generated the event. * `VALUE` is the current position of the hat, a bitwise OR'd combination of the following values `SDL-HAT-CENTERED`, `SDL-HAT-UP`, `SDL-HAT-RIGHT`, `SDL-HAT-DOWN`, `SDL-HAT-LEFT`, `SDL-HAT-RIGHT-UP`, `SDL-HAT-RIGHT-DOWN`, `SDL-HAT-LEFT-UP` and `SDL-HAT-LEFT-DOWN`. ##### Joystick Ball Motion Event (:JOY-BALL-MOTION-EVENT (:WHICH WHICH :BALL BALL :X-REL X-REL :Y-REL Y-REL) &BODY BODY) A `JOY-BALL-MOTION-EVENT` event occurs when a user moves a trackball on the joystick. Trackballs only return relative motion. * `WHICH` is the index of the joystick that reported the event. * `BALL` is the index of the trackball that generated the event. * `X-REL` is the change in `X` position of the ball since it was last polled (last cycle of the event loop). * `Y-REL` is the change in `Y` position of the ball since it was last polled (last cycle of the event loop). ##### Quit Event (:QUIT-EVENT () &BODY BODY) If `QUIT-EVENT` is filtered or ignored then it is impossible for the user to close the window. If `QUIT-EVENT` is accepted and returns `T` then the application window will be closed. *Note:* Screen updates will continue to report success even though the application is no longer visible. If `QUIT-EVENT` is accepted and returns `NIL` then the application window will _not_ be closed. [QUIT-REQUESTED](#quit-requested) will return non-zero if a `QUIT-EVENT` event is pending. ##### SDL Window Resize Event (:VIDEO-RESIZE-EVENT (:W W :H H) ...) When `SDL-RESIZABLE` is passed as a flag to [WINDOW](#window), the user is allowed to resize the application window. When the window is resized a `VIDEO-RESIZE-EVENT` event is reported, with the new window width and height values stored in `W` and `H` respectively. When an `VIDEO-RESIZE-EVENT` event is recieved the window should be resized to the new dimensions using [WINDOW](#window). * `W` is the window width as an `INTEGER`. * `H` is the window height as an INTERGER`. ##### SDL Window Expose Event (:VIDEO-EXPOSE-EVENT () ...) `VIDEO-EXPOSE-EVENT` is triggered when the screen has been modified outside of the application, usually by the window manager, and needs to be redrawn. ##### System Window Events (:SYS-WM-EVENT () ...) The system window manager event contains a pointer to system-specific information about unknown window manager events. If this event is enabled using [SDL-EVENT-STATE](#sdl-event-state), it will be generated whenever unhandled events are received from the window manager. This can be used, for example, to implement cut-and-paste in your application. If you want to obtain system-specific information about the window manager, you can fill in the version member of a `SDL-SYS-WM-INFO` structure using [SDL-VERSION](#sdl-version), and pass it to the function: [SDL-GET-WM-INFO](#sdl-get-wm-info) ##### User (:USER-EVENT (:TYPE TYPE :CODE CODE :DATA1 DATA1 :DATA2 DATA2) ...) `USER-EVENT` is unique in that it is created by the user not SDL. `USER-EVENT` can be pushed onto the event queue using [PUSH-USER-EVENT](#push-user-event). The contents of the event are completely up to the programmer. * `TYPE` is a value from `SDL-USER-EVENT to `(- SDL-NUM-EVENTS 1)` inclusive. * `CODE` is a user defined event code * `DATA1` is a user defined data pointer * `DATA2` is a user defined data pointer ##### Syntax (WITH-EVENTS (TYPE) (:ACTIVE-EVENT (:GAIN GAIN :STATE STATE) ... ) (:KEY-DOWN-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :MOD-KEY MOD-KEY :UNICODE UNICODE) ... ) (:KEY-UP-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :MOD-KEY MOD-KEY :UNICODE UNICODE) ...) (:MOUSE-MOTION-EVENT (:STATE STATE :X X :Y Y :X-REL X-REL :Y-REL Y-REL) ...) (:MOUSE-BUTTON-DOWN-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y) ...) (:MOUSE-BUTTON-UP-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y) ...) (:JOY-AXIS-MOTION-EVENT (:WHICH WHICH :AXIS AXIS :VALUE VALUE) ...) (:JOY-BUTTON-DOWN-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE) ...) (:JOY-BUTTON-UP-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE) ...) (:JOY-HAT-MOTION-EVENT (:WHICH WHICH :HAT HAT :VALUE VALUE) ...) (:JOY-BALL-MOTION-EVENT (:WHICH WHICH :BALL BALL :X-REL X-REL :Y-REL Y-REL) ...) (:VIDEO-RESIZE-EVENT (:W W :H H) ...) (:VIDEO-EXPOSE-EVENT () ...) (:SYS-WM-EVENT () ...) (:USER-EVENT (:TYPE TYPE :CODE CODE :DATA1 DATA1 :DATA2 DATA2) ...) (:QUIT-EVENT () ... T) (:IDLE () ... ))
  • Class COLOR
    A color containing `INTEGER` Red, Green and Blue components. Free using [FREE](#free).
    COLOR-VECTOR   Accessor: FP
  • Class COLOR-A  (COLOR)
    An color containing `INTEGER` Red, Green, Blue and Alpha components. Free using [FREE](#free).
    COLOR-VECTOR   Accessor: FP
  • Function COLOR (&key (r 0) (g 0) (b 0) (a nil))
    Returns a new `RGB` [COLOR](#color) from the specified `R`ed, `G`reen, and `B`lue components. Returns a new `RGBA` [COLOR-A](#color-a) from the specified `R`ed, `G`reen, `B`lue, and `A`lpha components.
  • Macro WITH-COLOR ((var &optional color (free t)) &body body)
    A convience macro that binds `*DEFAULT-COLOR*` to `VAR` within the scope of `WITH-COLOR`. `VAR` is set to `COLOR` when `COLOR` is not `NIL`.`VAR` must be of type [COLOR](#color), or [COLOR-A](#color-a). `VAR` is freed using [FREE](#free) when `FREE` is `T`.
  • Method FREE ((color color))
  • Method R ((color color))
  • Method (setf R) (r-val (color color))
  • Method G ((color color))
  • Method (setf G) (g-val (color color))
  • Method B ((color color))
  • Method (setf B) (b-val (color color))
  • Method A ((color color))
  • Method A ((color color-a))
  • Method (setf A) (a-val (color color-a))
  • Method COLOR-* ((color color))
  • Method COLOR-* ((color color-a))
  • Method MAP-COLOR-* ((r integer) (g integer) (b integer) a &optional (surface *default-surface*))
  • Method MAP-COLOR ((color color) &optional (surface *default-surface*))
  • Method MAP-COLOR ((color color-a) &optional (surface *default-surface*))
  • Method PACK-COLOR ((color color))
  • Method PACK-COLOR ((color color-a))
  • Macro WITH-FOREIGN-COLOR-COPY ((struct color) &body body)
    Creates and assigns a new foreign `SDL_Color` to `STRUCT`. Then copies the color components from `COLOR` into `STRUCT`. `STRUCT` is free'd when out of scope.
  • Method COLOR= (color1 color2)
  • Method COLOR= ((color1 color) (color2 color))
  • Method COLOR= ((color1 color-a) (color2 color-a))
  • Method ANY-COLOR-BUT-THIS (color)
  • Macro WITH-POINT ((var &optional point) &body body)
    A convenience macro that binds `*DEFAULT-POINT*` to `VAR` within the scope of `WITH-POINT`. `VAR` must be of type `POINT`. If `POINT` is not `NIL`, then `VAR is set to `POINT`.
  • Type POINT
  • Function POINT (&key (x 0) (y 0))
    Creates a new `POINT` set to the specified horizontal `X` and vertical `Y` coordinate.
  • Function COPY-POINT (point)
    Returns a copy of the point `POINT`.
  • Method X ((point vector))
    Returns the `X` coordindate of the point `POINT` as an `INTEGER`.
  • Method (setf X) (x-val (point vector))
    Sets the `X` coordindate of the point `POINT`.
  • Method Y ((point vector))
    Returns the `Y` coordindate of the point `POINT` as an `INTEGER`.
  • Method (setf Y) (y-val (point vector))
    Sets the `X` coordindate of the point `POINT`.
  • Method POINT-* ((point vector))
    Returns the `X` and `Y` coordinates of the point `POINT` as a spread.
  • Method GET-POINT ((point vector))
    Returns the point `POINT`.
  • Method SET-POINT ((dst vector) (src vector))
    Sets the `X` and `Y` coordinates of the destination point `DST` to the coordinates in the source point `SRC`. Returns the destination point `DST`.
  • Method SET-POINT-* ((point vector) &key x y)
    Sets the `X` and `Y` coordinates of the point `POINT` to `X` and `Y`.
  • Method POSITION-* ((point vector))
    See [POINT-*](#point-*).
  • Method SET-POSITION ((dst vector) (src vector))
    See [SET-POINT](#set-point).
  • Method SET-POSITION-* ((point vector) &key x y)
    See [SET-POINT-*](#set-point-*).
  • Class RECTANGLE  (FOREIGN-OBJECT)
    A `RECTANGLE` object manages the foreign SDL_Rect object. Free using [FREE](#free).
    No slots.
  • Function RECTANGLE (&key (x 0) (y 0) (w 0) (h 0) (fp nil))
    Creates a new `RECTANGLE` from the specified `X`, `Y`, width `W` and height `H`. If `FP' is `NIL` then a foreign SDL_Rect is created. If `FP` is a pointer to a foreign SDL_Rect object then `FP` is used.
  • Function RANDOM-RECTANGLE (bound-w bound-h &optional (rectangle (rectangle)))
    Creates and return s a new `RECTANGLE` of random x, y width and height within the specified bounds of width `BOUND-W` and height `BOUND-H`. `RECTANGLE` if unset will force the creation of a new `RECTANGLE` object. `RECTANGLE` if set will be modified with the coordinates.
  • Function RECTANGLE-FROM-EDGES (p1 p2 &optional (rectangle (rectangle)))
    See [RECTANGLE-FROM-EDGES-*](#rectangle-from-edges-*). * `P1` and `P2` are `POINTS` that specify the bounds of the `RECTANGLE`. `P1` specifies the top left coordinate. `P2` specifies the lower right coordinate.
  • Function RECTANGLE-FROM-EDGES-* (x1 y1 x2 y2 &optional (rectangle (rectangle)))
    Returns a new `RECTANGLE` using the bounds specified by the `INTEGERS` `X1`, `X2`, `Y1` and `Y2`. The coordinates of the rectangle are X = X1, Y = Y1, WIDTH = (- X2 X1), HEIGHT = (- Y2 Y1) ##### Parameters * `X1`, `Y1` specify the top left coordinate as `INTEGERS`. * `X2`, `Y2` specify the bottom right coordinate as `INTEGERS`. * `RECTANGLE` if unset will force the creation of a new `RECTANGLE` object. `RECTANGLE` if set will be modified with the coordinates.
  • Function RECTANGLE-FROM-MIDPOINT-* (x y w h &optional (rectangle (rectangle)))
    Returns a `RECTANGLE` of width `W` and height `H` with the rectangle mid-point at coordinates `X` and `Y`. `RECTANGLE` if unset will force the creation of a new `RECTANGLE` object. `RECTANGLE` if set will be modified with the coordinates.
  • Macro WITH-RECTANGLE ((var &optional rectangle (free t)) &body body)
    A convenience macro that binds `*DEFAULT-RECTANGLE*` to `VAR` within the scope of `WITH-RECTANGLE`. `VAR` must be of type `RECTANGLE`. `VAR` is set to `RECTANGLE` when `RECTANGLE` is not `NIL`. `VAR` is freed when `FREE` is `T`. ##### Example (WITH-RECTANGLE (a-rect (RECTANGLE :x 0 :y 0 :w 100 :h 100)) ...)
  • Macro WITH-RECTANGLES (bindings &body body)
    A convenience macro that binds multiple rectangles as per [WITH-RECTANGLE](#with-rectangle). ##### Example (WITH-RECTANGLES ((a-rect (RECTANGLE :x 0 :y 0 :w 100 :h 100)) ((b-rect (RECTANGLE :x 0 :y 100 :w 100 :h 100)) ((c-rect (RECTANGLE :x 0 :y 200 :w 100 :h 100))) ...)
  • Method X ((rectangle rectangle))
    Returns the `X` position coordinate of the rectangle `RECTANGLE` as an `INTEGER`.
  • Method (setf X) (x-val (rectangle rectangle))
    Sets the `X` position coordinate of the rectangle `RECTANGLE`.
  • Method Y ((rectangle rectangle))
    Returns the `Y` position coordinate of the rectangle `RECTANGLE` as an `INTEGER`.
  • Method (setf Y) (y-val (rectangle rectangle))
    Sets the `Y` position coordinate of the rectangle `RECTANGLE`.
  • Method X2 ((rectangle rectangle))
    Sets the WIDTH of the rectangle `RECTANGLE` to `(- X2 X)`
  • Method (setf X2) (h-val (rectangle rectangle))
    Returns `(+ X WIDTH)` of the rectangle `RECTANGLE`.
  • Method Y2 ((rectangle rectangle))
    Returns `(+ Y HEIGHT)` of the rectangle `RECTANGLE`.
  • Method (setf Y2) (h-val (rectangle rectangle))
    Sets the HEIGHT of rectangle `RECTANGLE` to `(- Y2 Y)`
  • Method WIDTH ((rectangle rectangle))
    Returns the `INTEGER` width of the rectangle `RECTANGLE`.
  • Method (setf WIDTH) (w-val (rectangle rectangle))
    Sets the `INTEGER` width of the rectangle `RECTANGLE`.
  • Method HEIGHT ((rectangle rectangle))
    Returns the `INTEGER` height of the rectangle `RECTANGLE`.
  • Method (setf HEIGHT) (h-val (rectangle rectangle))
    Sets the `INTEGER` height of the rectangle `RECTANGLE`.
  • Method POINT-* ((rectangle rectangle))
    Returns the `X` and `Y` coordinates of the rectangle `RECTANGLE` as a spread. The `RESULT` is `(VALUES X Y)`
  • Method GET-POINT ((rectangle rectangle))
    Returns the `X` and `Y` coordinates of rectangle `RECTANGLE` as a `POINT`.
  • Method SET-POINT ((rectangle rectangle) (position vector))
    Copies the `X` and `Y` coordinates to the destination rectangle `RECTANGLE` from the source point `POSITION`.
  • Method SET-POINT-* ((rectangle rectangle) &key x y)
    Sets the `X` and `Y` coordinates of the rectangle `RECTANGLE`. `X` and `Y` are `KEY`word parameters.
  • Method POSITION-* ((rectangle rectangle))
    See [POINT-*](#point-*)
  • Method GET-POSITION ((rectangle rectangle))
    See [GET-POINT](#get-POINT)
  • Method SET-POSITION ((rectangle rectangle) (position vector))
    Sets the `X` and `Y` coordinates of the rectangle `RECTANGLE` from the point `POSITION`.
  • Method SET-POSITION-* ((rectangle rectangle) &key x y)
    Sets the `X` and `Y` coordinates of the rectangle `RECTANGLE`. `X` and `Y` are `KEY`word parameters.
  • Method RECTANGLE-* ((rectangle rectangle))
    Returns the `X`, `Y`, `WIDTH` and `HEIGHT` coordinates of the rectangle `RECTANGLE` as a spread. The `RESULT` is `(VALUES X Y WIDTH HEIGHT)`
  • Method GET-RECTANGLE ((rectangle rectangle))
    Returns the rectangle `RECTANGLE`.
  • Method SET-RECTANGLE ((dst rectangle) (src rectangle))
    Copies the `X`, `Y`, `WIDTH` and `HEIGHT` coordinates to the destination rectangle `DST` from the source rectangle `SRC`.
  • Method SET-RECTANGLE-* ((rectangle rectangle) &key x y w h)
    Sets the coordinates of the rectangle `RECTANGLE` to the specified `X`, `Y` , width `W` and height `HEIGHT` coordinates. `X`, `Y`, `W` and `H` are `KEY`word parameters of type `INTEGER`. Returns the rectangle `RECTANGLE` as RESULT.
  • Method COPY-RECTANGLE ((self rectangle))
  • Method COPY-RECTANGLE ((self vector))
  • Method COPY-RECTANGLE ((self list))
  • Function BIT-DEPTH (&optional (surface *default-surface*))
    Returns the number of bytes per pixel, or bpp, of `SURFACE`.
  • Function BYTE-DEPTH (&optional (surface *default-surface*))
    Returns the number of bytes per pixel, or bpp, of `SURFACE`.
  • Function R-MASK (&optional (surface *default-surface*))
    Returns the red mask of `SURFACE`.
  • Function G-MASK (&optional (surface *default-surface*))
    Returns the green mask of `SURFACE`.
  • Function B-MASK (&optional (surface *default-surface*))
    Returns the blue mask of `SURFACE`.
  • Function A-MASK (&optional (surface *default-surface*))
    Returns the alpha mask of `SURFAaCE`.
  • Class SDL-SURFACE  (FOREIGN-OBJECT)
    A wrapper for the foreign SDL_Surface object.
    POSITION-RECT   Reader: POSITION-RECT
    CELL-INDEX   Accessor: CELL-INDEX
    CELLS   Reader: CELLS
    DISPLAY-SURFACE-P   Accessor: DISPLAY-SURFACE-P
  • Class DISPLAY-SURFACE  (SDL-SURFACE)
    The current display surface. Can be accessed using `SDL:*DEFAULT-DISPLAY*`.
    No slots.
  • Method FREE ((self display-surface))
    Freeing the display surface is not a valid operation.
  • Class SURFACE  (SDL-SURFACE)
    This object is garbage collected and the `SDL_Surface` object freed when out of scope. Free using [FREE](#free).
    No slots.
  • Macro WITH-SURFACE ((var &optional surface (free t)) &body body)
  • Method (setf CELLS) ((num integer) (self sdl-surface))
  • Method (setf CELLS) ((rects list) (self sdl-surface))
  • Method (setf CELLS) ((rects vector) (self sdl-surface))
  • Method (setf CELLS) ((rect rectangle) (self sdl-surface))
  • Macro WITH-SURFACE-SLOTS ((var &optional surface) &body body)
  • Macro WITH-SURFACES (bindings &rest body)
  • Macro WITH-LOCKED-SURFACE ((var &optional surface) &body body)
  • Macro WITH-LOCKED-SURFACES (bindings &rest body)
  • Method WIDTH ((surface sdl-surface))
    Returns the width of `SURFACE` as an `INTEGER`.
  • Method HEIGHT ((surface sdl-surface))
    Returns the height of `SURFACE` as an `INTEGER`.
  • Method X ((surface sdl-surface))
    Returns the `X` position coordinate of `SURFACE` as an `INTEGER`.
  • Method (setf X) (x-val (surface sdl-surface))
    Sets the integer `X` position coordinate of `SURFACE`.
  • Method Y ((surface sdl-surface))
    Returns the `Y` position coordinate of `SURFACE` as an `INTEGER`.
  • Method (setf Y) (y-val (surface sdl-surface))
    Sets the integer `Y` position coordinate of `SURFACE`.
  • Method POINT-* ((surface sdl-surface))
    Returns the `X` and `Y` position coordinates of `SURFACE` as a spread.
  • Method GET-POINT ((surface sdl-surface))
    Returns the `POINT` position coordinates of `SURFACE`.
  • Method SET-POINT ((surface sdl-surface) (position vector))
    Sets the `POINT` position coordinates of `SURFACE`.
  • Method SET-POINT-* ((surface sdl-surface) &key x y)
    Sets the `X` and `Y` position coordinates of `SURFACE`. `X` and `Y` are integers.
  • Method POSITION-* ((surface sdl-surface))
    See [POSITION](#position).
  • Method GET-POSITION ((surface sdl-surface))
    See [GET-POINT](#get-point).
  • Method SET-POSITION ((surface sdl-surface) (position vector))
    See [SET-POINT](#set-point).
  • Method SET-POSITION-* ((surface sdl-surface) &key x y)
    See [SET-POINT-*](#set-point-*).
  • Method SET-SURFACE ((surface sdl-surface) (position vector))
    See [SET-POINT](#set-point).
  • Method SET-SURFACE-* ((surface sdl-surface) &key x y)
    See [SET-POINT-*](#set-point-*).
  • Method RECTANGLE-* ((surface sdl-surface))
    Returns the fields `X`, `Y`, `WIDTH` and `HEIGHT` from `SURFACE` as a spread.
  • Function SURFACE-INFO (surface &optional (info nil))
    Returns information about the SDL surface `SURFACE`. ##### Parameters * `SURFACE` is an SDL surface of type [SDL-SURFACE](#sdl-surface). * `INFO` must be one of `NIL`, [SDL-SW-SURFACE](#sdl-sw-surface), [SDL-HW-SURFACE](#sdl-hw-surface), [SDL-ASYNC-BLIT](#sdl-async-blit), [SDL-ANY-FORMAT](#sdl-any-format), [SDL-HW-PALETTE](#sdl-hw-palette), [SDL-DOUBLEBUF](#sdl-doublebuf), [SDL-FULLSCREEN](#sdl-fullscreen), [SDL-OPENGL](#sdl-opengl), [SDL-RESIZABLE](#sdl-resizable) [SDL-HW-ACCEL](#sdl-hw-accel), [SDL-SRC-COLOR-KEY](#sdl-src-color-key), [SDL-RLE-ACCEL](#sdl-rle-accel), [SDL-SRC-ALPHA](#sdl-src-alpha) or [SDL-PRE-ALLOC](#sdl-pre-alloc). ##### Returns `INFO` when `NIL` will return a list of all enabled surface flags. Otherwise will return `INFO` as `T` or `NIL` if supported by the surface. ##### Example (SURFACE-INFO A-SURFACE '(SDL-HW-SURFACE SDL-HW-PALETTE SDL-HW-ACCELL))
  • Method ALPHA-ENABLED-P ((surface sdl-surface))
  • Method COLOR-KEY-ENABLED-P ((surface sdl-surface))
  • Method RLE-ACCEL-ENABLED-P ((surface sdl-surface))
  • Method (setf ALPHA-ENABLED-P) (value (surface sdl-surface))
  • Function ENABLE-ALPHA (value &key (surface *default-surface*))
    Enable surface alpha blending for when `T`. Disable surface alpha blending when `NIL`. A `SURFACE` need not have a pixel alpha component (RGBA) to use surface alpha blending.
  • Method ALPHA ((surface sdl-surface))
  • Method (setf ALPHA) (value (surface sdl-surface))
  • Method (setf COLOR-KEY-ENABLED-P) (value (surface sdl-surface))
  • Function ENABLE-COLOR-KEY (value &key (surface *default-surface*))
    Enables color keying when `T`. Disable color keying when `NIL`
  • Method COLOR-KEY ((surface sdl-surface))
  • Method (setf COLOR-KEY) (value (surface sdl-surface))
  • Function CLEAR-COLOR-KEY (&key (surface *default-surface*))
    Disables the color key.
  • Method PIXEL-ALPHA-ENABLED-P ((surface sdl-surface))
  • Method (setf RLE-ACCEL-ENABLED-P) (value (surface sdl-surface))
  • Function ENABLE-RLE-ACCEL (value &key (surface *default-surface*))
    Enables RLE blit acceleration when `T`, disables RLE acceleration when `NIL`. RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i.e., pixels that match the key color).
  • Method CLIP-RECT ((surface sdl-surface))
  • Method (setf CLIP-RECT) (value (surface sdl-surface))
  • Function CLEAR-CLIP-RECT (&optional (surface *default-surface*))
    Removes the clipping [RECTANGLE](#rectangle).
  • Function GET-CLIP-RECT (&key (surface *default-surface*) (rectangle (rectangle)))
    Returns the clipping [RECTANGLE](#rectangle).
  • Function SET-CLIP-RECT (rectangle &key (surface *default-surface*))
    See [CLIP-RECT](#clip-rect).
  • Function GET-CELL (&key (surface *default-surface*) (index 0))
    Returns a [RECTANGLE](#rectangle) describing the bounds of `CELL` at the specified `INDEX`. *Note:* When `SURFACE` is the source of a blit, only the area within the cell rectangle is drawn.
  • Function CLEAR-CELL (&key (surface *default-surface*) (index nil))
    Sets the `CELL` at `INDEX` to the bounds of `SURFACE`.
  • Function SET-CELL (rectangle &key (surface *default-surface*) (index nil))
    Sets the `CELL` at `INDEX` to the bounds of `RECTANGLE`. *Note:* When `SURFACE` is the source of a blit, only the area within the cell rectangle is drawn.
  • Function SET-CELL-* (x y w h &key (surface *default-surface*) (index nil))
    Sets the `CELL` at `INDEX` to a rectangle bounded by `X`, `Y`, `W` and `H`. *Note:* When `SURFACE` is the source of a blit, only the area within the cell rectangle is drawn.
  • Function GET-SURFACE-RECT (&key (surface *default-surface*) (rectangle (rectangle)))
  • Function CREATE-SURFACE (width height &key (bpp 32) (type :sw) color-key color-key-at pixel-alpha alpha (rle-accel t) (x 0) (y 0) mask)
    Creates and returns a new `SURFACE` with the dimensions `WIDTH` and `HEIGHT`. `:COLOR-KEY` sets the color key of the surface and enables color-keying. `:ALPHA` sets the surface alpha transparency and enables alpha blending. This allows a pixel color of `RGB` with the surface `A`. `:PIXEL-ALPHA` enables a pixel alpha component (alpha mask of 0xFF) on the new surface. This allows a pixel color of `RGBA`. `:RLE-ACCEL` enables RLE blit acceleration. `:BPP` is the pixel depth of the surface, and my be 8, 16, 24 or 32. `:TYPE` attempts to create the `SURFACE` in video memory when `:HW`, and in system memory when `:SW` `:X` and `:Y` are the positions of the `SURFACE` in screen coordinates.
  • Function CONVERT-TO-DISPLAY-FORMAT (&key (surface *default-surface*) enable-alpha enable-color-key pixel-alpha (free nil) (inherit t))
    Returns a new surface matching the pixel format and color of the video frame buffer (`*display surface*), that is suitable for fast blitting. The new surface will inherit the pixel, alpha and color key components of the source, *unless* `:INHERIT` is `NIL`. Use `:ENABLE-COLOR-KEY` or `:ENABLE-ALPHA` to take advantage of hardware colorkey or alpha blit acceleration. Enabling these flags once a surface is created will not necessarily utilize available hardware acceleration if the surface was not initally created in video memory. Use `:PIXEL-ALPHA` to enable the pixel alpha component (alpha mask of 0xFF) for the new surface. Use `:FREE` to delete the source `SURFACE`. Differences between [CONVERT-TO-DISPLAY-FORMAT](#convert-to-display-format), [CONVERT-SURFACE](#convert-surface), [COPY-SURFACE](#copy-surface), and [CREATE-SURFACE](#create-surface); * [CONVERT-TO-DISPLAY-FORMAT](#convert-to-display-format) ** will always attempt to create a surface in video memory using hardware acceleration if key color and surface alpha are supported. ** A pixel alpha component can be specified. ** New surface is filled with old surface. * [CONVERT-SURFACE](#convert-surface) ** calls [CONVERT-TO-DISPLAY-FORMAT](#convert-to-display-format) if converting a surface to the display format. ** paramatized option to create new surface in video or system memory. ** Pixel format and color match that of the source surface. ** New surface is filled with old surface. * [COPY-SURFACE](#copy-surface) ** paramatized option to create new surface in video or system memory. ** copies a portion or all of the source surface to a new destination surface ** A pixel alpha component can be specified. ** New surface can be filled with the old surface, or the color key or both.
  • Function CONVERT-SURFACE (&key (surface *default-surface*) (to-surface *default-display*) enable-alpha enable-color-key (free nil) (inherit t) (type :sw))
    Converts `:SURFACE` and returns a new surface matching the pixel format and color of `:TO-SURFACE`. Calls [CONVERT-TO-DISPLAY-FORMAT](#convert-to-display-format) if converting to the display format. Use `:ENABLE-COLOR-KEY` or `:ENABLE-ALPHA` to take advantage of hardware colorkey or alpha blit acceleration. Enabling these flags once a surface is created will not necessarily utilize available hardware acceleration if the surface was not initally created in video memory. Will create the new surface in system memory when `TYPE` is `:SW`. Will attempt to create the new surface in video memory when `TYPE` is `:HW`, otherwise the surface is created in system memory if the combination of color key and alpha do not allow hardware acceleration. The new surface will inherit the pixel, alpha and color key components of the source, *unless* `:INHERIT` is `NIL`. Use `:FREE` to delete the source `SURFACE`.
  • Function COPY-SURFACE (&key (surface *default-surface*) color-key alpha pixel-alpha rle-accel (type :sw) free (inherit t) (fill t) (color-key-fill t) (pixel-format nil) cells cell-index)
    Returns a copy of `:SURFACE`. Use `:COLOR-KEY` or `:ALPHA` to set the key color and surface alpha transparency. Hardware colorkey and alpha blit acceleration will be used if supported. Will create the new surface in system memory when `TYPE` is `:SW`. Will attempt to create the new surface in video memory when `TYPE` is `:HW`, otherwise the surface is created in system memory if the combination of color key and alpha do not allow hardware acceleration. The new surface will be filled with the old surface unless `:FILL` is `NIL`. The new surface will be filled with the color key of the old surface (if available) unless `:COLOR-KEY-FILL` is `NIL`. The new surface will inherit the pixel, alpha and color key components of the source, *unless* `:INHERIT` is `NIL`. Use `:FREE` to delete the source `SURFACE`.
  • Function UPDATE-SURFACE (surface &optional template)
    Updates the surface
  • Function UPDATE-SURFACE-* (surface x y w h)
    See [UPDATE-SURFACE](#update-surface).
  • Function BLIT-SURFACE (source &optional (surface *default-surface*) cell)
    Performs a fast blit of the `SOURCE` surface to the destination `SURFACE`. The area defined by the `SOURCE` cell is blitted to the area defined by the destination clipping rectangle. The blit function should not be called on a locked surface. The results of blitting operations vary greatly depending on whether a surface ALPHA channel is set on the source surface or not. The priorty of how color key and alpha attributes interact with surface blitting is as follows: * source surface with `ALPHA` + `PIXEL-ALPHA`: Blit using per-pixel alpha only * source surface with `ALPHA` + `COLOR-KEY`: Blit using the colour key AND the per-surface alpha value * source surface with `ALPHA`: Blit using the colour key AND the per-surface alpha value * source surface with `COLOR-KEY`: Blit using the colour key * source surface: Blit using opaque rectangular blit An ALPHA channel has the following effect on blitting operations: * _RGBA to RGB_ with [ALPHA-ENABLED-P](#alpha-enabled-p): The source is alpha-blended with the destination, using the alpha channel. [COLOR-KEY-ENABLED-P](#color-key-enabled-p) and the per-surface alpha are ignored. * _RGBA to RGB_ without [ALPHA-ENABLED-P](#alpha-enabled-p): The RGB data is copied from the source. The source alpha channel and the per-surface alpha value are ignored. If [COLOR-KEY-ENABLED-P](#color-key-enabled-p) is set, only the pixels not matching the colorkey value are copied. * _RGB to RGBA_ with [ALPHA-ENABLED-P](#alpha-enabled-p): The source is alpha-blended with the destination using the per-surface alpha value. If [COLOR-KEY-ENABLED-P](#color-key-enabled-p) is set, only the pixels not matching the colorkey value are copied. The alpha channel of the copied pixels is set to opaque. * _RGB to RGBA_ without [ALPHA-ENABLED-P](#alpha-enabled-p): The RGB data is copied from the source and the alpha value of the copied pixels is set to opaque. If [COLOR-KEY-ENABLED-P](#color-key-enabled-p) is set, only the pixels not matching the colorkey value are copied. * _RGBA to RGBA_ with [ALPHA-ENABLED-P](#alpha-enabled-p): The source is alpha-blended with the destination using the source alpha channel. The alpha channel in the destination surface is left untouched. [COLOR-KEY-ENABLED-P](#color-key-enabled-p) is ignored. * _RGBA to RGBA_ without [ALPHA-ENABLED-P](#alpha-enabled-p): The RGBA data is copied to the destination surface. If [COLOR-KEY-ENABLED-P](#color-key-enabled-p) is set, only the pixels not matching the colorkey value are copied. * _RGB to RGB_ with [ALPHA-ENABLED-P](#alpha-enabled-p): The source is alpha-blended with the destination using the per-surface alpha value. If [COLOR-KEY-ENABLED-P](#color-key-enabled-p) is set, only the pixels not matching the colorkey value are copied. * _RGB to RGB_ without [ALPHA-ENABLED-P](#alpha-enabled-p): The RGB data is copied from the source. If [COLOR-KEY-ENABLED-P](#color-key-enabled-p) is set, only the pixels not matching the colorkey value are copied. *Note*: _RGBA to RGBA_ blits (with [ALPHA-ENABLED-P](#alpha-enabled-p) set) keep the alpha of the destination surface. This means that you cannot compose two arbitrary _RGBA_ surfaces this way and get the result you would expect from "overlaying" them; the destination alpha will work as a mask.
  • Function DRAW-SURFACE (src &key (surface *default-surface*) cell)
    See [BLIT-SURFACE](#blit-surface)
  • Function DRAW-SURFACE-AT-* (src x y &key (surface *default-surface*) cell)
    Draws the source surface to the destination surface at position X and Y. See [BLIT-SURFACE](#blit-surface). *Note*: Modifies the position of `SRC` as a side-effect.
  • Function DRAW-SURFACE-AT (src point &key (surface *default-surface*) cell)
    Draws the source surface to the destination surface at position POINT. See [BLIT-SURFACE](#blit-surface). *Note*: Modifies the position of `SRC` as a side-effect.
  • Function FILL-SURFACE (color &key (template nil) (surface *default-surface*) (update nil) (clipping nil))
    Fills surface with the specified `COLOR`. `:TEMPLATE` accepts a `RECTANGLE` defining the fill bounds. `The surface is updated when `:UPDATE`
  • Function FILL-SURFACE-* (r g b &key (a nil) (template nil) (surface *default-surface*) (update nil) (clipping nil))
    Fill the surface with the specified color `R` `G` `B` `:A` `A`. See [FILL-SURFACE](#fill-surface).
  • Function COPY-CHANNEL-TO-ALPHA (destination source &key (channel :r))
  • Function ANY-FORMAT-P
    Returns `T` if any pixel format is allowed.
  • Function OPENGL-CONTEXT-P
    Returns `T` if the video surface has an OpenGL context, or returns `NIL` otherwise.
  • Function DOUBLE-BUFFERED-P
    Returns `T` if the video surface is double buffered, or returns `NIL` otherwise.
  • Function FULLSCREEN-P
    Returns `T` if the video surface is fullscreen. Returns `NIL` if the video surface is windowed.
  • Function RESIZABLE-P
    Returns `T` if the video surface is resizable, returns `NIL` otherwise.
  • Function SET-VIDEO-DRIVER (driver)
  • Function SET-AUDIO-DRIVER (driver)
  • Method WINDOW (width height &rest rest)
  • Method RESIZE-WINDOW (width height &key flags sw hw fullscreen async-blit any-format palette double-buffer opengl resizable no-frame title-caption icon-caption bpp opengl-attributes)
    Modifies the dispaly, resets the input loop and clears all key events.
  • Function UPDATE-DISPLAY (&optional (surface *default-display*))
    `UPDATE-DISPLAY` will flip the SDL video buffers and update the screen `SURFACE` if `SDL-HW-SURFACE` is set in [WINDOW](#window). If double buffering is not enabled then SDL will perform an [SDL-UPDATE-RECT](#sdl-update-rect) on the entire screen. If there is an active OpenGL contenxt, then `UPDATE-DISPLAY` will call [SDL-GL-SWAP-BUFFERS](#sdl-gl-swap-buffers) to update the OpenGL display display. `SURFACE` is bound to `*DEFAULT-DISPLAY*` if unspecified.
  • Function CLEAR-DISPLAY (color &key (surface *default-display*) update)
    Fills the display `SURFACE` using color `COLOR`. `SURFACE` is bound to `*DEFAULT-DISPLAY*` if unspecified. The display is updated when `UPDATE` is `T`.
  • Function SHOW-CURSOR (state)
    Disables the cursor when state is `NIL`, otherwise enables the cursor.
  • Function GET-NATIVE-WINDOW
    Returns a foreign pointer to the native SDL display window.
  • Function VIDEO-MEMORY
    Returns the amount of video memory of the graphics hardware. Must be called after SDL is initialized using [INIT-SDL](#init-sdl) or [WITH-INIT](#with-init).
  • Function VIDEO-DIMENSIONS
    Returns the best video dimensions if called before a window is created, using [WINDOW](#window). Returns the current video dimensions if called after a window is created. Must be called after SDL is initialized using [INIT-SDL](#init-sdl) or [WITH-INIT](#with-init)
  • Function VIDEO-INFO (&rest info)
    Returns information about the video hardware. `VIDEO-INFO` must be called after SDL is initialised using [INIT-SDL](#init-sdl) or [WITH-INIT](#with-init). If `VIDEO-INFO` is called before [WINDOW](#window), the information returned is of the *best* video mode. If `VIDEO-INFO` is called after [WINDOW](#window), the information returned is of the *current* video mode. ##### Parameters * `INFO` can be one of `:HW-AVAILABLE`, `:WM-AVAILABLE`, `:BLIT-HW`, `:BLIT-HW-CC`, `:BLIT-HW-A`, `:BLIT-SW`, `:BLIT-SW-CC`, `:BLIT-SW-A`or `:BLIT-FILL`. If `NIL`, returns a list of all supported video flags. ##### Example (video-info :HW-AVAILABLE)
  • Function HW-AVAILABLE-P
  • Function WM-AVAILABLE-P
  • Function BLIT-HW-P
  • Function BLIT-HW-CC-P
  • Function BLIT-SW-P
  • Function BLIT-SW-CC-P
  • Function BLIT-SW-A-P
  • Function BLIT-FILL-P
  • Function LIST-MODES (&rest flags)
    Returns a LIST of vectors sorted largest to smallest containing window or screen dimensions that will support the specified video `FLAGS`. `LIST-MODES` must be called after SDL is initialised using [INIT-SDL](#init-sdl) or [WITH-INIT](#with-init). ##### Parameters * `FLAGS` is one or more of the following; [SDL-SW-SURFACE](#sdl-sw-surface), [SDL-HW-SURFACE](#sdl-hw-surface), [SDL-ASYNC-BLIT](#sdl-async-blit), [SDL-ANY-FORMAT](#sdl-any-format), [SDL-HW-PALETTE](#sdl-hw-palette), [SDL-DOUBLEBUF](#sdl-doublebuf), [SDL-FULLSCREEN](#sdl-fullscreen), [SDL-OPENGL](#sdl-opengl), [SDL-RESIZABLE](#sdl-resizable) and [SDL-NO-FRAME](#sdl-no-frame). * `SURFACE` A surface of type [SDL-SURFACE](#sdl-surface]), or `NIL`. WHEN `NIL`, the pixel format will be that returned by [SDL-GET-VIDEO-INFO](#sdl-get-video-info]). ##### Returns * Returns a list of `VECTOR`s of display dimensions, sorted largest to smallest, that will support the pixel format of surface `SURFACE`; for example `(#(1024 768) #(640 480) #(512 384) #(320 240))`. Returns `NIL` if there are no dimensions available for a particular pixel format. Returns `T` if any dimension will support the pixel format and video flags. ##### Example (LIST-MODES SDL-HW-SURFACE SDL-FULLSCREEN)
  • Function QUERY-CURSOR
    Queries the current state of the cursor. Returns `T` if the cursor is enabled and shown on the display. Returns `NIL` if the cursor is disabled and hidden.
  • Function VIDEO-DRIVER-NAME
    Returns the driver name of the initialised video driver. The driver name is a `STRING` containing a one-word identifier like "x11" or "windib". Returns 'NIL' if the video driver is not already initialised with [INIT-SDL](#init-sdl) or [WITH-INIT](#with-init). ##### Example (sdl:with-init () (sdl:video-driver-name)) >> "windib"
  • Function SET-GL-ATTRIBUTE (attribute value)
  • Function SET-CAPTION (window-caption icon-caption)
    Sets the caption text for window bar, and icon.
  • Function GET-CAPTION
    Returns the caption and icon text for the display surface as a spread; (VALUES title-caption icon caption)
  • Class RWOPS  (FOREIGN-OBJECT)
    A wrapper around a foreign SDL_RWops object. Free using [FREE](#free).
    No slots.
  • Function CREATE-RWOPS-FROM-FILE (filename)
    Creates and returns a new `RWOPS` object from the file at location `FILENAME`.
  • Function SUPPORTED-IMAGE-FORMATS
  • Function IMAGE-INIT-P (&rest flags)
  • Function INIT-IMAGE (&rest systems)
  • Function QUIT-IMAGE
  • Method IMAGE-P ((source rwops) image-type)
  • Method IMAGE-TYPE-OF ((source rwops))
  • Method IMAGE-P (source image-type)
  • Method IMAGE-TYPE-OF (source)
  • Method IMAGE-SUPPORTED-P (source)
  • Method LOAD-IMAGE ((source rwops) &key color-key alpha image-type force free-rwops (color-key-at nil))
    Returns a new `SURFACE` from the `RWOPS` in `SOURCE`.
  • Method LOAD-IMAGE ((source vector) &key color-key alpha image-type force free-rwops (color-key-at nil))
    Returns a new `SURFACE` from the byte array in `SOURCE`.
  • Method LOAD-IMAGE ((filename string) &key color-key alpha image-type force free-rwops (color-key-at nil))
    Returns a new `SURFACE` from the file at location `FILENAME`.
  • Method LOAD-IMAGE ((filename pathname) &key color-key alpha image-type force free-rwops (color-key-at nil))
    Returns a new `SURFACE` from the file at location `PATHNAME`.
  • Method SAVE-IMAGE ((surface sdl-surface) (filename string))
    Saves the `SURFACE` as a `BMP` image to a file at location `FILENAME`.
  • Method SAVE-IMAGE ((surface sdl-surface) (filename pathname))
    Saves the `SURFACE` as a `BMP` image to a file at location `FILENAME`.
  • Method LOAD-AND-CONVERT-IMAGE ((source string) &key color-key alpha (color-key-at nil) image-type force &allow-other-keys)
    Loads an image from the filename `SOURCE` as per [LOAD-IMAGE-*](#load-image-*), converts this image to the current display format using `CONVERT-SURFACE`. Parameters supported are the same as those for [LOAD-IMAGE](#load-image) and `CONVERT-IMAGE`.
  • Method LOAD-AND-CONVERT-IMAGE ((source pathname) &key color-key alpha (color-key-at nil) image-type force &allow-other-keys)
    Loads an image from the filename `SOURCE` as per [LOAD-IMAGE-*](#load-image-*), converts this image to the current display format using `CONVERT-SURFACE`. Parameters supported are the same as those for [LOAD-IMAGE](#load-image) and `CONVERT-IMAGE`.
  • Function CATMULL-ROM-SPLINE (val v0 v1 v2 v3)
  • Function DRAW-BEZIER (vertices &key (clipping t) (surface *default-surface*) (color *default-color*) (segments 20) (style :solid) (gfx-loaded-p *gfx-loaded-p*))
  • Macro WITH-BEZIER ((&optional (style :solid) (segments 20)) &body body)
    Draw a bezier curve of `*DEFAULT-COLOR*` to `*DEFAULT-SURFACE*`. The shape of the Bezier curve is defined by control points. A control point is a vertex containing an X and Y coordinate pair. The number of segments `SEGENTS` used to draw the Bezier curve defaults to 10. The greater the number of segments, the smoother the Bezier curve. ##### Local Methods A vertex may be added using: * `ADD-VERTEX` which accepts an `POINT`, or * `ADD-VERTEX-*` which is the x/y spread version `ADD-VERTEX` and `ADD-VERTEX-*` are valid only within the scop of `WITH-BEZIER`. ##### Parameters * `STYLE` is one of `:SOLID`, `:DASH`, or `:POINTS`. When `STYLE` is `:SOLID`, a single continuous line is drawn through the specified waypoints. When `STYLE` is `:DASH`, a line is drawn to alternate waypoint pairs. When `STYLE` is `:POINTS`, a single point is drawn at each waypoint. * `SEGMENTS` is the number of segments used to draw the Bezier curve. Default is 20 segments if unspecified. The greater the number of segments, the smoother the curve. ##### Example (SDL:WITH-COLOR (COL (SDL:COLOR)) (WITH-BEZIER () (ADD-VERTEX-* 60 40) (ADD-VERTEX-* 160 10) (ADD-VERTEX-* 170 150) (ADD-VERTEX-* 60 150))) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Macro WITH-CURVE ((&optional (style :solid) (segments 20)) &body body)
    Draw a Cattmul-Rom spline of `*DEFAULT-COLOR*` to `*DEFAULT-SURFACE*`. The shape of the curve is defined by waypoints. A waypoint is a vertex containing an X and Y coordinate pair. ##### Local Methods A vertex may be added using: * `ADD-VERTEX` which accepts an `SDL:POINT`, or * `ADD-VERTEX-*` which is the x/y spread version `ADD-VERTEX` and `ADD-VERTEX-*` are valid only within the scope of `WITH-CURVE`. ##### Parameters * `STYLE` describes the line style used to draw the curve and may be one of `:SOLID`, `:DASH`, or `:POINTS`. Use `:SOLID` to draw a single continuous line through the specified waypoints. Use `:DASH` to draw a line between alternate waypoint pairs. Use `:POINTS` to draw a single pixel at each waypoint. * `SEGMENTS` is the number of segments used to draw the Catmull-Rom spline. Default is 20 segments if unspecified. The greater the number of segments, the smoother the spline. ##### Example (SDL:WITH-COLOR (COL (SDL:COLOR)) (WITH-CURVE (:SOLID 30) (ADD-VERTEX-* 60 40) (ADD-VERTEX-* 160 10) (ADD-VERTEX-* 170 150) (ADD-VERTEX-* 60 150))) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Macro WITH-SHAPE ((&optional (style :solid)) &body body)
    Draw a polygon of `*DEFAULT-COLOR*` to `*DEFAULT-SURFACE*`. ##### Local Methods A vertex may be added using: * `ADD-VERTEX` which accepts an `SDL:POINT`, or * `ADD-VERTEX-*` which is the x/y spread version ADD-VERTEX and ADD-VERTEX-* are valid only within the scop of WITH-SHAPE. ##### Parameters * `STYLE` describes the line style used to draw the shape and may be one of `:SOLID`, `:DASH`, or `:POINTS`. Use `:SOLID` to draw a single continuous line through the specified waypoints. Use `:DASH` to draw a line between alternate waypoint pairs. Use `:POINTS` to draw a single pixel at each waypoint. ##### Example (SDL:WITH-COLOR (COL (SDL:COLOR)) (WITH-SHAPE (:POINTS) (ADD-VERTEX-* 60 40) (ADD-VERTEX-* 160 10) (ADD-VERTEX-* 170 150) (ADD-VERTEX-* 60 150))) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-CURVE (vertices &key (clipping t) (surface *default-surface*) (color *default-color*) (segments 20) (style :solid) (gfx-loaded-p *gfx-loaded-p*))
    Draw a Cattmul-Rom spline of [COLOR](#color) to [SURFACE](#surface). The shape of the curve is defined by waypoints. A waypoint is a vertex containing an X and Y coordinate pair. ##### Parameters * `VERTICES` is a list of waypoints or vetices for the spline, of [POINT](#point) * `STYLE` describes the line style used to draw the curve and may be one of `:SOLID`, `:DASH`, or `:POINTS`. Use `:SOLID` to draw a single continuous line through the specified waypoints. Use `:DASH` to draw a line between alternate waypoint pairs. Use `:POINTS` to draw a single pixel at each waypoint. * `SEGMENTS` is the number of segments used to draw the Catmull-Rom spline. Default is 20 segments if unspecified. The greater the number of segments, the smoother the spline. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the line color, of [COLOR](#color) or [COLOR-A](#color-a). * `:CLIPPING` when left as the default value `T` will ensure that the shape is clipped to the dimensions of `SURFACE`. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave `CLIPPING` as `T`. ##### Example (DRAW-CURVE (LIST (SDL:POINT :X 60 :Y 40) (SDL:POINT :X 160 :Y 10) (SDL:POINT :X 170 :Y 150) (SDL:POINT :X 60 :Y 150))) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-SHAPE (vertices &key (clipping t) (surface *default-surface*) (color *default-color*) (style :solid) (gfx-loaded-p *gfx-loaded-p*))
    Draw a polygon of [COLOR](#color) to [SURFACE](#surface) using `VERTICES`. ##### Parameters * `VERTICES` is a list of vertices, of `POINT` * `STYLE` describes the line style used to draw the polygon and may be one of `:SOLID`, `:DASH`, or `:POINTS`. Use `:SOLID` to draw a single continuous line through the specified waypoints. Use `:DASH` to draw a line between alternate waypoint pairs. Use `:POINTS` to draw a single pixel at each waypoint. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the line color, of [COLOR](#color) or [COLOR-A](#color-a). * `:CLIPPING` when left as the default value `T` will ensure that the shape is clipped to the dimensions of `SURFACE`. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave `CLIPPING` as `T`. ##### Example (DRAW-SHAPE (LIST (SDL:POINT :X 60 :Y 40) (SDL:POINT :X 160 :Y 10) (SDL:POINT :X 170 :Y 150) (SDL:POINT :X 60 :Y 150))) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-LINE-* (x0 y0 x1 y1 &key (surface *default-surface*) (color *default-color*) (clipping t) (aa nil) (gfx-loaded-p *gfx-loaded-p*))
    Draws a line of [COLOR](#color) to [SURFACE](#surface). ##### Parameters * `X0` `Y0` are the start X/Y coordinates of the line, of `INTEGER`. * `X1` `Y1` are the end X/Y coordinates of the line, of `INTEGER`. * `:AA` determines if the line is to be drawn using antialiasing. _NOTE_: Supported only in `LISPBUILDER-SDL-GFX`, otherwise ignored. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the line color, of [COLOR](#color) or [COLOR-A](#color-a). * `:CLIPPING` when left as the default value `T` will ensure that the shape is clipped to the dimensions of `SURFACE`. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave `CLIPPING` as `T`. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_ * `:AA` ignored in _LISPBUILDER-SDL_
  • Function DRAW-LINE (p1 p2 &key (surface *default-surface*) (color *default-color*) (clipping t) (aa nil) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-LINE-*](#draw-line-*). ##### Parameters * `P1` and `P2` are the start and end x/y co-ordinates of the line, of `POINT`. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-VLINE (x y0 y1 &key (surface *default-surface*) (color *default-color*) (clipping nil) (template nil) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-HLINE (x0 x1 y &key (surface *default-surface*) (color *default-color*) (clipping nil) (template nil) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-BOX (rect &key (clipping nil) (surface *default-surface*) (color *default-color*) (stroke-color nil) (alpha nil))
    See [DRAW-BOX-*](#draw-box-*). ##### Parameters * `RECT` is [RECTANGLE](#rectangle). ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-BOX-* (x y w h &key (clipping nil) (surface *default-surface*) (color *default-color*) (stroke-color nil) (alpha nil) (gfx-loaded-p *gfx-loaded-p*))
    Draws a filled rectangle of [COLOR](#color) to [SURFACE](#surface). ##### Parameters * `X` and `Y` are the `INTEGER` coordinates of the top-left corner of the rectangle. * `W` and `H` are the width and height of the rectangle, of type `INTEGER`. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the line color, of [COLOR](#color) or [COLOR-A](#color-a). * `:STROKE-COLOR` when not `NIL` will draw a `1` pixel line of color `COLOR` around the perimiter of the box. * `:ALPHA` when between `0` and `255` is used as the alpha transparency value when blitting the rectangle onto `SURFACE`. *Note:* An intermediate surface is created, the rectangle is drawn onto this intermediate surface and then this surface is blitted to `SURFACE`. * `:CLIPPING` is `NIL` The default is `NIL` as the SDL library will perform the necessary clipping automatically. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-RECTANGLE (rect &key (clipping nil) (surface *default-surface*) (color *default-color*) (alpha nil))
    See [DRAW-RECTANGLE-*](#draw-rectangle-*). ##### Parameters * `RECT` is [RECTANGLE](#rectangle). ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-RECTANGLE-* (x y w h &key (clipping nil) (surface *default-surface*) (color *default-color*) (alpha nil))
    Draw a rectangle outline of [COLOR](#color) to [SURFACE](#surface). ##### Parameters * `X` and `Y` are the `INTEGER` coordinates of the top-left corner of the rectangle. * `W` and `H` are the width and height of the rectangle, of type `INTEGER`. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the line color, of [COLOR](#color) or [COLOR-A](#color-a). * `:ALPHA` when between `0` and `255` is used as the alpha transparency value when blitting the rectangle onto `SURFACE`. *Note:* An intermediate surface is created, the rectangle is drawn onto this intermediate surface and then this surface is blitted to `SURFACE`. * `:CLIPPING` is `NIL` The default is `NIL` as the SDL library will perform the necessary clipping automatically. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-PIXEL (point &key (clipping t) (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-PIXEL-*](#draw-pixel-*). ##### Parameters * `POINT` is the [POINT](#point) coordinates of the pixel. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-PIXEL-* (x y &key (clipping t) (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Function READ-PIXEL-* (x y &key (clipping t) (surface *default-surface*))
    Read the [COLOR](#color) of the pixel at `X` and `Y` coordiates from [SURFACE](#surface). ##### Parameters * `X` and `Y` specify the coordinates of the pixel, and are of type `INTEGER`. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the pixel color, of [COLOR](#color) or [COLOR-A](#color-a). * `:CLIPPING` when left as the default value `T` will ensure that the pixel is clipped to the dimensions of `SURFACE`. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave `CLIPPING` as `T`. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-FILLED-CIRCLE (p1 r &key (surface *default-surface*) (color *default-color*) (stroke-color nil) (alpha nil) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-FILLED-CIRCLE-*](#draw-filled-circle-*). ##### Parameters * `P1` is the [POINT](#point) coordinates coordinate of the center of the filled circle. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-FILLED-CIRCLE-* (x0 y0 r &key (surface *default-surface*) (color *default-color*) (stroke-color nil) (alpha nil) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-CIRCLE (p1 r &key (surface *default-surface*) (color *default-color*) (alpha nil) (aa nil) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-CIRCLE-*](#draw-circle-*). ##### Parameters * `P1` is the [POINT](#point) coordinates at the center of the circle. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_ * `:AA` ignored in _LISPBUILDER-SDL_
  • Function DRAW-CIRCLE-* (x0 y0 r &key (surface *default-surface*) (color *default-color*) (alpha nil) (aa nil) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-TRIGON (p1 p2 p3 &key (surface *default-surface*) (color *default-color*) (clipping t) (aa nil) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-FILLED-TRIGON (p1 p2 p3 &key (surface *default-surface*) (color *default-color*) (clipping t) (gfx-loaded-p *gfx-loaded-p*))
    Draw a filled trigon of [COLOR](#color) to the [SURFACE](#surface) ##### Parameters * `P1`, `P2` and `P3` specify the vertices of the trigon, of type `SDL:POINT`. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the pixel color, of [COLOR](#color) or [COLOR-A](#color-a). ##### Packages * Supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-POLYGON (vertices &key (surface *default-surface*) (color *default-color*) (clipping t) (aa nil) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-FILLED-POLYGON (vertices &key (surface *default-surface*) (color *default-color*) (clipping t) (gfx-loaded-p *gfx-loaded-p*))
    Draw a filled polygon of [COLOR](#color) to the [SURFACE](#surface) ##### Parameters * `VERTICES` is the list of vertices of type `SDL:POINT`. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the pixel color, of [COLOR](#color) or [COLOR-A](#color-a). ##### Packages * Supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-ELLIPSE (p1 rx ry &key (surface *default-surface*) (color *default-color*) (aa nil) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-ELLIPSE-*](#draw-ellipse-*). ##### Parameters * `P1` is the [POINT](#point) coordinates at the center of the ellipse. ##### Packages * Supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-ELLIPSE-* (x y rx ry &key (surface *default-surface*) (color *default-color*) (aa nil) (gfx-loaded-p *gfx-loaded-p*))
    Draws an ellipse circumference of [COLOR](#color) to the [SURFACE](#surface). Use [DRAW-FILLED-ELLIPSE-*](#draw-filled-ellipse-*) to draw a filled ellipse. ##### Parameters * `X` and `Y` specify the center coordinate of the ellipse, of type `INTEGER`. * `RX` and `RY` specify the ellipse radius, of type `INTEGER`. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the pixel color, of [COLOR](#color) or [COLOR-A](#color-a). ##### Packages * Supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-FILLED-ELLIPSE (p1 rx ry &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-FILLED-ELLIPSE-*](#draw-filled-ellipse-*). ##### Parameters * `P1` is the [POINT](#point) coordinates at the center of the filled ellipse. ##### Packages * Supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-FILLED-ELLIPSE-* (x y rx ry &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
    Draws a filled ellipse of [COLOR](#color) to the [SURFACE](#surface). ##### Parameters * `X` and `Y` specify the center coordinate of the ellipse, of type `INTEGER`. * `RX` and `RY` specify the ellipse radius, of type `INTEGER`. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the pixel color, of [COLOR](#color) or [COLOR-A](#color-a). ##### Packages * Supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-PIE (p1 rad start end &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-PIE-*](#draw-pie-*). ##### Parameters * `P1` is the [POINT](#point) coordinates at the center of the pie. ##### Packages * Supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-PIE-* (x y rad start end &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
    Draws a pie of [COLOR](#color) to the [SURFACE](#surface). Use [DRAW-FILLED-PIE-*](#draw-filled-pie-*) to draw a filled pie. ##### Parameters * `X` and `Y` specify the center coordinate of the pie, of type `INTEGER`. * `RAD` is the pie radius, of type `INTEGER`. * `START` is the pie start, of type `INTEGER`. * `END` is the pie end, of type `INTEGER`. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the pixel color, of [COLOR](#color) or [COLOR-A](#color-a). ##### Packages * Supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-FILLED-PIE (p1 rad start end &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-FILLED-PIE-*](#draw-filled-pie-*). ##### Parameters * `P1` is the [POINT](#point) coordinates at the center of the filled pie. ##### Packages * Supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-FILLED-PIE-* (x y rad start end &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
    Draws a filled pie of [COLOR](#color) to the [SURFACE](#surface) ##### Parameters * `X` and `Y` specify the center coordinate of the pie, of type `INTEGER`. * `RAD` is the pie radius, of type `INTEGER`. * `START` is the pie start, of type `INTEGER`. * `END` is the pie end, of type `INTEGER`. * `:SURFACE` is the target [SURFACE](#surface). * `:COLOR` is the pixel color, of [COLOR](#color) or [COLOR-A](#color-a). ##### Packages * Supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-ARC (p1 rad start end &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-ARC-* (x y rad start end &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Function ROTATE-SURFACE (degrees &key (surface *default-surface*) (free nil) (zoom 1) (smooth nil) (gfx-loaded-p *gfx-loaded-p*))
  • Function ROTATE-SURFACE-XY (degrees &key (surface *default-surface*) (free nil) (zoomx 1) (zoomy 1) (smooth nil) (gfx-loaded-p *gfx-loaded-p*))
    Returns a new [SURFACE](#surface) rotated to `DEGREES`. ##### Parameters * `DEGREES` is the rotation in degrees. * `:SURFACE` is the surface to rotate [SURFACE](#surface). * `:FREE` when `T` will free `SURFACE`. * `:ZOOMX` and `ZOOMY` are the the scaling factors. A negative scaling factor will flip the corresponding axis. _Note_: Flipping is only supported with anti-aliasing turned off. * `:SMOOTH` when `T` will anti-aliase the new surface. ##### Packages * Supported in _LISPBUILDER-SDL-GFX_ * _LISPBUILDER-SDL-GFX_ ignores `:FREE`.
  • Function ZOOM-SURFACE (zoomx zoomy &key (surface *default-surface*) (free nil) (smooth nil) (gfx-loaded-p *gfx-loaded-p*))
    Returns a new [SURFACE](#surface) scaled to `ZOOMX` and `ZOOMY`. ##### Parameters * `:ZOOMX` and `ZOOMY` are the scaling factors. A negative scaling factor will flip the corresponding axis. _Note_: Flipping is only supported with anti-aliasing turned off. * `:SURFACE` is the surface to rotate [SURFACE](#surface). * `:FREE` when `T` will free `SURFACE`. * `:SMOOTH` when `T` will anti-aliase the new surface. ##### Packages * Supported in _LISPBUILDER-SDL-GFX_ * _LISPBUILDER-SDL-GFX_ ignores `:FREE`.
  • Function DRAW-AA-LINE (p1 p2 &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-AA-LINE-* (x1 y1 x2 y2 &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-AA-CIRCLE (p1 r &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-AA-CIRCLE-* (x y r &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-AA-ELLIPSE (p1 rx ry &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-AA-TRIGON (p1 p2 p3 &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-AA-POLYGON (vertices &key (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Class SIMPLE-FONT-DEFINITION  (BITMAP-FONT-DEFINITION)
    COLOR-KEY   Accessor: COLOR-KEY
    CHARACTER-MAP   Accessor: CHARACTER-MAP
    CHARACTER-MASK   Accessor: CHARACTER-MASK
  • Method WIDTH ((font font))
  • Method HEIGHT ((font font))
  • Method X ((font font))
  • Method (setf X) (x-val (font font))
  • Method Y ((font font))
  • Method (setf Y) (y-val (font font))
  • Method DRAW-FONT (&key (font *default-font*) (surface *default-surface*))
  • Method DRAW-FONT-AT (position &key (font *default-font*) (surface *default-surface*))
  • Method DRAW-FONT-AT-* (x y &key (font *default-font*) (surface *default-surface*))
  • Method FREE-CACHED-SURFACE ((font font))
  • Macro WITH-DEFAULT-FONT ((font) &body body)
    Sets `*DEFAULT-FONT*` to `FONT` within the scope of `WITH-DEFAULT-FONT`. ##### Example (WITH-DEFAULT-FONT (new-font) (DRAW-CHARACTER-SHADED-* "Hello World!" 0 0 F-COLOR B-COLOR)) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_ and _LISPBUILDER-SDL-TTF_
  • Macro WITH-FONT ((font font-definition) &body body)
    Sets `*DEFAULT-FONT*` to a new [BITMAP-FONT](#bitmap-font) in `FONT` within the scope of `WITH-FONT`. Frees `FONT` when `WITH-FONT` goes out of scope, and sets `*DEFAULT-FONT* to `NIL. ##### Example (WITH-FONT (new-font *font-8x8*) (DRAW-CHARACTER-SHADED-* "Hello World!" 0 0 F-COLOR B-COLOR)) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function SET-FONT-STYLE (style &key (font *default-font*))
    Sets the rendering style `STYLE` of font `FONT`. This will flush the internal cache of previously rendered glyphs, even if there is no change in style, so it may be best to check the current style using [GET-FONT-STYLE](#get-font-style) first. ##### Parameters * `FONT` is a `FONT` object. * `STYLE` is a list of one or more: `:STYLE-NORMAL`, `:STYLE-BOLD`, `:STYLE-ITALIC`, `:STYLE-UNDERLINE`. NOTE: Combining `:STYLE-UNDERLINE` with anything can cause a segfault, other combinations may also do this. ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function GET-GLYPH-METRIC (ch &key metric (font *default-font*))
    Returns the glyph metrics `METRIC` for the character `CH`, or `NIL` upon error. ##### Parameters * `CH` is a UNICODE chararacter specified as an `INTEGER`. * `FONT` is a `FONT` object from which to retrieve the glyph metrics of the character `CH`. Binds to `*DEFAULT-FONT*` by default. * `METRIC` is a `KEY`word argument and may be one of; `:MINX`, for the minimum `X` offset. `:MAXX`, for the maximum `X` offset. `:MINY`, for the minimum `Y` offset. `:MAXY`, for the maximum `Y` offset. `:ADVANCE`, for the advance offset. ##### Returns * Returns the glyph metric as an `INTEGER`. ##### Example (GET-GLYPH-METRIC UNICODE-CHAR :METRIC :MINX :FONT *DEFAULT-FONT*) ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function GET-FONT-SIZE (text &key size (font *default-font*))
    Calculates and returns the resulting `SIZE` of the `SDL:SURFACE` that is required to render the text `TEXT`, or `NIL` on error. No actual rendering is performed, however correct kerning is calculated for the actual width. The height returned is the same as returned using [GET-FONT-HEIGHT](#get-font-height). ##### Parameters * `TEXT` is the string to size, of type `STRING`. * `SIZE` must be one of; `:W` for the text width or `:H` for the text height. * `FONT` is the font used to calculate the size of the `TEXT`. Binds to `*DEFAULT-FONT*` by default. ##### Returns * Returns the width or height of the specified `SDL:SURFACE`, or `NIL` upon error. ##### Packages * Supported in _LISPBUILDER-SDL_, _LISPBUILDER-SDL-GFX_ and _LISPBUILDER-SDL-TTF_
  • Function GET-FONT-STYLE (&key (font *default-font*))
    Returns the rendering style of the font `FONT`. If no style is set then `:STYLE-NORMAL` is returned, or `NIL` upon error. ##### Parameters * `FONT` is a `FONT` object. Binfs to `*DEFAULT-FONT*` by default. ##### Returns * Retuns the font style as one or more of: `:STYLE-NORMAL`, `:STYLE-BOLD`, `:STYLE-ITALIC`, `:STYLE-UNDERLINE` ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function GET-FONT-HEIGHT (&key (font *default-font*))
    Returns the maximum pixel height of all glyphs of font `FONT`. Use this height for rendering text as close together vertically as possible, though adding at least one pixel height to it will space it so they can't touch. Remember that `SDL_TTF` doesn't handle multiline printing so you are responsible for line spacing, see [GET-FONT-LINE-SKIP](#get-font-line-skip) as well. ##### Parameters * `FONT` is a `FONT` object. Binds to `*DEFAULT-FONT*` by default. ##### Returns * Retuns the height of the `FONT` as an `INTEGER`. ##### Packages * Supported in _LISPBUILDER-SDL_, _LISPBUILDER-SDL-GFX_ and _LISPBUILDER-SDL-TTF_
  • Function GET-FONT-ASCENT (&key (font *default-font*))
    Returns the maximum pixel ascent of all glyphs of font `FONT`. This can also be interpreted as the distance from the top of the font to the baseline. It could be used when drawing an individual glyph relative to a top point, by combining it with the glyph's maxy metric to resolve the top of the rectangle used when blitting the glyph on the screen. ##### Parameters * `FONT` is a `FONT` object. Binds to `*DEFAULT-FONT*` by default. ##### Returns * Returns the ascent of the `FONT` as an `INTEGER`. ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function GET-FONT-DESCENT (&key (font *default-font*))
    Returns the maximum pixel descent of all glyphs of font `FONT`. This can also be interpreted as the distance from the baseline to the bottom of the font. It could be used when drawing an individual glyph relative to a bottom point, by combining it with the glyph's maxy metric to resolve the top of the rectangle used when blitting the glyph on the screen. ##### Parameters * `FONT` is a `FONT` object. Binds to `*DEFAULT-FONT*` by default. ##### Returns * Returns the descent of the `FONT` as an `INTEGER`. ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function GET-FONT-LINE-SKIP (&key (font *default-font*))
    Returns the recommended pixel height of a rendered line of text of the font `FONT`. This is usually larger than the [GET-FONT-HEIGHT](#get-font-height) of the font. ##### Parameters * `FONT` is a `FONT` object. Binds to `*DEFAULT-FONT*` by default. ##### Returns * Returns the pixel height of the `FONT` as an `INTEGER`. ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function GET-FONT-FACES (&key (font *default-font*))
    Returns the number of faces 'sub-fonts' available in the font `FONT`. This is a count of the number of specific fonts (based on size and style and other typographical features perhaps) contained in the font itself. It seems to be a useless fact to know, since it can't be applied in any other `SDL_TTF` functions. ##### Parameters * `FONT` is a `FONT` object. Binds to `*DEFAULT-FONT*` by default. ##### Returns * Returns the number of faces in the `FONT` as an `INTEGER`. ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function FONT-FIXED-WIDTH-P (&key (font *default-font*))
    Returns `T` if the font face is of a fixed width, or `NIL` otherwise. Fixed width fonts are monospace, meaning every character that exists in the font is the same width. ##### Parameters * `FONT` is a `FONT` object. Binds to `*DEFAULT-FONT*` by default. ##### Returns * Retuns `T` if `FONT` is of fixed width, and `NIL` otherwise. ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function GET-FONT-FACE-FAMILY-NAME (&key (font *default-font*))
    Returns the current font face family name of font `FONT` or `NIL` if the information is unavailable. ##### Parameters * `FONT` is a `FONT` object. Binds to `*DEFAULT-FONT*` by default. ##### Returns * Returns the name of the `FONT` face family name as a `STRING`, or `NIL` if unavailable. ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function GET-FONT-FACE-STYLE-NAME (&key (font *default-font*))
    Returns the current font face style name of font `FONT`, or `NIL` if the information is unavailable. ##### Parameters * `FONT` is a `FONT` object. Binds to `*DEFAULT-FONT*` by default. ##### Returns * Returns the name of the `FONT` face style as a `STRING`, or `NIL` if unavailable. ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Method SET-DEFAULT-FONT (font)
  • Variable *FONT-5X7*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 5 :height 7
                   :data lispbuilder-sdl::*5x7-font-data*)
    Contains the font data for an 5x7 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-5X7*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 5 :height 7 :data
                   lispbuilder-sdl::*5x7-font-data*)
    Contains the font data for an 5x7 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-5X8*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 5 :height 8
                   :data lispbuilder-sdl::*5x8-font-data*)
    Contains the font data for an 5x8 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-5X8*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 5 :height 8 :data
                   lispbuilder-sdl::*5x8-font-data*)
    Contains the font data for an 5x8 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-6X9*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 6 :height 9
                   :data lispbuilder-sdl::*6x9-font-data*)
    Contains the font data for an 6x9 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-6X9*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 6 :height 9
                   :data lispbuilder-sdl::*6x9-font-data*)
    Contains the font data for an 6x9 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-6X10*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 6 :height 10
                   :data lispbuilder-sdl::*6x10-font-data*)
    Contains the font data for an 6x10 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-6X10*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 6 :height 10 :data
                   lispbuilder-sdl::*6x10-font-data*)
    Contains the font data for an 6x10 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-6X12*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 6 :height 12
                   :data lispbuilder-sdl::*6x12-font-data*)
    Contains the font data for an 6x12 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-6X12*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 6 :height 12 :data
                   lispbuilder-sdl::*6x12-font-data*)
    Contains the font data for an 6x12 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-6X13*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 6 :height 13
                   :data lispbuilder-sdl::*6x13-font-data*)
    Contains the font data for an 6x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-6X13*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 6 :height 13 :data
                   lispbuilder-sdl::*6x13-font-data*)
    Contains the font data for an 6x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-6X13B*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 6 :height 13
                   :data lispbuilder-sdl::*6x13b-font-data*)
    Contains the font data for an 6x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-6X13B*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 6 :height 13 :data
                   lispbuilder-sdl::*6x13b-font-data*)
    Contains the font data for an 6x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-6X13O*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 6 :height 13
                   :data lispbuilder-sdl::*6x13o-font-data*)
    Contains the font data for an 6x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-6X13O*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 6 :height 13
                   :data lispbuilder-sdl::*6x13o-font-data*)
    Contains the font data for an 6x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-7X13*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 7 :height 13
                   :data lispbuilder-sdl::*7x13-font-data*)
    Contains the font data for an 7x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-7X13*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 7 :height 13
                   :data lispbuilder-sdl::*7x13-font-data*)
    Contains the font data for an 7x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-7X13B*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 7 :height 13
                   :data lispbuilder-sdl::*7x13b-font-data*)
    Contains the font data for an 7x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-7X13B*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 7 :height 13
                   :data lispbuilder-sdl::*7x13b-font-data*)
    Contains the font data for an 7x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-7X13O*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 7 :height 13
                   :data lispbuilder-sdl::*7x13o-font-data*)
    Contains the font data for an 7x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-7X13O*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 7 :height 13 :data
                   lispbuilder-sdl::*7x13o-font-data*)
    Contains the font data for an 7x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-7X14*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 7 :height 14
                   :data lispbuilder-sdl::*7x14-font-data*)
    Contains the font data for an 7x14 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-7X14*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 7 :height 14 :data
                   lispbuilder-sdl::*7x14-font-data*)
    Contains the font data for an 7x14 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-7X14B*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 7 :height 14
                   :data lispbuilder-sdl::*7x14b-font-data*)
    Contains the font data for an 7x14 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-7X14B*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 7 :height 14 :data
                   lispbuilder-sdl::*7x14b-font-data*)
    Contains the font data for an 7x14 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-8X8*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 8 :height 8
                   :data lispbuilder-sdl::*8x8-font-data*)
    Contains the font data for an 8x8 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-8X8*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 8 :height 8 :data
                   lispbuilder-sdl::*8x8-font-data*)
    Contains the font data for an 8x8 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-8X13*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 8 :height 13
                   :data lispbuilder-sdl::*8x13-font-data*)
    Contains the font data for an 8x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-8X13*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 8 :height 13 :data
                   lispbuilder-sdl::*8x13-font-data*)
    Contains the font data for an 8x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-8X13B*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 8 :height 13
                   :data lispbuilder-sdl::*8x13b-font-data*)
    Contains the font data for an 8x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-8X13B*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 8 :height 13 :data
                   lispbuilder-sdl::*8x13b-font-data*)
    Contains the font data for an 8x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-8X13O*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 8 :height 13
                   :data lispbuilder-sdl::*8x13o-font-data*)
    Contains the font data for an 8x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-8X13O*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 8 :height 13 :data
                   lispbuilder-sdl::*8x13o-font-data*)
    Contains the font data for an 8x13 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-9X15*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 9 :height 15
                   :data lispbuilder-sdl::*9x15-font-data*)
    Contains the font data for an 9x15 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-9X15*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 9 :height 15 :data
                   lispbuilder-sdl::*9x15-font-data*)
    Contains the font data for an 9x15 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-9X15B*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 9 :height 15
                   :data lispbuilder-sdl::*9x15b-font-data*)
    Contains the font data for an 9x15 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-9X15B*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 9 :height 15 :data
                   lispbuilder-sdl::*9x15b-font-data*)
    Contains the font data for an 9x15 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-9X18*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 9 :height 18
                   :data lispbuilder-sdl::*9x18-font-data*)
    Contains the font data for an 9x18 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-9X18*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 9 :height 18 :data
                   lispbuilder-sdl::*9x18-font-data*)
    Contains the font data for an 9x18 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-9X18B*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 9 :height 18
                   :data lispbuilder-sdl::*9-18b-font-data*)
    Contains the font data for an 9x18 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-9X18B*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 9 :height 18 :data
                   lispbuilder-sdl::*9-18b-font-data*)
    Contains the font data for an 9x18 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *FONT-10X20*
    (make-instance 'lispbuilder-sdl::bitmap-font-definition :width 10 :height 20
                   :data lispbuilder-sdl::*10x20-font-data*)
    Contains the font data for an 10x20 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *GFX-FONT-10X20*
    (make-instance 'lispbuilder-sdl::gfx-font-definition :width 10 :height 20 :data
                   lispbuilder-sdl::*10x20-font-data*)
    Contains the font data for an 10x20 bitmap font. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Variable *SIMPLE-FONT-4X5*
    (make-instance 'lispbuilder-sdl:simple-font-definition :width 4 :height 5
                   :character-map
                   "abcdefghijklmnopqrstuvwxyz:'!?_-,.()#~0123456789"
                   :character-mask
                   (loop lispbuilder-sdl::for lispbuilder-sdl:y lispbuilder-sdl::from 0 lispbuilder-sdl::below 1
                         append (loop lispbuilder-sdl::for lispbuilder-sdl:x lispbuilder-sdl::from 0 lispbuilder-sdl::below 48
                                      lispbuilder-sdl::collect (list
                                                                (*
                                                                 lispbuilder-sdl:x
                                                                 4)
                                                                (*
                                                                 lispbuilder-sdl:y
                                                                 5)
                                                                4 5)))
                   :color-key (lispbuilder-sdl:color :r 99 :g 0 :b 0) :filename
                   (lispbuilder-sdl:create-path "font.bmp"
                                                lispbuilder-sdl-assets::*default-asset-path*))
  • Class BITMAP-FONT  (FONT)
    CHARACTERS   Reader: CHARACTERS
  • Method CHAR-WIDTH ((self bitmap-font))
  • Method CHAR-HEIGHT ((self bitmap-font))
  • Class SDL-BITMAP-FONT  (BITMAP-FONT)
    The `SDL-BITMAP-FONT` object manages the resources for a bitmap font. Prior to the first call to a `RENDER-STRING*` function, the cached [SURFACE](#surface) is `NIL`. The cached surface is created by a call to any of the RENDER-STRING* functions. Use [DRAW-FONT](#draw-font), [DRAW-FONT-AT](#draw-font-at) or [DRAW-FONT-AT-*](#draw-font-at-*) to draw the cached surface. Free using [FREE](#free)
    No slots.
  • Method INITIALISE-FONT ((self bitmap-font-definition))
  • Function INITIALISE-DEFAULT-FONT (&optional (font-definition (if *gfx-loaded-p* *gfx-font-8x8* *font-8x8*)))
    Returns a new [SDL-BITMAP-FONT](#sdl-bitmap-font) initialized from `FONT-DEFINITION` data, or `NIL` if the font cannot be created. `FONT-DEFINITION` is set to `*font-8x8*` if unspecified. Binds the symbol `*DEFAULT-FONT*` to the new font to be used as the default for subsequent font rendering or drawing operations. ##### Packages * Aslo supported in _LISPBUILDER-SDL-GFX_
  • Function CREATE-SIMPLE-FONT-DEFINITION (width height char-map char-mask color-key filename loader)
  • Method INITIALISE-FONT ((self simple-font-definition))
  • Class GFX-BITMAP-FONT  (BITMAP-FONT, FOREIGN-OBJECT)
    FONT-DEFAULT   Accessor: DEFAULT-FONT-P
  • Method INITIALISE-FONT ((self gfx-font-definition))
  • Function RENDER-STRING-SOLID (string &key (font *default-font*) (color *default-color*) (free nil) (cache nil))
    Render the string `STRING` using font `FONT` with text color `COLOR` to a new `SURFACE`. The dimensions of the new surface are height == `FONT` height, and width == `FONT` width * `STRING` length. The surface background is transparent and therefore can be keyed over other surfaces. Use `:CACHE T` to cache the new surface in the `FONT` object. When `:FREE T` any exisiting cached surface in `FONT` is automatically freed. When `:FREE NIL` the caller is responsible for freeing any existing cached surface in `FONT`. ##### Parameters * `STRING` is the text to render. * `FONT` is the font face used to render the `STRING`. Of type `FONT`. Bound to `*DEFAULT-FONT*` if unspecified. * `COLOR` color is the text color, of type `COLOR`. * `FREE` when `T` will free any exisitng cached surface in `FONT`. * `CACHE` when `T` will cache the newly created SURFACE in `FONT`. Any cached surface can be accessed using [CACHED-SURFACE](#cached-surface) and can be blitted to a target surface using [DRAW-FONT](#draw-font). ##### Returns * Returns a new cached surface `SDL-SURFACE`. ##### Example (DRAW-STRING-SOLID "Hello World!" :COLOR A-COLOR) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_, and _LISPBUILDER-SDL-TTF_
  • Function DRAW-STRING-SOLID (string p1 &key (justify :left) (surface *default-surface*) (font *default-font*) (color *default-color*))
    See [DRAW-STRING-SOLID-*](#draw-string-solid-*). ##### Parameters * `P1` is the `X` and `X` coordinates to render the text, of type `POINT`. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_, and _LISPBUILDER-SDL-TTF_
  • Function DRAW-STRING-SOLID-* (string x y &key (justify :left) (surface *default-surface*) (font *default-font*) (color *default-color*))
    Draw text `STRING` at location `X` `Y` using font `FONT` with color `COLOR` onto surface `SURFACE`. The text is keyed onto `SURFACE`. ##### Parameters * `STRING` is the text to render. * `X` and `Y` are the `X` and `Y` position coordinates, as `INTEGERS`. * `FONT` is the font face used to render the string. Of type `FONT`. Bound to `*DEFAULT-FONT*` if unspecified. * `SURFACE` is the target surface, of type `SDL-SURFACE`. Bound to `*DEFAULT-SURFACE*` if unspecified. * `COLOR` color is the text color, of type `COLOR`. ##### Returns * Returns the surface `SURFACE`. ##### Example (DRAW-STRING-SOLID-* "Hello World!" 0 0 :SURFACE A-SURFACE :COLOR A-COLOR) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_, and _LISPBUILDER-SDL-TTF_
  • Function RENDER-STRING-SHADED (string fg-color bg-color &key (font *default-font*) (free nil) (cache nil))
    Render the string `STRING` using font `FONT` with text color `FG-COLOR` and background color `BG-COLOR` to a new `SURFACE`. The dimensions of the new surface are height == `FONT` height, and width == `FONT` width * `STRING` length. The surface background is filled with `BG-COLOR` so the surface cannot be keyed over other surfaces. Use `:CACHE T` to cache the new surface in the `FONT` object. When `:FREE T` any exisiting cached surface in `FONT` is automatically freed. When `:FREE NIL` the caller is responsible for freeing any existing cached surface in `FONT`. ##### Parameters * `STRING` is the text to render. * `FONT` is the font face used to render the `STRING`. Of type `FONT`. Bound to `*DEFAULT-FONT*` if unspecified. * `FG-COLOR` color is the text color, of type `COLOR` * `BG-COLOR` color is the background color used to fill the surface, of type `COLOR` * `FREE` when `T` will free any exisiting cached surface in `FONT`. * `CACHE` when `T` will cache the newly created SURFACE in `FONT`. Any cached surface can be accessed using [CACHED-SURFACE](#cached-surface) and can be blitted to a target surface using [DRAW-FONT](#draw-font). ##### Returns * Returns a new cached surface `SDL-SURFACE`. ##### Example (RENDER-STRING-SHADED "Hello World!" F-COLOR B-COLOR) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-STRING-SHADED (string p1 fg-color bg-color &key (justify :left) (surface *default-surface*) (font *default-font*))
    See [DRAW-STRING-SHADED-*](#draw-string-shaded-*). ##### Parameters * `P1` is the `X` and `Y` coordinates to render the text, of type `SDL:POINT`. ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function DRAW-STRING-SHADED-* (string x y fg-color bg-color &key (justify :left) (surface *default-surface*) (font *default-font*))
    Draw text `STRING` at location `X` `Y` using font `FONT` with text color `FG-COLOR` and background color `BG-COLOR` onto surface `SURFACE`. The surface background is filled with `BG-COLOR` so the surface cannot be keyed over other surfaces. * `STRING` is the text to render. * `X` and `Y` are the `X` and `Y` coordinates, as `INTEGERS`. * `FG-COLOR` color is the text color, of type `COLOR` * `BG-COLOR` color is the background color used to fill the surface `SURFACE`, of type `COLOR` * `FONT` is the font face used to render the text. Of type `FONT`. Bound to `*DEFAULT-FONT*` if unspecified. * `SURFACE` is the target surface, of type `SDL-SURFACE`. Bound to `*DEFAULT-SURFACE*` if unspecified. ##### Returns * Returns the surface `SURFACE`. ##### Example (DRAW-STRING-SHADED-* "Hello World!" 0 0 F-COLOR B-COLOR :SURFACE A-SURFACE) ##### Packages * Also supported in _LISPBUILDER-SDL-GFX_
  • Function RENDER-STRING-BLENDED (string &key (font *default-font*) (color *default-color*) (free nil) (cache nil))
    Render the string `STRING` using font `FONT` with text color `COLOR` to a new `SURFACE`. The dimensions of the new surface are height == `FONT` height, and width == `FONT` width * `STRING` length. The surface background is transparent and therefore can be keyed over other surfaces. Use `:CACHE T` to cache the new surface in the `FONT` object. When `:FREE T` any exisiting cached surface in `FONT` is automatically freed. When `:FREE NIL` the caller is responsible for freeing any existing cached surface in `FONT`. ##### Parameters * `STRING` is the text to render. * `FONT` is the font face used to render the `STRING`. Of type `FONT`. Bound to `*DEFAULT-FONT*` if unspecified. * `COLOR` color is the text color, of type `COLOR`. * `FREE` when `T` will free any exisitng cached surface in `FONT`. * `CACHE` when `T` will cache the newly created SURFACE in `FONT`. Any cached surface can be accessed using [CACHED-SURFACE](#cached-surface) and can be blitted to a target surface using [DRAW-FONT](#draw-font). ##### Returns * Returns a new cached surface `SDL-SURFACE`. ##### Example (DRAW-STRING-SOLID "Hello World!" :COLOR A-COLOR) ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function DRAW-STRING-BLENDED (string p1 &key (justify :left) (surface *default-surface*) (font *default-font*) (color *default-color*))
    See [DRAW-STRING-BLENDED-*](#draw-string-blended-*). ##### Parameters * `P1` is the `X` and `X` coordinates to render the text, of type `POINT`. ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function DRAW-STRING-BLENDED-* (string x y &key (justify :left) (surface *default-surface*) (font *default-font*) (color *default-color*))
    Draw text `STRING` at location `X` `Y` using font `FONT` with color `COLOR` onto surface `SURFACE`. The text is keyed onto `SURFACE`. ##### Parameters * `STRING` is the text to render. * `X` and `Y` are the `X` and `Y` position coordinates, as `INTEGERS`. * `FONT` is the font face used to render the string. Of type `FONT`. Bound to `*DEFAULT-FONT*` if unspecified. * `SURFACE` is the target surface, of type `SDL-SURFACE`. Bound to `*DEFAULT-SURFACE*` if unspecified. * `COLOR` color is the text color, of type `COLOR`. ##### Returns * Returns the surface `SURFACE`. ##### Example (DRAW-STRING-SOLID-* "Hello World!" 0 0 :SURFACE A-SURFACE :COLOR A-COLOR) ##### Packages * Supported in _LISPBUILDER-SDL-TTF_
  • Function DRAW-CHARACTER-SOLID (c p1 &key (font *default-font*) (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-CHARACTER-SOLID-*](#draw-character-solid-*). ##### Parameters * `P1` is the `X` and `Y` coordinates to render the character onto `SURFACE`, of type `SDL:POINT`.
  • Function DRAW-CHARACTER-SOLID-* (c x y &key (font *default-font*) (surface *default-surface*) (color *default-color*) (gfx-loaded-p *gfx-loaded-p*))
  • Function DRAW-CHARACTER-SHADED (c p1 fg-color bg-color &key (font *default-font*) (surface *default-surface*) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-CHARACTER-SHADED-*](#draw-character-shaded-*). ##### Parameters * `P1` is the x and y position to render the character, of type `SDL:POINT`.
  • Function DRAW-CHARACTER-SHADED-* (c x y fg-color bg-color &key (font *default-font*) (surface *default-surface*) (gfx-loaded-p *gfx-loaded-p*))
    See [DRAW-CHARACTER-SHADED-*](#draw-character-shaded-*). ##### Parameters * `P1` is the x and y position to render the character, of type `SDL:POINT`.
  • Function UNICODE-ENABLED-P
    Queries the current state of Unicode keyboard translation. Returns T if enabled, NIL if disabled.
  • Function ENABLE-UNICODE
    Unicode translation is enabled with STATE is T, and disabled when STATE is NIL. To obtain the character codes corresponding to received keyboard events, Unicode translation must first be turned on using this function. The translation incurs a slight overhead for each keyboard event and is therefore disabled by default. For each subsequently received key down event, the unicode member of the SDL_keysym structure will then contain the corresponding character code, or zero for keysyms that do not correspond to any character code. Note that only key press events will be translated, not release events. Returns the previous unicode translation state.
  • Function DISABLE-UNICODE
    Unicode translation is enabled with STATE is T, and disabled when STATE is NIL. To obtain the character codes corresponding to received keyboard events, Unicode translation must first be turned on using this function. The translation incurs a slight overhead for each keyboard event and is therefore disabled by default. For each subsequently received key down event, the unicode member of the SDL_keysym structure will then contain the corresponding character code, or zero for keysyms that do not correspond to any character code. Note that only key press events will be translated, not release events. Returns the previous unicode translation state.
  • Function ENABLE-KEY-REPEAT (delay interval)
    Enables the keyboard repeat rate. DELAY specifies how long the key must be pressed before it begins repeating, it then repeats at the speed specified by INTERVAL. Both DELAY and INTERVAL are expressed in milliseconds. Setting DELAY or INTERVAL to NIL will set the default values of SDL-DEFAULT-REPEAT-DELAY and SDL-DEFAULT-REPEAT-INTERVAL respectively. _NOTE_: `ENABLE-KEY-REPEAT` must be called after the SDL library has been initialized to have an effect.
  • Function DISABLE-KEY-REPEAT
    Disables keyboard repeat.
  • Function KEY-REPEAT-ENABLED-P
    Returns the current keyboard DELAY and INTERVAL repeat rate in milliseconds as (VALUES DELAY INTERVAL).
  • Function KEY-REPEAT-DELAY
    Returns the current key repeat delay, in milliseconds.
  • Function KEY-REPEAT-INTERVAL
    Returns the current key repeat interval, in milliseconds.
  • Function GET-KEY-STATE (key)
  • Function GET-KEYS-STATE
  • Function KEY-STATE-P (&optional key)
    Returns all keys that are currently depressed as a LIST. Returns KEY if KEY is currently depressed, returns NIL otherwise. Note: Use SDL_PumpEvents to update the state array. Note: This function gives you the current state after all events have been processed, so if a key or button has been pressed and released before you process events, then the pressed state will never show up in the getstate calls. Note: This function doesn't take into account whether shift is currently depressed. For example: (KEY-STATE-P :SDL-KEY-F1)
  • Function KEY-DOWN-P (key)
    Returns `KEY` if currently depressed, returns NIL otherwise. Note: Use SDL_PumpEvents to update the state array. Note: This function returns the current state after all events have been processed, so if a key or button has been pressed and released before you process events, then the pressed state will never show up in the getstate calls. Note: This function doesn't take into account whether shift is currently depressed. For example: (KEY-DOWN-P :SDL-KEY-F1)
  • Function KEYS-DOWN-P
    Returns all keys that are currently depressed as a LIST. Note: Use SDL_PumpEvents to update the state array. Note: This function returns the current state after all events have been processed, so if a key or button has been pressed and released before you process events, then the pressed state will never show up in the getstate calls. Note: This function doesn't take into account whether shift is currently depressed. For example: (KEYS-DOWN-P)
  • Function GET-MOD-STATE (key)
  • Function GET-MODS-STATE
  • Function MOD-STATE-P (&optional key)
    Returns all modifier keys that are currently depressed as a LIST. Returns KEY if KEY is currently depressed, returns NIL otherwise. Note: Use SDL_PumpEvents to update the state array. Note: This function gives you the current state after all events have been processed, so if a key or button has been pressed and released before you process events, then the pressed state will never show up in the getstate calls. For example: (GET-MOD-STATE :SDL-KEY-MOD-LCTRL)
  • Function MOD-DOWN-P (mod)
    Returns `MOD` if currently depressed, returns NIL otherwise. Note: Use SDL_PumpEvents to update the state array. Note: This function gives you the current state after all events have been processed, so if a key or button has been pressed and released before you process events, then the pressed state will never show up in the getstate calls. For example: (MOD-DOWN-P :SDL-KEY-MOD-LCTRL)
  • Function MODS-DOWN-P
    Returns all modifier keys that are currently depressed as a LIST. Note: Use SDL_PumpEvents to update the state array. Note: This function gives you the current state after all events have been processed, so if a key or button has been pressed and released before you process events, then the pressed state will never show up in the getstate calls. For example: (MODS-DOWN-P)
  • Function KEY= (key1 key2)
  • Generic-Function MODIFIER= (mod key)
    Returns `MOD` only when all of the modifiers in `MOD` exactly match `KEY`, and returns `NIL` otherwise. `MOD` may be a list of modifiers, or a single modifier. ##### Example (:KEY-DOWN-EVENT (:MOD MOD) (SDL:MODIFIER= '(:SDL-KEY-MOD-LCTRL :SDL-KEY-MOD-LALT) MOD))
  • Method MODIFIER= (modifiers (key list))
  • Method MODIFIER= (modifiers key)
  • Generic-Function MODIFIER-P (key &optional modifiers)
    Returns a list of the modifiers in `KEY` that match `MODIFIERS`, or `NIL` if no modifiers match. By default, `MODIFIERS` is the list of valid modifiers. ##### Example 1 (:KEY-DOWN-EVENT (:MOD MOD) (SDL:MODIFIER-P MOD '(:SDL-KEY-MOD-LCTRL :SDL-KEY-MOD-LALT))) ##### Example 2 (:KEY-DOWN-EVENT (:MOD MOD) (SDL:MODIFIER-P MOD))
  • Method MODIFIER-P ((key list) &optional (modifiers (foreign-enum-keyword-list 'lispbuilder-sdl-cffi::sdl-mod)))
  • Method MODIFIER-P (key &optional (modifiers (foreign-enum-keyword-list 'lispbuilder-sdl-cffi::sdl-mod)))
  • Variable *BLACK*
    (lispbuilder-sdl:color :r 0 :g 0 :b 0)
    `RGB` [COLOR](#color) black.
  • Variable *WHITE*
    (lispbuilder-sdl:color :r 255 :g 255 :b 255)
    `RGB` [COLOR](#color) white.
  • Variable *RED*
    (lispbuilder-sdl:color :r 255 :g 0 :b 0)
    `RGB` [COLOR](#color) red.
  • Variable *GREEN*
    (lispbuilder-sdl:color :r 0 :g 255 :b 0)
    `RGB` [COLOR](#color) green.
  • Variable *BLUE*
    (lispbuilder-sdl:color :r 0 :g 0 :b 255)
    `RGB` [COLOR](#color) blue.
  • Variable *YELLOW*
    (lispbuilder-sdl:color :r 255 :g 255 :b 0)
    `RGB` [COLOR](#color) yellow.
  • Variable *CYAN*
    (lispbuilder-sdl:color :r 0 :g 255 :b 255)
    `RGB` [COLOR](#color) cyan.
  • Variable *MAGENTA*
    (lispbuilder-sdl:color :r 255 :g 0 :b 255)
    `RGB` [COLOR](#color) magenta.
  • Generic-Function AUDIO-SPEC (audio-spec)
  • Generic-Function SAMPLE-FREQUENCY (audio-spec)
  • Generic-Function AUDIO-FORMAT (audio-spec)
  • Generic-Function OUTPUT-CHANNELS (audio-spec)
  • Generic-Function AUDIO-SILENCE (audio-spec)
  • Generic-Function AUDIO-BUFFER-SIZE (audio-spec)
  • Generic-Function AUDIO-BUFFER-SIZE-CALCULATED (audio-spec)
  • Generic-Function SPEC-CALLBACK (audio-spec)
  • Generic-Function SPEC-USER-DATA (audio-spec)
  • Generic-Function COPY-AUDIO (audio-spec)
  • Generic-Function REGISTER-AUDIO-FINISHED (audio-spec fn)
  • Generic-Function UNREGISTER-AUDIO-FINISHED (audio-spec)
  • Generic-Function AUDIO-FINISHED-CALLBACK (audio-spec)
  • Generic-Function REWIND-AUDIO (audio &optional pos)
  • Class AUDIO-SPEC  (FOREIGN-OBJECT)
    No slots.
  • Method AUDIO-SPEC ((self audio-spec))
  • Method SAMPLE-FREQUENCY ((self audio-spec))
  • Method AUDIO-FORMAT ((self audio-spec))
  • Method OUTPUT-CHANNELS ((self audio-spec))
  • Method AUDIO-SILENCE ((self audio-spec))
  • Method AUDIO-BUFFER-SIZE ((self audio-spec))
  • Method AUDIO-BUFFER-SIZE-CALCULATED ((self audio-spec))
  • Method SPEC-CALLBACK ((self audio-spec))
  • Method SPEC-USER-DATA ((self audio-spec))
  • Class AUDIO-CVT  (FOREIGN-OBJECT)
    No slots.
  • Class AUDIO-BUFFER
    BUFFER   Reader: AUDIO-BUFFER
    LENGTH   Reader: AUDIO-LENGTH
    SPEC   Reader: AUDIO-SPEC
    FREQUENCY
    FORMAT
    CHANNELS
    CONVERTED-P   Reader: CONVERTED-P
  • Method SAMPLE-FREQUENCY ((self audio-buffer))
  • Method AUDIO-FORMAT ((self audio-buffer))
  • Method OUTPUT-CHANNELS ((self audio-buffer))
  • Class AUDIO
    BUFFER-HANDLE   Reader: AUDIO-BUFFER-HANDLE
    REMAINING   Accessor: AUDIO-REMAINING
    POSITION   Accessor: AUDIO-POSITION
    PAUSE
    VOLUME   Accessor: AUDIO-VOLUME
    PLAY-COUNT   Accessor: PLAY-COUNT
    LOOP   Accessor: LOOP-P
    CALLBACK-FINISHED   Accessor: CALLBACK-FINISHED
    REMOVE-P   Accessor: REMOVE-AUDIO-P
  • Method COPY-AUDIO ((self audio))
  • Method AUDIO-BUFFER ((self audio))
  • Method AUDIO-LENGTH ((self audio))
  • Method SAMPLE-FREQUENCY ((self audio))
  • Method AUDIO-FORMAT ((self audio))
  • Method OUTPUT-CHANNELS ((self audio))
  • Method REGISTER-AUDIO-FINISHED ((self audio) fn)
  • Method UNREGISTER-AUDIO-FINISHED ((self audio))
  • Method AUDIO-FINISHED-CALLBACK ((self audio))
  • Method REWIND-AUDIO ((self audio) &optional (pos 0))
    Rewind to start of `AUDIO`. Safe to use on halted, paused or currently playing music. Does not resume or begin playback of halted or paused music.
  • Function AUDIO-DRIVER-NAME
    Returns the driver name of the initialised audio driver. The driver name is a `STRING` containing a one-word identifier like "x11" or "windib". Returns 'NIL' if the audio driver is not already initialised with [INIT-SDL](#init-sdl) or [WITH-INIT](#with-init). ##### Example (sdl:with-init () (sdl:audio-driver-name)) >> "windib"
  • Generic-Function AUDIO-PLAYING-P (&optional obj)
  • Generic-Function BUILD-AUDIO-CVT (audio mixer)
  • Class MIXER
    REQUESTED-SAMPLE-FREQUENCY   Accessor: REQUESTED-SAMPLE-FREQUENCY
    REQUESTED-AUDIO-FORMAT   Accessor: REQUESTED-AUDIO-FORMAT
    REQUESTED-OUTPUT-CHANNELS   Accessor: REQUESTED-OUTPUT-CHANNELS
    REQUESTED-AUDIO-BUFFER-SIZE   Accessor: REQUESTED-AUDIO-BUFFER-SIZE
    OBTAINED-SPEC   Reader: AUDIO-SPEC
    CALLBACK
    MIXER-OPENED-P   Reader: MIXER-OPENED-P
    OUTPUT-AUDIO-BUFFER-SIZE   Reader: OUTPUT-AUDIO-BUFFER-SIZE
    OUTPUT-BUFFER   Accessor: OUTPUT-BUFFER
    VOLUME   Accessor: AUDIO-VOLUME
    LOOP   Accessor: LOOP-P
    PAUSE
  • Method SAMPLE-FREQUENCY ((self mixer))
  • Method AUDIO-FORMAT ((self mixer))
  • Method OUTPUT-CHANNELS ((self mixer))
  • Method AUDIO-BUFFER-SIZE ((self mixer))
  • Function OPEN-AUDIO (&key (frequency +default-frequency+) (format +default-format+) (channels +default-channels+) (audio-buffer-size +default-sample-buffer+) callback (volume +max-volume+))
  • Function PLAY-AUDIO (&optional obj &key loop pos)
  • Function PAUSE-AUDIO (&optional obj)
  • Function RESUME-AUDIO (&optional obj)
  • Function AUDIO-PAUSED-P (&optional obj)
  • Function AUDIO-OPENED-P
  • Method AUDIO-PLAYING-P (&optional obj)
  • Function CLOSE-AUDIO
  • Generic-Function LOAD-SAMPLE (filename)
  • Method LOAD-SAMPLE ((filename string))
  • Method LOAD-SAMPLE ((filename pathname))
  • Method BUILD-AUDIO-CVT ((audio audio) (mixer mixer))
  • Function LOAD-AUDIO (filename)
  • Function MOUSE-GAIN-FOCUS-P (gain &optional (state (lispbuilder-sdl-cffi::sdl-get-app-state)))
  • Function INPUT-GAIN-FOCUS-P (gain &optional (state (lispbuilder-sdl-cffi::sdl-get-app-state)))
  • Function ACTIVE-GAIN-P (gain &optional (state (lispbuilder-sdl-cffi::sdl-get-app-state)))
  • Function MOUSE-FOCUS-P (&optional (state (lispbuilder-sdl-cffi::sdl-get-app-state)))
  • Function INPUT-FOCUS-P (&optional (state (lispbuilder-sdl-cffi::sdl-get-app-state)))
  • Function ACTIVE-P (&optional (state (lispbuilder-sdl-cffi::sdl-get-app-state)))
  • Function FLOOD-FILL (point &key (surface *default-surface*) (color *default-color*))
    See [FLOOD-FILL-*](#flood-fill-*). ##### Parameters * POINT is the position to state the fill, of type `POINT`.
  • Function FLOOD-FILL-* (x y &key (surface *default-surface*) (color *default-color*))
    Performs a flood fill of surface `SURFACE` with color `COLOR`. The fill starts at the position specified by the `X` and `Y` coordinates. Uses a stack based flood fill that does a lot of consing because it uses PUSH/POP as the stack. This function is fast. ##### Parameters * `X` and `Y` are `INTEGER` coordinates. * `SURFACE` is the target surface, of type `SDL:SDL-SURFACE`. Bound to `SDL:*DEFAULT-SURFACE*` if unspecified. * `COLOR` is the fill color, of type `SDL:COLOR` or `SDL:COLOR-A`. Bound to `SDL:*DEFAULT-COLOR*` if unspecified.
  • Function FLOOD-FILL-STACK (point &key (surface *default-surface*) (color *default-color*))
    See [FLOOD-FILL-STACK-*](#flood-fill-stack-*). ##### Parameters * POINT is the position to state the fill, of type `POINT`.
  • Function FLOOD-FILL-STACK-* (x y &key (surface *default-surface*) (color *default-color*))
    See [FLOOD-FILL-*](#flood-fill-*). `FLOOD-FILL-STACK-*` is maintains an internal array-based stack. *Note*: More of an experiment to see if an array would be faster than a bunch of consing. The timing of both functions indicates they run at the same speed. With compiler declarations it may have better results. Another disadvantage to this is it preallocates the stack, chewing up quite a bit of ram.

Also exports

  • LISPBUILDER-SDL-CFFI:SDL-HW-PALETTE
  • LISPBUILDER-SDL-CFFI:SDL-PRE-ALLOC
  • LISPBUILDER-SDL-CFFI:SDL-IYUV-OVERLAY
  • LISPBUILDER-SDL-CFFI:SDL-BUTTON-RIGHT
  • LISPBUILDER-SDL-BASE:PIXEL-DATA
  • LISPBUILDER-SDL-CFFI:SDL-INIT-EVERYTHING
  • LISPBUILDER-SDL-CFFI:SDL-YV12-OVERLAY
  • LISPBUILDER-SDL-ASSETS:*DEFAULT-ASSET-PATH*
  • LISPBUILDER-SDL-CFFI:SDL-BUTTON-MIDDLE
  • LISPBUILDER-SDL-CFFI:SDL-SRC-COLOR-KEY
  • LISPBUILDER-SDL-CFFI:SDL-INIT-VIDEO
  • LISPBUILDER-SDL-CFFI:SDL-SW-SURFACE
  • LISPBUILDER-SDL-BASE:PIXELS
  • LISPBUILDER-SDL-CFFI:SDL-SRC-ALPHA
  • LISPBUILDER-SDL-CFFI:SDL-GL-GET-PROC-ADDRESS
  • LISPBUILDER-SDL-CFFI:SDL-ANY-FORMAT
  • LISPBUILDER-SDL-CFFI:SDL-ASYNC-BLIT
  • LISPBUILDER-SDL-CFFI:SDL-INIT-TIMER
  • LISPBUILDER-SDL-CFFI:IMAGE-WRAPPER-VERSION
  • LISPBUILDER-SDL-CFFI:SDL-BUTTON-X2
  • LISPBUILDER-SDL-CFFI:SDL-RESIZABLE
  • LISPBUILDER-SDL-CFFI:GET-LIBRARY-VERSION
  • LISPBUILDER-SDL-CFFI:*GFX-LOADED-P*
  • LISPBUILDER-SDL-CFFI:SDL-YVYU-OVERLAY
  • LISPBUILDER-SDL-CFFI:SDL-RLE-ACCEL
  • LISPBUILDER-SDL-CFFI:IMAGE-VERSION-AT-LEAST
  • LISPBUILDER-SDL-CFFI:SDL-WM-GRAB-INPUT
  • LISPBUILDER-SDL-CFFI:IMAGE-LIBRARY-VERSION
  • LISPBUILDER-SDL-BASE:WITH-PIXEL
  • LISPBUILDER-SDL-CFFI:SDL-YUY2-OVERLAY
  • LISPBUILDER-SDL-CFFI:SDL-INIT-AUDIO
  • LISPBUILDER-SDL-CFFI:NUM-JOYSTICKS
  • LISPBUILDER-SDL-CFFI:SDL-INIT-EVENTTHREAD
  • LISPBUILDER-SDL-CFFI:SDL-HW-ACCEL
  • LISPBUILDER-SDL-BASE:PIXEL-BPP
  • LISPBUILDER-SDL-CFFI:SDL-BUTTON-X1
  • LISPBUILDER-SDL-CFFI:SDL-WRAPPER-VERSION
  • LISPBUILDER-SDL-CFFI:SDL-INIT-NOPARACHUTE
  • LISPBUILDER-SDL-CFFI:VERSION-NUMBER
  • COMMON-LISP:PRINT-OBJECT
  • LISPBUILDER-SDL-CFFI:SDL-INIT-JOYSTICK
  • LISPBUILDER-SDL-CFFI:*IMAGE-LOADED-P*
  • LISPBUILDER-SDL-CFFI:SDL-BUTTON-WHEEL-DOWN
  • LISPBUILDER-SDL-CFFI:SDL-BUTTON-WHEEL-UP
  • LISPBUILDER-SDL-CFFI:SDL-GET-TICKS
  • LISPBUILDER-SDL-CFFI:SDL-LIBRARY-VERSION
  • LISPBUILDER-SDL-CFFI:SDL-INIT-CDROM
  • LISPBUILDER-SDL-BASE:PIXEL-PITCH
  • LISPBUILDER-SDL-CFFI:SDL-RLE-ACCEL-OK
  • LISPBUILDER-SDL-CFFI:SDL-DOUBLEBUF
  • LISPBUILDER-SDL-CFFI:SDL-BUTTON-LEFT
  • LISPBUILDER-SDL-BASE:WITH-PIXELS
  • LISPBUILDER-SDL-BASE:WRITE-PIXEL
  • LISPBUILDER-SDL-CFFI:SDL-VERSION-AT-LEAST
  • LISPBUILDER-SDL-BASE:IS-VALID-PTR
  • LISPBUILDER-SDL-CFFI:SDL-UYVY-OVERLAY
  • LISPBUILDER-SDL-CFFI:*GLUE-LOADED-P*
  • LISPBUILDER-SDL-BASE:READ-PIXEL
  • LISPBUILDER-SDL-CFFI:SDL-FULLSCREEN
  • LISPBUILDER-SDL-CFFI:SDL-HW-SURFACE
  • LISPBUILDER-SDL-CFFI:SDL-NO-FRAME
  • LISPBUILDER-SDL-CFFI:SDL-OPENGL
  • LISPBUILDER-SDL-CFFI:SDL-JOYSTICK-NAME

lispbuilder-sdl-base

lispbuilder-sdl-base: SDL library wrapper providing a base set of functionality.

LISPBUILDER-SDL-BASE

The basic wrapper package of `lispbuilder-sdl'.
  • Macro CHECK-BOUNDS (min below &rest vars)
    Clamps the values in VARS to MIN <= VARS <= BELOW. Returns as a list the values in VARS.
  • Function CLAMP (v l u)
    Returns V clamped to L <= V <= U.
  • Function IS-VALID-PTR (pointer)
    Returns T if pointer is not NULL and is a valid CFFI pointer to a foreign object.
  • Function TO-INT (num)
    Returns num as an INTEGER.
  • Function RECTANGLE (&key (x 0) (y 0) (w 0) (h 0) src)
    Creates a new rectangle initialized with values x, y, width W and height H, or the contents of rectangle SRC if specified.
  • Macro WITH-RECTANGLE ((var &optional rectangle (free-p t)) &body body)
  • Function RECT-X (rect)
  • Function (setf RECT-X) (x-val rect)
  • Function RECT-Y (rect)
  • Function (setf RECT-Y) (y-val rect)
  • Function RECT-W (rect)
  • Function (setf RECT-W) (w-val rect)
  • Function RECT-H (rect)
  • Function (setf RECT-H) (h-val rect)
  • Function RECT-X2 (rect)
  • Function (setf RECT-X2) (h-val rect)
  • Function RECT-Y2 (rect)
  • Function (setf RECT-Y2) (h-val rect)
  • Function COPY-RECTANGLE (src dst)
    Copies the contents of the rectangle SRC to the rectangle DST. SRC and DST are both of type SDL_Rect.
  • Function CLONE-RECTANGLE (src)
    Initializes and returns a new rectangle with the contents of the rectangle SRC. SRC and DST are both of type SDL_Rect.
  • Macro WITH-SURFACE ((var &optional surface (free t)) &body body)
    Don't use this for managing the display surface.
  • Macro WITH-SURFACES (bindings &rest body)
  • Macro WITH-LOCKED-SURFACE ((var &optional surface) &body body)
  • Macro WITH-POSSIBLE-LOCK-AND-UPDATE ((var &key surface template) &body body)
  • Function GET-SURFACE-RECT (surface rectangle)
  • Function CONVERT-SURFACE-TO-DISPLAY-FORMAT (surface &key enable-color-key enable-alpha pixel-alpha (free nil))
    Returns a new surface that has been converted to the display format and optionally free the source surface. Returns NIL if the surface cannot be converted.
  • Function CREATE-SURFACE (width height &key (bpp 32) surface (type :sw) enable-color-key pixel-alpha enable-alpha rle-accel pixels pitch mask)
    create a surface compatible with the supplied :surface, if provided.
  • Function MUST-LOCK? (surface)
    Checks if a surface can be locked. Re-implementation of the SDL_MUSTLOCK macro. Returns T if the surface can be locked. NIL if the surface cannot be locked.
  • Function PIXEL-FORMAT (surface)
    Returns the pixel format of a surface.
  • Function SURF-W (surface)
    return the width of the SDL_surface.
  • Function SURF-H (surface)
    return the height of the Sdl-Surface.
  • Function UPDATE-SURFACE (surface &key template x y w h (clipping t))
    Updates the screen using the keyword co-ordinates in the Vector, :template. All co-ordinates default to 0, updating the entire screen.
  • Function BLIT-SURFACE (src dst src-rect dst-rect &key (update nil))
    Blits the entire SRC Sdl-Surface to the DST Sdl-Surface using SDL_BlitSurface. use :src-rect SDL_Rect to blit only a portion of the SRC to the DST surface Use :dst-rect SDL_Rect to position the SRC on the DST surface.
  • Function FILL-SURFACE (surface color &key (template nil) (update nil) (clipping nil))
    Fill the entire surface with the specified RGB/A color. Use :template to specify the SDL_Rect to be used as the fill template. Use :update to call SDL_UpdateRect, using :template if provided. This allows for a 'dirty recs' screen update. *Note*: `TEMPLATE` is clipped to the surface `SURFACE`, when `CLIPPING` is `T`.
  • Function CREATE-RWOPS-FROM-FILE (filename)

lispbuilder-sdl-binaries

lispbuilder-sdl-binaries: The windows binary for the SDL v1.2.14 library

LISPBUILDER-SDL-BINARIES

The main package of `lispbuilder-sdl'.
  • Variable *DLL-PATH*
    (make-pathname :host
                   (pathname-host
                    #p"/root/.roswell/impls/all/all/quicklisp/dists/quicklisp/software/lispbuilder-20180831-git/lispbuilder-sdl/bin/globals.lisp")
                   :directory
                   (pathname-directory
                    #p"/root/.roswell/impls/all/all/quicklisp/dists/quicklisp/software/lispbuilder-20180831-git/lispbuilder-sdl/bin/globals.lisp"))

lispbuilder-sdl-cffi

lispbuilder-sdl-cffi: Basic Lisp wrapper for the SDL library.

LISPBUILDER-SDL-CFFI

The basic wrapper package of `lispbuilder-sdl'.
  • Cffi-Function SDL-ENABLE-UNICODE
  • Function SDL-ENABLE-UNICODE (enable)
  • Cffi-Function SDL-ENABLE-KEY-REPEAT
  • Function SDL-ENABLE-KEY-REPEAT (delay interval)
  • Cffi-Function SDL-GET-KEY-REPEAT
  • Function SDL-GET-KEY-REPEAT (delay interval)
  • Cffi-Function SDL-GET-KEY-STATE
  • Function SDL-GET-KEY-STATE (numkeys)
  • Cffi-Function SDL-GET-MOD-STATE
  • Function SDL-GET-MOD-STATE
  • Cffi-Function SDL-SET-MOD-STATE
  • Function SDL-SET-MOD-STATE (modstate)
  • Cffi-Function SDL-GET-KEY-NAME
  • Function SDL-GET-KEY-NAME (key)

lispbuilder-sdl-cl-vectors

CL-VECTORS v0.1.3 glue for LISPBUILDER-SDL

No packages.

lispbuilder-sdl-cl-vectors-examples

Examples for the LISPBUILDER-SDL-CL-VECTORS package.

LISPBUILDER-SDL-EXAMPLES

Examples for `lispbuilder-sdl'.
  • Function CL-VECTORS-1
  • Function CL-VECTORS-2
  • Function CL-VECTORS-3
  • Function CL-VECTORS-4

lispbuilder-sdl-examples

Examples for the lispbuilder-sdl package.

LISPBUILDER-SDL-EXAMPLES

Examples for `lispbuilder-sdl'.
  • Function SIMPLE-FONT-DEMO-1
    example of simple font
  • Function SIMPLE-FONT-DEMO-2
    example of simple font
  • Function BMP-SAMPLE
  • Function FLOOD-FILL
  • Function FLOOD-FILL-TIMED
  • Function FLOOD-FILL-STACK
  • Function FLOOD-FILL-STACK-TIMED
  • Function PIXELS-1
  • Function PIXELS-2
  • Function PIXELS-3
  • Function PIXELS-4
  • Function RECURSIVE-RECTS
    recursively and randomly divides up the screen with rectangles
  • Function MOUSE-PAINTER
  • Function RANDOM-RECTS
  • Function RANDOM-BOX-1
  • Function RANDOM-BOX-2
  • Function RANDOM-BOX-3
  • Function RANDOM-BOX-4
  • Function MANDELBROT (&optional (width *mandelbrot-width*) (height *mandelbrot-height*) (x0 *x0*) (y0 *y0*) (x1 *x1*) (y1 *y1*))
    main program to draw navigate mandelbrot set
  • Function LINE-DRAWING
  • Function VERTICES
  • Function BEZIER
  • Function SETUP-AND-DRAW
  • Function WIDTH-HEIGHT
  • Function OBJECTS
  • Function POINTS-AND-LINES
  • Function DISTANCE-2D
  • Function METABALLS (&key (h-res 10) (v-res 10) (h-squares 25) (v-squares 30))
  • Function INBUILT-FONTS
  • Function CIRCLE-1
  • Function CIRCLE-2
  • Function CIRCLE-3
  • Function CIRCLE-4
  • Function CIRCLE-5
  • Function STROKE
  • Function MOUSE-2D
  • Function MOUSE-SURFACE-2D
  • Struct JOYSTICK
    FP
    INDEX
    AXIS-MOTION
    BUTTON-DOWN
    BUTTON-UP
    HAT-MOTION
    BALL-MOTION
    STATUS
  • Function JOYSTICK
  • Function PARTICLES (&optional (frame-rate nil))
  • Function PARTICLES-TIMESTEP (&optional (frame-rate nil))
  • Function PARTICLES-EVENT-LOOP (&optional (frame-rate nil))
  • Function FIREWORKS
  • Function RAW-AUDIO-TEST
  • Function SDL-INPUT
  • Function FISHES
  • Function MIXER-TEST
  • Function SQUASHED
    Squashed: main entry function
  • Function KEY-TEST
  • Function ALPHA-EXAMPLE
  • Function ACTIVE-EVENT
  • Function EXPLOSION
  • Function IMAGE-EXAMPLE

lispbuilder-sdl-gfx

lispbuilder-sdl-gfx: SDL_gfx v2.0.16 library wrapper and tools

LISPBUILDER-SDL-GFX

The main package of `lispbuilder-gfx-sdl'.
No exported symbols.

Also exports

  • LISPBUILDER-SDL:*GFX-FONT-8X13O*
  • LISPBUILDER-SDL:*FONT-10X20*
  • LISPBUILDER-SDL:DRAW-ELLIPSE
  • LISPBUILDER-SDL:SMOOTHING-OFF
  • LISPBUILDER-SDL:DRAW-PIXEL-*
  • LISPBUILDER-SDL:DRAW-BOX-*
  • LISPBUILDER-SDL:*GFX-FONT-9X18B*
  • LISPBUILDER-SDL:*GFX-FONT-6X13O*
  • LISPBUILDER-SDL:*GFX-FONT-7X13O*
  • LISPBUILDER-SDL:DRAW-AA-LINE
  • LISPBUILDER-SDL:*FONT-9X15B*
  • LISPBUILDER-SDL:DRAW-CIRCLE
  • LISPBUILDER-SDL:DRAW-HLINE
  • LISPBUILDER-SDL:DRAW-ELLIPSE-*
  • LISPBUILDER-SDL:DRAW-STRING-SHADED
  • LISPBUILDER-SDL:DRAW-PIE-*
  • LISPBUILDER-SDL:*FONT-9X18*
  • LISPBUILDER-SDL:DRAW-FILLED-TRIGON
  • LISPBUILDER-SDL:DRAW-AA-POLYGON
  • LISPBUILDER-SDL:INITIALISE-FONT
  • LISPBUILDER-SDL:WITH-BEZIER
  • LISPBUILDER-SDL:*GFX-FONT-6X9*
  • LISPBUILDER-SDL:*FONT-8X13B*
  • LISPBUILDER-SDL:DRAW-AA-TRIGON
  • LISPBUILDER-SDL:*GFX-FONT-9X18*
  • LISPBUILDER-SDL:GFX-PRIMITIVES-SET-FONT
  • LISPBUILDER-SDL:DRAW-RECTANGLE
  • LISPBUILDER-SDL:DRAW-VLINE
  • LISPBUILDER-SDL:DRAW-BOX
  • LISPBUILDER-SDL:SET-DEFAULT-FONT
  • LISPBUILDER-SDL:ROTO-ZOOM-SIZE
  • LISPBUILDER-SDL:*FONT-6X9*
  • LISPBUILDER-SDL:DRAW-ARC-*
  • LISPBUILDER-SDL:*GFX-FONT-6X13*
  • LISPBUILDER-SDL:*FONT-5X8*
  • LISPBUILDER-SDL:DRAW-FILLED-ELLIPSE-*
  • LISPBUILDER-SDL:DRAW-TRIGON
  • LISPBUILDER-SDL:DRAW-POLYGON
  • LISPBUILDER-SDL:*FONT-8X13*
  • LISPBUILDER-SDL:DRAW-FONT-AT-*
  • LISPBUILDER-SDL:ROTO-ZOOM-SURFACE
  • LISPBUILDER-SDL:*GFX-FONT-9X15B*
  • LISPBUILDER-SDL:FONT
  • LISPBUILDER-SDL:DRAW-RECTANGLE-*
  • LISPBUILDER-SDL:*GFX-FONT-6X10*
  • LISPBUILDER-SDL:DRAW-STRING-SHADED-*
  • LISPBUILDER-SDL:DRAW-PIXEL
  • LISPBUILDER-SDL:*FONT-9X18B*
  • LISPBUILDER-SDL:ADD-VERTEX
  • LISPBUILDER-SDL:DRAW-FILLED-ELLIPSE
  • LISPBUILDER-SDL:*FONT-7X14*
  • LISPBUILDER-SDL:*GFX-FONT-6X13B*
  • LISPBUILDER-SDL:*GFX-FONT-8X13*
  • LISPBUILDER-SDL:ZOOM-SURFACE
  • LISPBUILDER-SDL:DRAW-FILLED-CIRCLE
  • LISPBUILDER-SDL:DRAW-STRING-SOLID
  • LISPBUILDER-SDL:RENDER-STRING-SOLID
  • LISPBUILDER-SDL:*GFX-FONT-5X7*
  • LISPBUILDER-SDL:DRAW-CURVE
  • LISPBUILDER-SDL:*FONT-7X14B*
  • LISPBUILDER-SDL:*GFX-FONT-8X13B*
  • LISPBUILDER-SDL:DRAW-CHARACTER-SOLID
  • LISPBUILDER-SDL:DRAW-STRING-SOLID-*
  • LISPBUILDER-SDL:DRAW-AA-CIRCLE-*
  • LISPBUILDER-SDL:DRAW-LINE
  • LISPBUILDER-SDL:*FONT-7X13*
  • LISPBUILDER-SDL:DRAW-PIE
  • LISPBUILDER-SDL:DRAW-AA-ELLIPSE-*
  • LISPBUILDER-SDL:*FONT-7X13O*
  • LISPBUILDER-SDL:DRAW-LINE-*
  • LISPBUILDER-SDL:DRAW-SHAPE
  • LISPBUILDER-SDL:DRAW-FONT-AT
  • LISPBUILDER-SDL:DRAW-CIRCLE-*
  • LISPBUILDER-SDL:RENDER-STRING-SHADED
  • LISPBUILDER-SDL:WITH-CURVE
  • LISPBUILDER-SDL:*GFX-FONT-6X12*
  • LISPBUILDER-SDL:*GFX-FONT-7X14B*
  • LISPBUILDER-SDL:DRAW-FILLED-POLYGON
  • LISPBUILDER-SDL:*FONT-7X13B*
  • LISPBUILDER-SDL:*GFX-FONT-7X13B*
  • LISPBUILDER-SDL:DRAW-CHARACTER-SOLID-*
  • LISPBUILDER-SDL:T-COLOR-Y
  • LISPBUILDER-SDL:DRAW-CHARACTER-SHADED
  • LISPBUILDER-SDL:DRAW-CHARACTER-SHADED-*
  • LISPBUILDER-SDL:ROTO-ZOOM-XY
  • LISPBUILDER-SDL:DRAW-FILLED-CIRCLE-*
  • LISPBUILDER-SDL:*GFX-FONT-7X13*
  • LISPBUILDER-SDL:ADD-VERTEX-*
  • LISPBUILDER-SDL:DRAW-FILLED-PIE
  • LISPBUILDER-SDL:ZOOM-SURFACE-SIZE
  • LISPBUILDER-SDL:ROTATE-SURFACE-XY
  • LISPBUILDER-SDL:*FONT-9X15*
  • LISPBUILDER-SDL:*GFX-FONT-5X8*
  • LISPBUILDER-SDL:*GFX-FONT-9X15*
  • LISPBUILDER-SDL:*GFX-FONT-8X8*
  • LISPBUILDER-SDL:DRAW-AA-CIRCLE
  • LISPBUILDER-SDL:*FONT-8X13O*
  • LISPBUILDER-SDL:SMOOTHING-ON
  • LISPBUILDER-SDL:DRAW-ARC
  • LISPBUILDER-SDL:ROTO-ZOOM-SIZE-XY
  • LISPBUILDER-SDL:INITIALISE-DEFAULT-FONT
  • LISPBUILDER-SDL:ROTATE-SURFACE
  • LISPBUILDER-SDL:*FONT-5X7*
  • LISPBUILDER-SDL:*FONT-6X12*
  • LISPBUILDER-SDL:DRAW-BEZIER
  • LISPBUILDER-SDL:DRAW-AA-LINE-*
  • LISPBUILDER-SDL:DRAW-FILLED-PIE-*
  • LISPBUILDER-SDL:*FONT-6X13*
  • LISPBUILDER-SDL:*GFX-FONT-7X14*
  • LISPBUILDER-SDL:T-COLOR-RGBA
  • LISPBUILDER-SDL:*GFX-FONT-10X20*
  • LISPBUILDER-SDL:DRAW-FONT
  • LISPBUILDER-SDL:DRAW-AA-ELLIPSE
  • LISPBUILDER-SDL:*FONT-6X13O*
  • LISPBUILDER-SDL:*FONT-6X13B*
  • LISPBUILDER-SDL:*FONT-8X8*
  • LISPBUILDER-SDL:*FONT-6X10*
  • LISPBUILDER-SDL:WITH-SHAPE

lispbuilder-sdl-gfx-binaries

lispbuilder-sdl-gfx-binaries: The windows binary for the SDL_gfx v2.0.13 library

LISPBUILDER-SDL-GFX-BINARIES

The main package of `lispbuilder-sdl-gfx'.
  • Variable *DLL-PATH*
    (make-pathname :host
                   (pathname-host
                    #p"/root/.roswell/impls/all/all/quicklisp/dists/quicklisp/software/lispbuilder-20180831-git/lispbuilder-sdl-gfx/bin/globals.lisp")
                   :directory
                   (pathname-directory
                    #p"/root/.roswell/impls/all/all/quicklisp/dists/quicklisp/software/lispbuilder-20180831-git/lispbuilder-sdl-gfx/bin/globals.lisp"))

lispbuilder-sdl-gfx-examples

Examples describing the use of lispbuilder-sdl-gfx.

LISPBUILDER-SDL-GFX-EXAMPLES

  • Function INBUILT-FONTS
  • Function RANDOM-CIRCLES
  • Function SETUP-AND-DRAW
  • Function WIDTH-HEIGHT
  • Function RECURSION
  • Function FUNCTIONS
  • Function OBJECTS
  • Function POINTS-AND-LINES
  • Function SHAPE-PRIMITIVES
  • Function BEZIER
  • Function DISTANCE-2D
  • Function VERTICES
  • Function ROTOZOOM
  • Function ZOOM
  • Function FIREWORKS

lispbuilder-sdl-image

lispbuilder-sdl-image: SDL_image 1.2.10 library wrapper and tools

LISPBUILDER-SDL-IMAGE

The methods defined here extend any methods already defined in `lispbuilder-sdl'.
  • Function LOAD-LIBRARY

Also exports

  • LISPBUILDER-SDL:IMAGE-INIT-P
  • LISPBUILDER-SDL:IMAGE-P
  • LISPBUILDER-SDL:LOAD-IMAGE
  • LISPBUILDER-SDL:LOAD-AND-CONVERT-IMAGE
  • LISPBUILDER-SDL:INIT-IMAGE
  • LISPBUILDER-SDL:IMAGE-TYPE-OF
  • LISPBUILDER-SDL-CFFI:IMAGE-LIBRARY-VERSION
  • LISPBUILDER-SDL:QUIT-IMAGE

lispbuilder-sdl-image-binaries

lispbuilder-sdl-image-binaries: The windows binary for the SDL_image v1.2.10 library

LISPBUILDER-SDL-IMAGE-BINARIES

The main package of `lispbuilder-sdl-image'.
  • Variable *DLL-PATH*
    (make-pathname :host
                   (pathname-host
                    #p"/root/.roswell/impls/all/all/quicklisp/dists/quicklisp/software/lispbuilder-20180831-git/lispbuilder-sdl-image/bin/globals.lisp")
                   :directory
                   (pathname-directory
                    #p"/root/.roswell/impls/all/all/quicklisp/dists/quicklisp/software/lispbuilder-20180831-git/lispbuilder-sdl-image/bin/globals.lisp"))

lispbuilder-sdl-mixer

lispbuilder-sdl-mixer: SDL_mixer v1.2.11 library wrapper and tools

LISPBUILDER-SDL-MIXER

The main package of `lispbuilder-sdl-mixer'.
  • Variable +DEFAULT-SAMPLE-BUFFER+
    4096
    Default size of the sample output buffer is `4096` bytes
  • Function MIXER-LIBRARY-VERSION
  • Function MIXER-GLUE-VERSION
  • Function LOAD-LIBRARY
  • Function MIXER-INIT-P (&rest flags)
  • Function INIT-MIXER (&rest flags)
  • Function QUIT-MIXER
  • Function RESERVE-CHANNELS (channels)
    Reserves, or excludes, the number of `CHANNELS` from default mixing. The number of channels to reserve is from 0 to `(- CHANNELS 1)`. Default mixing is performed when when a sample is played on an unreserved channel, when using [PLAY-SAMPLE](#play-sample) with `:CHANNEL` `NIL`. `CHANNEL` when `NIL` or `0` will remove all reservations. Channels are unreserved unless explicitly reserved by [RESERVE-CHANNELS](#reserve-channels). Returns the number of channels reserved. May return less channels than requested, depending on the number of channels previously allocated using [ALLOCATE-CHANNELS](#allocate-channels).
  • Method LOAD-MUSIC ((filepath string))
    Loads the music file at location `FILEPATH`. Must be a `WAVE`, `MOD`, `MIDI`, `OGG` or `MP3` file. Returns music as a new [MUSIC](#music) object, or NIL on error.
  • Method LOAD-MUSIC ((filepath pathname))
  • Method LOAD-MUSIC ((rwops rwops))
    Loads the music file from `RWOPS`. Must be a `WAVE`, `MOD`, `MIDI`, `OGG` or `MP3` file. Returns music as a new [MUSIC](#music) object, or NIL on error.
  • Method LOAD-MUSIC ((array vector))
    Loads the music file from the byte `ARRAY`. Must be a `WAVE`, `MOD`, `MIDI`, `OGG` or `MP3` file. Returns music as a new [MUSIC](#music) object and a new `RWOPS` object. Maintain references to both of these objects until the music can be freed.
  • Method LOAD-SAMPLE ((filepath string))
    Loads the sample file at location `FILEPATH`. Must be a `WAVE`, `AIFF`, `RIFF`, `OGG`, or `VOC` file. Returns the sample as a new [CHUNK](#chunk) object, or NIL on error.
  • Method LOAD-SAMPLE ((filepath pathname))
  • Method LOAD-SAMPLE ((rwops rwops))
    Loads the sample from `RWOPS`. Must be a `WAVE`, `AIFF`, `RIFF`, `OGG`, or `VOC` file. Returns the sample as a new [CHUNK](#chunk) object, or NIL on error.
  • Method LOAD-SAMPLE ((array vector))
    Loads the sample file from the byte `ARRAY`. Must be a `WAVE`, `AIFF`, `RIFF`, `OGG`, or `VOC` file. Returns the sample as a new [CHUNK](#chunk) object, or NIL on error.
  • Function SAMPLE-FROM-CHANNEL (channel)
    Returns currently playing or most recently played sample on `CHANNEL` as a new [CHUNK](#chunk) object, or `NIL` if `CHANNEL` is not allocated or `CHANNEL` has not yet played out any samples. NOTE: The sample may already have been freed and therefore the pointer to the foreign object in [CHUNK](#chunk) may not be valid.
  • Function OPEN-AUDIO (&key (frequency +default-frequency+) (format +default-format+) (channels +default-channels+) (chunksize +default-sample-buffer+) (enable-callbacks nil))
    Initializes the mixer. SDL must be initialized with [SDL-INIT-AUDIO](#sdl-init-audio) prior to this call. [OPEN-AUDIO](#open-audio) can be called multiple times, however `FORMAT` is set on the first call and will not changed on subsequent calls. The audio device must be closed and re-opened for any change to `FORMAT` to take effect. [CLOSE-AUDIO](#close-audio) must be called the same number of time to close the audio device. Use [ALLOCATE-CHANNELS](#allocate-channels) to set the number of mixing channels. [OPEN-AUDIO](#open-audio) will allocate [+MIX-CHANNELS+](#+channels+) by default. ##### Parameters * `FREQUENCY` is the output sampling frequency in samples per second (Hz). Default is [+DEFAULT-FREQUENCY+](#+default-frequency+). Most games use a `FREQUENCY` of [+DEFAULT-FREQUENCY+](#+default-frequency+). The higher the `FREQUENCY` the greater the CPU resource requirements. (A value of 44100 is the CD audio rate). * `FORMAT` is the output sample format. Default is [+DEFAULT-FORMAT+](#+default-format+). * `CHANNELS` sets the number of sound channels in the output. Default is [+DEFAULT-CHANNELS+](#+default-channels+). This is not the same as [ALLOCATE-CHANNELS](#allocate-channels) which sets the number of mixing channels. * `CHUNKSIZE` is the size in bytes of each mixed sample buffer. Default is [+DEFAULT-SAMPLE-BUFFER+](#+default-sample-buffer+) bytes. The smaller the `CHUNKSIZE`, the more frequenctly the mixer hooks are called. Increase `CHUNKSIZE` to decrease CPU resources, if sound skips or if playing music. Decrease `CHUNKSIZE` to decrease sound lag. ##### Returns * `T` on success and `NIL` on failure.
  • Function CLOSE-AUDIO (&optional (all nil))
    Attempts to close the audio device. The audio device can be opened multiple times by [OPEN-AUDIO](#open-audio) and to properly close the audio device, [CLOSE-AUDIO](#close-audio) should be called the same number of times. Optionally `ALL` when `T` will forcibly close the audio device, no matter how many times the device was opened.
  • Function PLAY-MUSIC (music &key (loop nil) (fade nil) (position 0))
    Starts playing [MUSIC](#music) from `POSITION`. The music can be faded-in over the number of milliseconds in `FADE`. Automatically repeats the music when finished the number of time specified in `LOOP`. Any previous music will be halted. Will block until any current fade effect completes. ##### Parameters * `MUSIC` is the [MUSIC](#music) to play. * `LOOP` is the number of times to play the music. T continuously loops the music. Plays once when `NIL`, or `0`. Default is `NIL`. * `FADE` is the number of milliseconds to perform the fade-in effect. Default is `NIL`, no fade effect. Only applies to the first loop. * `POSITION` is the position in the music to begin playing from. Default is to start playout from the beginning. ##### Returns * T on success and NIL on failure.
  • Function PLAY-SAMPLE (chunk &key (channel t) (group nil) (loop nil) (fade nil) (ticks t))
    Plays the sample in [CHUNK](#chunk) for `TICKS` milliseconds, repeated `LOOP` times. The sample is repeated the number of times specified in `LOOP`, or until `TICKS`. The sample will fade-in over `FADE` milliseconds. The callback set by [REGISTER-SAMPLE-FINISHED](#register-sample-finished) is called when the sample stops playing. ##### Parameters * `CHUNK` is the sample [CHUNK](#chunk). * `CHANNEL` specifies the channel to play the sample. When `T`, will perform default mixing and mix the sample on the first free unreserved channel. * `GROUP` Attempts to play the sample on the first available (not playing) reserved channel in `GROUP`. When `T`, will search for the first available (not playing) reserved channel in all groups. If there are no available reserved channels then [PLAY-SAMPLE](#play-sample) will fail. If however `CHANNEL` is also `T` then the default action is to play the sample on the first unreserved channel. Use [RESERVE-CHANNELS](#reserve-channels) to reserve, or exclude, a channel from default mixing. * `LOOP` is the number of times to loop the sample. Loops continuously when `T`. Plays once when `NIL`, or `0`. Default in `NIL`. * `FADE` is the number of milliseconds to perform the fade-in effect. Default is `NIL`, no fade effect. Only applies to the first loop. * `TICKS` is the number of milliseconds to play the sample. When `T` will play the sample from start to finish. Default is `T`. ##### Returns * The channel the sample is playing on, or `NIL` on failure.
  • Function HALT-MUSIC (&optional (fade nil))
    Stops playing music. The callback set by [REGISTER-MUSIC-FINISHED](#register-music-finished) is called when the music stops. ##### Parameters * `FADE` is the number of milliseconds to perform the fade-out effect. Will block until any current fade effect completes. Has no effect on paused or halted music. When `FADE` is NIL the music is stopped and all fade effects are immediately cancelled. The default is NIL. ##### Returns * T on success and NIL on failure.
  • Function HALT-SAMPLE (&key (channel t) (group nil) (fade nil) (ticks nil))
    Stops playing the sample on `CHANNEL`, or stops playback on the reserved channels in `GROUP`. The callback set by [REGISTER-SAMPLE-FINISHED](#register-sample-finished) is called when the channel stops. ##### Parameters * `CHANNEL` specifies the channel to stop playing. When `T`, will stop playback samples on all channels. Ignores channels not currently playing out samples. * `GROUP` specifies the group of reserved channels to stop playing. Use [RESERVE-CHANNELS](#reserve-channels) to create a group of reserved channels. * `FADE` is the number of milliseconds to perform the fade-out effect. When `CHANNEL` is set, will fade out the sample on the specified channel. When `GROUP` is set, will fade out the samples on the reserved channels in `GROUP`. The sample is stopped when fade effect completes. When `FADE` is `NIL` or `0` the fade effect is immediate. Default is `NIL`. * `TICKS` is the number of milliseconds until the sample is stopped. When `NIL` or `0`, the sample is stopped immediately. Default is `NIL`. ##### Returns * The number of samples fading out, when `FADE` is set. * The number of samples halted, when `TICKS` is set. * Otherwise, returns T on success and NIL on failure.
  • Function LINKED-VERSION
    Returns the version number of the SDL_mixer dynamic library in use as #(`MAJOR` `MINOR` `PATCH`).
  • Function AUDIO-FREQUENCY-P
    Returns the current audio frequency of the audio device.
  • Function AUDIO-FORMAT-P
    Returns the current audio format of the audio device.
  • Function AUDIO-CHANNELS-P
    Returns the number of output channels used by the audio device, e.g. `2` for stereo and `1` for mono. Does not return the number of mixing channels allocated.
  • Function AUDIO-OPENED-P
    Returns the number of times the audio device has been opened by [OPEN-AUDIO](#open-audio), or `NIL` if the audio device is closed.
  • Function SAMPLE-VOLUME (chunk)
    Returns the volume of the sample in [CHUNK](#chunk), as an `INTEGER` from 0 to [+MAX-VOLUME+](#+max-volume+).
  • Function (setf SAMPLE-VOLUME) (volume chunk)
    Sets the `VOLUME` of the sample in [CHUNK](#chunk). `VOLUME` can be from 0 to [+MAX-VOLUME+](#+max-volume+). The `VOLUME` will take effect when [CHUNK](#chunk) is mixed into the output. Returns the previous `VOLUME` for [CHUNK](#chunk).
  • Function CHANNEL-VOLUME (channel)
    Returns the volume of `CHANNEL`, as an `INTEGER`. Volume can be from 0 to [+MAX-VOLUME+](#+max-volume+). If `CHANNEL` is NIL then the average volume over all channels is returned.
  • Function (setf CHANNEL-VOLUME) (volume channel)
    Sets the `VOLUME` of `CHANNEL`. `VOLUME` can be from 0 to [+MAX-VOLUME+](#+max-volume+). If `CHANNEL` is NIL then the volume for all channels is set. Returns the current `VOLUME` for `CHANNEL` as an `INTEGER` from 0 to [+MAX-VOLUME+](#+max-volume+).
  • Function MUSIC-VOLUME
    Returns current music volume as an `INTEGER` from 0 to [+MAX-VOLUME+](#+max-volume+).
  • Function (setf MUSIC-VOLUME) (volume)
    Sets the music `VOLUME`. `VOLUME` can be from `0` to [+MAX-VOLUME+](#+max-volume+). Has no effect when a fade effect is being performed or when using an external music player. Returns the previous music `VOLUME` as an `INTEGER` from 0 to [+MAX-VOLUME+](#+max-volume+)
  • Method FREE ((chunk chunk))
    Frees the sample in [CHUNK](#chunk). Do not reuse a [CHUNK](#chunk) once freed. Do not attempt to free a [CHUNK](#chunk) that is still being played.
  • Method FREE ((music music))
    Frees the music in [MUSIC](#music). Stops [MUSIC](#music) if currently playing. Will block until any current fade effect completes. Do not reuse [MUSIC](#music) once freed.
  • Function SAMPLE-PLAYING-P (channel)
    Returns `T` if a sample is currently playing or is paused on `CHANNEL`, or `NIL` if the sample is halted. Returns the number of samples playing or paused when `CHANNEL` is `T` or `NIL`.
  • Function MUSIC-PLAYING-P
    Returns `T` if music is currently playing, or `NIL` if music is halted or paused.
  • Function SAMPLE-PAUSED-P (channel)
    Returns `T` if the sample on `CHANNEL` is currently paused or was previously paused prior to a halt, or `NIL` otherwise. Returns the number of paused samples when `CHANNEL` is `T` or `NIL`.
  • Function MUSIC-PAUSED-P
    Returns T if music is currently paused or was previously paused prior to a halt, or NIL otherwise.
  • Function SAMPLE-FADING-P (channel)
    Returns `T` if a fade is in effect for the sample on `CHANNEL`, regardless of the current play or pause state of the sample. Returns `:FADING-OUT` if a fade-out is in effect, `:FADING-IN` if a fade-in is in effect, or `NIL` if no fade is in effect.
  • Function MUSIC-FADING-P
    Returns the current fade effect on music regardless of the current play or pause state. Returns `:FADING-OUT` if a fade-out is in effect, `:FADING-IN` if a fade-in is in effect, or `NIL` if no fade is in effect.
  • Function PAUSE-MUSIC
    Pause music. Music can only be paused if it is actively playing. You may halt paused music.
  • Function PAUSE-SAMPLE (channel)
    Pauses the sample on `CHANNEL`, or `T` to pause samples on all channels. `NIL` will resume samples on all channels, same as [RESUME-SAMPLE](#resume-sample). Only samples which are actively playing will be paused. You may halt a paused sample.
  • Function RESUME-MUSIC
    Resume playing music when paused music. Safe to use on halted and already playing music.
  • Function REWIND-MUSIC
    Rewind to the start of music. Safe to use on halted, paused, and currently playing music. It is not necessary to rewind the music immediately after starting playback, as it starts at the beginning by default. Only the following streams support rewind: `MOD`, `OGG`, `MP3`, `Native MIDI`.
  • Function MUSIC-POSITION (position)
    Sets the play `POSITION` of the currently playing music. Returns `T` on success and `NIL` on failure. Applicable only to `MOD`, `OGG` and `MP3` music formats as described below. * `MOD`, jumps to the pattern number in the module identified by `POSITION`. `0` will rewind the module to the beginning. * `OGG`, jumps to `POSITION` seconds from the beginning of the song. * `MP3`, jumps forwards `POSITION` seconds from the current play position. Negative values are ignored. To rewind, use [REWIND-MUSIC](#rewind-music) to jump to the start of the song, then jump forward `POSITION` seconds using [MUSIC-POSITION](#music-position).
  • Function MUSIC-TYPE-P (music)
    Returns the format type of [MUSIC](#music) as one of `WAV`, `MOD`, `MID`, `OGG`, `MP3`, `MP3-MAD`, `FLAC` or `CMD`. Returns the format type of the currently playing music when [MUSIC](#music) is `NIL`. Returns `NIL` is no music is playing.
  • Function MUSIC-TYPE-OF (music type)
    Returns `T` if [MUSIC](#music) is of `TYPE`, returns `NIL` otherwise. `TYPE` may be one of `WAV`, `MOD`, `MID`, `OGG`, `MP3`, `MP3-MAD`, `FLAC` or `CMD`. If [MUSIC](#music) is `NIL` returns the type of the currently playing music. Returns `NIL` is no music is playing.
  • Function ALLOCATE-CHANNELS (num-channels)
    Allocates `NUM-CHANNELS` to be used for mixing samples. Frees all allocated channnels when `NUM-CHANNELS` is `NIL` or `0`. A negative value for `NUM-CHANNELS` is ignored. Returns the number of channels currently allocated. Can be called multiple times even if samples are currently playing. If the current allocation of channels is greater than `NUM-CHANNELS`, then channels greater than `NUM-CHANNELS` will be stopped and these resources freed. The callback set by [REGISTER-SAMPLE-FINISHED](#register-sample-finished) is called for each channel halted. NOTE: Samples will continue playing when `NUM-CHANNELS` is `0`.
  • Function REGISTER-SAMPLE-FINISHED (func)
    Sets the callback that is executed when a sample [CHUNK](#chunk) finishes playback or is halted. `FUNC` is of the format `#(lambda (channel))` ##### Example (REGISTER-SAMPLE-FINISHED (lambda (channel) (FORMAT T "SAMPLE FINISHED ON CHANNEL: ~A" channel)))
  • Function UNREGISTER-SAMPLE-FINISHED
    Removes the callback function set by [REGISTER-SAMPLE-FINISHED](#register-sample-finished).
  • Function REGISTER-MUSIC-FINISHED (func)
    Sets the callback that is executed when [MUSIC](#music) finishes playback or is halted. `FUNC` is of the format `#(lambda ())` ##### Example (REGISTER-MUSIC-FINISHED (lambda () (FORMAT T "MUSIC FINISHED")))
  • Function UNREGISTER-MUSIC-FINISHED
    Removes the callback function set by set by [REGISTER-MUSIC-FINISHED](#register-music-finished).
  • Function REGISTER-MUSIC-MIXER (func)
    Sets the callback that is executed to fill the music audio output buffer. `FUNC` is of the format `#(lambda (user-data stream len))` ##### Example (REGISTER-MUSIC-MIXER (lambda (user stream len) 'FILL-THE-AUDIO-OUTPUT-BUFFER))
  • Function UNREGISTER-MUSIC-MIXER
    Removes any callback function set by [REGISTER-MUSIC-MIXER](#register-music-mixer).
  • Function GROUP-CHANNELS (tag &key (channel 0) (end-channel nil))
    Assigns the group `TAG` to `:CHANNEL`, or the range of channels from `:CHANNEL` to `:END-CHANNEL`. `TAG` when `NIL` will remove the `TAG` from the channels specified and reassign these channels to the default group. Returns the number of channels grouped on success, or `NIL` on failure when an invalid or unallocated `CHANNEL` or range of channels is specified. Use [ALLOCATE-CHANNELS](#allocate-channels) to allocate one or more channels.
  • Function GROUP-CHANNEL-P (tag)
    Returns the number of reserved channels in the group identified by `TAG`. Returns the total number of reserved channels in all groups when `NIL`.
  • Function GROUP-OLDEST (tag)
    Returns the oldest actively playing reserved channel in the group identified by `TAG`. When `T` will return the oldest actively playing reserved channel in any group. Returns a channel, or `NIL` if no channels are actively playing or the group is empty.
  • Function GROUP-RECENT (tag)
    Returns the most recent actively playing reserved channel in the group identifed by `TAG`. When 'T' will return the most recent actively playing reserved channel in any group. Returns a channel, or `NIL` if no channels are actively playing or the group is empty.

Also exports

  • LISPBUILDER-SDL-MIXER-CFFI:SDL-MIXER-VERSION
  • LISPBUILDER-SDL-MIXER-CFFI:MUSIC
  • LISPBUILDER-SDL-MIXER-CFFI:+CHANNEL-POST+
  • LISPBUILDER-SDL-MIXER-CFFI:+DEFAULT-FORMAT+
  • LISPBUILDER-SDL-MIXER-CFFI:+DEFAULT-FREQUENCY+
  • LISPBUILDER-SDL-MIXER-CFFI:+MAX-VOLUME+
  • LISPBUILDER-SDL-MIXER-CFFI:+DEFAULT-CHANNELS+
  • LISPBUILDER-SDL-MIXER-CFFI:+CHANNELS+
  • LISPBUILDER-SDL-MIXER-CFFI:CHUNK

lispbuilder-sdl-mixer-binaries

lispbuilder-sdl-mixer-binaries: The Win32 binary for the SDL_mixer v1.2.11 library

LISPBUILDER-SDL-MIXER-BINARIES

The main package of `lispbuilder-sdl-mixer'.
  • Variable *DLL-PATH*
    (make-pathname :host
                   (pathname-host
                    #p"/root/.roswell/impls/all/all/quicklisp/dists/quicklisp/software/lispbuilder-20180831-git/lispbuilder-sdl-mixer/bin/globals.lisp")
                   :directory
                   (pathname-directory
                    #p"/root/.roswell/impls/all/all/quicklisp/dists/quicklisp/software/lispbuilder-20180831-git/lispbuilder-sdl-mixer/bin/globals.lisp"))

lispbuilder-sdl-ttf

No packages.

lispbuilder-sdl-ttf-binaries

lispbuilder-sdl-ttf-binaries: The windows binary for the SDL_ttf v2.0.9 library

LISPBUILDER-SDL-TTF-BINARIES

The main package of `lispbuilder-sdl-ttf'.
  • Variable *DLL-PATH*
    (make-pathname :host
                   (pathname-host
                    #p"/root/.roswell/impls/all/all/quicklisp/dists/quicklisp/software/lispbuilder-20180831-git/lispbuilder-sdl-ttf/bin/globals.lisp")
                   :directory
                   (pathname-directory
                    #p"/root/.roswell/impls/all/all/quicklisp/dists/quicklisp/software/lispbuilder-20180831-git/lispbuilder-sdl-ttf/bin/globals.lisp"))

lispbuilder-sdl-ttf-cffi

No packages.

lispbuilder-sdl-ttf-examples

No packages.

lispbuilder-sdl-vecto

VECTO v1.0.2 glue for LISPBUILDER-SDL

No packages.

lispbuilder-sdl-vecto-examples

Examples for the LISPBUILDER-SDL-VECTO package.

LISPBUILDER-SDL-EXAMPLES

Examples for `lispbuilder-sdl'.
  • Function VECTO-TEST
  • Function RADIANT-LAMBDA
  • Function FEEDLIKE-ICON
  • Function STAR-CLIPPING
  • Function ROOTS (&key (depth 7))

lispbuilder-windows

lispbuilder-windows: Windows library wrapper and tools

LISPBUILDER-WINDOWS

The main package of `lispbuilder-windows'.
  • Variable CS_VREDRAW
    1
  • Variable CS_HREDRAW
    2
  • Variable CS_DBLCLKS
    8
  • Variable CS_OWNDC
    32
  • Variable CS_CLASSDC
    64
  • Variable CS_PARENTDC
    128
  • Variable CS_NOCLOSE
    512
  • Variable CS_SAVEBITS
    2048
  • Variable CS_BYTEALIGNCLIENT
    4096
  • Variable CS_BYTEALIGNWINDOW
    8192
  • Variable CS_GLOBALCLASS
    16384
  • Cffi-Struct WNDCLASS
  • Cffi-Function CREATEWINDOWEX
  • Function CREATEWINDOWEX (dwexstyle lpclassname lpwindowname dwstyle x y nwidth nheight hwndparent hmenu hinstance lpparam)
  • Cffi-Function REGISTERCLASS
  • Function REGISTERCLASS (lpwndclass)
  • Cffi-Function GETMODULEHANDLE
  • Function GETMODULEHANDLE (lpmodulename)
  • Cffi-Function DEFWINDOWPROC
  • Function DEFWINDOWPROC (hwnd msg wparam lparam)
  • Variable SW_HIDE
    0
  • Variable SW_SHOWNORMAL
    1
  • Variable SW_NORMAL
    1
  • Variable SW_SHOWMINIMIZED
    2
  • Variable SW_SHOWMAXIMIZED
    3
  • Variable SW_MAXIMIZE
    3
  • Variable SW_SHOWNOACTIVATE
    4
  • Variable SW_SHOW
    5
  • Variable SW_MINIMIZE
    6
  • Variable SW_SHOWMINNOACTIVE
    7
  • Variable SW_SHOWNA
    8
  • Variable SW_RESTORE
    9
  • Variable SW_SHOWDEFAULT
    10
  • Variable SW_FORCEMINIMIZE
    11
  • Variable SW_MAX
    11
  • Cffi-Function SHOWWINDOW
  • Function SHOWWINDOW (hwnd ncmdshow)
  • Cffi-Function UPDATEWINDOW
  • Function UPDATEWINDOW (hwnd)
  • Variable WS_OVERLAPPED
    0
  • Variable WS_POPUP
    2147483648
  • Variable WS_CHILD
    1073741824
  • Variable WS_MINIMIZE
    536870912
  • Variable WS_VISIBLE
    268435456
  • Variable WS_DISABLED
    134217728
  • Variable WS_CLIPSIBLINGS
    67108864
  • Variable WS_CLIPCHILDREN
    33554432
  • Variable WS_MAXIMIZE
    16777216
  • Variable WS_CAPTION
    12582912
  • Variable WS_BORDER
    8388608
  • Variable WS_DLGFRAME
    4194304
  • Variable WS_VSCROLL
    2097152
  • Variable WS_HSCROLL
    1048576
  • Variable WS_SYSMENU
    524288
  • Variable WS_THICKFRAME
    262144
  • Variable WS_GROUP
    131072
  • Variable WS_TABSTOP
    65536
  • Variable WS_MINIMIZEBOX
    131072
  • Variable WS_MAXIMIZEBOX
    65536
  • Variable WS_TILED
    0
  • Variable WS_ICONIC
    536870912
  • Variable WS_SIZEBOX
    262144
  • Variable WS_OVERLAPPEDWINDOW
    (logior 0 12582912 524288 262144 131072 65536)
  • Variable WS_POPUPWINDOW
    (logior 2147483648 8388608 524288)
  • Variable WS_CHILDWINDOW
    1073741824
  • Cffi-Struct POINT
  • Cffi-Struct MSG
  • Cffi-Function TRANSLATEMESSAGE
  • Function TRANSLATEMESSAGE (lpmsg)
  • Cffi-Function DISPATCHMESSAGE
  • Function DISPATCHMESSAGE (lpmsg)
  • Cffi-Function GETMESSAGE
  • Function GETMESSAGE (lpmsg hwnd wmsgfiltermin wmsgfiltermax)
  • Cffi-Struct RECT
  • Cffi-Struct PAINTSTRUCT
  • Cffi-Function BEGINPAINT
  • Function BEGINPAINT (hwnd lppaint)
  • Cffi-Function SELECTOBJECT
  • Function SELECTOBJECT (hdc hgdiobj)
  • Cffi-Function GETSTOCKOBJECT
  • Function GETSTOCKOBJECT (fnobject)
  • Cffi-Function MOVETOEX
  • Function MOVETOEX (hdc x y lppoint)
  • Cffi-Function LINETO
  • Function LINETO (hdc nxend nyend)
  • Cffi-Function ENDPAINT
  • Function ENDPAINT (hwnd lppaint)
  • Cffi-Function POSTQUITMESSAGE
  • Function POSTQUITMESSAGE (nexitcode)
  • Variable WHITE_BRUSH
    0
  • Variable LTGRAY_BRUSH
    1
  • Variable GRAY_BRUSH
    2
  • Variable DKGRAY_BRUSH
    3
  • Variable BLACK_BRUSH
    4
  • Variable NULL_BRUSH
    5
  • Variable HOLLOW_BRUSH
    5
  • Variable WHITE_PEN
    6
  • Variable BLACK_PEN
    7
  • Variable NULL_PEN
    8
  • Variable OEM_FIXED_FONT
    10
  • Variable ANSI_FIXED_FONT
    11
  • Variable ANSI_VAR_FONT
    12
  • Variable SYSTEM_FONT
    13
  • Variable DEVICE_DEFAULT_FONT
    14
  • Variable DEFAULT_PALETTE
    15
  • Variable SYSTEM_FIXED_FONT
    16
  • Variable STOCK_LAST
    16
  • Variable CLR_INVALID
    4294967295
  • Variable BS_SOLID
    0
  • Variable BS_NULL
    1
  • Variable BS_HOLLOW
    1
  • Variable BS_HATCHED
    2
  • Variable BS_PATTERN
    3
  • Variable BS_INDEXED
    4
  • Variable BS_DIBPATTERN
    5
  • Variable BS_DIBPATTERNPT
    6
  • Variable BS_PATTERN8X8
    7
  • Variable BS_DIBPATTERN8X8
    8
  • Variable BS_MONOPATTERN
    9
  • Variable HS_HORIZONTAL
    0
  • Variable HS_VERTICAL
    1
  • Variable HS_FDIAGONAL
    2
  • Variable HS_BDIAGONAL
    3
  • Variable HS_CROSS
    4
  • Variable HS_DIAGCROSS
    5
  • Variable PS_SOLID
    0
  • Variable PS_DASH
    1
  • Variable PS_DOT
    2
  • Variable PS_DASHDOT
    3
  • Variable PS_DASHDOTDOT
    4
  • Variable PS_NULL
    5
  • Variable PS_INSIDEFRAME
    6
  • Variable PS_USERSTYLE
    7
  • Variable PS_ALTERNATE
    8
  • Variable PS_STYLE_MASK
    15
  • Variable PS_ENDCAP_ROUND
    0
  • Variable PS_ENDCAP_SQUARE
    256
  • Variable PS_ENDCAP_FLAT
    512
  • Variable PS_ENDCAP_MASK
    3840
  • Variable PS_JOIN_ROUND
    0
  • Variable PS_JOIN_BEVEL
    4096
  • Variable PS_JOIN_MITER
    8192
  • Variable PS_JOIN_MASK
    61440
  • Variable PS_COSMETIC
    0
  • Variable PS_GEOMETRIC
    65536
  • Variable PS_TYPE_MASK
    983040
  • Variable AD_COUNTERCLOCKWISE
    1
  • Variable AD_CLOCKWISE
    2
  • Cffi-Function MESSAGEBOX
  • Function MESSAGEBOX (hwnd lptext lpcaption utype)
  • Variable MB_OK
    0
  • Variable MB_OKCANCEL
    1
  • Variable MB_ABORTRETRYIGNORE
    2
  • Variable MB_YESNOCANCEL
    3
  • Variable MB_YESNO
    4
  • Variable MB_RETRYCANCEL
    5
  • Variable MB_ICONHAND
    16
  • Variable MB_ICONQUESTION
    32
  • Variable MB_ICONEXCLAMATION
    48
  • Variable MB_ICONASTERISK
    64
  • Variable MB_ICONINFORMATION
    64
  • Variable MB_ICONSTOP
    16
  • Variable MB_DEFBUTTON1
    0
  • Variable MB_DEFBUTTON2
    256
  • Variable MB_DEFBUTTON3
    512
  • Variable MB_APPLMODAL
    0
  • Variable MB_SYSTEMMODAL
    4096
  • Variable MB_TASKMODAL
    8192
  • Variable MB_NOFOCUS
    32768
  • Variable MB_SETFOREGROUND
    65536
  • Variable MB_DEFAULT_DESKTOP_ONLY
    131072
  • Variable MB_TYPEMASK
    15
  • Variable MB_ICONMASK
    240
  • Variable MB_DEFMASK
    3840
  • Variable MB_MODEMASK
    12288
  • Variable MB_MISCMASK
    49152
  • Variable WM_NULL
    0
  • Variable WM_CREATE
    1
  • Variable WM_DESTROY
    2
  • Variable WM_MOVE
    3
  • Variable WM_SIZE
    5
  • Variable WM_ACTIVATE
    6
  • Variable WA_INACTIVE
    0
  • Variable WA_ACTIVE
    1
  • Variable WA_CLICKACTIVE
    2
  • Variable WM_SETFOCUS
    7
  • Variable WM_KILLFOCUS
    8
  • Variable WM_ENABLE
    10
  • Variable WM_SETREDRAW
    11
  • Variable WM_SETTEXT
    12
  • Variable WM_GETTEXT
    13
  • Variable WM_GETTEXTLENGTH
    14
  • Variable WM_PAINT
    15
  • Variable WM_CLOSE
    16
  • Variable WM_QUERYENDSESSION
    17
  • Variable WM_QUERYOPEN
    19
  • Variable WM_ENDSESSION
    22
  • Variable WM_QUIT
    18
  • Variable WM_ERASEBKGND
    20
  • Variable WM_SYSCOLORCHANGE
    21
  • Variable WM_SHOWWINDOW
    24
  • Variable WM_WININICHANGE
    26
  • Variable WM_DEVMODECHANGE
    27
  • Variable WM_ACTIVATEAPP
    28
  • Variable WM_FONTCHANGE
    29
  • Variable WM_TIMECHANGE
    30
  • Variable WM_CANCELMODE
    31
  • Variable WM_SETCURSOR
    32
  • Variable WM_MOUSEACTIVATE
    33
  • Variable WM_CHILDACTIVATE
    34
  • Variable WM_QUEUESYNC
    35
  • Variable WM_GETMINMAXINFO
    36
  • Cffi-Struct MINMAXINFO
  • Variable WM_PAINTICON
    38
  • Variable WM_ICONERASEBKGND
    39
  • Variable WM_NEXTDLGCTL
    40
  • Variable WM_SPOOLERSTATUS
    42
  • Variable WM_DRAWITEM
    43
  • Variable WM_MEASUREITEM
    44
  • Variable WM_DELETEITEM
    45
  • Variable WM_VKEYTOITEM
    46
  • Variable WM_CHARTOITEM
    47
  • Variable WM_SETFONT
    48
  • Variable WM_GETFONT
    49
  • Variable WM_SETHOTKEY
    50
  • Variable WM_GETHOTKEY
    51
  • Variable WM_QUERYDRAGICON
    55
  • Variable WM_COMPAREITEM
    57
  • Variable WM_COMPACTING
    65
  • Variable WM_COMMNOTIFY
    68
  • Variable WM_WINDOWPOSCHANGING
    70
  • Variable WM_WINDOWPOSCHANGED
    71
  • Variable WM_POWER
    72
  • Variable PWR_OK
    1
  • Variable PWR_FAIL
    -1
  • Variable PWR_SUSPENDREQUEST
    1
  • Variable PWR_SUSPENDRESUME
    2
  • Variable PWR_CRITICALRESUME
    3
  • Variable WM_COPYDATA
    74
  • Variable WM_CANCELJOURNAL
    75
  • Cffi-Struct COPYDATASTRUCT
  • Variable WM_NCCREATE
    129
  • Variable WM_NCDESTROY
    130
  • Variable WM_NCCALCSIZE
    131
  • Variable WM_NCHITTEST
    132
  • Variable WM_NCPAINT
    133
  • Variable WM_NCACTIVATE
    134
  • Variable WM_GETDLGCODE
    135
  • Variable WM_SYNCPAINT
    136
  • Variable WM_NCMOUSEMOVE
    160
  • Variable WM_NCLBUTTONDOWN
    161
  • Variable WM_NCLBUTTONUP
    162
  • Variable WM_NCLBUTTONDBLCLK
    163
  • Variable WM_NCRBUTTONDOWN
    164
  • Variable WM_NCRBUTTONUP
    165
  • Variable WM_NCRBUTTONDBLCLK
    166
  • Variable WM_NCMBUTTONDOWN
    167
  • Variable WM_NCMBUTTONUP
    168
  • Variable WM_NCMBUTTONDBLCLK
    169
  • Variable WM_KEYFIRST
    256
  • Variable WM_KEYDOWN
    256
  • Variable WM_KEYUP
    257
  • Variable WM_CHAR
    258
  • Variable WM_DEADCHAR
    259
  • Variable WM_SYSKEYDOWN
    260
  • Variable WM_SYSKEYUP
    261
  • Variable WM_SYSCHAR
    262
  • Variable WM_SYSDEADCHAR
    263
  • Variable WM_KEYLAST
    264
  • Variable WM_INITDIALOG
    272
  • Variable WM_COMMAND
    273
  • Variable WM_SYSCOMMAND
    274
  • Variable WM_TIMER
    275
  • Variable WM_HSCROLL
    276
  • Variable WM_VSCROLL
    277
  • Variable WM_INITMENU
    278
  • Variable WM_INITMENUPOPUP
    279
  • Variable WM_MENUSELECT
    287
  • Variable WM_MENUCHAR
    288
  • Variable WM_ENTERIDLE
    289
  • Variable WM_CTLCOLORMSGBOX
    306
  • Variable WM_CTLCOLOREDIT
    307
  • Variable WM_CTLCOLORLISTBOX
    308
  • Variable WM_CTLCOLORBTN
    309
  • Variable WM_CTLCOLORDLG
    310
  • Variable WM_CTLCOLORSCROLLBAR
    311
  • Variable WM_CTLCOLORSTATIC
    312
  • Variable MN_GETHMENU
    481
  • Variable WM_MOUSEFIRST
    512
  • Variable WM_MOUSEMOVE
    512
  • Variable WM_LBUTTONDOWN
    513
  • Variable WM_LBUTTONUP
    514
  • Variable WM_LBUTTONDBLCLK
    515
  • Variable WM_RBUTTONDOWN
    516
  • Variable WM_RBUTTONUP
    517
  • Variable WM_RBUTTONDBLCLK
    518
  • Variable WM_MBUTTONDOWN
    519
  • Variable WM_MBUTTONUP
    520
  • Variable WM_MBUTTONDBLCLK
    521
  • Variable WM_MOUSELAST
    521
  • Variable WM_PARENTNOTIFY
    528
  • Variable WM_ENTERMENULOOP
    529
  • Variable WM_EXITMENULOOP
    530
  • Variable WM_MDICREATE
    544
  • Variable WM_MDIDESTROY
    545
  • Variable WM_MDIACTIVATE
    546
  • Variable WM_MDIRESTORE
    547
  • Variable WM_MDINEXT
    548
  • Variable WM_MDIMAXIMIZE
    549
  • Variable WM_MDITILE
    550
  • Variable WM_MDICASCADE
    551
  • Variable WM_MDIICONARRANGE
    552
  • Variable WM_MDIGETACTIVE
    553
  • Variable WM_MDISETMENU
    560
  • Variable WM_ENTERSIZEMOVE
    561
  • Variable WM_EXITSIZEMOVE
    562
  • Variable WM_DROPFILES
    563
  • Variable WM_MDIREFRESHMENU
    564
  • Variable WM_CUT
    768
  • Variable WM_COPY
    769
  • Variable WM_PASTE
    770
  • Variable WM_CLEAR
    771
  • Variable WM_UNDO
    772
  • Variable WM_RENDERFORMAT
    773
  • Variable WM_RENDERALLFORMATS
    774
  • Variable WM_DESTROYCLIPBOARD
    775
  • Variable WM_DRAWCLIPBOARD
    776
  • Variable WM_PAINTCLIPBOARD
    777
  • Variable WM_VSCROLLCLIPBOARD
    778
  • Variable WM_SIZECLIPBOARD
    779
  • Variable WM_ASKCBFORMATNAME
    780
  • Variable WM_CHANGECBCHAIN
    781
  • Variable WM_HSCROLLCLIPBOARD
    782
  • Variable WM_QUERYNEWPALETTE
    783
  • Variable WM_PALETTEISCHANGING
    784
  • Variable WM_PALETTECHANGED
    785
  • Variable WM_HOTKEY
    786
  • Variable WM_PENWINFIRST
    896
  • Variable WM_PENWINLAST
    911
  • Variable WM_USER
    1024
  • Variable HTERROR
    -2
  • Variable HTTRANSPARENT
    -1
  • Variable HTNOWHERE
    0
  • Variable HTCLIENT
    1
  • Variable HTCAPTION
    2
  • Variable HTSYSMENU
    3
  • Variable HTGROWBOX
    4
  • Variable HTSIZE
    4
  • Variable HTMENU
    5
  • Variable HTHSCROLL
    6
  • Variable HTVSCROLL
    7
  • Variable HTMINBUTTON
    8
  • Variable HTMAXBUTTON
    9
  • Variable HTLEFT
    10
  • Variable HTRIGHT
    11
  • Variable HTTOP
    12
  • Variable HTTOPLEFT
    13
  • Variable HTTOPRIGHT
    14
  • Variable HTBOTTOM
    15
  • Variable HTBOTTOMLEFT
    16
  • Variable HTBOTTOMRIGHT
    17
  • Variable HTBORDER
    18
  • Variable HTREDUCE
    8
  • Variable HTZOOM
    9
  • Variable HTSIZEFIRST
    10
  • Variable HTSIZELAST
    17
  • Variable SMTO_NORMAL
    0
  • Variable SMTO_BLOCK
    1
  • Variable SMTO_ABORTIFHUNG
    2
  • Variable MA_ACTIVATE
    1
  • Variable MA_ACTIVATEANDEAT
    2
  • Variable MA_NOACTIVATE
    3
  • Variable MA_NOACTIVATEANDEAT
    4
  • Variable ICON_SMALL
    0
  • Variable ICON_BIG
    1
  • Variable SIZE_RESTORED
    0
  • Variable SIZE_MINIMIZED
    1
  • Variable SIZE_MAXIMIZED
    2
  • Variable SIZE_MAXSHOW
    3
  • Variable SIZE_MAXHIDE
    4
  • Variable SIZENORMAL
    0
  • Variable SIZEICONIC
    1
  • Variable SIZEFULLSCREEN
    2
  • Variable SIZEZOOMSHOW
    3
  • Variable SIZEZOOMHIDE
    4
  • Cffi-Struct WINDOWPOS
  • Cffi-Struct NCCALCSIZE_PARAMS
  • Variable WVR_ALIGNTOP
    16
  • Variable WVR_ALIGNLEFT
    32
  • Variable WVR_ALIGNBOTTOM
    64
  • Variable WVR_ALIGNRIGHT
    128
  • Variable WVR_HREDRAW
    256
  • Variable WVR_VREDRAW
    512
  • Variable WVR_REDRAW
    (logior 256 512)
  • Variable WVR_VALIDRECTS
    1024
  • Variable MK_LBUTTON
    1
  • Variable MK_RBUTTON
    2
  • Variable MK_SHIFT
    4
  • Variable MK_CONTROL
    8
  • Variable MK_MBUTTON
    16
  • Cffi-Function LOADCURSOR
  • Function LOADCURSOR (hinstance lpcursorname)
  • Variable IDC_ARROW
    32512
  • Variable IDC_IBEAM
    32513
  • Variable IDC_WAIT
    32514
  • Variable IDC_CROSS
    32515
  • Variable IDC_UPARROW
    32516
  • Variable IDC_SIZE
    32640
  • Variable IDC_ICON
    32641
  • Variable IDC_SIZENWSE
    32642
  • Variable IDC_SIZENESW
    32643
  • Variable IDC_SIZEWE
    32644
  • Variable IDC_SIZENS
    32645
  • Variable IDC_SIZEALL
    32646
  • Variable IDC_NO
    32648
  • Variable IDC_APPSTARTING
    32650
  • Cffi-Function GETCLIENTRECT
  • Function GETCLIENTRECT (hwnd lprect)
  • Cffi-Function MOVEWINDOW
  • Function MOVEWINDOW (hwnd x y nwidth nheight brepaint)
  • Cffi-Struct RGBQUAD
  • Cffi-Struct BITMAPINFOHEADER
  • Cffi-Struct BITMAPINFO
  • Cffi-Function CREATECOMPATIBLEDC
  • Function CREATECOMPATIBLEDC (hdc)
  • Cffi-Function CREATEDIBSECTION
  • Function CREATEDIBSECTION (hdc pbmi iusage ppvbits hsection dwoffset)
  • Cffi-Function BITBLT
  • Function BITBLT (hdcdest nxdest nydest nwidth nheight hdcsrc nxsrc nysrc dwrop)
  • Variable SRCCOPY
    13369376
  • Variable SRCPAINT
    15597702
  • Variable SRCAND
    8913094
  • Variable SRCINVERT
    6684742
  • Variable SRCERASE
    4457256
  • Variable NOTSRCCOPY
    3342344
  • Variable NOTSRCERASE
    1114278
  • Variable MERGECOPY
    12583114
  • Variable MERGEPAINT
    12255782
  • Variable PATCOPY
    15728673
  • Variable PATPAINT
    16452105
  • Variable PATINVERT
    5898313
  • Variable DSTINVERT
    5570569
  • Variable BLACKNESS
    66
  • Variable WHITENESS
    16711778
  • Variable DIB_RGB_COLORS
    0
  • Variable DIB_PAL_COLORS
    1
  • Variable BI_RGB
    0
  • Variable BI_RLE8
    1
  • Variable BI_RLE4
    2
  • Variable BI_BITFIELDS
    3
  • Variable BI_JPEG
    4
  • Variable BI_PNG
    5
  • Cffi-Function INVALIDATERECT
  • Function INVALIDATERECT (hwnd lprect berase)
  • Variable WS_EX_DLGMODALFRAME
    1
  • Variable WS_EX_NOPARENTNOTIFY
    4
  • Variable WS_EX_TOPMOST
    8
  • Variable WS_EX_ACCEPTFILES
    16
  • Variable WS_EX_TRANSPARENT
    32
  • Variable ES_LEFT
    0
  • Variable ES_CENTER
    1
  • Variable ES_RIGHT
    2
  • Variable ES_MULTILINE
    4
  • Variable ES_UPPERCASE
    8
  • Variable ES_LOWERCASE
    16
  • Variable ES_PASSWORD
    32
  • Variable ES_AUTOVSCROLL
    64
  • Variable ES_AUTOHSCROLL
    128
  • Variable ES_NOHIDESEL
    256
  • Variable ES_OEMCONVERT
    1024
  • Variable ES_READONLY
    2048
  • Variable ES_WANTRETURN
    4096
  • Variable EN_SETFOCUS
    256
  • Variable EN_KILLFOCUS
    512
  • Variable EN_CHANGE
    768
  • Variable EN_UPDATE
    1024
  • Variable EN_ERRSPACE
    1280
  • Variable EN_MAXTEXT
    1281
  • Variable EN_HSCROLL
    1537
  • Variable EN_VSCROLL
    1538
  • Variable EM_GETSEL
    176
  • Variable EM_SETSEL
    177
  • Variable EM_GETRECT
    178
  • Variable EM_SETRECT
    179
  • Variable EM_SETRECTNP
    180
  • Variable EM_SCROLL
    181
  • Variable EM_LINESCROLL
    182
  • Variable EM_SCROLLCARET
    183
  • Variable EM_GETMODIFY
    184
  • Variable EM_SETMODIFY
    185
  • Variable EM_GETLINECOUNT
    186
  • Variable EM_LINEINDEX
    187
  • Variable EM_SETHANDLE
    188
  • Variable EM_GETHANDLE
    189
  • Variable EM_GETTHUMB
    190
  • Variable EM_LINELENGTH
    193
  • Variable EM_REPLACESEL
    194
  • Variable EM_GETLINE
    196
  • Variable EM_LIMITTEXT
    197
  • Variable EM_CANUNDO
    198
  • Variable EM_UNDO
    199
  • Variable EM_FMTLINES
    200
  • Variable EM_LINEFROMCHAR
    201
  • Variable EM_SETTABSTOPS
    203
  • Variable EM_SETPASSWORDCHAR
    204
  • Variable EM_EMPTYUNDOBUFFER
    205
  • Variable EM_GETFIRSTVISIBLELINE
    206
  • Variable EM_SETREADONLY
    207
  • Variable EM_SETWORDBREAKPROC
    208
  • Variable EM_GETWORDBREAKPROC
    209
  • Variable EM_GETPASSWORDCHAR
    210
  • Variable WB_LEFT
    0
  • Variable WB_RIGHT
    1
  • Variable WB_ISDELIMITER
    2
  • Variable BS_PUSHBUTTON
    0
  • Variable BS_DEFPUSHBUTTON
    1
  • Variable BS_CHECKBOX
    2
  • Variable BS_AUTOCHECKBOX
    3
  • Variable BS_RADIOBUTTON
    4
  • Variable BS_3STATE
    5
  • Variable BS_AUTO3STATE
    6
  • Variable BS_GROUPBOX
    7
  • Variable BS_USERBUTTON
    8
  • Variable BS_AUTORADIOBUTTON
    9
  • Variable BS_PUSHBOX
    10
  • Variable BS_OWNERDRAW
    11
  • Variable BS_TYPEMASK
    15
  • Variable BS_LEFTTEXT
    32
  • Variable BN_CLICKED
    0
  • Variable BN_PAINT
    1
  • Variable BN_HILITE
    2
  • Variable BN_UNHILITE
    3
  • Variable BN_DISABLE
    4
  • Variable BN_DOUBLECLICKED
    5
  • Variable BM_GETCHECK
    240
  • Variable BM_SETCHECK
    241
  • Variable BM_GETSTATE
    242
  • Variable BM_SETSTATE
    243
  • Variable BM_SETSTYLE
    244
  • Variable SS_LEFT
    0
  • Variable SS_CENTER
    1
  • Variable SS_RIGHT
    2
  • Variable SS_ICON
    3
  • Variable SS_BLACKRECT
    4
  • Variable SS_GRAYRECT
    5
  • Variable SS_WHITERECT
    6
  • Variable SS_BLACKFRAME
    7
  • Variable SS_GRAYFRAME
    8
  • Variable SS_WHITEFRAME
    9
  • Variable SS_USERITEM
    10
  • Variable SS_SIMPLE
    11
  • Variable SS_LEFTNOWORDWRAP
    12
  • Variable SS_NOPREFIX
    128
  • Variable STM_SETICON
    368
  • Variable STM_GETICON
    369
  • Variable STM_MSGMAX
    372
  • Cffi-Function GETWINDOWTEXT
  • Function GETWINDOWTEXT (hwnd lpstring nmaxcount)
  • Cffi-Function SENDMESSAGE
  • Function SENDMESSAGE (hwnd msg wparam lparam)
  • Cffi-Function SETTIMER
  • Function SETTIMER (hwnd nidevent uelapse lptimerfunc)
  • Cffi-Function KILLTIMER
  • Function KILLTIMER (hwnd uidevent)
  • Cffi-Function FILLRECT
  • Function FILLRECT (hdc lprc hbr)
  • Cffi-Function CREATESOLIDBRUSH
  • Function CREATESOLIDBRUSH (crcolor)
  • Cffi-Function DELETEOBJECT
  • Function DELETEOBJECT (hobject)
  • Cffi-Function CREATEFONT
  • Function CREATEFONT (nheight nwidth nescapement norientation fnweight fdwitalic fdwunderline fdwstrikeout fdwcharset fdwoutputprecision fdwclipprecision fdwquality fdwpitchandfamily lpszface)
  • Cffi-Function EXTTEXTOUT
  • Function EXTTEXTOUT (hdc x y fuoptions lprc lpstring cbcount lpdx)
  • Cffi-Function SETMAPMODE
  • Function SETMAPMODE (hdc fnmapmode)
  • Variable OUT_DEFAULT_PRECIS
    0
  • Variable OUT_STRING_PRECIS
    1
  • Variable OUT_CHARACTER_PRECIS
    2
  • Variable OUT_STROKE_PRECIS
    3
  • Variable OUT_TT_PRECIS
    4
  • Variable OUT_DEVICE_PRECIS
    5
  • Variable OUT_RASTER_PRECIS
    6
  • Variable OUT_TT_ONLY_PRECIS
    7
  • Variable OUT_OUTLINE_PRECIS
    8
  • Variable OUT_SCREEN_OUTLINE_PRECIS
    9
  • Variable OUT_PS_ONLY_PRECIS
    10
  • Variable CLIP_DEFAULT_PRECIS
    0
  • Variable CLIP_CHARACTER_PRECIS
    1
  • Variable CLIP_STROKE_PRECIS
    2
  • Variable CLIP_MASK
    15
  • Variable CLIP_LH_ANGLES
    16
  • Variable CLIP_TT_ALWAYS
    32
  • Variable CLIP_EMBEDDED
    128
  • Variable DEFAULT_QUALITY
    0
  • Variable DRAFT_QUALITY
    1
  • Variable PROOF_QUALITY
    2
  • Variable DEFAULT_PITCH
    0
  • Variable FIXED_PITCH
    1
  • Variable VARIABLE_PITCH
    2
  • Variable ANSI_CHARSET
    0
  • Variable DEFAULT_CHARSET
    1
  • Variable SYMBOL_CHARSET
    2
  • Variable SHIFTJIS_CHARSET
    128
  • Variable HANGEUL_CHARSET
    129
  • Variable HANGUL_CHARSET
    129
  • Variable GB2312_CHARSET
    134
  • Variable CHINESEBIG5_CHARSET
    136
  • Variable OEM_CHARSET
    255
  • Variable FF_DONTCARE
    0
  • Variable FF_ROMAN
    16
  • Variable FF_SWISS
    32
  • Variable FF_MODERN
    64
  • Variable FF_SCRIPT
    128
  • Variable FF_DECORATIVE
    256
  • Variable FW_DONTCARE
    0
  • Variable FW_THIN
    100
  • Variable FW_EXTRALIGHT
    200
  • Variable FW_LIGHT
    300
  • Variable FW_NORMAL
    400
  • Variable FW_MEDIUM
    500
  • Variable FW_SEMIBOLD
    600
  • Variable FW_BOLD
    700
  • Variable FW_EXTRABOLD
    800
  • Variable FW_HEAVY
    900
  • Variable FW_ULTRALIGHT
    200
  • Variable FW_REGULAR
    400
  • Variable FW_DEMIBOLD
    600
  • Variable FW_ULTRABOLD
    800
  • Variable FW_BLACK
    900
  • Variable PANOSE_COUNT
    10
  • Variable PAN_FAMILYTYPE_INDEX
    0
  • Variable PAN_SERIFSTYLE_INDEX
    1
  • Variable PAN_WEIGHT_INDEX
    2
  • Variable PAN_PROPORTION_INDEX
    3
  • Variable PAN_CONTRAST_INDEX
    4
  • Variable PAN_STROKEVARIATION_INDEX
    5
  • Variable PAN_ARMSTYLE_INDEX
    6
  • Variable PAN_LETTERFORM_INDEX
    7
  • Variable PAN_MIDLINE_INDEX
    8
  • Variable PAN_XHEIGHT_INDEX
    9
  • Variable PAN_CULTURE_LATIN
    0
  • Variable PAN_ANY
    0
  • Variable PAN_NO_FIT
    1
  • Variable PAN_FAMILY_TEXT_DISPLAY
    2
  • Variable PAN_FAMILY_SCRIPT
    3
  • Variable PAN_FAMILY_DECORATIVE
    4
  • Variable PAN_FAMILY_PICTORIAL
    5
  • Variable PAN_SERIF_COVE
    2
  • Variable PAN_SERIF_OBTUSE_COVE
    3
  • Variable PAN_SERIF_SQUARE_COVE
    4
  • Variable PAN_SERIF_OBTUSE_SQUARE_COVE
    5
  • Variable PAN_SERIF_SQUARE
    6
  • Variable PAN_SERIF_THIN
    7
  • Variable PAN_SERIF_BONE
    8
  • Variable PAN_SERIF_EXAGGERATED
    9
  • Variable PAN_SERIF_TRIANGLE
    10
  • Variable PAN_SERIF_NORMAL_SANS
    11
  • Variable PAN_SERIF_OBTUSE_SANS
    12
  • Variable PAN_SERIF_PERP_SANS
    13
  • Variable PAN_SERIF_FLARED
    14
  • Variable PAN_SERIF_ROUNDED
    15
  • Variable PAN_WEIGHT_VERY_LIGHT
    2
  • Variable PAN_WEIGHT_LIGHT
    3
  • Variable PAN_WEIGHT_THIN
    4
  • Variable PAN_WEIGHT_BOOK
    5
  • Variable PAN_WEIGHT_MEDIUM
    6
  • Variable PAN_WEIGHT_DEMI
    7
  • Variable PAN_WEIGHT_BOLD
    8
  • Variable PAN_WEIGHT_HEAVY
    9
  • Variable PAN_WEIGHT_BLACK
    10
  • Variable PAN_WEIGHT_NORD
    11
  • Variable PAN_PROP_OLD_STYLE
    2
  • Variable PAN_PROP_MODERN
    3
  • Variable PAN_PROP_EVEN_WIDTH
    4
  • Variable PAN_PROP_EXPANDED
    5
  • Variable PAN_PROP_CONDENSED
    6
  • Variable PAN_PROP_VERY_EXPANDED
    7
  • Variable PAN_PROP_VERY_CONDENSED
    8
  • Variable PAN_PROP_MONOSPACED
    9
  • Variable PAN_CONTRAST_NONE
    2
  • Variable PAN_CONTRAST_VERY_LOW
    3
  • Variable PAN_CONTRAST_LOW
    4
  • Variable PAN_CONTRAST_MEDIUM_LOW
    5
  • Variable PAN_CONTRAST_MEDIUM
    6
  • Variable PAN_CONTRAST_MEDIUM_HIGH
    7
  • Variable PAN_CONTRAST_HIGH
    8
  • Variable PAN_CONTRAST_VERY_HIGH
    9
  • Variable PAN_STROKE_GRADUAL_DIAG
    2
  • Variable PAN_STROKE_GRADUAL_TRAN
    3
  • Variable PAN_STROKE_GRADUAL_VERT
    4
  • Variable PAN_STROKE_GRADUAL_HORZ
    5
  • Variable PAN_STROKE_RAPID_VERT
    6
  • Variable PAN_STROKE_RAPID_HORZ
    7
  • Variable PAN_STROKE_INSTANT_VERT
    8
  • Variable PAN_STRAIGHT_ARMS_HORZ
    2
  • Variable PAN_STRAIGHT_ARMS_WEDGE
    3
  • Variable PAN_STRAIGHT_ARMS_VERT
    4
  • Variable PAN_STRAIGHT_ARMS_SINGLE_SERIF
    5
  • Variable PAN_STRAIGHT_ARMS_DOUBLE_SERIF
    6
  • Variable PAN_BENT_ARMS_HORZ
    7
  • Variable PAN_BENT_ARMS_WEDGE
    8
  • Variable PAN_BENT_ARMS_VERT
    9
  • Variable PAN_BENT_ARMS_SINGLE_SERIF
    10
  • Variable PAN_BENT_ARMS_DOUBLE_SERIF
    11
  • Variable PAN_LETT_NORMAL_CONTACT
    2
  • Variable PAN_LETT_NORMAL_WEIGHTED
    3
  • Variable PAN_LETT_NORMAL_BOXED
    4
  • Variable PAN_LETT_NORMAL_FLATTENED
    5
  • Variable PAN_LETT_NORMAL_ROUNDED
    6
  • Variable PAN_LETT_NORMAL_OFF_CENTER
    7
  • Variable PAN_LETT_NORMAL_SQUARE
    8
  • Variable PAN_LETT_OBLIQUE_CONTACT
    9
  • Variable PAN_LETT_OBLIQUE_WEIGHTED
    10
  • Variable PAN_LETT_OBLIQUE_BOXED
    11
  • Variable PAN_LETT_OBLIQUE_FLATTENED
    12
  • Variable PAN_LETT_OBLIQUE_ROUNDED
    13
  • Variable PAN_LETT_OBLIQUE_OFF_CENTER
    14
  • Variable PAN_LETT_OBLIQUE_SQUARE
    15
  • Variable PAN_MIDLINE_STANDARD_TRIMMED
    2
  • Variable PAN_MIDLINE_STANDARD_POINTED
    3
  • Variable PAN_MIDLINE_STANDARD_SERIFED
    4
  • Variable PAN_MIDLINE_HIGH_TRIMMED
    5
  • Variable PAN_MIDLINE_HIGH_POINTED
    6
  • Variable PAN_MIDLINE_HIGH_SERIFED
    7
  • Variable PAN_MIDLINE_CONSTANT_TRIMMED
    8
  • Variable PAN_MIDLINE_CONSTANT_POINTED
    9
  • Variable PAN_MIDLINE_CONSTANT_SERIFED
    10
  • Variable PAN_MIDLINE_LOW_TRIMMED
    11
  • Variable PAN_MIDLINE_LOW_POINTED
    12
  • Variable PAN_MIDLINE_LOW_SERIFED
    13
  • Variable PAN_XHEIGHT_CONSTANT_SMALL
    2
  • Variable PAN_XHEIGHT_CONSTANT_STD
    3
  • Variable PAN_XHEIGHT_CONSTANT_LARGE
    4
  • Variable PAN_XHEIGHT_DUCKING_SMALL
    5
  • Variable PAN_XHEIGHT_DUCKING_STD
    6
  • Variable PAN_XHEIGHT_DUCKING_LARGE
    7
  • Variable ELF_VENDOR_SIZE
    4
  • Variable ELF_VERSION
    0
  • Variable ELF_CULTURE_LATIN
    0
  • Variable RASTER_FONTTYPE
    1
  • Variable DEVICE_FONTTYPE
    2
  • Variable TRUETYPE_FONTTYPE
    4
  • Variable PC_RESERVED
    1
  • Variable PC_EXPLICIT
    2
  • Variable PC_NOCOLLAPSE
    4
  • Variable TRANSPARENT
    1
  • Variable OPAQUE
    2
  • Variable BKMODE_LAST
    2
  • Variable GM_COMPATIBLE
    1
  • Variable GM_ADVANCED
    2
  • Variable GM_LAST
    2
  • Variable PT_CLOSEFIGURE
    1
  • Variable PT_LINETO
    2
  • Variable PT_BEZIERTO
    4
  • Variable PT_MOVETO
    6
  • Variable MM_TEXT
    1
  • Variable MM_LOMETRIC
    2
  • Variable MM_HIMETRIC
    3
  • Variable MM_LOENGLISH
    4
  • Variable MM_HIENGLISH
    5
  • Variable MM_TWIPS
    6
  • Variable MM_ISOTROPIC
    7
  • Variable MM_ANISOTROPIC
    8
  • Variable MM_MIN
    1
  • Variable MM_MAX
    8
  • Variable MM_MAX_FIXEDSCALE
    6
  • Variable ABSOLUTE
    1
  • Variable RELATIVE
    2
  • Variable ETO_OPAQUE
    2
  • Variable ETO_CLIPPED
    4
  • Cffi-Function SETBKCOLOR
  • Function SETBKCOLOR (hdc crcolor)
  • Cffi-Function GETSYSTEMMETRICS
  • Function GETSYSTEMMETRICS (nindex)
  • Variable SM_CXSCREEN
    0
  • Variable SM_CYSCREEN
    1
  • Variable SM_CXVSCROLL
    2
  • Variable SM_CYHSCROLL
    3
  • Variable SM_CYCAPTION
    4
  • Variable SM_CXBORDER
    5
  • Variable SM_CYBORDER
    6
  • Variable SM_CXDLGFRAME
    7
  • Variable SM_CYDLGFRAME
    8
  • Variable SM_CYVTHUMB
    9
  • Variable SM_CXHTHUMB
    10
  • Variable SM_CXICON
    11
  • Variable SM_CYICON
    12
  • Variable SM_CXCURSOR
    13
  • Variable SM_CYCURSOR
    14
  • Variable SM_CYMENU
    15
  • Variable SM_CXFULLSCREEN
    16
  • Variable SM_CYFULLSCREEN
    17
  • Variable SM_CYKANJIWINDOW
    18
  • Variable SM_MOUSEPRESENT
    19
  • Variable SM_CYVSCROLL
    20
  • Variable SM_CXHSCROLL
    21
  • Variable SM_DEBUG
    22
  • Variable SM_SWAPBUTTON
    23
  • Variable SM_RESERVED1
    24
  • Variable SM_RESERVED2
    25
  • Variable SM_RESERVED3
    26
  • Variable SM_RESERVED4
    27
  • Variable SM_CXMIN
    28
  • Variable SM_CYMIN
    29
  • Variable SM_CXSIZE
    30
  • Variable SM_CYSIZE
    31
  • Variable SM_CXFRAME
    32
  • Variable SM_CYFRAME
    33
  • Variable SM_CXMINTRACK
    34
  • Variable SM_CYMINTRACK
    35
  • Variable SM_CXDOUBLECLK
    36
  • Variable SM_CYDOUBLECLK
    37
  • Variable SM_CXICONSPACING
    38
  • Variable SM_CYICONSPACING
    39
  • Variable SM_MENUDROPALIGNMENT
    40
  • Variable SM_PENWINDOWS
    41
  • Variable SM_DBCSENABLED
    42
  • Variable SM_CMOUSEBUTTONS
    43
  • Variable SM_SHOWSOUNDS
    70
  • Variable SM_CMETRICS
    76
  • Cffi-Function GET-DC
  • Function GET-DC (hwnd)
  • Cffi-Function DESTROY-WINDOW
  • Function DESTROY-WINDOW (hwnd)
  • Cffi-Function VALIDATE-RECT
  • Function VALIDATE-RECT (hwnd rect)
  • Cffi-Function GET-WINDOW-RECT
  • Function GET-WINDOW-RECT (hwnd lprect)
  • Cffi-Struct CREATESTRUCT
  • Variable PFD_DRAW_TO_WINDOW
    4
  • Variable PFD_SUPPORT_OPENGL
    32
  • Variable PFD_DOUBLEBUFFER
    1
  • Variable PFD_TYPE_RGBA
    0
  • Variable PFD_MAIN_PLANE
    0
  • Cffi-Function SET-PIXEL-FORMAT
  • Function SET-PIXEL-FORMAT (hdc ipixelformat ppfd)
  • Cffi-Function CHOOSE-PIXEL-FORMAT
  • Function CHOOSE-PIXEL-FORMAT (hdc ppfd)
  • Cffi-Struct PIXELFORMATDESCRIPTOR

lispbuilder-yacc

A LALR(1) parser generator for Common Lisp

LISPBUILDER-YACC

  • Function MAKE-PRODUCTION (symbol derives &key (action #'list) (action-form nil))
  • Function MAKE-GRAMMAR (&key name (start-symbol (required-argument)) terminals precedence productions)
  • Function MAKE-PARSER (grammar &key (discard-memos t) (muffle-conflicts nil) (print-derives-epsilon nil) (print-first-terminals nil) (print-states nil) (print-goto-graph nil) (print-lookaheads nil))
    Combines COMPUTE-ALL-LOOKAHEADS and COMPUTE-PARSING-TABLES. MUFFLE-WARNINGS is one of NIL, T, :SOME or a list of the form (sr rr).
  • Condition YACC-PARSE-ERROR  (ERROR)
  • Function PARSE-WITH-LEXER (lexer parser)
    Parse the stream of symbols provided by LEXER using PARSER. LEXER is a function of no arguments returning a symbol and a semantic value, and should return (VALUES NIL NIL) when the end of input is reached. Handle YACC-PARSE-ERROR to provide custom error reporting.
  • Macro DEFINE-GRAMMAR (name &body body)
    DEFINE-GRAMMAR NAME OPTION... PRODUCTION... PRODUCTION ::= (SYMBOL RHS...) RHS ::= SYMBOL | (SYMBOL... [ACTION]) Defines the special variable NAME to be a grammar. Options are as in MAKE-GRAMMAR.
  • Macro DEFINE-PARSER (name &body body)
    DEFINE-GRAMMAR NAME OPTION... PRODUCTION... PRODUCTION ::= (SYMBOL RHS...) RHS ::= SYMBOL | (SYMBOL... [ACTION]) Defines the special variable NAME to be a parser. Options are as in MAKE-GRAMMAR and MAKE-PARSER.