firevision::SDLKeeper Class Reference

SDL Reference keeper. More...

#include <fvwidgets/sdl_keeper.h>

List of all members.

Static Public Member Functions

static void init (unsigned int flags)
 Init SDL.
static void quit () throw ()
 Conditionally quit SDL.
static void force_quit ()
 Force quit of SDL.


Detailed Description

SDL Reference keeper.

Use this keeper to initialize and quit the SDL library. As there may be many modules using the SDL a central place for reference counting is needed.

Author:
Tim Niemueller

Definition at line 34 of file sdl_keeper.h.


Member Function Documentation

void firevision::SDLKeeper::force_quit (  )  [static]

Force quit of SDL.

This will quit the SDL no matter of the reference count. Use with extreme care.

Definition at line 106 of file sdl_keeper.cpp.

void firevision::SDLKeeper::init ( unsigned int  flags  )  [static]

Init SDL.

Keeps track of SDL_Init calls and only calls SDL_InitSubSystem on consecutive calls.

Parameters:
flags Same flags as for SDL_Init

Definition at line 64 of file sdl_keeper.cpp.

Referenced by firevision::ImageDisplay::ImageDisplay().

void firevision::SDLKeeper::quit (  )  throw () [static]

Conditionally quit SDL.

Use this after you are done with the SDL. No subsystem will be closed after all users of SDL quit the usage. Then the whole SDL will be released at once.

Definition at line 92 of file sdl_keeper.cpp.

Referenced by firevision::ImageDisplay::~ImageDisplay().


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:31:45 2011 for Fawkes API by  doxygen 1.4.7