Clutter Namespace Reference


Classes

class  ActorBox
class  Actor
class  Alpha
class  BehaviourBspline
class  BehaviourDepth
class  BehaviourEllipse
class  BehaviourOpacity
class  BehaviourPath
class  BehaviourRotate
class  BehaviourScale
class  Behaviour
class  CloneTexture
class  Color
class  Container
class  EffectTemplate
class  Entry
class  Group
class  Label
class  Media
class  Rectangle
class  Score
class  Script
class  Scriptable
class  Shader
class  Perspective
class  Stage
class  TextureError
 Exception class for Clutter::Texture errors. More...
class  Texture
class  Timeline
class  TimeoutPool
 A timeout pool should be used when multiple timeout functions, running at the same priority, are needed and the Glib::SignalTimeout API might lead to starvation of the time slice of the main loop. More...
class  InitError
class  Knot
class  Vertex
class  Geometry

Typedefs

typedef ClutterFog Fog
typedef ClutterEvent Event
typedef ClutterButtonEvent ButtonEvent
typedef ClutterKeyEvent KeyEvent
typedef ClutterMotionEvent MotionEvent
typedef ClutterScrollEvent ScrollEvent
typedef ClutterCrossingEvent CrossingEvent
typedef ClutterUnit Unit
typedef ClutterFixed Fixed
typedef ClutterAngle Angle

Enumerations

enum  TextureFlags { TEXTURE_RGB_FLAG_BGR = 1 << 1, TEXTURE_RGB_FLAG_PREMULT = 1 << 2, TEXTURE_YUV_FLAG_YUV2 = 1 << 3 }
 
Bitwise operators:
TextureFlags operator|(TextureFlags, TextureFlags)
TextureFlags operator&(TextureFlags, TextureFlags)
TextureFlags operator^(TextureFlags, TextureFlags)
TextureFlags operator~(TextureFlags)
TextureFlags& operator|=(TextureFlags&, TextureFlags)
TextureFlags& operator&=(TextureFlags&, TextureFlags)
TextureFlags& operator^=(TextureFlags&, TextureFlags)
More...
enum  TextureQuality { TEXTURE_QUALITY_LOW, TEXTURE_QUALITY_MEDIUM, TEXTURE_QUALITY_HIGH }
enum  TimelineDirection { TIMELINE_FORWARD, TIMELINE_BACKWARD }
enum  RotateDirection { ROTATE_CW, ROTATE_CCW }
enum  RotateAxis { X_AXIS, Y_AXIS, Z_AXIS }
enum  Gravity {
  GRAVITY_NONE, GRAVITY_NORTH, GRAVITY_NORTH_EAST, GRAVITY_EAST,
  GRAVITY_SOUTH_EAST, GRAVITY_SOUTH, GRAVITY_SOUTH_WEST, GRAVITY_WEST,
  GRAVITY_NORTH_WEST, GRAVITY_CENTER
}
enum  RequestMode { REQUEST_HEIGHT_FOR_WIDTH, REQUEST_WIDTH_FOR_HEIGHT }

Functions

bool events_pending ()
 Checks if events are pending in the event queue.
guint key_event_symbol (KeyEvent *keyev)
 Retrieves the value of the key that caused keyev.
guint16 key_event_code (KeyEvent *keyev)
 Retrieves the keycode of the key that caused keyev.
guint32 key_event_unicode (KeyEvent *keyev)
 Retrieves the unicode value for the key that caused keyev.
guint32 keysym_to_unicode (guint keyval)
 Convert from a Clutter key symbol to the corresponding ISO10646 (Unicode) character.
sigc::connection frame_source_add (const sigc::slot< bool > &callback, guint interval, gint priority=Glib::PRIORITY_DEFAULT)
 Sets a function to be called at regular intervals with the given priority.
void init (int *argc, gchar **argv[])
 It will initialise everything needed to operate with Clutter and parses some standard command line options.
void init (int &argc, gchar **&argv)
 It will initialise everything needed to operate with Clutter and parses some standard command line options.
void add_clutter_option_group (Glib::OptionContext &option_context)
 Adds a Glib::OptionGroup for the command line arguments recognized by Clutter to the given context.
void main ()
 Starts the Clutter mainloop.
void main_quit ()
 Terminates the Clutter mainloop.
int main_level ()
 Retrieves the depth of the Clutter mainloop.
bool get_debug_enabled ()
 Check if clutter has debugging turned on.
bool get_show_fps ()
 Returns whether Clutter should print out the frames per second on the console.
gulong get_timestamp ()
 Returns the approximate number of microseconds passed since clutter was intialised.
Glib::RefPtr< Actorget_actor_by_gid (guint32 id)
 Retrieves the Actor with id.
void set_default_frame_rate (guint frames_per_sec)
 Sets the default frame rate to be used when creating Timeline objects.
guint get_default_frame_rate ()
 Retrieves the default frame rate used when creating ClutterTimelines.
void set_motion_events_enabled (bool enable)
 Sets whether per-actor motion events should be enabled or not (the default is to enable them).
bool get_motion_events_enabled ()
 Gets whether the per-actor motion events are enabled.
void set_motion_events_frequency (guint frequency)
 Sets the motion events frequency.
guint get_motion_events_frequency ()
 Retrieves the number of motion events per second that are delivered to the stage.
void clear_glyph_cache ()
 Clears the internal cache of glyphs used by the Pango renderer.
void set_use_mipmapped_text (bool value)
 Sets whether subsequent text rendering operations will use mipmapped textures or not.
bool get_use_mipmapped_text ()
 Gets whether mipmapped textures are used in text operations.
Glib::RefPtr< Actorget_keyboard_grab ()
 Queries the current keyboard grab of clutter.
Glib::RefPtr< Actorget_pointer_grab ()
 Queries the current pointer grab of clutter.
void grab_keyboard (const Glib::RefPtr< Actor > &actor)
 Grabs keyboard events, after the grab is done keyboard events ("key-press-event" and "key-release-event") are delivered to this actor directly.
void grab_pointer (const Glib::RefPtr< Actor > &actor)
 Grabs pointer events, after the grab is done all pointer related events (press, motion, release, enter, leave and scroll) are delivered to this actor directly.
void ungrab_keyboard ()
 Removes an existing grab of the keyboard.
void ungrab_pointer ()
 Removes an existing grab of the pointer.
void grab_pointer_for_device (const Glib::RefPtr< Actor > &actor, int id)
 Grabs all the pointer events coming from the device id for actor.
void ungrab_pointer_for_device (int id)
 Removes an existing grab of the pointer events for device id.
TextureFlags operator| (TextureFlags lhs, TextureFlags rhs)
TextureFlags operator & (TextureFlags lhs, TextureFlags rhs)
TextureFlags operator^ (TextureFlags lhs, TextureFlags rhs)
TextureFlags operator~ (TextureFlags flags)
TextureFlagsoperator|= (TextureFlags &lhs, TextureFlags rhs)
TextureFlagsoperator &= (TextureFlags &lhs, TextureFlags rhs)
TextureFlagsoperator^= (TextureFlags &lhs, TextureFlags rhs)
void threads_init ()
 Initialises the Clutter threading mechanism, so that Clutter API can be called by multiple threads, using threads_enter() and threads_leave() to mark the critical sections.
void threads_enter ()
 Locks the Clutter thread lock.
void threads_leave ()
 Unlocks the Clutter thread lock.
sigc::connection threads_add_idle (const sigc::slot< bool > &callback, int priority=Glib::PRIORITY_DEFAULT_IDLE)
 Adds a function to be called whenever there are no higher priority events pending.
sigc::connection threads_add_timeout (const sigc::slot< bool > &callback, guint interval, gint priority=Glib::PRIORITY_DEFAULT)
 Sets a function to be called at regular intervals holding the Clutter lock, with the given priority.
sigc::connection threads_add_frame_source (const sigc::slot< bool > &callback, guint interval, gint priority=Glib::PRIORITY_DEFAULT)
 Sets a function to be called at regular intervals holding the Clutter lock, with the given priority.
int util_next_p2 (int a)
void wrap_init ()


Typedef Documentation

typedef ClutterAngle Clutter::Angle

typedef ClutterButtonEvent Clutter::ButtonEvent

typedef ClutterCrossingEvent Clutter::CrossingEvent

typedef ClutterEvent Clutter::Event

typedef ClutterFixed Clutter::Fixed

typedef ClutterFog Clutter::Fog

typedef ClutterKeyEvent Clutter::KeyEvent

typedef ClutterMotionEvent Clutter::MotionEvent

typedef ClutterScrollEvent Clutter::ScrollEvent

typedef ClutterUnit Clutter::Unit


Function Documentation

void Clutter::add_clutter_option_group ( Glib::OptionContext &  option_context  ) 

Adds a Glib::OptionGroup for the command line arguments recognized by Clutter to the given context.

This is useful if you are using Glib::OptionContext::parse() to parse your commandline arguments.

Parameters:
option_context a Glib::OptionContext to add the clutter option group to.

void Clutter::clear_glyph_cache (  ) 

Clears the internal cache of glyphs used by the Pango renderer.

This will free up some memory and GL texture resources. The cache will be automatically refilled as more text is drawn.

bool Clutter::events_pending (  ) 

Checks if events are pending in the event queue.

Returns:
true if there are pending events, false otherwise.

sigc::connection Clutter::frame_source_add ( const sigc::slot< bool > &  callback,
guint  interval,
gint  priority = Glib::PRIORITY_DEFAULT 
)

Sets a function to be called at regular intervals with the given priority.

The function is called repeatedly until it returns false, at which point the timeout is automatically destroyed and the function will not be called again. The first call to the function will be at the end of the first interval.

This function is similar to Glib::SignalTimeout except that it will try to compensate for delays. For example, if func takes half the interval time to execute then the function will be called again half the interval time after it finished. In contrast Glib::SignalTimeout would not fire until a full interval after the function completes so the delay between calls would be interval * 1.5. This function does not however try to invoke the function multiple times to catch up missing frames if callback takes more than interval ms to execute.

Parameters:
callback function to call
interval the time between calls to the function, in milliseconds
the priority of the timeout source. Typically this will be in the range between Glib::PRIORITY_DEFAULT and Glib::PRIORITY_HIGH.
Returns:
A sigc::connection that can be used to disconnect the callback from the timeout source.

Glib::RefPtr<Actor> Clutter::get_actor_by_gid ( guint32  id  ) 

Retrieves the Actor with id.

Parameters:
id an Actor ID.
Returns:
the actor with the passed id or a NULL RefPtr.

bool Clutter::get_debug_enabled (  ) 

Check if clutter has debugging turned on.

Returns:
true if debugging is turned on, false otherwise.

guint Clutter::get_default_frame_rate (  ) 

Retrieves the default frame rate used when creating ClutterTimelines.

This value is also used to compute the default frequency of motion events.

Returns:
the default frame rate

Glib::RefPtr<Actor> Clutter::get_keyboard_grab (  ) 

Queries the current keyboard grab of clutter.

Returns:
the actor currently holding the keyboard grab, or an empty Glib::RefPtr if there is no grab.

bool Clutter::get_motion_events_enabled (  ) 

Gets whether the per-actor motion events are enabled.

Returns:
true if the motion events are enabled

guint Clutter::get_motion_events_frequency (  ) 

Retrieves the number of motion events per second that are delivered to the stage.

See set_motion_events_frequency().

Returns:
the number of motion events per second

Glib::RefPtr<Actor> Clutter::get_pointer_grab (  ) 

Queries the current pointer grab of clutter.

Returns:
the actor currently holding the pointer grab, or am empty Glib::RefPtr if there is no grab.

bool Clutter::get_show_fps (  ) 

Returns whether Clutter should print out the frames per second on the console.

You can enable this setting either using the CLUTTER_SHOW_FPS environment variable or passing the --clutter-show-fps command line argument.

Returns:
true if Clutter should show the FPS.

gulong Clutter::get_timestamp (  ) 

Returns the approximate number of microseconds passed since clutter was intialised.

Returns:
Number of microseconds since clutter_init() was called.

bool Clutter::get_use_mipmapped_text (  ) 

Gets whether mipmapped textures are used in text operations.

See set_use_mipmapped_text().

Returns:
true if text operations should use mipmapped textures

void Clutter::grab_keyboard ( const Glib::RefPtr< Actor > &  actor  ) 

Grabs keyboard events, after the grab is done keyboard events ("key-press-event" and "key-release-event") are delivered to this actor directly.

The source set in the event will be the actor that would have received the event if the keyboard grab was not in effect.

Parameters:
actor An Actor

void Clutter::grab_pointer ( const Glib::RefPtr< Actor > &  actor  ) 

Grabs pointer events, after the grab is done all pointer related events (press, motion, release, enter, leave and scroll) are delivered to this actor directly.

The source set in the event will be the actor that would have received the event if the pointer grab was not in effect.

If you wish to grab all the pointer events for a specific input device, you should use grab_pointer_for_device().

Parameters:
actor An Actor

void Clutter::grab_pointer_for_device ( const Glib::RefPtr< Actor > &  actor,
int  id 
)

Grabs all the pointer events coming from the device id for actor.

If id is -1 then this function is equivalent to grab_pointer().

Parameters:
actor An Actor.
id a device id, or -1

void Clutter::init ( int &  argc,
gchar **&  argv 
)

It will initialise everything needed to operate with Clutter and parses some standard command line options.

argc and argv are adjusted accordingly so your own code will never see those standard arguments.

Parameters:
argc a reference to the number of command line arguments
argv a reference to the array of comman line arguments
Exceptions:
InitError,Glib::OptionError 

void Clutter::init ( int *  argc,
gchar **  argv[] 
)

It will initialise everything needed to operate with Clutter and parses some standard command line options.

argc and argv are adjusted accordingly so your own code will never see those standard arguments.

Parameters:
argc a pointer to the number of command line arguments
argv a pointer to the array of comman line arguments
Exceptions:
InitError,Glib::OptionError 

guint16 Clutter::key_event_code ( KeyEvent *  keyev  ) 

Retrieves the keycode of the key that caused keyev.

Parameters:
keyev A KeyEvent.
Returns:
The keycode representing the key

guint Clutter::key_event_symbol ( KeyEvent *  keyev  ) 

Retrieves the value of the key that caused keyev.

Parameters:
keyev A KeyEvent.
Returns:
The keysym representing the key.

guint32 Clutter::key_event_unicode ( KeyEvent *  keyev  ) 

Retrieves the unicode value for the key that caused keyev.

Parameters:
keyev A KeyEvent
Returns:
The unicode value representing the key

guint32 Clutter::keysym_to_unicode ( guint  keyval  ) 

Convert from a Clutter key symbol to the corresponding ISO10646 (Unicode) character.

Parameters:
keyval a clutter key symbol
Returns:
the corresponding unicode character, or 0 if there is no corresponding character.

void Clutter::main (  ) 

Starts the Clutter mainloop.

int Clutter::main_level (  ) 

Retrieves the depth of the Clutter mainloop.

Returns:
The level of the mainloop.

void Clutter::main_quit (  ) 

Terminates the Clutter mainloop.

void Clutter::set_default_frame_rate ( guint  frames_per_sec  ) 

Sets the default frame rate to be used when creating Timeline objects.

Parameters:
frames_per_sec the new default frame rate

void Clutter::set_motion_events_enabled ( bool  enable  ) 

Sets whether per-actor motion events should be enabled or not (the default is to enable them).

If enable is false the following events will not work:

Parameters:
enable true to enable per-actor motion events

void Clutter::set_motion_events_frequency ( guint  frequency  ) 

Sets the motion events frequency.

Setting this to a non-zero value will override the default setting, so it should be rarely used.

Motion events are delivered from the default backend to the stage and are used to generate the enter/leave events pair. This might lead to a performance penalty due to the way the actors are identified. Using this function is possible to reduce the frequency of the motion events delivery to the stage.

Parameters:
frequency the number of motion events per second, or 0 for the default value

void Clutter::set_use_mipmapped_text ( bool  value  ) 

Sets whether subsequent text rendering operations will use mipmapped textures or not.

Using mipmapped textures will improve the quality for scaled down text but will use more texture memory.

Parameters:
value true to enable mipmapping or false to disable.

sigc::connection Clutter::threads_add_frame_source ( const sigc::slot< bool > &  callback,
guint  interval,
gint  priority = Glib::PRIORITY_DEFAULT 
)

Sets a function to be called at regular intervals holding the Clutter lock, with the given priority.

The function is called repeatedly until it returns false, at which point the timeout is automatically destroyed and the function will not be called again. The first call to the function will be at the end of the first interval.

This function is similar to threads_add_timeout_full() except that it will try to compensate for delays. For example, if func takes half the interval time to execute then the function will be called again half the interval time after it finished. In contrast threads_add_timeout() would not fire until a full interval after the function completes so the delay between calls would be interval * 1.5. This function does not however try to invoke the function multiple times to catch up missing frames if func takes more than interval ms to execute.

This variant of frame_source_add() can be thought of a MT-safe version for Clutter actors.

Parameters:
callback function to call
interval the time between calls to the function, in milliseconds
the priority of the timeout source. Typically this will be in the range between Glib::PRIORITY_DEFAULT and Glib::PRIORITY_HIGH.
Returns:
A sigc::connection that can be used to disconnect the callback from the timeout source.

sigc::connection Clutter::threads_add_idle ( const sigc::slot< bool > &  callback,
int  priority = Glib::PRIORITY_DEFAULT_IDLE 
)

Adds a function to be called whenever there are no higher priority events pending.

If the function returns false it is automatically removed from the list of event sources and will not be called again.

This variant of Glib::signal_idle calls function with the Clutter lock held. It can be thought of a MT-safe version for Clutter actors for the use case where you have to worry about idle_callback() running in thread A and accessing self after it has been finalized in thread B.

Parameters:
callback function to call
priority the priority of the timeout source. Typically this will be in the range between Glib::PRIORITY_DEFAULT_IDLE and Glib::PRIORITY_HIGH_IDLE
Returns:
A sigc::connection that can be used to disconnect the callback from the idle source.

sigc::connection Clutter::threads_add_timeout ( const sigc::slot< bool > &  callback,
guint  interval,
gint  priority = Glib::PRIORITY_DEFAULT 
)

Sets a function to be called at regular intervals holding the Clutter lock, with the given priority.

The function is called repeatedly until it returns false, at which point the timeout is automatically destroyed and the function will not be called again. The first call to the function will be at the end of the first interval.

Note that timeout functions may be delayed, due to the processing of other event sources. Thus they should not be relied on for precise timing. After each call to the timeout function, the time of the next timeout is recalculated based on the current time and the given interval (it does not try to 'catch up' time lost in delays).

This variant of Glib::SignalTimeout can be thought of a MT-safe version for Clutter actors. See also threads_add_idle().

Parameters:
callback function to call
interval the time between calls to the function, in milliseconds
priority the priority of the timeout source. Typically this will be in the range between Glib::PRIORITY_DEFAULT and Glib::PRIORITY_HIGH.
Returns:
A sigc::connection that can be used to disconnect the callback from the timeout source.

void Clutter::threads_enter (  ) 

Locks the Clutter thread lock.

void Clutter::threads_init (  ) 

Initialises the Clutter threading mechanism, so that Clutter API can be called by multiple threads, using threads_enter() and threads_leave() to mark the critical sections.

You must call Glib::thread_init() before this function.

This function must be called before init().

void Clutter::threads_leave (  ) 

Unlocks the Clutter thread lock.

void Clutter::ungrab_keyboard (  ) 

Removes an existing grab of the keyboard.

void Clutter::ungrab_pointer (  ) 

Removes an existing grab of the pointer.

void Clutter::ungrab_pointer_for_device ( int  id  ) 

Removes an existing grab of the pointer events for device id.

Parameters:
a device id

int Clutter::util_next_p2 ( int  a  ) 

void Clutter::wrap_init (  ) 


Generated on Sun Jul 27 21:35:59 2008 for cluttermm by  doxygen 1.5.4