Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

SDLmm Namespace Reference

The namespace for the SDLmm library. More...


Compounds

class  SDLmm::Audio
class  SDLmm::BaseSurface
 An abstract base class for graphical surfaces. More...

class  SDLmm::CD
class  SDLmm::ColorRGB
 A small usefull class representing an RGB color. More...

class  SDLmm::ColorRGBA
 A small usefull class representing an RGBA color. More...

class  SDLmm::Display
 The video frame buffer surface. More...

class  SDLmm::Event
 The general Event class. More...

class  SDLmm::EventHandler
 The base class used for custom Event handlers. More...

class  SDLmm::Joystick
class  SDLmm::PixelFormat
class  SDLmm::SRect
 This enhanced version of SDL_Rect includes a number of handy short-hand constructors. Since the class is derived from the SDL_Rect struct, it can be used in any context where an SDL_Rect is valid. More...

class  SDLmm::Surface
 A graphical surface structure which is used to store graphical data. More...

class  SDLmm::Timer
class  SDLmm::VideoInfo
 Video target information. More...


Typedefs

typedef Uint32 Color

Functions

bool Init (Uint32 flags)
 Initializes SDL. More...

void Quit ()
 Shut down SDL. More...

Uint32 WasInit (Uint32 flags)
 Check which subsystems are initialized. More...

const char* GetError ()
 Get the latest error message. More...

const char* version ()
 Return the SDLmm library version. More...

const T& Max (const T &t1, const T &t2)
 Find the maximum of two values. More...

const T& Min (const T &t1, const T &t2)
 Find the minimum of two values. More...

SRect Intersect (const SRect &r1, const SRect &r2)
 Get intersection rectangle of two rectangles. More...

SRect Union (const SRect &r1, const SRect &r2)
 Get union rectangle of two rectangles. More...


Detailed Description

The namespace for the SDLmm library.

Typedef Documentation

typedef Uint32 SDLmm::Color
 

Definition at line 25 of file sdlmm_color.h.


Function Documentation

const DECLSPEC char * SDLmm::GetError ( )
 

Get the latest error message.

Returns:
The error message for the last SDL function that failed.

Definition at line 39 of file sdlmm_global.cpp.

bool DECLSPEC SDLmm::Init ( Uint32 flags )
 

Initializes SDL.

This method should be called before utilizing any other SDL or SDLmm functionality. The flags parameter specifies what part(s) of SDL to initialize (see the SDL documentation for details).

Parameters:
flags   the subsystems to initalize
Returns:
true on success, false on error

Note:
In SDLmm the preferred way of initiating subsystem is to use the Init() function in the subsystem classes. I.e to initialize audio and video, run Display::Init() and Audio::Init(). Also note that instantiating an object might be enough (for example creating a VideoInfo instance will initialize the video subsystem).

Definition at line 31 of file sdlmm_global.cpp.

SRect SDLmm::Intersect ( const SRect & r1,
const SRect & r2 )
 

Get intersection rectangle of two rectangles.

The intersection rectangle is the largest rectangle that is contained by both r1 and r2.

Definition at line 70 of file sdlmm_srect.cpp.

const T & SDLmm::Max ( const T & t1,
const T & t2 ) [inline]
 

Find the maximum of two values.

Definition at line 27 of file sdlmm_misc.h.

Referenced by Intersect(), and Union().

const T & SDLmm::Min ( const T & t1,
const T & t2 ) [inline]
 

Find the minimum of two values.

Definition at line 37 of file sdlmm_misc.h.

Referenced by Intersect(), and Union().

void DECLSPEC SDLmm::Quit ( )
 

Shut down SDL.

Quit() shuts down all SDL subsystems and frees the resources allocated to them. This should always be called before you exit. For the sake of simplicity you can set Quit() as your atexit call, like this:

    SDLmm::Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO);
    atexit(SDLmm::Quit);

Definition at line 35 of file sdlmm_global.cpp.

SRect SDLmm::Union ( const SRect & r1,
const SRect & r2 )
 

Get union rectangle of two rectangles.

The union rectangle is the smallest rectangle that is contains both r1 and r2.

Definition at line 81 of file sdlmm_srect.cpp.

Uint32 DECLSPEC SDLmm::WasInit ( Uint32 flags )
 

Check which subsystems are initialized.

This allows you to see which SDL subsytems have been initialized.

Parameters:
flags   bitwise OR'd combination of the subsystems you wish to check
Returns:
A bitwised OR'd combination of the initialized subsystems.

Definition at line 36 of file sdlmm_global.cpp.

const DECLSPEC char * SDLmm::version ( )
 

Return the SDLmm library version.

Definition at line 41 of file sdlmm_global.cpp.


Documentation automatically generated by doxygen written by Dimitri van Heesch. Project hosted at
Hosted by SourceForge