Package “SDL” has 175 man pages.
sdl-config(1) sdl-config is a tool that is used to configure and determine the compiler and linker flags that should be used to compile and link programs, and libraries, and... SDL_ActiveEvent(3) SDL_ActiveEvent is a member of the SDL_Event union and is used when an event of type SDL_ACTIVEEVENT is reported. When the mouse leaves or enters the window... SDL_AddTimer(3) Adds a callback function to be run after the specified number of milliseconds has elapsed. The callback function is passed the current timer interval and the... SDL_AudioCVT(3) The SDL_AudioCVT is used to convert audio data between different formats. A SDL_AudioCVT structure is created with the SDL_BuildAudioCVT function, while the... SDL_AudioSpec(3) The SDL_AudioSpec structure is used to describe the format of some audio data. This structure is used by SDL_OpenAudio and SDL_LoadWAV. While all fields are... SDL_BlitSurface(3) This performs a fast blit from the source surface to the destination surface. Only the position is used in the dstrect (the width and height are ignored). If... SDL_BuildAudioCVT(3) Before an SDL_AudioCVT structure can be used to convert audio data it must be initialized with source and destination information. src_format and dst_format are... SDL_CD(3) An SDL_CD structure is returned by SDL_CDOpen. It represents an opened CDROM device and stores information on the layout of the tracks on the disc. A frame is... SDL_CDName(3) Returns a human-readable, system-dependent identifier for the CD-ROM. drive is the index of the drive. Drive indices start to 0 and end at SDL_CDNumDrives()-1. SDL_CDOpen(3) Opens a CD-ROM drive for access. It returns a SDL_CD structure on success, or NULL if the drive was invalid or busy. This newly opened CD-ROM becomes the... SDL_CDPlay(3) Plays the given cdrom, starting a frame start for length frames. SDL_CDPlayTracks(3) SDL_CDPlayTracks plays the given CD starting at track start_track, for ntracks tracks. start_frame is the frame offset, from the beginning of the start_track... SDL_CDStatus(3) This function returns the current status of the given drive. SDL_CDtrack(3) SDL_CDtrack stores data on each track on a CD, its fields should be pretty self explainatory. It is a member a the SDL_CD structure. SDL_CloseAudio(3) This function shuts down audio processing and closes the audio device. SDL_Color(3) SDL_Color describes a color in a format independent way. You can convert a SDL_Color to a pixel value for a certain pixel format using SDL_MapRGB. SDL_CondBroadcast(3) Restarts all threads that are waiting on the condition variable, cond. Returns 0 on success, or -1 on an error. SDL_CondSignal(3) Restart one of the threads that are waiting on the condition variable, cond. Returns 0 on success of -1 on an error. SDL_CondWait(3) Wait on the condition variable cond and unlock the provided mutex. The mutex must the locked before entering this function. Returns 0 when it is signalled, or... SDL_CondWaitTimeout(3) Wait on the condition variable cond for, at most, ms milliseconds. mut is unlocked so it must be locked when the function is called. Returns SDL_MUTEX_TIMEDOUT... SDL_ConvertAudio(3) SDL_ConvertAudio takes one parameter, cvt, which was previously initilized. Initilizing a SDL_AudioCVT is a two step process. First of all, the structure must... SDL_ConvertSurface(3) Creates a new surface of the specified format, and then copies and maps the given surface to it. If this function fails, it returns NULL. The flags parameter is... SDL_CreateCursor(3) Create a cursor using the specified data and mask (in MSB format). The cursor width must be a multiple of 8 bits. SDL_CreateRGBSurface(3) Allocate an empty surface (must be called after SDL_SetVideoMode) If depth is 8 bits an empty palette is allocated for the surface, otherwise a 'packed-pixel'... SDL_CreateRGBSurfaceFrom(3) Creates an SDL_Surface from the provided pixel data. The data stored in pixels is assumed to be of the depth specified in the parameter list. The pixel data is... SDL_CreateSemaphore(3) SDL_CreateSemaphore() creates a new semaphore and initializes it with the value initial_value. Each locking operation on the semaphore by SDL_SemWait... SDL_CreateThread(3) SDL_CreateThread creates a new thread of execution that shares all of its parent's global memory, signal handlers, file descriptors, etc, and runs the function... SDL_CreateYUVOverlay(3) SDL_CreateYUVOverlay creates a YUV overlay of the specified width, height and format (see SDL_Overlay for a list of available formats), for the provided... SDL_Delay(3) Wait a specified number of milliseconds before returning. SDL_Delay will wait at least the specified time, but possible longer due to OS scheduling. SDL_DestroySemaphore(3) SDL_DestroySemaphore destroys the semaphore pointed to by sem that was created by SDL_CreateSemaphore. It is not safe to destroy a semaphore if there are... SDL_DisplayFormat(3) This function takes a surface and copies it to a new surface of the pixel format and colors of the video framebuffer, suitable for fast blitting onto the... SDL_DisplayFormatAlpha(3) This function takes a surface and copies it to a new surface of the pixel format and colors of the video framebuffer plus an alpha channel, suitable for fast... SDL_DisplayYUVOverlay(3) Blit the overlay to the surface specified when it was created. The SDL_Rect structure, dstrect, specifies the position and size of the destination. If the... SDL_EnableKeyRepeat(3) Enables or disables the keyboard repeat rate. delay specifies how long the key must be pressed before it begins repeating, it then repeats at the speed... SDL_EnableUNICODE(3) Enables/Disables Unicode keyboard translation. To obtain the character codes corresponding to received keyboard events, Unicode translation must first be turned... SDL_Event(3) The SDL_Event union is the core to all event handling is SDL, its probably the most important structure after SDL_Surface. SDL_Event is a union of all event... SDL_EventState(3) This function allows you to set the state of processing certain event type's. If state is set to SDL_IGNORE, that event type will be automatically dropped from... SDL_ExposeEvent(3) SDL_ExposeEvent is a member of the SDL_Event union and is used whan an event of type SDL_VIDEOEXPOSE is reported. A VIDEOEXPOSE event is triggered when the... SDL_FillRect(3) This function performs a fast fill of the given rectangle with color. If dstrect is NULL, the whole surface will be filled with color. The color should be a... SDL_Flip(3) On hardware that supports double-buffering, this function sets up a flip and returns. The hardware will wait for vertical retrace, and then swap video buffers... SDL_FreeSurface(3) Frees the resources used by a previously created SDL_Surface. If the surface was created using SDL_CreateRGBSurfaceFrom then the pixel data is not freed. SDL_FreeWAV(3) After a WAVE file has been opened with SDL_LoadWAV its data can eventually be freed with SDL_FreeWAV. audio_buf is a pointer to the buffer created by... SDL_GetClipRect(3) Gets the clipping rectangle for a surface. When this surface is the destination of a blit, only the area within the clip rectangle is drawn into. The rectangle... SDL_GetError(3) SDL_GetError returns a NULL terminated string containing information about the last internal SDL error. SDL_GetEventFilter(3) This function retrieces a pointer to the event filter that was previously set using SDL_SetEventFilter. SDL_GetGamma(3) Gets the color gamma of the display. The gamma value for each color component will be place in the parameters red, green and blue. The values can range from 0.1... SDL_GetGammaRamp(3) Gets the gamma translation lookup tables currently used by the display. Each table is an array of 256 Uint16 values. Not all display hardware is able to change... SDL_GetKeyState(3) Gets a snapshot of the current keyboard state. The current state is return as a pointer to an array, the size of this array is stored in numkeys. The array is... SDL_GetMouseState(3) The current button state is returned as a button bitmask, which can be tested using the SDL_BUTTON(X) macros, and x and y are set to the current mouse cursor... SDL_GetRelativeMouseState(3) The current button state is returned as a button bitmask, which can be tested using the SDL_BUTTON(X) macros, and x and y are set to the change in the mouse... SDL_GetRGB(3) Get RGB component values from a pixel stored in the specified pixel format. This function uses the entire 8-bit [0..255] range when converting color components... SDL_GetRGBA(3) Get RGBA component values from a pixel stored in the specified pixel format. This function uses the entire 8-bit [0..255] range when converting color components... SDL_GetTicks(3) Get the number of milliseconds since the SDL library initialization. Note that this value wraps if the program runs for more than ~49 days. SDL_GetVideoInfo(3) This function returns a read-only pointer to information about the video hardware. If this is called before SDL_SetVideoMode, the vfmt member of the returned... SDL_GetVideoSurface(3) This function returns a pointer to the current display surface. If SDL is doing format conversion on the display surface, this function returns the publicly... SDL_GLattr(3) While you can set most OpenGL attributes normally, the attributes list above must be known before SDL sets the video mode. These attributes a set and read with... SDL_GL_GetAttribute(3) Places the value of the SDL/OpenGL attribute attr into value. This is useful after a call to SDL_SetVideoMode to check whether your attributes have been set as... SDL_GL_GetProcAddress(3) Returns the address of the GL function proc, or NULL if the function is not found. If the GL library is loaded at runtime, with SDL_GL_LoadLibrary, then all GL... SDL_GL_LoadLibrary(3) If you wish, you may load the OpenGL library at runtime, this must be done before SDL_SetVideoMode is called. The path of the GL library is passed to... SDL_GL_SetAttribute(3) Sets the OpenGL attribute attr to value. The attributes you set don't take effect until after a call to SDL_SetVideoMode. You should use SDL_GL_GetAttribute to... SDL_Init(3) Initializes SDL. This should be called before all other SDL functions. The flags parameter specifies what part(s) of SDL to initialize. SDL_InitSubSystem(3) After SDL has been initialized with SDL_Init you may initialize uninitialized subsystems with SDL_InitSubSystem. The flags parameter is the same as that used in... SDL_JoyAxisEvent(3) SDL_JoyAxisEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYAXISMOTION is reported. A SDL_JOYAXISMOTION event occurs when ever... SDL_JoyBallEvent(3) SDL_JoyBallEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYBALLMOTION is reported. A SDL_JOYBALLMOTION event occurs when a... SDL_JoyButtonEvent(3) SDL_JoyButtonEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP is reported. A SDL_JOYBUTTONDOWN or... SDL_JoyHatEvent(3) SDL_JoyHatEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYHATMOTION is reported. A SDL_JOYHATMOTION event occurs when ever a... SDL_JoystickEventState(3) This function is used to enable or disable joystick event processing. With joystick event processing disabled you will have to update joystick states with... SDL_JoystickGetAxis(3) SDL_JoystickGetAxis returns the current state of the given axis on the given joystick. On most modern joysticks the X axis is usually represented by axis 0 and... SDL_JoystickGetBall(3) Get the ball axis change. Trackballs can only return relative motion since the last call to SDL_JoystickGetBall, these motion deltas a placed into dx and dy. SDL_JoystickGetHat(3) SDL_JoystickGetHat returns the current state of the given hat on the given joystick. SDL_JoystickName(3) Get the implementation dependent name of joystick. The index parameter refers to the N'th joystick on the system. SDL_JoystickOpen(3) Opens a joystick for use within SDL. The index refers to the N'th joystick in the system. A joystick must be opened before it game be used. SDL_JoystickOpened(3) Determines whether a joystick has already been opened within the application. index refers to the N'th joystick on the system. SDL_JoystickUpdate(3) Updates the state(position, buttons, etc.) of all open joysticks. If joystick events have been enabled with SDL_JoystickEventState then this is called... SDL_KeyboardEvent(3) SDL_KeyboardEvent is a member of the SDL_Event union and is used when an event of type SDL_KEYDOWN or SDL_KEYUP is reported. The type and state actually report... SDL_keysym(3) The SDL_keysym structure is used by reporting key presses and releases since it is a part of the SDL_KeyboardEvent. The scancode field should generally be left... SDL_KillThread(3) SDL_KillThread gracelessly terminates the thread associated with thread. If possible, you should use some other form of IPC to signal the thread to quit. SDL_ListModes(3) Return a pointer to an array of available screen dimensions for the given format and video flags, sorted largest to smallest. Returns NULL if there are no... SDL_LoadWAV(3) SDL_LoadWAV This function loads a WAVE file into memory. If this function succeeds, it returns the given SDL_AudioSpec, filled with the audio data format of the... SDL_LockAudio(3) The lock manipulated by these functions protects the callback function. During a LockAudio period, you can be guaranteed that the callback function is not... SDL_LockSurface(3) SDL_LockSurface sets up a surface for directly accessing the pixels. Between calls to SDL_LockSurface and SDL_UnlockSurface, you can write to and read from... SDL_LockYUVOverlay(3) Much the same as SDL_LockSurface, SDL_LockYUVOverlay locks the overlay for direct access to pixel data. SDL_MapRGB(3) Maps the RGB color value to the specified pixel format and returns the pixel value as a 32-bit int. If the format has a palette (8-bit) the index of the closest... SDL_MapRGBA(3) Maps the RGBA color value to the specified pixel format and returns the pixel value as a 32-bit int. If the format has a palette (8-bit) the index of the... SDL_MixAudio(3) This function takes two audio buffers of len bytes each of the playing audio format and mixes them, performing addition, volume adjustment, and overflow... SDL_MouseButtonEvent(3) SDL_MouseButtonEvent is a member of the SDL_Event union and is used when an event of type SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP is reported. When a mouse... SDL_MouseMotionEvent(3) SDL_MouseMotionEvent is a member of the SDL_Event union and is used when an event of type SDL_MOUSEMOTION is reported. Simply put, a SDL_MOUSEMOTION type event... SDL_mutexP(3) Locks the mutex, which was previously created with SDL_CreateMutex. If the mutex is already locked then SDL_mutexP will not return until it is unlocked. Returns... SDL_mutexV(3) Unlocks the mutex, which was previously created with SDL_CreateMutex. Returns 0 on success, or -1 on an error. SDL also defines a macro #define... SDL_OpenAudio(3) This function opens the audio device with the desired parameters, and returns 0 if successful, placing the actual hardware parameters in the structure pointed... SDL_Overlay(3) A SDL_Overlay is similar to a SDL_Surface except it stores a YUV overlay. All the fields are read only, except for pixels which should be locked before use. SDL_Palette(3) Each pixel in an 8-bit surface is an index into the colors field of the SDL_Palette structure store in SDL_PixelFormat. A SDL_Palette should never need to be... SDL_PauseAudio(3) This function pauses and unpauses the audio callback processing. It should be called with pause_on=0 after opening the audio device to start playing sound. This... SDL_PeepEvents(3) Checks the event queue for messages and optionally returns them. If action is SDL_ADDEVENT, up to numevents events will be added to the back of the event queue... SDL_PixelFormat(3) A SDL_PixelFormat describes the format of the pixel data stored at the pixels field of a SDL_Surface. Every surface stores a SDL_PixelFormat in the format... SDL_PollEvent(3) Polls for currently pending events, and returns 1 if there are any pending events, or 0 if there are none available. If event is not NULL, the next event is... SDL_PumpEvents(3) Pumps the event loop, gathering events from the input devices. SDL_PumpEvents gathers all the pending input information from devices and places it on the event... SDL_PushEvent(3) The event queue can actually be used as a two way communication channel. Not only can events be read from the queue, but the user can also push their own events... SDL_Quit(3) SDL_Quit shuts down all SDL subsystems and frees the resources allocated to them. This should always be called before you exit. SDL_QuitEvent(3) SDL_QuitEvent is a member of the SDL_Event union and is used whan an event of type SDL_QUIT is reported. As can be seen, the SDL_QuitEvent structure serves no... SDL_QuitSubSystem(3) SDL_QuitSubSystem allows you to shut down a subsystem that has been previously initialized by SDL_Init or SDL_InitSubSystem. The flags tells SDL_QuitSubSystem... SDL_Rect(3) A SDL_Rect defines a rectangular area of pixels. It is used by SDL_BlitSurface to define blitting regions and by several other video functions. SDL_ResizeEvent(3) SDL_ResizeEvent is a member of the SDL_Event union and is used when an event of type SDL_VIDEORESIZE is reported. When SDL_RESIZABLE is passed as a flag to... SDL_SaveBMP(3) Saves the SDL_Surface surface as a Windows BMP file named file. SDL_SemPost(3) SDL_SemPost unlocks the semaphore pointed to by sem and atomically increments the semaphores value. Threads that were blocking on the semaphore may be scheduled... SDL_SemTryWait(3) SDL_SemTryWait is a non-blocking varient of SDL_SemWait. If the value of the semaphore pointed to by sem is positive it will atomically decrement the semaphore... SDL_SemValue(3) SDL_SemValue() returns the current semaphore value from the semaphore pointed to by sem. SDL_SemWait(3) SDL_SemWait() suspends the calling thread until either the semaphore pointed to by sem has a positive value, the call is interrupted by a signal or error. If... SDL_SemWaitTimeout(3) SDL_SemWaitTimeout() is a varient of SDL_SemWait with a maximum timeout value. If the value of the semaphore pointed to by sem is positive (greater than zero)... SDL_SetClipRect(3) Sets the clipping rectangle for a surface. When this surface is the destination of a blit, only the area within the clip rectangle will be drawn into. The... SDL_SetColorKey(3) Sets the color key (transparent pixel) in a blittable surface and enables or disables RLE blit acceleration. RLE acceleration can substantially speed up... SDL_SetColors(3) Sets a portion of the colormap for the given 8-bit surface. When surface is the surface associated with the current display, the display colormap will be... SDL_SetCursor(3) Sets the currently active cursor to the specified one. If the cursor is currently visible, the change will be immediately represented on the display. SDL_SetEventFilter(3) This function sets up a filter to process all events before they are posted to the event queue. This is a very powerful and flexible feature. SDL_SetGamma(3) Sets the "gamma function" for the display of each color component. Gamma controls the brightness/contrast of colors displayed on the screen. A gamma value of... SDL_SetGammaRamp(3) Sets the gamma lookup tables for the display for each color component. Each table is an array of 256 Uint16 values, representing a mapping between the input and... SDL_SetModState(3) The inverse of SDL_GetModState, SDL_SetModState allows you to impose modifier key states on your application. Simply pass your desired modifier states into... SDL_SetPalette(3) Sets a portion of the palette for the given 8-bit surface. Palettized (8-bit) screen surfaces with the SDL_HWPALETTE flag have two palettes, a logical palette... SDL_SetTimer(3) Set a callback to run after the specified number of milliseconds has elapsed. The callback function is passed the current timer interval and returns the next... SDL_SetVideoMode(3) Set up a video mode with the specified width, height and bits-per-pixel. If bpp is 0, it is treated as the current display bits per pixel. The flags parameter... SDL_ShowCursor(3) Toggle whether or not the cursor is shown on the screen. Passing SDL_ENABLE displays the cursor and passing SDL_DISABLE hides it. The current state of the mouse... SDL_Surface(3) SDL_Surface's represent areas of "graphical" memory, memory that can be drawn to. The video framebuffer is returned as a SDL_Surface by SDL_SetVideoMode and... SDL_SysWMEvent(3) The system window manager event contains a pointer to system-specific information about unknown window manager events. If you enable this event using... SDL_UnlockSurface(3) Surfaces that were previously locked using SDL_LockSurface must be unlocked with SDL_UnlockSurface. Surfaces should be unlocked as soon as possible. It should... SDL_UnlockYUVOverlay(3) The opposite to SDL_LockYUVOverlay. Unlocks a previously locked overlay. An overlay must be unlocked before it can be displayed. SDL_UpdateRect(3) Makes sure the given area is updated on the given screen. The rectangle must be confined within the screen boundaries (no clipping is done). If 'x', 'y', 'w'... SDL_UpdateRects(3) Makes sure the given list of rectangles is updated on the given screen. The rectangles must all be confined within the screen boundaries (no clipping is done)... SDL_UserEvent(3) SDL_UserEvent is in the user member of the structure SDL_Event. This event is unique, it is never created by SDL but only by the user. The event can be pushed... SDL_VideoDriverName(3) The buffer pointed to by namebuf is filled up to a maximum of maxlen characters (include the NULL terminator) with the name of the initialised video driver. The... SDL_VideoInfo(3) This (read-only) structure is returned by SDL_GetVideoInfo. It contains information on either the 'best' available mode (if called before SDL_SetVideoMode) or... SDL_VideoModeOK(3) SDL_VideoModeOK returns 0 if the requested mode is not supported under any bit depth, or returns the bits-per-pixel of the closest available mode with the given... SDL_WaitEvent(3) Waits indefinitely for the next available event, returning 1, or 0 if there was an error while waiting for events. If event is not NULL, the next event is... SDL_WarpMouse(3) Set the position of the mouse cursor (generates a mouse motion event). SDL_WasInit(3) SDL_WasInit allows you to see which SDL subsytems have been initialized. flags is a bitwise OR'd combination of the subsystems you wish to check (see SDL_Init... SDL_WM_GrabInput(3) Grabbing means that the mouse is confined to the application window, and nearly all keyboard input is passed directly to the application, and not interpreted by... SDL_WM_IconifyWindow(3) If the application is running in a window managed environment SDL attempts to iconify/minimise it. If SDL_WM_IconifyWindow is successful, the application will... SDL_WM_SetIcon(3) Sets the icon for the display window. Win32 icons must be 32x32. This function must be called before the first call to SDL_SetVideoMode. It takes an icon... SDL_WM_ToggleFullScreen(3) Toggles the application between windowed and fullscreen mode, if supported. (X11 is the only target currently supported, BeOS support is experimental).