Public Member Functions

gnash::GtkGui Class Reference

#include <gtksup.h>

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

List of all members.

Public Member Functions

 GtkGui (unsigned long xid, float scale, bool loop, RunResources &r)
virtual ~GtkGui ()
virtual bool init (int argc, char **argv[])
 GUI interface implementation.
virtual bool createWindow (int width, int height)
virtual bool createWindow (const char *title, int width, int height, int xPosition=0, int yPosition=0)
 Create and display our window.
virtual void resizeWindow (int width, int height)
virtual bool run ()
 Start main rendering loop.
virtual void quitUI ()
 End main rendering loop calling GUI-specific exit functions.
virtual bool createMenu ()
virtual bool createMenuAlt ()
virtual bool setupEvents ()
 Set up callbacks for key, mouse and other GTK events.
virtual void beforeRendering ()
virtual void renderBuffer ()
virtual void setInterval (unsigned int interval)
 Set main loop delay in milliseconds.
virtual void setTimeout (unsigned int timeout)
 Set the time in milliseconds after which the programme should exit.
virtual void setFullscreen ()
virtual void unsetFullscreen ()
virtual void hideMenu ()
virtual double getPixelAspectRatio ()
 For System.capabilities information.
virtual int getScreenResX ()
virtual int getScreenResY ()
virtual double getScreenDPI ()
bool watchFD (int fd)
 Watch a file descriptor.
void grabFocus ()
 Grab focus so to receive all key events.
bool createMenuBar ()
 Create a menu bar for the application, attach to our window.
void createFileMenu (GtkWidget *obj)
void createEditMenu (GtkWidget *obj)
void createViewMenu (GtkWidget *obj)
void createQualityMenu (GtkWidget *obj)
void createHelpMenu (GtkWidget *obj)
void createControlMenu (GtkWidget *obj)
void showPropertiesDialog ()
void showPreferencesDialog ()
void showAboutDialog ()
void expose (const GdkRegion *region)
void setInvalidatedRegions (const InvalidatedRanges &ranges)
bool want_multiple_regions ()
virtual void setCursor (gnash_cursor_type newcursor)
 Sets the current mouse cursor for the Gui window.
virtual bool showMouse (bool show)
 Sets whether the gui should show the system mouse pointer.
virtual void showMenu (bool show)
 Sets whether the menus should be shown (for fscommand).
virtual void error (const std::string &msg)
 Handle error message from the core.
bool checkX11Extension (const std::string &ext)

Constructor & Destructor Documentation

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

Member Function Documentation

void gnash::GtkGui::beforeRendering (  )  [virtual]

Reimplemented from gnash::Gui.

bool gnash::GtkGui::checkX11Extension ( const std::string &  ext  ) 
void gnash::GtkGui::createControlMenu ( GtkWidget *  obj  ) 
void gnash::GtkGui::createEditMenu ( GtkWidget *  obj  ) 
void gnash::GtkGui::createFileMenu ( GtkWidget *  obj  ) 

/ Menus /// /

void gnash::GtkGui::createHelpMenu ( GtkWidget *  obj  ) 
bool gnash::GtkGui::createMenu (  )  [virtual]

The sound handler is initialized after the Gui is created, and may be disabled or enabled dynamically.

References _, gnash::Gui::_interval, and gnash::Gui::advance_movie().

bool gnash::GtkGui::createMenuAlt (  )  [virtual]
bool gnash::GtkGui::createMenuBar (  ) 

Create a menu bar for the application, attach to our window.

/ Widget functions /// /

Referenced by watchFD().

void gnash::GtkGui::createQualityMenu ( GtkWidget *  obj  ) 
void gnash::GtkGui::createViewMenu ( GtkWidget *  obj  ) 
bool gnash::GtkGui::createWindow ( int  width,
int  height 
) [virtual]

/ Rendering stuff /// /

bool gnash::GtkGui::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.

void gnash::GtkGui::error ( const std::string &   )  [virtual]

Handle error message from the core.

Parameters:
msg The error message recieved

Reimplemented from gnash::Gui.

References _.

void gnash::GtkGui::expose ( const GdkRegion *  region  ) 
double gnash::GtkGui::getPixelAspectRatio (  )  [virtual]

For System.capabilities information.

Reimplemented from gnash::Gui.

double gnash::GtkGui::getScreenDPI (  )  [virtual]

Reimplemented from gnash::Gui.

int gnash::GtkGui::getScreenResX (  )  [virtual]

Reimplemented from gnash::Gui.

int gnash::GtkGui::getScreenResY (  )  [virtual]

Reimplemented from gnash::Gui.

void gnash::GtkGui::grabFocus (  ) 

Grab focus so to receive all key events.

Might become a virtual in the base class

void gnash::GtkGui::hideMenu (  )  [virtual]

Hide the menu bar when using standalone player

Reimplemented from gnash::Gui.

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

GUI interface implementation.

Implements gnash::Gui.

void gnash::GtkGui::quitUI (  )  [virtual]

End main rendering loop calling GUI-specific exit functions.

Do not call this directly. Call quit() instead. The default implementation calls exit(EXIT_SUCCESS), which isn't nice. Please implement the proper main loop quitter in the subclasses.

Reimplemented from gnash::Gui.

void gnash::GtkGui::renderBuffer (  )  [virtual]

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

Implements gnash::Gui.

void gnash::GtkGui::resizeWindow ( int  width,
int  height 
) [virtual]

Reimplemented from gnash::Gui.

bool gnash::GtkGui::run (  )  [virtual]

Start main rendering loop.

Implements gnash::Gui.

void gnash::GtkGui::setCursor ( gnash_cursor_type  newcursor  )  [virtual]

Sets the current mouse cursor for the Gui window.

Reimplemented from gnash::Gui.

void gnash::GtkGui::setFullscreen (  )  [virtual]

Attempt to run in a fullscreen window both for plugin and standalone player. Use isFullscreen() to see if gnash thinks it's running in fullscreen or not. The switch to fullscreen may fail if, for instance, the window manager refuses to allow it, but the flag will be set anyway.

Reimplemented from gnash::Gui.

void gnash::GtkGui::setInterval ( unsigned int  interval  )  [virtual]

Set main loop delay in milliseconds.

Reimplemented from gnash::Gui.

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

Reimplemented from gnash::Gui.

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

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

Implements gnash::Gui.

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

Set up callbacks for key, mouse and other GTK events.

Must be called after the drawing area has been added to a top level window, as it calls setupWindowEvents() to add key event callbacks to the top level window.

void gnash::GtkGui::showAboutDialog ( void   ) 
void gnash::GtkGui::showMenu ( bool  show  )  [virtual]

Sets whether the menus should be shown (for fscommand).

Parameters:
show true if the menu bar should be shown.

Reimplemented from gnash::Gui.

References gnash::CURSOR_HAND, and gnash::CURSOR_INPUT.

bool gnash::GtkGui::showMouse ( bool  show  )  [virtual]

Sets whether the gui should show the system mouse pointer.

Parameters:
show true if the mouse should be shown.
Returns:
true if the state changed.

Reimplemented from gnash::Gui.

void gnash::GtkGui::showPreferencesDialog (  ) 
void gnash::GtkGui::showPropertiesDialog (  ) 
void gnash::GtkGui::unsetFullscreen (  )  [virtual]

Return from fullscreen to normal mode.

Reimplemented from gnash::Gui.

bool gnash::GtkGui::want_multiple_regions (  )  [inline, virtual]

Reimplemented from gnash::Gui.

bool gnash::GtkGui::watchFD ( int   )  [virtual]

Watch a file descriptor.

An implementing Gui should monitor the file descriptor in its main loop. When the file descriptor is triggered, the implementation should call callCallback().

Parameters:
fd The file descriptor to be watched

Reimplemented from gnash::Gui.

References createMenuBar().


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