Namespaces | Classes | Typedefs | Enumerations | Functions

# Clutter Namespace Reference

## Namespaces
namespace | Cairo
## Classes
class | ActorBox
class | Actor
class | ActorMeta
class | Action
class | Alpha
class | Animation
class | Animator
class | Backend
class | Behaviour
class | BehaviourDepth
class | BehaviourEllipse
class | BehaviourOpacity
class | BehaviourPath
class | BehaviourRotate
class | BehaviourScale
class | BinLayout
class | Box
class | BoxLayout
class | ChildMeta
class | Clone
class | Color
class | Container
class | DeviceManager
class | Effect
class | FixedLayout
class | FlowLayout
class | Group
class | InputDevice
class | Interval
class | LayoutMeta
class | LayoutManager
class | Media
class | PathNode
class | Path
class | Rectangle
class | Score
class | Script
class | Scriptable
class | Shader
class | Perspective
class | Stage
| This is a top level 'window' on which child actors are placed and manipulated. More...
class | Text
class | TextureError
| Exception class for Clutter::Texture errors. More...
class | Texture
class | Timeline
class | InitError
class | Vertex
class | Geometry
class | Knot
## Typedefs
typedef ClutterFog | Fog
typedef ClutterEvent | Event
typedef ClutterButtonEvent | ButtonEvent
typedef ClutterKeyEvent | KeyEvent
typedef ClutterMotionEvent | MotionEvent
typedef ClutterScrollEvent | ScrollEvent
typedef ClutterCrossingEvent | CrossingEvent
## Enumerations
enum | ActorFlags { ACTOR_MAPPED = 1 << 1, ACTOR_REALIZED = 1 << 2, ACTOR_REACTIVE = 1 << 3, ACTOR_VISIBLE = 1 << 4, ACTOR_NO_LAYOUT = 1 << 5 }
enum | AllocationFlags { ALLOCATION_NONE = 0x0, ABSOLUTE_ORIGIN_CHANGED = 1 << 1 }
enum | Interpolation { INTERPOLATION_LINEAR, INTERPOLATION_CUBIC }
enum | BinAlignment { BIN_ALIGNMENT_FIXED, BIN_ALIGNMENT_FILL, BIN_ALIGNMENT_START, BIN_ALIGNMENT_END, BIN_ALIGNMENT_CENTER }
enum | BoxAlignment { BOX_ALIGNMENT_START, BOX_ALIGNMENT_END, BOX_ALIGNMENT_CENTER }
enum | FlowOrientation { FLOW_HORIZONTAL, FLOW_VERTICAL }
enum | InputDeviceType { POINTER_DEVICE, KEYBOARD_DEVICE, EXTENSION_DEVICE, N_DEVICE_TYPES }
enum | PathNodeType { PATH_MOVE_TO, PATH_LINE_TO, PATH_CURVE_TO, PATH_CLOSE, PATH_REL_MOVE_TO = PATH_MOVE_TO | CLUTTER_PATH_RELATIVE, PATH_REL_LINE_TO = PATH_LINE_TO | CLUTTER_PATH_RELATIVE, PATH_REL_CURVE_TO = PATH_CURVE_TO | CLUTTER_PATH_RELATIVE }
enum | PickMode { PICK_NONE, PICK_REACTIVE, PICK_ALL }
enum | TextureFlags { TEXTURE_NONE = 0x0, TEXTURE_RGB_FLAG_BGR = 1 << 1, TEXTURE_RGB_FLAG_PREMULT = 1 << 2, TEXTURE_YUV_FLAG_YUV2 = 1 << 3 }
enum | TextureQuality { TEXTURE_QUALITY_LOW, TEXTURE_QUALITY_MEDIUM, TEXTURE_QUALITY_HIGH }
enum | TimelineDirection { TIMELINE_FORWARD, TIMELINE_BACKWARD }
enum | AnimationMode { CUSTOM_MODE, LINEAR, EASE_IN_QUAD, EASE_OUT_QUAD, EASE_IN_OUT_QUAD, EASE_IN_CUBIC, EASE_OUT_CUBIC, EASE_IN_OUT_CUBIC, EASE_IN_QUART, EASE_OUT_QUART, EASE_IN_OUT_QUART, EASE_IN_QUINT, EASE_OUT_QUINT, EASE_IN_OUT_QUINT, EASE_IN_SINE, EASE_OUT_SINE, EASE_IN_OUT_SINE, EASE_IN_EXPO, EASE_OUT_EXPO, EASE_IN_OUT_EXPO, EASE_IN_CIRC, EASE_OUT_CIRC, EASE_IN_OUT_CIRC, EASE_IN_ELASTIC, EASE_OUT_ELASTIC, EASE_IN_OUT_ELASTIC, EASE_IN_BACK, EASE_OUT_BACK, EASE_IN_OUT_BACK, EASE_IN_BOUNCE, EASE_OUT_BOUNCE, EASE_IN_OUT_BOUNCE, ANIMATION_LAST }
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 }
enum | FontFlags { FONT_MIPMAPPING = (1 << 0), FONT_HINTING = (1 << 1) }
enum | TextDirection { TEXT_DIRECTION_DEFAULT, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL }
## Functions
ActorFlags | operator| (ActorFlags lhs, ActorFlags rhs)
ActorFlags | operator& (ActorFlags lhs, ActorFlags rhs)
ActorFlags | operator^ (ActorFlags lhs, ActorFlags rhs)
ActorFlags | operator~ (ActorFlags flags)
ActorFlags& | operator|= (ActorFlags& lhs, ActorFlags rhs)
ActorFlags& | operator&= (ActorFlags& lhs, ActorFlags rhs)
ActorFlags& | operator^= (ActorFlags& lhs, ActorFlags rhs)
AllocationFlags | operator| (AllocationFlags lhs, AllocationFlags rhs)
AllocationFlags | operator& (AllocationFlags lhs, AllocationFlags rhs)
AllocationFlags | operator^ (AllocationFlags lhs, AllocationFlags rhs)
AllocationFlags | operator~ (AllocationFlags flags)
AllocationFlags& | operator|= (AllocationFlags& lhs, AllocationFlags rhs)
AllocationFlags& | operator&= (AllocationFlags& lhs, AllocationFlags rhs)
AllocationFlags& | operator^= (AllocationFlags& lhs, AllocationFlags rhs)
TextureFlags | operator| (TextureFlags lhs, TextureFlags rhs)
TextureFlags | operator& (TextureFlags lhs, TextureFlags rhs)
TextureFlags | operator^ (TextureFlags lhs, TextureFlags rhs)
TextureFlags | operator~ (TextureFlags flags)
TextureFlags& | operator|= (TextureFlags& lhs, TextureFlags rhs)
TextureFlags& | operator&= (TextureFlags& lhs, TextureFlags rhs)
TextureFlags& | operator^= (TextureFlags& lhs, TextureFlags rhs)
FontFlags | operator| (FontFlags lhs, FontFlags rhs)
FontFlags | operator& (FontFlags lhs, FontFlags rhs)
FontFlags | operator^ (FontFlags lhs, FontFlags rhs)
FontFlags | operator~ (FontFlags flags)
FontFlags& | operator|= (FontFlags& lhs, FontFlags rhs)
FontFlags& | operator&= (FontFlags& lhs, FontFlags rhs)
FontFlags& | operator^= (FontFlags& lhs, FontFlags rhs)
bool | events_pending ()
| Checks if events are pending in the event queue.
guint | key_event_get_symbol (KeyEvent* keyev)
| Retrieves the value of the key that caused keyev.
guint16 | key_event_get_code (KeyEvent* keyev)
| Retrieves the keycode of the key that caused keyev.
guint32 | key_event_get_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, int 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< Actor > | get_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 | clear_glyph_cache ()
| Clears the internal cache of glyphs used by the Pango renderer.
void | set_font_flags (FontFlags flags)
FontFlags | get_font_flags ()
Glib::RefPtr< Pango::FontMap > | get_font_map ()
Glib::RefPtr< Actor > | get_keyboard_grab ()
| Queries the current keyboard grab of clutter.
Glib::RefPtr< Actor > | get_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.
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.

## Typedef Documentation

typedef ClutterButtonEvent Clutter::ButtonEvent

typedef ClutterCrossingEvent Clutter::CrossingEvent

typedef ClutterEvent Clutter::Event

typedef ClutterFog Clutter::Fog

typedef ClutterKeyEvent Clutter::KeyEvent

typedef ClutterMotionEvent Clutter::MotionEvent

typedef ClutterScrollEvent Clutter::ScrollEvent

## Enumeration Type Documentation

enum Clutter::PathNodeType

Enumerator:

  PATH_MOVE_TO |
  PATH_LINE_TO |
  PATH_CURVE_TO |
  PATH_CLOSE |
  PATH_REL_MOVE_TO |
  PATH_REL_LINE_TO |
  PATH_REL_CURVE_TO |

## 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,
|  | int | 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

FontFlags Clutter::get_font_flags | ( |  | ) |

Glib::RefPtr<Pango::FontMap> Clutter::get_font_map | ( |  | ) |

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

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.

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 pointer to the number of command line arguments
  | argv | a pointer 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 reference to the number of command line arguments
  | argv | a reference to the array of comman line arguments

Exceptions:

  | InitError,Glib::OptionError |

guint16 Clutter::key_event_get_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_get_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_get_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_font_flags | ( | FontFlags | flags | ) |

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:

- ClutterActor::motion-event, unless on the ClutterStage
- ClutterActor::enter-event
- ClutterActor::leave-event

Parameters:

  | enable | true to enable per-actor motion events

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