Gnash  0.8.10
Public Member Functions
gnash::SDLGui Class Reference

#include <sdlsup.h>

Inheritance diagram for gnash::SDLGui:
gnash::Gui

List of all members.

Public Member Functions

 SDLGui (unsigned long xid, float scale, bool loop, RunResources &r)
virtual ~SDLGui ()
virtual bool init (int argc, char **argv[])
 / Initialise the gui and the associated renderer.
virtual bool createWindow (const char *title, int width, int height, int xPosition=0, int yPosition=0)
 Create and display our window.
virtual bool run ()
 Start main rendering loop.
virtual bool createMenu ()
virtual bool setupEvents ()
virtual void renderBuffer ()
virtual void setInterval (unsigned int interval)
 Set main loop delay in milliseconds.
virtual void disableCoreTrap ()
virtual void setTimeout (unsigned int timeout)
 Set the time in milliseconds after which the programme should exit.
void key_event (SDL_KeyboardEvent *key, bool down)
void setInvalidatedRegions (const InvalidatedRanges &ranges)

Constructor & Destructor Documentation

gnash::SDLGui::SDLGui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources r 
)
gnash::SDLGui::~SDLGui ( ) [virtual]

Member Function Documentation

bool gnash::SDLGui::createMenu ( ) [virtual]
bool gnash::SDLGui::createWindow ( const char *  title,
int  width,
int  height,
int  xPosition = 0,
int  yPosition = 0 
) [virtual]

Create and display our window.

Parameters:
titleThe window title.
widthThe desired window width in pixels.
heightThe desired window height in pixels.
xPositionThe desired window X position from the top left corner.
yPositionThe desired window Y position from the top left corner.

Implements gnash::Gui.

References gnash::Gui::_width, width, gnash::Gui::_height, height, gnash::Gui::_xid, gnash::Gui::_runResources, gnash::RunResources::setRenderer(), and gnash::Gui::_renderer.

void gnash::SDLGui::disableCoreTrap ( ) [virtual]

Referenced by init().

bool gnash::SDLGui::init ( int  argc,
char **  argv[] 
) [virtual]

/ Initialise the gui and the associated renderer.

Parameters:
argcThe commandline argument count.
argvThe commandline arguments.
Returns:
True on success; false on failure.

Implements gnash::Gui.

References disableCoreTrap(), gnash::Gui::_xid, and gnash::Gui::_renderer.

void gnash::SDLGui::key_event ( SDL_KeyboardEvent *  key,
bool  down 
)
void gnash::SDLGui::renderBuffer ( ) [virtual]

Render the current buffer. For OpenGL, this means that the front and back buffers are swapped.

Implements gnash::Gui.

bool gnash::SDLGui::run ( ) [virtual]
void gnash::SDLGui::setInterval ( unsigned int  interval) [virtual]

Set main loop delay in milliseconds.

Reimplemented from gnash::Gui.

References gnash::Gui::_interval.

void gnash::SDLGui::setInvalidatedRegions ( const InvalidatedRanges ranges) [virtual]

Reimplemented from gnash::Gui.

void gnash::SDLGui::setTimeout ( unsigned int  timeout) [virtual]

Set the time in milliseconds after which the programme should exit.

Implements gnash::Gui.

bool gnash::SDLGui::setupEvents ( ) [virtual]

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