ginga 1.0
The Ginga iTV middleware
Loading...
Searching...
No Matches
Ginga Class Referenceabstract

Ginga handle. More...

#include <ginga.h>

Inheritance diagram for Ginga:

Public Member Functions

 Ginga (const GingaOptions *opts)
 Creates a new Ginga object.
 
virtual ~Ginga ()=0
 Destroys Ginga object.
 
virtual GingaState getState ()=0
 Gets Ginga object state.
 
virtual bool start (const std::string &path, std::string *errmsg)=0
 Starts the presentation of an NCL file.
 
virtual bool stop ()=0
 Stops the presentation.
 
virtual void resize (int width, int height)=0
 Resizes the presentation screen.
 
virtual void redraw (cairo_t *cr)=0
 Draws the latest frame of the presentation on Cairo context.
 
virtual bool sendKey (const std::string &key, bool press)=0
 Sends key event to presentation.
 
virtual bool sendTick (uint64_t total, uint64_t diff, uint64_t frame)=0
 Sends tick event to presentation.
 
virtual const GingaOptionsgetOptions ()=0
 Gets current options.
 
virtual bool getOptionBool (const std::string &name)=0
 Gets boolean option value.
 
virtual void setOptionBool (const std::string &name, bool value)=0
 Sets boolean option.
 
virtual int getOptionInt (const std::string &name)=0
 Gets integer option value.
 
virtual void setOptionInt (const std::string &name, int value)=0
 Sets integer option.
 
virtual std::string getOptionString (const std::string &name)=0
 Gets string option value.
 
virtual void setOptionString (const std::string &name, std::string value)=0
 Sets string option.
 

Static Public Member Functions

static Gingacreate (const GingaOptions *opts)
 Creates a new Ginga object.
 
static std::string version ()
 Gets libginga version string.
 

Detailed Description

Ginga handle.

Opaque handle that represents an NCL formatter.

Constructor & Destructor Documentation

◆ Ginga()

Ginga::Ginga ( const GingaOptions * opts)
explicit

Creates a new Ginga object.

Parameters
optsOptions to initialize the object with.
Returns
New Ginga.

Member Function Documentation

◆ create()

Ginga * Ginga::create ( const GingaOptions * opts)
static

Creates a new Ginga object.

Parameters
optsOptions to initialize the object with.
Returns
New Ginga.

◆ getOptionBool()

virtual bool Ginga::getOptionBool ( const std::string & name)
pure virtual

Gets boolean option value.

Parameters
nameOption name.
Returns
Option value.

Implemented in ginga::Formatter.

◆ getOptionInt()

virtual int Ginga::getOptionInt ( const std::string & name)
pure virtual

Gets integer option value.

Parameters
nameOption name.
Returns
Option value.

Implemented in ginga::Formatter.

◆ getOptions()

virtual const GingaOptions * Ginga::getOptions ( )
pure virtual

Gets current options.

Returns
Current options.

Implemented in ginga::Formatter.

◆ getOptionString()

virtual std::string Ginga::getOptionString ( const std::string & name)
pure virtual

Gets string option value.

Parameters
nameOption name.
Returns
Option value.

Implemented in ginga::Formatter.

◆ getState()

virtual GingaState Ginga::getState ( )
pure virtual

Gets Ginga object state.

Returns
Ginga object state.

Implemented in ginga::Formatter.

◆ redraw()

virtual void Ginga::redraw ( cairo_t * cr)
pure virtual

Draws the latest frame of the presentation on Cairo context.

Parameters
crCairo context.

Implemented in ginga::Formatter.

◆ resize()

virtual void Ginga::resize ( int width,
int height )
pure virtual

Resizes the presentation screen.

Parameters
widthScreen width (in pixels).
heightScreen height (in pixels).

Implemented in ginga::Formatter.

◆ sendKey()

virtual bool Ginga::sendKey ( const std::string & key,
bool press )
pure virtual

Sends key event to presentation.

Parameters
keyKey name.
pressWhether the key was pressed (or released).
Returns
true if successful, or false otherwise.

Implemented in ginga::Formatter.

◆ sendTick()

virtual bool Ginga::sendTick ( uint64_t total,
uint64_t diff,
uint64_t frame )
pure virtual

Sends tick event to presentation.

Parameters
totalTime since the presentation started.
diffTime since last tick.
frameTick number.
Returns
true if successful, or false otherwise.

Implemented in ginga::Formatter.

◆ setOptionBool()

virtual void Ginga::setOptionBool ( const std::string & name,
bool value )
pure virtual

Sets boolean option.

Parameters
nameOption name.
valueOption value.

Implemented in ginga::Formatter.

◆ setOptionInt()

virtual void Ginga::setOptionInt ( const std::string & name,
int value )
pure virtual

Sets integer option.

Parameters
nameOption name.
valueOption value.

Implemented in ginga::Formatter.

◆ setOptionString()

virtual void Ginga::setOptionString ( const std::string & name,
std::string value )
pure virtual

Sets string option.

Parameters
nameOption name.
valueOption value.

Implemented in ginga::Formatter.

◆ start()

virtual bool Ginga::start ( const std::string & path,
std::string * errmsg )
pure virtual

Starts the presentation of an NCL file.

Parameters
pathPath to NCL file.
[out]errmsgVariable to store the error message (if any).
Returns
true if successful or false otherwise.

Implemented in ginga::Formatter.

◆ stop()

virtual bool Ginga::stop ( )
pure virtual

Stops the presentation.

Returns
true if successful or false otherwise.

Implemented in ginga::Formatter.

◆ version()

string Ginga::version ( )
static

Gets libginga version string.

Returns
libginga version string.

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