Ginga  0.13.6.2086-83aa
The iTV middleware.
Formatter.cpp File Reference

The Formatter class. More...

#include "aux-ginga.h"
#include "aux-gl.h"
#include "Formatter.h"
#include "Context.h"
#include "Media.h"
#include "MediaSettings.h"
#include "Object.h"
#include "Switch.h"
#include "Parser.h"
#include "PlayerText.h"
Include dependency graph for Formatter.cpp:

Classes

struct  GingaOptionData
 

Macros

#define OPTS_ENTRY(name, type, func)
 
#define _GINGA_CHECK_EOS(ginga)
 
#define OPT_ERR_UNKNOWN(name)   ERROR ("unknown GingaOption '%s'", (name))
 
#define OPT_ERR_BAD_TYPE(name, typename)   ERROR ("GingaOption '%s' is of type '%s'", (name), (typename))
 
#define OPT_GETSET_DEFN(Name, Type, GType)
 

Typedefs

typedef struct GingaOptionData OptionTab
 

Detailed Description

The Formatter class.

Macro Definition Documentation

◆ _GINGA_CHECK_EOS

#define _GINGA_CHECK_EOS (   ginga)
Value:
G_STMT_START \
{ \
Context *root; \
root = _doc->getRoot (); \
g_assert_nonnull (root); \
if (root->isSleeping ()) \
{ \
(ginga)->setEOS (true); \
} \
if ((ginga)->getEOS ()) \
{ \
g_assert ((ginga)->_state == GINGA_STATE_PLAYING); \
(ginga)->setEOS (false); \
g_assert ((ginga)->stop ()); \
g_assert ((ginga)->_state == GINGA_STATE_STOPPED); \
} \
} \
G_STMT_END
Ginga is playing.
Definition: ginga.h:71
Ginga is stopped.
Definition: ginga.h:72

◆ OPT_GETSET_DEFN

#define OPT_GETSET_DEFN (   Name,
  Type,
  GType 
)
Value:
Type Formatter::getOption##Name (const string &name) \
{ \
GingaOptionData *opt; \
if (unlikely (!opts_table_index (name, &opt))) \
OPT_ERR_UNKNOWN (name.c_str ()); \
if (unlikely (opt->type != (GType))) \
OPT_ERR_BAD_TYPE (name.c_str (), G_STRINGIFY (Type)); \
return *((Type *) (((ptrdiff_t) &_opts) + opt->offset)); \
} \
void Formatter::setOption##Name (const string &name, Type value) \
{ \
GingaOptionData *opt; \
if (unlikely (!opts_table_index (name, &opt))) \
OPT_ERR_UNKNOWN (name.c_str ()); \
if (unlikely (opt->type != (GType))) \
OPT_ERR_BAD_TYPE (name.c_str (), G_STRINGIFY (Type)); \
*((Type *) (((ptrdiff_t) &_opts) + opt->offset)) = value; \
if (opt->func) \
{ \
((void (*) (Formatter *, const string &, Type)) opt->func) ( \
this, name, value); \
} \
}
Interface between libginga and the external world.
Definition: Formatter.h:37

◆ OPTS_ENTRY

#define OPTS_ENTRY (   name,
  type,
  func 
)
Value:
{ \
G_STRINGIFY (name), \
{ \
(type), offsetof (GingaOptions, name), \
pointerof (G_PASTE (Formatter::setOption, func)) \
} \
}
Ginga control options.
Definition: ginga.h:44