Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Video Class Reference

Video (and input) system maintaince. More...

#include <Video.h>

List of all members.

Public Member Functions

void setWindow (unsigned x, unsigned y, bool redrawThread=false, bool openGL=false)
 sets the size of video window.

unsigned getWindowWidth () const
unsigned getWindowHeight () const
void addRedraw (Redrawer *r)
 Adds the user redraw function called from redraw() - the surface is cleared and and flipped automatically.

void removeRedraw (Redrawer *r)
 remove previously added Redrawer

void redraw ()
 redraws if possible. Should only be called from the video (GL) thread !

void waitForKey ()
bool gl ()
void flip ()

Static Public Member Functions

VideogetInstance ()
 inits Video on first call

void deinit ()
 deinits video. Should be called before exit.


Protected Types

typedef std::list< Redrawer * > Painters

Protected Member Functions

 Video ()
 ~Video ()

Protected Attributes

Painters painters
SDL_Surface * screen


Detailed Description

Video (and input) system maintaince.

You must create this class before using Image. There Problem: if you want to visualise, you can only have one window. So if you need more, the only way is to fork() and have two videos..


Member Typedef Documentation

typedef std::list<Redrawer *> Painters [protected]
 


Constructor & Destructor Documentation

Video  )  [protected]
 

~Video  )  [protected]
 


Member Function Documentation

void addRedraw Redrawer r  ) 
 

Adds the user redraw function called from redraw() - the surface is cleared and and flipped automatically.

warning: Video only stores reference -> you must call removeRedraw() before the object becomes invalid!

void deinit  )  [static]
 

deinits video. Should be called before exit.

void flip  ) 
 

Video& getInstance  )  [static]
 

inits Video on first call

unsigned getWindowHeight  )  const
 

unsigned getWindowWidth  )  const
 

bool gl  )  [inline]
 

void redraw  ) 
 

redraws if possible. Should only be called from the video (GL) thread !

void removeRedraw Redrawer r  ) 
 

remove previously added Redrawer

void setWindow unsigned  x,
unsigned  y,
bool  redrawThread = false,
bool  openGL = false
 

sets the size of video window.

On the first call, the window will be created.

Parameters:
redrawThread if video && event thread is running.
openGL whether to create an OpenGL context

void waitForKey  ) 
 


Member Data Documentation

Painters painters [protected]
 

SDL_Surface* screen [protected]
 


The documentation for this class was generated from the following file:
Generated on Fri Jun 18 13:19:36 2004 for Annie by doxygen 1.3.5