Next: Events, Previous: General SDL, Up: The (sdl *) Modules [Contents][Index]
Return a new cursor from data and mask (both u8 uniform vectors), sized w by h and with hot pixel located at x,y.
Create a new YUV overlay, sized width by height with overlay format (a symbol or an exact number). Optional arg display specifies a surface to use instead of creating a new one.
Return the current display surface.
Return information about the video hardware as three values:
capabilities
(list of symbols), memory
(integer),
and format
(pixel format object). The capabilities
are:
hw-available wm-available blit-hw blit-hw-CC blit-hw-A blit-sw blit-sw-CC blit-sw-A blit-fill
Return the name of the video driver.
Return a list of available screen dimensions for pixel
format and flags (see video flags).
Format defaults to that for
the current screen. Flags default to none.
Return #f
if no modes are available, #t
if all are available.
Check to see if a particular video mode is supported.
Args are width, height, bpp (numbers),
and flags (see video flags).
Return #f
if the mode is not supported, or a number
indicating the bits-per-pixel of the closest available
mode supporting width and height.
Set the SDL video mode with width, height and bits-per-pixel bpp. Optional arg flags (see video flags) is supported. Return a new surface.
The external representation of a Rectangle object is:
#<SDL-Rect wxhsxsy>
where w and h are the width and height of the rectangle, and x and y are its horizontal and vertical coordinates. s may be ‘+’ or ‘-’.
Return #t
iff obj is an SDL-rectangle object.
Return a rectangle object with location x,y and dimensions width by height.
Get x
from rect.
Get y
from rect.
Get w
from rect.
Get h
from rect.
Set x
in rect
to value.
Set y
in rect
to value.
Set w
in rect
to value.
Set h
in rect
to value.
Update surface within a specified rectangle. The second arg can either be an SDL-Rect object, or the second through fifth args are numbers specifying the x, y, width and height of a rectangular area.
On surface, update the rectangles in ls, a list of rectangles.
Swap double buffers of the default surface, or of surface if specified.
The external representation of a Color object is:
#<SDL-Color r g b>
where r is the decimal value of the color object’s red component, and g and b the likewise respective green and blue components.
Return #t
iff obj is an SDL-Color object.
Return a color object with r, g, and b components.
Get r
from color.
Get g
from color.
Get b
from color.
Set r
in color
to value.
Set g
in color
to value.
Set b
in color
to value.
Set a portion of the colormap for the 8-bit surface using colors, a vector of SDL-Colors. Optional arg start (an integer in the range [0,255]) specifies the portion to be modified. It defaults to 0.
Set the palette of an 8-bit surface using flags (see palette flags) and colors, a vector of SDL-Colors. Optional arg start (an integer in the range [0,255]) specifies the portion to be modified. It defaults to 0.
Set the color gamma function for the display using real numbers redgamma, greengamma and bluegamma.
Return the gamma translation lookup tables currently used by
the display as a list of three tables, for red, green and blue.
Each table is a u16 uniform vector of length 256.
Return #f
if unsuccessful.
Set the gamma translation lookup tables currently
used by the display to tables r, g and b,
each a u16 uniform vector of length 256, or #f
,
in which case that particular component is unchanged.
Return #t
if successful.
Map a RGB color value to the pixel format. The second arg can be an SDL-Color, otherwise the second through fourth args are red, green and blue values (numbers). Return the mapped components as an unsigned integer.
Map a RGB color value to the pixel format. If the second arg is an SDL-Color, the third is an alpha value (number). Otherwise, the second through fifth args are red, green, blue and alpha values (numbers). Return the mapped components as an unsigned integer.
Return RGB info from pixel in the specified pixel format
as three values: r
, g
and b
(all integers).
Return RGBA info from pixel in the specified pixel format as
four values: r
, g
, b
and a
(all integers).
Fill surface rect with color (a number).
If rect is #f
, fill the entire surface.
Return #t
if successful.
Return a new surface made by converting surface
to the display format. Return #f
if not successful.
Return a new surface made by converting surface
to the display format, with an alpha channel. Return #f
if not successful.
Set the position of the mouse cursor to x,y.
Set the current mouse cursor to cursor.
Get the current mouse cursor.
Return the current visibility of the pointer (aka “mouse cursor”) as a boolean. If arg setting (a boolean) is specified, set the visibility to setting (the returned visibility corresponds to that before the call, regardless).
Return the value of a special SDL/OpenGL attribute.
Set the special SDL/OpenGL attribute to value. Both args are numbers.
Swap OpenGL framebuffers/Update Display.
Lock the given YUV overlay.
Return #f
if successful.
Unlock the previously locked YUV overlay.
Blit the YUV overlay to the display dstrect
over which it was created. Return #t
if successful.
Return information on the window manager, as a list of the
form: (VERSION SUBSYSTEM DISPLAY WINDOW FSWINDOW WMWINDOW).
VERSION is a sub-list of form: (MAJOR MINOR PATCH), where
element is an integer. SUBSYSTEM is either the symbol
x11
, or #f
. DISPLAY is a pointer (machine address)
of the X11 Display structure, converted to an integer.
WINDOW, FSWINDOW and WMWINDOW are Window identifiers (also
integers).
Set the title-bar and icon name of the display window to title and icon (both strings), respectively. If icon is not specified, use title by default.
Return display-window caption as two values: title
and icon
(both strings, or #f
if not set).
Set icon for the display window.
Iconify/Minimize the window.
Return #t
if successful.
Toggle the default video surface between windowed
and fullscreen mode, if supported. Optional arg
surface specifies another surface to toggle.
Return #t
if successful.
Grab mouse and keyboard input. Return new grab state.
Optional arg mode (a symbol) specifies the kind
of grab, one of query
(the default),
off
or on
.
Return the current state of the application, a list of symbols. The list may include: ‘mousefocus’, ‘inputfocus’, ‘active’.
The external representation of a Surface object is:
;; normally: #<SDL-Surface wxh depth bpp lock> ;; when the object is not associated with a SDL_Surface: #<SDL-Surface NULL>
where w and h are the width and height of the surface, and depth is its bit-depth (e.g., ‘32’ for an RGBA surface). If the surface is locked, lock displays as ‘L’, otherwise nothing.
Return a new surface of dimensions width by height. Optional third arg flags (see video flags) further specifies the surface. Color depth and masks are those for the current video surface.
Return an empty surface. The eight arguments, directly analagous to those for SDL_CreateRGBSurface, are: flags (list of symbols, see video flags), width, height, depth, rmask, gmask, bmask, amask (all numbers).
Get w
from surface.
Get h
from surface.
Get format->BitsPerPixel
from surface.
Return flags
from surface as a (possibly empty) list of symbols.
Return a new pixel format, the same used by surface.
Return true iff obj is a surface.
Lock surface for direct access.
Return #t
if successful.
Unlock previously locked surface.
Load bitmap data from filename.
Return a new surface if successful, otherwise #f
.
Load image data from filename.
Return a new surface if successful, otherwise #f
.
Save surface to filename in Windows BMP format.
Return #t
if successful.
Set the color key for surface to pixel.
If pixel is #f
, clear the current color key.
Otherwise, it should be an integer of the appropriate depth
for surface (e.g., in the range [0,65535] for 16 bpp).
If color key processing is enabled, optional arg rle is a
boolean that enables (true) or disables (false, the default)
RLE acceleration.
Return #t
if successful.
Set alpha blending for the entire surface to alpha.
If alpha is #f
, disable alpha blending.
Otherwise it should be an integer in the range [0,255]
or one of the symbols transparent
or opaque
.
If alpha blending is enabled, optional arg rle is a
boolean that enables (true) or disables (false, the default)
RLE acceleration.
Return #t
if successful.
Set surface clipping rectangle to the whole surface.
Optional arg rect, if non-#f
, specifies a particular
rectangle instead of using the whole surface.
Return the clipping rectangle for surface.
Convert surface to the same format as another surface. Optional third arg flags is a list of flags (see video flags).
Perform a fast blit from the src surface srcrect to the dst surface dstrect. srcrect defaults to x=0, y=0, src surface dimensions. If unspecified dst is taken as the default video surface. dstrect likewise defaults to x=0, y=0, dst surface dimensions.
Return a new surface created by flipping surface vertically.
Return a new surface created by flipping surface horizontally.
Return a new surface created by flipping surface both vertically and horizontally.
Return pixel data of surface as a new uniform vector.
The uvec has type u8
, u16
or u32
, corresponding
to the surface depth, with height x width elements.
A 24bpp surface — depth-in-bytes of 3 — is expanded (per pixel)
to u32
, leaving the high byte clear.
Optional arg squash non-#f
means to
return a u8vector regardless of surface depth,
with height x width x depth-in-bytes elements.
Return #t
if surface needs to be locked before access.
Failure to do so may result in a segfault.
Next: Events, Previous: General SDL, Up: The (sdl *) Modules [Contents][Index]