getSurface(Surface)
getPixelFormat(Surface)
getPalette(Surface)
getPixels(Surface, Size)
setVideoMode(W, H, Bpp, Type)
videoDriverName()
getVideoSurface()
videoModeOK(W, H, Bpp, Type)
listModes({formatp, Ref}, Flags)
displayFormat(Surface)
blitSurface(SSurf, SRect, DSurf, DRect)
fillRect(S, R, C)
updateRect(S, X, Y, W, H)
updateRects(S, R)
flip({surfacep, Ref})
setColors(S, Colors, FirstColor, Ncolors)
setColorKey(Surface, Flag, Key)
mapRGB(Surface, R, G, B)
createRGBsurface(Flags, W, H, D, RM, GM, BM, AM)
createRGBsurfaceFrom(Pixels, W, H, D, P, RM, GM, BM, AM)
freeSurface(Surface)
mustLock(Surface)
lockSurface(Surface)
unlockSurface(Surface)
loadBMP(File)
saveBMP(Surface, File)
setAlpha(Surface, Flag, Alpha)
setClipping(Surface, Top, Left, Botton, Right)
setGamma(Red,Green,Blue)
setGammaRamp(Red,Green,Blue)
getGammaRamp()
wm_setCaption(Title, IconTitle)
wm_getCaption()
wm_setIcon(Icon, Mask)
wm_iconifyWindow()
wm_toggleFullScreen(Surface)
wm_grabInput(GrabMode)
wm_getInfo()
wm_isMaximized()
wm_maximize()
wm_mac_file_dialog(Props)
gl_setAttribute(Attr, Val)
gl_getAttribute(Attr)
gl_swapBuffers()
mapRGBA(Surface, R, G, B, A)
getClipRect(Surface)
setClipRect(Surface, Rect)
displayFormatAlpha(Surface) Args: Surface Ref
Returns: sdl_surface record
Desc:
Copies data pointed to by Surface to sdl_surface record.
Args: PixelFormatRef
Returns: a sdl_pixelformat record
Desc:
Copies data pointed to by Surface to sdl_pixelformat record.
Args: SurfaceRef ref
Returns: a sdl_palette record
Desc:
Copies data pointed to by Surface to sdl_palette record.
Args: Surface Ref, Size (a sdl_rectangle record)
Returns: A binary containing all pixles, size varies with pixel format
Desc:
Copies pixels (specified by Size) of Surface to a binary
Returns: a surface ref or the atom 'error'
C-API: SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags);
Returns: [Name] | []
C-API: char *SDL_VideoDriverName(char *namebuf, int maxlen);
Returns: surface ref to the current display
C-API: SDL_Surface * SDL_GetVideoSurface(void);
Args: See sdl documentation
Returns: true | false (see sdl doc)
C-API: int SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags);
Args: PixelFormat (either as sdl_pixelformat record or a PixelFormat Ref or null) VideoFlags
Returns: [AvailableDimensions (in sdl_rect)] | all
C-API: SDL_Rect ** SDL_ListModes(SDL_PixelFormat *format, Uint32 flags);
Args: Surface Ref
Returns: Surface Ref
C-API: SDL_Surface * SDL_DisplayFormat(SDL_Surface *surface);
Args: SrcSurfaceRef, SrcRect | null, DestSurfaceRef, DestRect | null
Returns: {ClippedSrcRect | null, ClippedDestRect | null} or {error, ErrorLevel} Where ErrorLevel = -1 | -2
C-API: int SDL_BlitSurface(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect);
Args: SurfaceRef, sdl_rectangle|null, color
Returns: true | false (on failure)
C-API: int SDL_FillRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);
Args: SurfaceRef, X, Y, W, H
Returns: ok
C-API: void SDL_UpdateRect(SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h);
Args: SurfaceRef, [sdl_rect]
Returns: ok
C-API: void SDL_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects);
Args: Surface Ref
Returns: true | false (if error)
C-API: int SDL_Flip(SDL_Surface *screen);
Args: SurfaceRef, [ColorList], FirstColor, NoOfColors
Returns: true (when all colors where set) false (otherwise)
C-API: int SDL_SetColors(SDL_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors);
Args: Surface Ref, Flag(int), Key(int)
Returns: true (on success) | false on failure
C-API: int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key);
Args: Surface Ref, Int32, Int32, Int32
Returns: Int32
C-API: Uint32 SDL_MapRGB(SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b);
Args: SurfaceFlags Width Height Depth Rmask:32 Gmask:32 Bmask:32 Amask:32
Returns: A surface ref
C-API: SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
Args: Pixels(Binary) Width Height Depth Pitch Rmask:32 Gmask:32 Bmask:32 Amask:32
Returns: A surface ref
C-API: SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
Args: Surface Ref
Returns: ok
C-API: void SDL_FreeSurface(SDL_Surface *surface);
Args: surfaceRef
Returns: Bool
C-API: Macro
Args: Surface Ref
Returns: true (if locked) false otherwise
C-API: int SDL_LockSurface(SDL_Surface *surface);
Args: Surface Ref
Returns: ok
C-API: void SDL_UnlockSurface(SDL_Surface *surface);
Args: Name of the BMP file (string)
Returns: a surface ref or null
C-API: SDL_Surface * SDL_LoadBMP(char * file);
Args: Name of the BMP file (string)
Returns: true or false (if it failed)
C-API: int SDL_SaveBMP(SDL_Surface *surface, char *file)
Args: SurfaceRef, Flag:32, Alpha:32
Returns: integer (undocumented in (my version of) SDL)
C-API: int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);
Args: SurfaceRef, Top, Left, Botton, Right
Returns: ok
Desc:
Obsolete??
Args: red, green, blue
Returns: Bool
C-API: int SDL_SetGamma(float red, float green, float blue)
Args: redList, greenList, blueList (where each list contains 256 16 bits value)
Returns: Bool
C-API: int SDL_SetGammaRamp(Uint16 red[256], Uint16 green[256], Uint16 blue[256])
Args: none
Returns: {res, redList, greenList, blueList} (where each list contains 256 16 bits value)
C-API: int SDL_GetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue])
Desc:
If res is == true, the lists contain valid information
Args: Title List, IconTitleList
Returns: ok
C-API: void SDL_WM_SetCaption(const char *title, const char *icon);
Returns: {TitleStr, IconTitleStr}
C-API: void SDL_WM_GetCaption(char **title, char **icon);
Args: Icon (sdl_surface), Mask (list of bytes) | null
Returns: ok
C-API: void SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask);
Returns: ok
C-API: int SDL_WM_IconifyWindow(void);
Args: SurfaceRef
Returns: true or false (on failure)
C-API: int SDL_WM_ToggleFullScreen(SDL_Surface *surface);
Args: GrabMode (?SDL_GRAB_QUERY | ?SDL_GRAB_OFF | ?SDL_GRAB_ON)
Returns: GrabMode (?SDL_GRAB_OFF | ?SDL_GRAB_ON)
C-API: SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode);
Returns: {SDLVersion = {Major, Minor, Patch}, OSSpecBinary}
Desc:
Only windows returns anything useful (window handle)
Returns: Boolean
Desc:
Only windows returns anything useful (window handle)
Returns: nothing
Desc:
Only works on windows
Returns: nothing
Desc:
Only works on Mac
Returns: ok
C-API: int SDL_GL_SetAttribute(SDL_GLattr attr, int value);
Returns: Attribute Value
C-API: int SDL_GL_GetAttribute(SDL_GLattr attr, int* value);
Returns: A timestamp generated with SDL_GetTicks
C-API: void SDL_GL_SwapBuffers(void);
Args: Surface Ref, Int32, Int32, Int32, Int32
Returns: Int32
C-API: Uint32 SDL_MapRGB(SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
Args: Surface Ref
Returns: Rect
C-API: void SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect);
Args: Surface Ref, Rect
Returns: ok
C-API: void SDL_SetClipRect(SDL_Surface *surface, SDL_Rect *rect);
Args: Surface Ref
Returns: Surface Ref
C-API: SDL_Surface * SDL_DisplayFormatAlpha(SDL_Surface *surface);