Public Member Functions

gnash::SDLGui Class Reference

#include <sdlsup.h>

Inheritance diagram for gnash::SDLGui:
Inheritance graph
[legend]
Collaboration diagram for gnash::SDLGui:
Collaboration graph
[legend]

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:
title The window title.
width The desired window width in pixels.
height The desired window height in pixels.
xPosition The desired window X position from the top left corner.
yPosition The desired window Y position from the top left corner.

Implements gnash::Gui.

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

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:
argc The commandline argument count.
argv The commandline arguments.
Returns:
True on success; false on failure.

Implements gnash::Gui.

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

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: