Fawkes API  Fawkes Development Version
firevision::SDLKeeper Class Reference

SDL Reference keeper. More...

#include <>>

Static Public Member Functions

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

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

◆ force_quit()

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.

◆ init()

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
flagsSame flags as for SDL_Init

Definition at line 64 of file sdl_keeper.cpp.

◆ quit()

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.


The documentation for this class was generated from the following files: