From 83544f9fc69638156b47d5c768b527282309b946 Mon Sep 17 00:00:00 2001 From: Artur Skawina Date: Sun, 29 Jan 2012 20:24:16 +0100 Subject: [PATCH] Support for PangoFT2, PangoCairo, fontconfig2, freetype22, GL, Clutter, ClutterX11 and Cally modules. The resulting new modules are not even build tested. Need samples... --- gtk2/cally.d | 402 + gtk2/clutter.d | 20403 +++++++++++++++++++++++++++++++++++++++++++++++++++ gtk2/clutterx11.d | 491 ++ gtk2/fontconfig2.d | 26 + gtk2/freetype22.d | 30 + gtk2/gl.d | 59 + gtk2/pangocairo.d | 415 ++ gtk2/pangoft2.d | 158 + 8 files changed, 21984 insertions(+) create mode 100644 gtk2/cally.d create mode 100644 gtk2/clutter.d create mode 100644 gtk2/clutterx11.d create mode 100644 gtk2/fontconfig2.d create mode 100644 gtk2/freetype22.d create mode 100644 gtk2/gl.d create mode 100644 gtk2/pangocairo.d create mode 100644 gtk2/pangoft2.d diff --git a/gtk2/cally.d b/gtk2/cally.d new file mode 100644 index 0000000..ed10d4a --- /dev/null +++ b/gtk2/cally.d @@ -0,0 +1,402 @@ +// *** DO NOT EDIT *** +// Automatically generated from "/usr/share/gir-1.0/Cally-1.0.gir" + +module Cally; +public import gtk2.atk; +alias gtk2.atk Atk; +public import gtk2.clutter; +alias gtk2.clutter Clutter; +public import gtk2.cogl; +alias gtk2.cogl Cogl; +public import gtk2.coglpango; +alias gtk2.coglpango CoglPango; +public import gtk2.gl; +alias gtk2.gl GL; +public import gtk2.glib2; +alias gtk2.glib2 GLib2; +public import gtk2.gobject2; +alias gtk2.gobject2 GObject2; +public import gtk2.gio2; +alias gtk2.gio2 Gio2; +public import gtk2.json; +alias gtk2.json Json; +public import gtk2.pango; +alias gtk2.pango Pango; +public import gtk2.pangocairo; +alias gtk2.pangocairo PangoCairo; +public import gtk2.pangoft2; +alias gtk2.pangoft2 PangoFT2; +public import gtk2.cairo; +alias gtk2.cairo cairo; +public import gtk2.fontconfig2; +alias gtk2.fontconfig2 fontconfig2; +public import gtk2.freetype22; +alias gtk2.freetype22 freetype22; + +// package: "cally-1.0"; +// C header: "cally/cally.h"; + +// c:symbol-prefixes: ["cally"] +// c:identifier-prefixes: ["Cally"] + +// module Cally; + + +// Action function, to be used on #AtkAction implementations as +// an individual action. Unlike #CallyActionFunc, this function +// uses the @user_data argument passed to cally_actor_add_action_full(). +// : a #CallyActor +// : user data passed to the function +extern (C) alias void function (Actor* cally_actor, void* user_data) ActionCallback; + + +// Action function, to be used on #AtkAction implementations as a individual +// action +// : a #CallyActor +extern (C) alias void function (Actor* cally_actor) ActionFunc; + + +// The CallyActor structure contains only private +// data and should be accessed using the provided API +struct Actor /* : Atk.GObjectAccessible */ /* Version 1.4 */ { + alias parent this; + alias parent super_; + alias parent gobjectaccessible; + Atk.GObjectAccessible parent; + private ActorPrivate* priv; + + + // Creates a new #CallyActor for the given @actor + // RETURNS: the newly created #AtkObject + // : a #ClutterActor + static Actor* /*new*/ new_(Clutter.Actor* actor) { + return cally_actor_new(actor); + } + + // Unintrospectable method: add_action() / cally_actor_add_action() + // Adds a new action to be accessed with the #AtkAction interface. + // RETURNS: added action id, or -1 if failure + // : the action name + // : the action description + // : the action keybinding + // : the callback of the action, to be executed with do_action + uint add_action(char* action_name, char* action_description, char* action_keybinding, ActionFunc action_func) { + return cally_actor_add_action(&this, action_name, action_description, action_keybinding, action_func); + } + + // Adds a new action to be accessed with the #AtkAction interface. + // RETURNS: added action id, or -1 if failure + // : the action name + // : the action description + // : the action keybinding + // : the callback of the action + // : data to be passed to @callback + // : function to be called when removing the action + uint add_action_full(char* action_name, char* action_description, char* action_keybinding, ActionCallback callback, void* user_data, GLib2.DestroyNotify notify) { + return cally_actor_add_action_full(&this, action_name, action_description, action_keybinding, callback, user_data, notify); + } + + // Removes a action, using the @action_id returned by cally_actor_add_action() + // RETURNS: %TRUE if the operation was succesful, %FALSE otherwise + // : the action id + int remove_action(int action_id) { + return cally_actor_remove_action(&this, action_id); + } + + // Removes an action, using the @action_name used when the action was added + // with cally_actor_add_action() + // RETURNS: %TRUE if the operation was succesful, %FALSE otherwise + // : the name of the action to remove + int remove_action_by_name(char* action_name) { + return cally_actor_remove_action_by_name(&this, action_name); + } +} + + +// The CallyActorClass structure contains only +// private data +struct ActorClass /* Version 1.4 */ { + private Atk.GObjectAccessibleClass parent_class; + extern (C) void function (GObject2.Object* object, GObject2.ParamSpec* pspec) notify_clutter; + extern (C) int function (Clutter.Actor* actor, void* data) focus_clutter; + extern (C) int function (Clutter.Actor* container, Clutter.Actor* actor, void* data) add_actor; + extern (C) int function (Clutter.Actor* container, Clutter.Actor* actor, void* data) remove_actor; + private void*[32] _padding_dummy; +} + +struct ActorPrivate { +} + + +// The CallyClone structure contains only private +// data and should be accessed using the provided API +struct Clone /* : Actor */ /* Version 1.4 */ { + alias parent this; + alias parent super_; + alias parent actor; + Actor parent; + private ClonePrivate* priv; + + + // Creates a new #CallyClone for the given @actor. @actor must be a + // #ClutterClone. + // RETURNS: the newly created #AtkObject + // : a #ClutterActor + static Clone* /*new*/ new_(Clutter.Actor* actor) { + return cally_clone_new(actor); + } +} + + +// The CallyCloneClass structure contains only +// private data +struct CloneClass /* Version 1.4 */ { + private ActorClass parent_class; + private void*[8] _padding_dummy; +} + +struct ClonePrivate { +} + + +// The CallyGroup structure contains only +// private data and should be accessed using the provided API +struct Group /* : Actor */ /* Version 1.4 */ { + alias parent this; + alias parent super_; + alias parent actor; + Actor parent; + private GroupPrivate* priv; + + + // Creates a #CallyGroup for @actor + // RETURNS: the newly created #CallyGroup + // : a #ClutterGroup + static Group* /*new*/ new_(Clutter.Actor* actor) { + return cally_group_new(actor); + } +} + + +// The CallyGroupClass structure contains only +// private data +struct GroupClass /* Version 1.4 */ { + private ActorClass parent_class; + private void*[8] _padding_dummy; +} + +struct GroupPrivate { +} + + +// The CallyRectangle structure contains only private +// data and should be accessed using the provided API +struct Rectangle /* : Actor */ /* Version 1.4 */ { + alias parent this; + alias parent super_; + alias parent actor; + Actor parent; + private RectanglePrivate* priv; + + + // Creates a new #CallyRectangle for the given @actor. @actor must be + // a #ClutterRectangle. + // RETURNS: the newly created #AtkObject + // : a #ClutterActor + static Rectangle* /*new*/ new_(Clutter.Actor* actor) { + return cally_rectangle_new(actor); + } +} + + +// The CallyRectangleClass structure contains +// only private data +struct RectangleClass /* Version 1.4 */ { + private ActorClass parent_class; + private void*[8] _padding_dummy; +} + +struct RectanglePrivate { +} + + +// The CallyRoot structure contains only private +// data and should be accessed using the provided API +struct Root /* : Atk.GObjectAccessible */ /* Version 1.4 */ { + alias parent this; + alias parent super_; + alias parent gobjectaccessible; + Atk.GObjectAccessible parent; + private RootPrivate* priv; + + + // Creates a new #CallyRoot object. + // RETURNS: the newly created #AtkObject + static Root* /*new*/ new_() { + return cally_root_new(); + } +} + + +// The CallyRootClass structure contains only +// private data +struct RootClass /* Version 1.4 */ { + private Atk.GObjectAccessibleClass parent_class; + private void*[16] _padding_dummy; +} + +struct RootPrivate { +} + + +// The CallyStage structure contains only +// private data and should be accessed using the provided API +struct Stage /* : Group */ /* Version 1.4 */ { + alias parent this; + alias parent super_; + alias parent group; + Group parent; + private StagePrivate* priv; + + + // Creates a new #CallyStage for the given @actor. @actor should be a + // #ClutterStage. + // RETURNS: the newly created #AtkObject + // : a #ClutterActor + static Stage* /*new*/ new_(Clutter.Actor* actor) { + return cally_stage_new(actor); + } +} + + +// The CallyStageClass structure contains only +// private data +struct StageClass /* Version 1.4 */ { + private GroupClass parent_class; + private void*[16] _padding_dummy; +} + +struct StagePrivate { +} + + +// The CallyText structure contains only private +// data and should be accessed using the provided API +struct Text /* : Actor */ /* Version 1.4 */ { + alias parent this; + alias parent super_; + alias parent actor; + Actor parent; + private TextPrivate* priv; + + + // Creates a new #CallyText for the given @actor. @actor must be a + // #ClutterText. + // RETURNS: the newly created #AtkObject + // : a #ClutterActor + static Text* /*new*/ new_(Clutter.Actor* actor) { + return cally_text_new(actor); + } +} + + +// The CallyTextClass structure contains only +// private data +struct TextClass /* Version 1.4 */ { + private ActorClass parent_class; + private void*[8] _padding_dummy; +} + +struct TextPrivate { +} + + +// The CallyTexture structure contains only +// private data and should be accessed using the provided API +struct Texture /* : Actor */ /* Version 1.4 */ { + alias parent this; + alias parent super_; + alias parent actor; + Actor parent; + private TexturePrivate* priv; + + + // Creates a new #CallyTexture for the given @actor. @actor must be + // a #ClutterTexture. + // RETURNS: the newly created #AtkObject + // : a #ClutterActor + static Texture* /*new*/ new_(Clutter.Actor* actor) { + return cally_texture_new(actor); + } +} + + +// The CallyTextureClass structure contains +// only private data +struct TextureClass /* Version 1.4 */ { + private ActorClass parent_class; + private void*[8] _padding_dummy; +} + +struct TexturePrivate { +} + + +// The CallyUtil structure contains only +// private data and should be accessed using the provided API +struct Util /* : Atk.Util */ /* Version 1.4 */ { + alias parent this; + alias parent super_; + alias parent util; + Atk.Util parent; + private UtilPrivate* priv; +} + + +// The CallyUtilClass structure contains only +// private data +struct UtilClass /* Version 1.4 */ { + private Atk.UtilClass parent_class; + private void*[8] _padding_dummy; +} + +struct UtilPrivate { +} + + +// Initializes the accessibility support. +// +// initialized. +// RETURNS: %TRUE if accessibility support has been correctly +static int accessibility_init() { + return cally_accessibility_init(); +} + + +// Returns if the accessibility support using cally is enabled. +// +// initialized. +// RETURNS: %TRUE if accessibility support has been correctly +static int get_cally_initialized() { + return cally_get_cally_initialized(); +} + + +// C prototypes: + +extern (C) { +Actor* /*new*/ cally_actor_new(Clutter.Actor* actor); +uint cally_actor_add_action(Actor* this_, char* action_name, char* action_description, char* action_keybinding, ActionFunc action_func); +uint cally_actor_add_action_full(Actor* this_, char* action_name, char* action_description, char* action_keybinding, ActionCallback callback, void* user_data, GLib2.DestroyNotify notify); +int cally_actor_remove_action(Actor* this_, int action_id); +int cally_actor_remove_action_by_name(Actor* this_, char* action_name); +Clone* /*new*/ cally_clone_new(Clutter.Actor* actor); +Group* /*new*/ cally_group_new(Clutter.Actor* actor); +Rectangle* /*new*/ cally_rectangle_new(Clutter.Actor* actor); +Root* /*new*/ cally_root_new(); +Stage* /*new*/ cally_stage_new(Clutter.Actor* actor); +Text* /*new*/ cally_text_new(Clutter.Actor* actor); +Texture* /*new*/ cally_texture_new(Clutter.Actor* actor); +int cally_accessibility_init(); +int cally_get_cally_initialized(); +} diff --git a/gtk2/clutter.d b/gtk2/clutter.d new file mode 100644 index 0000000..4bfa501 --- /dev/null +++ b/gtk2/clutter.d @@ -0,0 +1,20403 @@ +// *** DO NOT EDIT *** +// Automatically generated from "/usr/share/gir-1.0/Clutter-1.0.gir" + +module Clutter; +public import gtk2.atk; +alias gtk2.atk Atk; +public import gtk2.cogl; +alias gtk2.cogl Cogl; +public import gtk2.coglpango; +alias gtk2.coglpango CoglPango; +public import gtk2.gl; +alias gtk2.gl GL; +public import gtk2.glib2; +alias gtk2.glib2 GLib2; +public import gtk2.gobject2; +alias gtk2.gobject2 GObject2; +public import gtk2.gio2; +alias gtk2.gio2 Gio2; +public import gtk2.json; +alias gtk2.json Json; +public import gtk2.pango; +alias gtk2.pango Pango; +public import gtk2.pangocairo; +alias gtk2.pangocairo PangoCairo; +public import gtk2.pangoft2; +alias gtk2.pangoft2 PangoFT2; +public import gtk2.cairo; +alias gtk2.cairo cairo; +public import gtk2.fontconfig2; +alias gtk2.fontconfig2 fontconfig2; +public import gtk2.freetype22; +alias gtk2.freetype22 freetype22; + +// package: "clutter-1.0"; +// C header: "clutter/clutter.h"; + +// c:symbol-prefixes: ["clutter"] +// c:identifier-prefixes: ["Clutter"] + +// module Clutter; + +enum int _0 = 48; +enum int _1 = 49; +enum int _2 = 50; +enum int _3 = 51; +enum int _3270_AltCursor = 64784; +enum int _3270_Attn = 64782; +enum int _3270_BackTab = 64773; +enum int _3270_ChangeScreen = 64793; +enum int _3270_Copy = 64789; +enum int _3270_CursorBlink = 64783; +enum int _3270_CursorSelect = 64796; +enum int _3270_DeleteWord = 64794; +enum int _3270_Duplicate = 64769; +enum int _3270_Enter = 64798; +enum int _3270_EraseEOF = 64774; +enum int _3270_EraseInput = 64775; +enum int _3270_ExSelect = 64795; +enum int _3270_FieldMark = 64770; +enum int _3270_Ident = 64787; +enum int _3270_Jump = 64786; +enum int _3270_KeyClick = 64785; +enum int _3270_Left2 = 64772; +enum int _3270_PA1 = 64778; +enum int _3270_PA2 = 64779; +enum int _3270_PA3 = 64780; +enum int _3270_Play = 64790; +enum int _3270_PrintScreen = 64797; +enum int _3270_Quit = 64777; +enum int _3270_Record = 64792; +enum int _3270_Reset = 64776; +enum int _3270_Right2 = 64771; +enum int _3270_Rule = 64788; +enum int _3270_Setup = 64791; +enum int _3270_Test = 64781; +enum int _4 = 52; +enum int _5 = 53; +enum int _6 = 54; +enum int _7 = 55; +enum int _8 = 56; +enum int _9 = 57; +enum int A = 65; +enum int AE = 198; +enum int Aacute = 193; +enum int Abelowdot = 16785056; +enum int Abreve = 451; +enum int Abreveacute = 16785070; +enum int Abrevebelowdot = 16785078; +enum int Abrevegrave = 16785072; +enum int Abrevehook = 16785074; +enum int Abrevetilde = 16785076; +enum int AccessX_Enable = 65136; +enum int AccessX_Feedback_Enable = 65137; +enum int Acircumflex = 194; +enum int Acircumflexacute = 16785060; +enum int Acircumflexbelowdot = 16785068; +enum int Acircumflexgrave = 16785062; +enum int Acircumflexhook = 16785064; +enum int Acircumflextilde = 16785066; + +// The ClutterAction structure contains only +// private data and should be accessed using the provided API +struct Action /* : ActorMeta */ /* Version 1.4 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance actormeta; + ActorMeta parent_instance; +} + + +// The ClutterActionClass structure contains +// only private data +struct ActionClass /* Version 1.4 */ { + private ActorMetaClass parent_class; + extern (C) void function () _clutter_action1; + extern (C) void function () _clutter_action2; + extern (C) void function () _clutter_action3; + extern (C) void function () _clutter_action4; + extern (C) void function () _clutter_action5; + extern (C) void function () _clutter_action6; + extern (C) void function () _clutter_action7; + extern (C) void function () _clutter_action8; +} + +// Base class for actors. +struct Actor /* : GObject.InitiallyUnowned */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance initiallyunowned; + GObject2.InitiallyUnowned parent_instance; + uint flags; + private uint private_flags; + private ActorPrivate* priv; + + + // Adds @action to the list of actions applied to @self + // + // A #ClutterAction can only belong to one actor at a time + // + // The #ClutterActor will hold a reference on @action until either + // clutter_actor_remove_action() or clutter_actor_clear_actions() + // is called + // : a #ClutterAction + void add_action(Action* action) { + clutter_actor_add_action(&this, action); + } + + // A convenience function for setting the name of a #ClutterAction + // while adding it to the list of actions applied to @self + // + // This function is the logical equivalent of: + // + // |[ + // clutter_actor_meta_set_name (CLUTTER_ACTOR_META (action), name); + // clutter_actor_add_action (self, action); + // ]| + // : the name to set on the action + // : a #ClutterAction + void add_action_with_name(char* name, Action* action) { + clutter_actor_add_action_with_name(&this, name, action); + } + + // Adds @constraint to the list of #ClutterConstraints applied + // to @self + // + // The #ClutterActor will hold a reference on the @constraint until + // either clutter_actor_remove_constraint() or + // clutter_actor_clear_constraints() is called. + // : a #ClutterConstraint + void add_constraint(Constraint* constraint) { + clutter_actor_add_constraint(&this, constraint); + } + + // A convenience function for setting the name of a #ClutterConstraint + // while adding it to the list of constraints applied to @self + // + // This function is the logical equivalent of: + // + // |[ + // clutter_actor_meta_set_name (CLUTTER_ACTOR_META (constraint), name); + // clutter_actor_add_constraint (self, constraint); + // ]| + // : the name to set on the constraint + // : a #ClutterConstraint + void add_constraint_with_name(char* name, Constraint* constraint) { + clutter_actor_add_constraint_with_name(&this, name, constraint); + } + + // Adds @effect to the list of #ClutterEffects applied to @self + // + // The #ClutterActor will hold a reference on the @effect until either + // clutter_actor_remove_effect() or clutter_actor_clear_effects() is + // called. + // : a #ClutterEffect + void add_effect(Effect* effect) { + clutter_actor_add_effect(&this, effect); + } + + // A convenience function for setting the name of a #ClutterEffect + // while adding it to the list of effectss applied to @self + // + // This function is the logical equivalent of: + // + // |[ + // clutter_actor_meta_set_name (CLUTTER_ACTOR_META (effect), name); + // clutter_actor_add_effect (self, effect); + // ]| + // : the name to set on the effect + // : a #ClutterEffect + void add_effect_with_name(char* name, Effect* effect) { + clutter_actor_add_effect_with_name(&this, name, effect); + } + + // Called by the parent of an actor to assign the actor its size. + // Should never be called by applications (except when implementing + // a container or layout manager). + // + // Actors can know from their allocation box whether they have moved + // with respect to their parent actor. The @flags parameter describes + // additional information about the allocation, for instance whether + // the parent has moved with respect to the stage, for example because + // a grandparent's origin has moved. + // : new allocation of the actor, in parent-relative coordinates + // : flags that control the allocation + void allocate(ActorBox* box, AllocationFlags flags) { + clutter_actor_allocate(&this, box, flags); + } + + // Allocates @self by taking into consideration the available allocation + // area; an alignment factor on either axis; and whether the actor should + // fill the allocation on either axis. + // + // The @box should contain the available allocation width and height; + // if the x1 and y1 members of #ClutterActorBox are not set to 0, the + // allocation will be offset by their value. + // + // This function takes into consideration the geometry request specified by + // the #ClutterActor:request-mode property, and the text direction. + // + // This function is useful for fluid layout managers, like #ClutterBinLayout + // or #ClutterTableLayout + // : a #ClutterActorBox, containing the available width and height + // : the horizontal alignment, between 0 and 1 + // : the vertical alignment, between 0 and 1 + // : whether the actor should fill horizontally + // : whether the actor should fill vertically + // : allocation flags to be passed to clutter_actor_allocate() + void allocate_align_fill(ActorBox* box, double x_align, double y_align, int x_fill, int y_fill, AllocationFlags flags) { + clutter_actor_allocate_align_fill(&this, box, x_align, y_align, x_fill, y_fill, flags); + } + + // Allocates @self taking into account the #ClutterActor's + // preferred size, but limiting it to the maximum available width + // and height provided. + // + // This function will do the right thing when dealing with the + // actor's request mode. + // + // The implementation of this function is equivalent to: + // + // |[ + // if (request_mode == CLUTTER_REQUEST_HEIGHT_FOR_WIDTH) + // { + // clutter_actor_get_preferred_width (self, available_height, + // &min_width, + // &natural_width); + // width = CLAMP (natural_width, min_width, available_width); + // + // clutter_actor_get_preferred_height (self, width, + // &min_height, + // &natural_height); + // height = CLAMP (natural_height, min_height, available_height); + // } + // else + // { + // clutter_actor_get_preferred_height (self, available_width, + // &min_height, + // &natural_height); + // height = CLAMP (natural_height, min_height, available_height); + // + // clutter_actor_get_preferred_width (self, height, + // &min_width, + // &natural_width); + // width = CLAMP (natural_width, min_width, available_width); + // } + // + // box.x1 = x; box.y1 = y; + // box.x2 = box.x1 + available_width; + // box.y2 = box.y1 + available_height; + // clutter_actor_allocate (self, &box, flags); + // ]| + // + // This function can be used by fluid layout managers to allocate + // an actor's preferred size without making it bigger than the area + // available for the container. + // : the actor's X coordinate + // : the actor's Y coordinate + // : the maximum available width, or -1 to use the actor's natural width + // : the maximum available height, or -1 to use the actor's natural height + // : flags controlling the allocation + void allocate_available_size(float x, float y, float available_width, float available_height, AllocationFlags flags) { + clutter_actor_allocate_available_size(&this, x, y, available_width, available_height, flags); + } + + // Allocates the natural size of @self. + // + // This function is a utility call for #ClutterActor implementations + // that allocates the actor's preferred natural size. It can be used + // by fixed layout managers (like #ClutterGroup or so called + // 'composite actors') inside the ClutterActor::allocate + // implementation to give each child exactly how much space it + // requires. + // + // This function is not meant to be used by applications. It is also + // not meant to be used outside the implementation of the + // ClutterActor::allocate virtual function. + // : flags controlling the allocation + void allocate_preferred_size(AllocationFlags flags) { + clutter_actor_allocate_preferred_size(&this, flags); + } + + // Unintrospectable method: animate() / clutter_actor_animate() + // Animates the given list of properties of @actor between the current + // value for each property and a new final value. The animation has a + // definite duration and a speed given by the @mode. + // + // For example, this: + // + // |[ + // clutter_actor_animate (rectangle, CLUTTER_LINEAR, 250, + // "width", 100.0, + // "height", 100.0, + // NULL); + // ]| + // + // will make width and height properties of the #ClutterActor "rectangle" + // grow linearly between the current value and 100 pixels, in 250 milliseconds. + // + // The animation @mode is a logical id, either from the #ClutterAnimationMode + // enumeration of from clutter_alpha_register_func(). + // + // All the properties specified will be animated between the current value + // and the final value. If a property should be set at the beginning of + // the animation but not updated during the animation, it should be prefixed + // by the "fixed::" string, for instance: + // + // |[ + // clutter_actor_animate (actor, CLUTTER_EASE_IN_SINE, 100, + // "rotation-angle-z", 360.0, + // "fixed::rotation-center-z", &center, + // NULL); + // ]| + // + // Will animate the "rotation-angle-z" property between the current value + // and 360 degrees, and set the "rotation-center-z" property to the fixed + // value of the #ClutterVertex "center". + // + // This function will implicitly create a #ClutterAnimation object which + // will be assigned to the @actor and will be returned to the developer + // to control the animation or to know when the animation has been + // completed. + // + // If a name argument starts with "signal::", "signal-after::", + // "signal-swapped::" or "signal-swapped-after::" the two following arguments + // are used as callback function and data for a signal handler installed on + // the #ClutterAnimation object for the specified signal name, for instance: + // + // |[ + // + // static void + // on_animation_completed (ClutterAnimation *animation, + // ClutterActor *actor) + // { + // clutter_actor_hide (actor); + // } + // + // clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 100, + // "opacity", 0, + // "signal::completed", on_animation_completed, actor, + // NULL); + // ]| + // + // or, to automatically destroy an actor at the end of the animation: + // + // |[ + // clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 100, + // "opacity", 0, + // "signal-swapped-after::completed", + // clutter_actor_destroy, + // actor, + // NULL); + // ]| + // + // The "signal::" modifier is the equivalent of using g_signal_connect(); + // the "signal-after::" modifier is the equivalent of using + // g_signal_connect_after() or g_signal_connect_data() with the + // %G_CONNECT_AFTER; the "signal-swapped::" modifier is the equivalent + // of using g_signal_connect_swapped() or g_signal_connect_data() with the + // %G_CONNECT_SWAPPED flah; finally, the "signal-swapped-after::" modifier + // is the equivalent of using g_signal_connect_data() with both the + // %G_CONNECT_AFTER and %G_CONNECT_SWAPPED flags. The clutter_actor_animate() + // function will not keep track of multiple connections to the same signal, + // so it is your responsability to avoid them when calling + // clutter_actor_animate() multiple times on the same actor. + // + // Calling this function on an actor that is already being animated + // will cause the current animation to change with the new final values, + // the new easing mode and the new duration - that is, this code: + // + // |[ + // clutter_actor_animate (actor, CLUTTER_LINEAR, 250, + // "width", 100.0, + // "height", 100.0, + // NULL); + // clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 500, + // "x", 100.0, + // "y", 100.0, + // "width", 200.0, + // NULL); + // ]| + // + // is the equivalent of: + // + // |[ + // clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 500, + // "x", 100.0, + // "y", 100.0, + // "width", 200.0, + // "height", 100.0, + // NULL); + // ]| + // + // Unless the animation is looping, the #ClutterAnimation created by + // clutter_actor_animate() will become invalid as soon as it is + // complete. + // + // Since the created #ClutterAnimation instance attached to @actor + // is guaranteed to be valid throughout the #ClutterAnimation::completed + // signal emission chain, you will not be able to create a new animation + // using clutter_actor_animate() on the same @actor from within the + // #ClutterAnimation::completed signal handler unless you use + // g_signal_connect_after() to connect the callback function, for instance: + // + // |[ + // static void + // on_animation_completed (ClutterAnimation *animation, + // ClutterActor *actor) + // { + // clutter_actor_animate (actor, CLUTTER_EASE_OUT_CUBIC, 250, + // "x", 500.0, + // "y", 500.0, + // NULL); + // } + // + // ... + // animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 250, + // "x", 100.0, + // "y", 100.0, + // NULL); + // g_signal_connect (animation, "completed", + // G_CALLBACK (on_animation_completed), + // actor); + // ... + // ]| + // + // owned by the #ClutterActor and should not be unreferenced with + // g_object_unref() + // RETURNS: a #ClutterAnimation object. The object is + // : an animation mode logical id + // : duration of the animation, in milliseconds + // : the name of a property + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_actor_animate animate; // Variadic + +/ + + // Unintrospectable method: animate_with_alpha() / clutter_actor_animate_with_alpha() + // Animates the given list of properties of @actor between the current + // value for each property and a new final value. The animation has a + // definite behaviour given by the passed @alpha. + // + // See clutter_actor_animate() for further details. + // + // This function is useful if you want to use an existing #ClutterAlpha + // to animate @actor. + // + // #ClutterActor and should not be unreferenced with g_object_unref() + // RETURNS: a #ClutterAnimation object. The object is owned by the + // : a #ClutterAlpha + // : the name of a property + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_actor_animate_with_alpha animate_with_alpha; // Variadic + +/ + + // Animates the given list of properties of @actor between the current + // value for each property and a new final value. The animation has a + // definite behaviour given by the passed @alpha. + // + // See clutter_actor_animate() for further details. + // + // This function is useful if you want to use an existing #ClutterAlpha + // to animate @actor. + // + // This is the vector-based variant of clutter_actor_animate_with_alpha(), + // useful for language bindings. + // + // Unlike clutter_actor_animate_with_alpha(), this function will + // not allow you to specify "signal::" names and callbacks. + // + // #ClutterActor and should not be unreferenced with g_object_unref() + // RETURNS: a #ClutterAnimation object. The object is owned by the + // : a #ClutterAlpha + // : number of property names and values + // : a vector containing the property names to set + // : a vector containing the property values to set + Animation* animate_with_alphav(Alpha* alpha, int n_properties, char* properties, GObject2.Value* values) { + return clutter_actor_animate_with_alphav(&this, alpha, n_properties, properties, values); + } + + // Unintrospectable method: animate_with_timeline() / clutter_actor_animate_with_timeline() + // Animates the given list of properties of @actor between the current + // value for each property and a new final value. The animation has a + // definite duration given by @timeline and a speed given by the @mode. + // + // See clutter_actor_animate() for further details. + // + // This function is useful if you want to use an existing timeline + // to animate @actor. + // + // owned by the #ClutterActor and should not be unreferenced with + // g_object_unref() + // RETURNS: a #ClutterAnimation object. The object is + // : an animation mode logical id + // : a #ClutterTimeline + // : the name of a property + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_actor_animate_with_timeline animate_with_timeline; // Variadic + +/ + + // Animates the given list of properties of @actor between the current + // value for each property and a new final value. The animation has a + // definite duration given by @timeline and a speed given by the @mode. + // + // See clutter_actor_animate() for further details. + // + // This function is useful if you want to use an existing timeline + // to animate @actor. + // + // This is the vector-based variant of clutter_actor_animate_with_timeline(), + // useful for language bindings. + // + // Unlike clutter_actor_animate_with_timeline(), this function + // will not allow you to specify "signal::" names and callbacks. + // + // owned by the #ClutterActor and should not be unreferenced with + // g_object_unref() + // RETURNS: a #ClutterAnimation object. The object is + // : an animation mode logical id + // : a #ClutterTimeline + // : number of property names and values + // : a vector containing the property names to set + // : a vector containing the property values to set + Animation* animate_with_timelinev(c_ulong mode, Timeline* timeline, int n_properties, char* properties, GObject2.Value* values) { + return clutter_actor_animate_with_timelinev(&this, mode, timeline, n_properties, properties, values); + } + + // Animates the given list of properties of @actor between the current + // value for each property and a new final value. The animation has a + // definite duration and a speed given by the @mode. + // + // This is the vector-based variant of clutter_actor_animate(), useful + // for language bindings. + // + // Unlike clutter_actor_animate(), this function will not + // allow you to specify "signal::" names and callbacks. + // + // owned by the #ClutterActor and should not be unreferenced with + // g_object_unref() + // RETURNS: a #ClutterAnimation object. The object is + // : an animation mode logical id + // : duration of the animation, in milliseconds + // : number of property names and values + // : a vector containing the property names to set + // : a vector containing the property values to set + Animation* animatev(c_ulong mode, uint duration, int n_properties, char* properties, GObject2.Value* values) { + return clutter_actor_animatev(&this, mode, duration, n_properties, properties, values); + } + + // Transforms @point in coordinates relative to the actor into + // ancestor-relative coordinates using the relevant transform + // stack (i.e. scale, rotation, etc). + // + // If @ancestor is %NULL the ancestor will be the #ClutterStage. In + // this case, the coordinates returned will be the coordinates on + // the stage before the projection is applied. This is different from + // the behaviour of clutter_actor_apply_transform_to_point(). + // : A #ClutterActor ancestor, or %NULL to use the default #ClutterStage + // : A point as #ClutterVertex + // : The translated #ClutterVertex + void apply_relative_transform_to_point(Actor* ancestor, Vertex* point, /*out*/ Vertex* vertex) { + clutter_actor_apply_relative_transform_to_point(&this, ancestor, point, vertex); + } + + // Transforms @point in coordinates relative to the actor + // into screen-relative coordinates with the current actor + // transformation (i.e. scale, rotation, etc) + // : A point as #ClutterVertex + // : The translated #ClutterVertex + void apply_transform_to_point(Vertex* point, /*out*/ Vertex* vertex) { + clutter_actor_apply_transform_to_point(&this, point, vertex); + } + // Clears the list of actions applied to @self + void clear_actions() { + clutter_actor_clear_actions(&this); + } + // Clears the list of constraints applied to @self + void clear_constraints() { + clutter_actor_clear_constraints(&this); + } + // Clears the list of effects applied to @self + void clear_effects() { + clutter_actor_clear_effects(&this); + } + + // Determines if @descendant is contained inside @self (either as an + // immediate child, or as a deeper descendant). If @self and + // @descendant point to the same actor then it will also return %TRUE. + // RETURNS: whether @descendent is contained within @self + // : A #ClutterActor, possibly contained in @self + int contains(Actor* descendant) { + return clutter_actor_contains(&this, descendant); + } + + // Run the next stage of the paint sequence. This function should only + // be called within the implementation of the ‘run’ virtual of a + // #ClutterEffect. It will cause the run method of the next effect to + // be applied, or it will paint the actual actor if the current effect + // is the last effect in the chain. + void continue_paint() { + clutter_actor_continue_paint(&this); + } + + // Creates a #PangoContext for the given actor. The #PangoContext + // is already configured using the appropriate font map, resolution + // and font options. + // + // See also clutter_actor_get_pango_context(). + // + // Use g_object_unref() on the returned value to deallocate its + // resources + // RETURNS: the newly created #PangoContext. + Pango.Context* /*new*/ create_pango_context() { + return clutter_actor_create_pango_context(&this); + } + + // Creates a new #PangoLayout from the same #PangoContext used + // by the #ClutterActor. The #PangoLayout is already configured + // with the font map, resolution and font options, and the + // given @text. + // + // If you want to keep around a #PangoLayout created by this + // function you will have to connect to the #ClutterBackend::font-changed + // and #ClutterBackend::resolution-changed signals, and call + // pango_layout_context_changed() in response to them. + // + // Use g_object_unref() when done + // RETURNS: the newly created #PangoLayout. + // : (allow-none) the text to set on the #PangoLayout, or %NULL + Pango.Layout* /*new*/ create_pango_layout(char* text) { + return clutter_actor_create_pango_layout(&this, text); + } + + // Destroys an actor. When an actor is destroyed, it will break any + // references it holds to other objects. If the actor is inside a + // container, the actor will be removed. + // + // When you destroy a container, its children will be destroyed as well. + // + // Note: you cannot destroy the #ClutterStage returned by + // clutter_stage_get_default(). + void destroy() { + clutter_actor_destroy(&this); + } + + // Detaches the #ClutterAnimation used by @actor, if clutter_actor_animate() + // has been called on @actor. + // + // Once the animation has been detached, it loses a reference. If it was + // the only reference then the #ClutterAnimation becomes invalid. + // + // The #ClutterAnimation::completed signal will not be emitted. + void detach_animation() { + clutter_actor_detach_animation(&this); + } + + // This function is used to emit an event on the main stage. + // You should rarely need to use this function, except for + // synthetising events. + // + // if the actor handled the event, or %FALSE if the event was + // not handled + // RETURNS: the return value from the signal emission: %TRUE + // : a #ClutterEvent + // : TRUE if event in in capture phase, FALSE otherwise. + int event(Event* event, int capture) { + return clutter_actor_event(&this, event, capture); + } + + // Calculates the transformed screen coordinates of the four corners of + // the actor; the returned vertices relate to the #ClutterActorBox + // coordinates as follows: + // + // v[0] contains (x1, y1) + // v[1] contains (x2, y1) + // v[2] contains (x1, y2) + // v[3] contains (x2, y2) + // + // : Pointer to a location of an array of 4 #ClutterVertex where to store the result. + void get_abs_allocation_vertices(/*out*/ Vertex verts) { + clutter_actor_get_abs_allocation_vertices(&this, verts); + } + + // Returns the accessible object that describes the actor to an + // assistive technology. + // + // If no class-specific #AtkObject implementation is available for the + // actor instance in question, it will inherit an #AtkObject + // implementation from the first ancestor class for which such an + // implementation is defined. + // + // The documentation of the ATK + // library contains more information about accessible objects and + // their uses. + // RETURNS: the #AtkObject associated with @actor + Atk.Object* get_accessible() { + return clutter_actor_get_accessible(&this); + } + + // Retrieves the #ClutterAction with the given name in the list + // of actions applied to @self + // + // name, or %NULL. The returned #ClutterAction is owned by the + // actor and it should not be unreferenced directly + // RETURNS: a #ClutterAction for the given + // : the name of the action to retrieve + Action* get_action(char* name) { + return clutter_actor_get_action(&this, name); + } + + // Retrieves the list of actions applied to @self + // + // of the list of #ClutterActions. The contents of the list are + // owned by the #ClutterActor. Use g_list_free() to free the resources + // allocated by the returned #GList + // RETURNS: a copy + GLib2.List* /*new container*/ get_actions() { + return clutter_actor_get_actions(&this); + } + + // Gets the layout box an actor has been assigned. The allocation can + // only be assumed valid inside a paint() method; anywhere else, it + // may be out-of-date. + // + // An allocation does not incorporate the actor's scale or anchor point; + // those transformations do not affect layout, only rendering. + // + // Do not call any of the clutter_actor_get_allocation_*() family + // of functions inside the implementation of the get_preferred_width() + // or get_preferred_height() virtual functions. + // : the function fills this in with the actor's allocation + void get_allocation_box(/*out*/ ActorBox* box) { + clutter_actor_get_allocation_box(&this, box); + } + + // Gets the layout box an actor has been assigned. The allocation can + // only be assumed valid inside a paint() method; anywhere else, it + // may be out-of-date. + // + // An allocation does not incorporate the actor's scale or anchor point; + // those transformations do not affect layout, only rendering. + // + // The returned rectangle is in pixels. + // : allocation geometry in pixels + void get_allocation_geometry(/*out*/ Geometry* geom) { + clutter_actor_get_allocation_geometry(&this, geom); + } + + // Calculates the transformed coordinates of the four corners of the + // actor in the plane of @ancestor. The returned vertices relate to + // the #ClutterActorBox coordinates as follows: + // + // @verts[0] contains (x1, y1) + // @verts[1] contains (x2, y1) + // @verts[2] contains (x1, y2) + // @verts[3] contains (x2, y2) + // + // + // If @ancestor is %NULL the ancestor will be the #ClutterStage. In + // this case, the coordinates returned will be the coordinates on + // the stage before the projection is applied. This is different from + // the behaviour of clutter_actor_get_abs_allocation_vertices(). + // : A #ClutterActor to calculate the vertices against, or %NULL to use the #ClutterStage + // : return location for an array of 4 #ClutterVertex in which to store the result + void get_allocation_vertices(Actor* ancestor, /*out*/ Vertex verts) { + clutter_actor_get_allocation_vertices(&this, ancestor, verts); + } + + // Gets the current anchor point of the @actor in pixels. + // : return location for the X coordinate of the anchor point + // : return location for the Y coordinate of the anchor point + void get_anchor_point(/*out*/ float* anchor_x, /*out*/ float* anchor_y) { + clutter_actor_get_anchor_point(&this, anchor_x, anchor_y); + } + + // Retrieves the anchor position expressed as a #ClutterGravity. If + // the anchor point was specified using pixels or units this will + // return %CLUTTER_GRAVITY_NONE. + // RETURNS: the #ClutterGravity used by the anchor point + Gravity get_anchor_point_gravity() { + return clutter_actor_get_anchor_point_gravity(&this); + } + + // Retrieves the #ClutterAnimation used by @actor, if clutter_actor_animate() + // has been called on @actor. + // RETURNS: a #ClutterAnimation, or %NULL + Animation* get_animation() { + return clutter_actor_get_animation(&this); + } + + // Gets the clip area for @self, if any is set + // : return location for the X offset of the clip rectangle, or %NULL + // : return location for the Y offset of the clip rectangle, or %NULL + // : return location for the width of the clip rectangle, or %NULL + // : return location for the height of the clip rectangle, or %NULL + void get_clip(/*out*/ float* xoff=null, /*out*/ float* yoff=null, /*out*/ float* width=null, /*out*/ float* height=null) { + clutter_actor_get_clip(&this, xoff, yoff, width, height); + } + + // Retrieves the value set using clutter_actor_set_clip_to_allocation() + // RETURNS: %TRUE if the #ClutterActor is clipped to its allocation + int get_clip_to_allocation() { + return clutter_actor_get_clip_to_allocation(&this); + } + + // Retrieves the #ClutterConstraint with the given name in the list + // of constraints applied to @self + // + // name, or %NULL. The returned #ClutterConstraint is owned by the + // actor and it should not be unreferenced directly + // RETURNS: a #ClutterConstraint for the given + // : the name of the constraint to retrieve + Constraint* get_constraint(char* name) { + return clutter_actor_get_constraint(&this, name); + } + + // Retrieves the list of constraints applied to @self + // + // of the list of #ClutterConstraints. The contents of the list are + // owned by the #ClutterActor. Use g_list_free() to free the resources + // allocated by the returned #GList + // RETURNS: a copy + GLib2.List* /*new container*/ get_constraints() { + return clutter_actor_get_constraints(&this); + } + + // Retrieves the depth of @self. + // RETURNS: the depth of the actor + float get_depth() { + return clutter_actor_get_depth(&this); + } + + // Retrieves the #ClutterEffect with the given name in the list + // of effects applied to @self + // + // name, or %NULL. The returned #ClutterEffect is owned by the + // actor and it should not be unreferenced directly + // RETURNS: a #ClutterEffect for the given + // : the name of the effect to retrieve + Effect* get_effect(char* name) { + return clutter_actor_get_effect(&this, name); + } + + // Retrieves the #ClutterEffects applied on @self, if any + // + // of #ClutterEffects, or %NULL. The elements of the returned + // list are owned by Clutter and they should not be freed. You should + // free the returned list using g_list_free() when done + // RETURNS: a list + GLib2.List* /*new container*/ get_effects() { + return clutter_actor_get_effects(&this); + } + + // Checks whether an actor has a fixed position set (and will thus be + // unaffected by any layout manager). + // RETURNS: %TRUE if the fixed position is set on the actor + int get_fixed_position_set() { + return clutter_actor_get_fixed_position_set(&this); + } + + // Retrieves the flags set on @self + // RETURNS: a bitwise or of #ClutterActorFlags or 0 + ActorFlags get_flags() { + return clutter_actor_get_flags(&this); + } + + // Gets the size and position of an actor relative to its parent + // actor. This is the same as calling clutter_actor_get_position() and + // clutter_actor_get_size(). It tries to "do what you mean" and get the + // requested size and position if the actor's allocation is invalid. + // : A location to store actors #ClutterGeometry + void get_geometry(/*out*/ Geometry* geometry) { + clutter_actor_get_geometry(&this, geometry); + } + + // Retrieves the unique id for @self. + // RETURNS: Globally unique value for this object instance. + uint get_gid() { + return clutter_actor_get_gid(&this); + } + + // Retrieves the height of a #ClutterActor. + // + // If the actor has a valid allocation, this function will return the + // height of the allocated area given to the actor. + // + // If the actor does not have a valid allocation, this function will + // return the actor's natural height, that is the preferred height of + // the actor. + // + // If you care whether you get the preferred height or the height that + // has been assigned to the actor, you should probably call a different + // function like clutter_actor_get_allocation_box() to retrieve the + // allocated size or clutter_actor_get_preferred_height() to retrieve the + // preferred height. + // + // If an actor has a fixed height, for instance a height that has been + // assigned using clutter_actor_set_height(), the height returned will + // be the same value. + // RETURNS: the height of the actor, in pixels + float get_height() { + return clutter_actor_get_height(&this); + } + + // Retrieves the name of @self. + // + // owned by the actor and should not be modified or freed. + // RETURNS: the name of the actor, or %NULL. The returned string is + char* get_name() { + return clutter_actor_get_name(&this); + } + + // Retrieves whether to redirect the actor to an offscreen buffer, as + // set by clutter_actor_set_offscreen_redirect(). + // RETURNS: the value of the offscreen-redirect property of the actor + OffscreenRedirect get_offscreen_redirect() { + return clutter_actor_get_offscreen_redirect(&this); + } + + // Retrieves the opacity value of an actor, as set by + // clutter_actor_set_opacity(). + // + // For retrieving the absolute opacity of the actor inside a paint + // virtual function, see clutter_actor_get_paint_opacity(). + // RETURNS: the opacity of the actor + ubyte get_opacity() { + return clutter_actor_get_opacity(&this); + } + + // Retrieves the paint volume of the passed #ClutterActor, and + // transforms it into a 2D bounding box in stage coordinates. + // + // This function is useful to determine the on screen area occupied by + // the actor. The box is only an approximation and may often be + // considerably larger due to the optimizations used to calculate the + // box. The box is never smaller though, so it can reliably be used + // for culling. + // + // There are times when a 2D paint box can't be determined, e.g. + // because the actor isn't yet parented under a stage or because + // the actor is unable to determine a paint volume. + // + // %FALSE. + // RETURNS: %TRUE if a 2D paint box could be determined, else + // : return location for a #ClutterActorBox + int get_paint_box(/*out*/ ActorBox* box) { + return clutter_actor_get_paint_box(&this, box); + } + + // Retrieves the absolute opacity of the actor, as it appears on the stage. + // + // This function traverses the hierarchy chain and composites the opacity of + // the actor with that of its parents. + // + // This function is intended for subclasses to use in the paint virtual + // function, to paint themselves with the correct opacity. + // RETURNS: The actor opacity value. + ubyte get_paint_opacity() { + return clutter_actor_get_paint_opacity(&this); + } + + // Retrieves the 'paint' visibility of an actor recursively checking for non + // visible parents. + // + // This is by definition the same as CLUTTER_ACTOR_IS_MAPPED(). + // RETURNS: TRUE if the actor is visibile and will be painted. + int get_paint_visibility() { + return clutter_actor_get_paint_visibility(&this); + } + + // Retrieves the paint volume of the passed #ClutterActor, or %NULL + // when a paint volume can't be determined. + // + // The paint volume is defined as the 3D space occupied by an actor + // when being painted. + // + // This function will call the get_paint_volume() + // virtual function of the #ClutterActor class. Sub-classes of #ClutterActor + // should not usually care about overriding the default implementation, + // unless they are, for instance: painting outside their allocation, or + // actors with a depth factor (not in terms of #ClutterActor:depth but real + // 3D depth). + // + // 2D actors overriding get_paint_volume() + // ensure their volume has a depth of 0. (This will be true so long as + // you don't call clutter_paint_volume_set_depth().) + // + // or %NULL if no volume could be determined. + // RETURNS: a pointer to a #ClutterPaintVolume + PaintVolume* get_paint_volume() { + return clutter_actor_get_paint_volume(&this); + } + + // Retrieves the #PangoContext for @self. The actor's #PangoContext + // is already configured using the appropriate font map, resolution + // and font options. + // + // Unlike clutter_actor_create_pango_context(), this context is owend + // by the #ClutterActor and it will be updated each time the options + // stored by the #ClutterBackend change. + // + // You can use the returned #PangoContext to create a #PangoLayout + // and render text using cogl_pango_render_layout() to reuse the + // glyphs cache also used by Clutter. + // + // The returned #PangoContext is owned by the actor and should not be + // unreferenced by the application code + // RETURNS: the #PangoContext for a #ClutterActor. + Pango.Context* get_pango_context() { + return clutter_actor_get_pango_context(&this); + } + + // Retrieves the parent of @self. + // + // if no parent is set + // RETURNS: The #ClutterActor parent, or %NULL + Actor* get_parent() { + return clutter_actor_get_parent(&this); + } + + // This function tries to "do what you mean" and tell you where the + // actor is, prior to any transformations. Retrieves the fixed + // position of an actor in pixels, if one has been set; otherwise, if + // the allocation is valid, returns the actor's allocated position; + // otherwise, returns 0,0. + // + // The returned position is in pixels. + // : return location for the X coordinate, or %NULL + // : return location for the Y coordinate, or %NULL + void get_position(/*out*/ float* x=null, /*out*/ float* y=null) { + clutter_actor_get_position(&this, x, y); + } + + // Computes the requested minimum and natural heights for an actor, + // or if they are already computed, returns the cached values. + // + // An actor may not get its request - depending on the layout + // manager that's in effect. + // + // A request should not incorporate the actor's scale or anchor point; + // those transformations do not affect layout, only rendering. + // : available width to assume in computing desired height, or a negative value to indicate that no width is defined + // : return location for minimum height, or %NULL + // : return location for natural height, or %NULL + void get_preferred_height(float for_width, /*out*/ float* min_height_p=null, /*out*/ float* natural_height_p=null) { + clutter_actor_get_preferred_height(&this, for_width, min_height_p, natural_height_p); + } + + // Computes the preferred minimum and natural size of an actor, taking into + // account the actor's geometry management (either height-for-width + // or width-for-height). + // + // The width and height used to compute the preferred height and preferred + // width are the actor's natural ones. + // + // If you need to control the height for the preferred width, or the width for + // the preferred height, you should use clutter_actor_get_preferred_width() + // and clutter_actor_get_preferred_height(), and check the actor's preferred + // geometry management using the #ClutterActor:request-mode property. + // : return location for the minimum width, or %NULL + // : return location for the minimum height, or %NULL + // : return location for the natural width, or %NULL + // : return location for the natural height, or %NULL + void get_preferred_size(/*out*/ float* min_width_p=null, /*out*/ float* min_height_p=null, /*out*/ float* natural_width_p=null, /*out*/ float* natural_height_p=null) { + clutter_actor_get_preferred_size(&this, min_width_p, min_height_p, natural_width_p, natural_height_p); + } + + // Computes the requested minimum and natural widths for an actor, + // optionally depending on the specified height, or if they are + // already computed, returns the cached values. + // + // An actor may not get its request - depending on the layout + // manager that's in effect. + // + // A request should not incorporate the actor's scale or anchor point; + // those transformations do not affect layout, only rendering. + // : available height when computing the preferred width, or a negative value to indicate that no height is defined + // : return location for minimum width, or %NULL + // : return location for the natural width, or %NULL + void get_preferred_width(float for_height, /*out*/ float* min_width_p=null, /*out*/ float* natural_width_p=null) { + clutter_actor_get_preferred_width(&this, for_height, min_width_p, natural_width_p); + } + + // Checks whether @actor is marked as reactive. + // RETURNS: %TRUE if the actor is reactive + int get_reactive() { + return clutter_actor_get_reactive(&this); + } + + // Retrieves the geometry request mode of @self + // RETURNS: the request mode for the actor + RequestMode get_request_mode() { + return clutter_actor_get_request_mode(&this); + } + + // Retrieves the angle and center of rotation on the given axis, + // set using clutter_actor_set_rotation(). + // RETURNS: the angle of rotation + // : the axis of rotation + // : return value for the X coordinate of the center of rotation + // : return value for the Y coordinate of the center of rotation + // : return value for the Z coordinate of the center of rotation + double get_rotation(RotateAxis axis, /*out*/ float* x, /*out*/ float* y, /*out*/ float* z) { + return clutter_actor_get_rotation(&this, axis, x, y, z); + } + + // Retrieves an actors scale factors. + // : Location to store horizonal scale factor, or %NULL. + // : Location to store vertical scale factor, or %NULL. + void get_scale(/*out*/ double* scale_x=null, /*out*/ double* scale_y=null) { + clutter_actor_get_scale(&this, scale_x, scale_y); + } + + // Retrieves the scale center coordinate in pixels relative to the top + // left corner of the actor. If the scale center was specified using a + // #ClutterGravity this will calculate the pixel offset using the + // current size of the actor. + // : Location to store the X position of the scale center, or %NULL. + // : Location to store the Y position of the scale center, or %NULL. + void get_scale_center(/*out*/ float* center_x=null, /*out*/ float* center_y=null) { + clutter_actor_get_scale_center(&this, center_x, center_y); + } + + // Retrieves the scale center as a compass direction. If the scale + // center was specified in pixels or units this will return + // %CLUTTER_GRAVITY_NONE. + // RETURNS: the scale gravity + Gravity get_scale_gravity() { + return clutter_actor_get_scale_gravity(&this); + } + + // Queries the currently set #ClutterShader on @self. + // + // or %NULL if no shader is set. + // RETURNS: The currently set #ClutterShader + Shader* get_shader() { + return clutter_actor_get_shader(&this); + } + + // This function tries to "do what you mean" and return + // the size an actor will have. If the actor has a valid + // allocation, the allocation will be returned; otherwise, + // the actors natural size request will be returned. + // + // If you care whether you get the request vs. the allocation, you + // should probably call a different function like + // clutter_actor_get_allocation_box() or + // clutter_actor_get_preferred_width(). + // : return location for the width, or %NULL. + // : return location for the height, or %NULL. + void get_size(/*out*/ float* width=null, /*out*/ float* height=null) { + clutter_actor_get_size(&this, width, height); + } + + // Retrieves the #ClutterStage where @actor is contained. + // + // containing the actor, or %NULL + // RETURNS: the stage + Actor* get_stage() { + return clutter_actor_get_stage(&this); + } + + // Retrieves the value set using clutter_actor_set_text_direction() + // + // If no text direction has been previously set, the default text + // direction, as returned by clutter_get_default_text_direction(), will + // be returned instead + // RETURNS: the #ClutterTextDirection for the actor + TextDirection get_text_direction() { + return clutter_actor_get_text_direction(&this); + } + + // Retrieves the transformations applied to @self relative to its + // parent. + // : the return location for a #CoglMatrix + void get_transformation_matrix(/*out*/ Cogl.Matrix* matrix) { + clutter_actor_get_transformation_matrix(&this, matrix); + } + + // Retrieves the 3D paint volume of an actor like + // clutter_actor_get_paint_volume() does (Please refer to the + // documentation of clutter_actor_get_paint_volume() for more + // details.) and it additionally transforms the paint volume into the + // coordinate space of @relative_to_ancestor. (Or the stage if %NULL + // is passed for @relative_to_ancestor) + // + // This can be used by containers that base their paint volume on + // the volume of their children. Such containers can query the + // transformed paint volume of all of its children and union them + // together using clutter_paint_volume_union(). + // + // or %NULL if no volume could be determined. + // RETURNS: a pointer to a #ClutterPaintVolume + // : A #ClutterActor that is an ancestor of @self (or %NULL for the stage) + PaintVolume* get_transformed_paint_volume(Actor* relative_to_ancestor) { + return clutter_actor_get_transformed_paint_volume(&this, relative_to_ancestor); + } + + // Gets the absolute position of an actor, in pixels relative to the stage. + // : return location for the X coordinate, or %NULL + // : return location for the Y coordinate, or %NULL + void get_transformed_position(/*out*/ float* x=null, /*out*/ float* y=null) { + clutter_actor_get_transformed_position(&this, x, y); + } + + // Gets the absolute size of an actor in pixels, taking into account the + // scaling factors. + // + // If the actor has a valid allocation, the allocated size will be used. + // If the actor has not a valid allocation then the preferred size will + // be transformed and returned. + // + // If you want the transformed allocation, see + // clutter_actor_get_abs_allocation_vertices() instead. + // + // When the actor (or one of its ancestors) is rotated around the + // X or Y axis, it no longer appears as on the stage as a rectangle, but + // as a generic quadrangle; in that case this function returns the size + // of the smallest rectangle that encapsulates the entire quad. Please + // note that in this case no assumptions can be made about the relative + // position of this envelope to the absolute position of the actor, as + // returned by clutter_actor_get_transformed_position(); if you need this + // information, you need to use clutter_actor_get_abs_allocation_vertices() + // to get the coords of the actual quadrangle. + // : return location for the width, or %NULL + // : return location for the height, or %NULL + void get_transformed_size(/*out*/ float* width=null, /*out*/ float* height=null) { + clutter_actor_get_transformed_size(&this, width, height); + } + + // Retrieves the width of a #ClutterActor. + // + // If the actor has a valid allocation, this function will return the + // width of the allocated area given to the actor. + // + // If the actor does not have a valid allocation, this function will + // return the actor's natural width, that is the preferred width of + // the actor. + // + // If you care whether you get the preferred width or the width that + // has been assigned to the actor, you should probably call a different + // function like clutter_actor_get_allocation_box() to retrieve the + // allocated size or clutter_actor_get_preferred_width() to retrieve the + // preferred width. + // + // If an actor has a fixed width, for instance a width that has been + // assigned using clutter_actor_set_width(), the width returned will + // be the same value. + // RETURNS: the width of the actor, in pixels + float get_width() { + return clutter_actor_get_width(&this); + } + + // Retrieves the X coordinate of a #ClutterActor. + // + // This function tries to "do what you mean", by returning the + // correct value depending on the actor's state. + // + // If the actor has a valid allocation, this function will return + // the X coordinate of the origin of the allocation box. + // + // If the actor has any fixed coordinate set using clutter_actor_set_x(), + // clutter_actor_set_position() or clutter_actor_set_geometry(), this + // function will return that coordinate. + // + // If both the allocation and a fixed position are missing, this function + // will return 0. + // + // transformation (i.e. scaling, rotation) + // RETURNS: the X coordinate, in pixels, ignoring any + float get_x() { + return clutter_actor_get_x(&this); + } + + // Retrieves the Y coordinate of a #ClutterActor. + // + // This function tries to "do what you mean", by returning the + // correct value depending on the actor's state. + // + // If the actor has a valid allocation, this function will return + // the Y coordinate of the origin of the allocation box. + // + // If the actor has any fixed coordinate set using clutter_actor_set_y(), + // clutter_actor_set_position() or clutter_actor_set_geometry(), this + // function will return that coordinate. + // + // If both the allocation and a fixed position are missing, this function + // will return 0. + // + // transformation (i.e. scaling, rotation) + // RETURNS: the Y coordinate, in pixels, ignoring any + float get_y() { + return clutter_actor_get_y(&this); + } + + // Retrieves the center for the rotation around the Z axis as a + // compass direction. If the center was specified in pixels or units + // this will return %CLUTTER_GRAVITY_NONE. + // RETURNS: the Z rotation center + Gravity get_z_rotation_gravity() { + return clutter_actor_get_z_rotation_gravity(&this); + } + + // Sets the key focus of the #ClutterStage including @self + // to this #ClutterActor. + void grab_key_focus() { + clutter_actor_grab_key_focus(&this); + } + + // Checks if the actor has an up-to-date allocation assigned to + // it. This means that the actor should have an allocation: it's + // visible and has a parent. It also means that there is no + // outstanding relayout request in progress for the actor or its + // children (There might be other outstanding layout requests in + // progress that will cause the actor to get a new allocation + // when the stage is laid out, however). + // + // If this function returns %FALSE, then the actor will normally + // be allocated before it is next drawn on the screen. + // RETURNS: %TRUE if the actor has an up-to-date allocation + int has_allocation() { + return clutter_actor_has_allocation(&this); + } + + // Determines whether the actor has a clip area set or not. + // RETURNS: %TRUE if the actor has a clip area set. + int has_clip() { + return clutter_actor_has_clip(&this); + } + + // Checks whether @self is the #ClutterActor that has key focus + // RETURNS: %TRUE if the actor has key focus, and %FALSE otherwise + int has_key_focus() { + return clutter_actor_has_key_focus(&this); + } + + // Asks the actor's implementation whether it may contain overlapping + // primitives. + // + // For example; Clutter may use this to determine whether the painting + // should be redirected to an offscreen buffer to correctly implement + // the opacity property. + // + // Custom actors can override the default response by implementing the + // #ClutterActor has_overlaps virtual function. See + // clutter_actor_set_offscreen_redirect() for more information. + // + // %FALSE otherwise + // RETURNS: %TRUE if the actor may have overlapping primitives, and + int has_overlaps() { + return clutter_actor_has_overlaps(&this); + } + + // Checks whether an actor contains the pointer of a + // #ClutterInputDevice + // + // %FALSE otherwise + // RETURNS: %TRUE if the actor contains the pointer, and + int has_pointer() { + return clutter_actor_has_pointer(&this); + } + + // Flags an actor to be hidden. A hidden actor will not be + // rendered on the stage. + // + // Actors are visible by default. + // + // If this function is called on an actor without a parent, the + // #ClutterActor:show-on-set-parent property will be set to %FALSE + // as a side-effect. + void hide() { + clutter_actor_hide(&this); + } + // Calls clutter_actor_hide() on all child actors (if any). + void hide_all() { + clutter_actor_hide_all(&this); + } + + // Checks whether @self is being currently painted by a #ClutterClone + // + // This function is useful only inside the ::paint virtual function + // implementations or within handlers for the #ClutterActor::paint + // signal + // + // This function should not be used by applications + // + // by a #ClutterClone, and %FALSE otherwise + // RETURNS: %TRUE if the #ClutterActor is currently being painted + int is_in_clone_paint() { + return clutter_actor_is_in_clone_paint(&this); + } + + // Checks whether any rotation is applied to the actor. + // RETURNS: %TRUE if the actor is rotated. + int is_rotated() { + return clutter_actor_is_rotated(&this); + } + + // Checks whether the actor is scaled in either dimension. + // RETURNS: %TRUE if the actor is scaled. + int is_scaled() { + return clutter_actor_is_scaled(&this); + } + + // Puts @self below @above. + // + // Both actors must have the same parent, and the parent must implement + // the #ClutterContainer interface. + // + // This function is the equivalent of clutter_container_lower_child(). + // : A #ClutterActor to lower below + void lower(Actor* above=null) { + clutter_actor_lower(&this, above); + } + + // Lowers @self to the bottom. + // + // This function calls clutter_actor_lower() internally. + void lower_bottom() { + clutter_actor_lower_bottom(&this); + } + + // Sets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly maps + // and realizes its children if they are visible. Does nothing if the + // actor is not visible. + // + // Calling this is allowed in only one case: you are implementing the + // #ClutterActor map() virtual function in an actor + // and you need to map the children of that actor. It is not necessary + // to call this if you implement #ClutterContainer because the default + // implementation will automatically map children of containers. + // + // When overriding map, it is mandatory to chain up to the parent + // implementation. + void map() { + clutter_actor_map(&this); + } + + // Sets an anchor point for the actor, and adjusts the actor postion so that + // the relative position of the actor toward its parent remains the same. + // : X coordinate of the anchor point + // : Y coordinate of the anchor point + void move_anchor_point(float anchor_x, float anchor_y) { + clutter_actor_move_anchor_point(&this, anchor_x, anchor_y); + } + + // Sets an anchor point on the actor based on the given gravity, adjusting the + // actor postion so that its relative position within its parent remains + // unchanged. + // + // Since version 1.0 the anchor point will be stored as a gravity so + // that if the actor changes size then the anchor point will move. For + // example, if you set the anchor point to %CLUTTER_GRAVITY_SOUTH_EAST + // and later double the size of the actor, the anchor point will move + // to the bottom right. + // : #ClutterGravity. + void move_anchor_point_from_gravity(Gravity gravity) { + clutter_actor_move_anchor_point_from_gravity(&this, gravity); + } + + // Moves an actor by the specified distance relative to its current + // position in pixels. + // + // This function modifies the fixed position of an actor and thus removes + // it from any layout management. Another way to move an actor is with an + // anchor point, see clutter_actor_set_anchor_point(). + // : Distance to move Actor on X axis. + // : Distance to move Actor on Y axis. + void move_by(float dx, float dy) { + clutter_actor_move_by(&this, dx, dy); + } + + // Renders the actor to display. + // + // This function should not be called directly by applications. + // Call clutter_actor_queue_redraw() to queue paints, instead. + // + // This function is context-aware, and will either cause a + // regular paint or a pick paint. + // + // This function will emit the #ClutterActor::paint signal or + // the #ClutterActor::pick signal, depending on the context. + // + // This function does not paint the actor if the actor is set to 0, + // unless it is performing a pick paint. + void paint() { + clutter_actor_paint(&this); + } + // Disables the effects of clutter_actor_push_internal() + void pop_internal() { + clutter_actor_pop_internal(&this); + } + + // Should be used by actors implementing the #ClutterContainer and with + // internal children added through clutter_actor_set_parent(), for instance: + // + // |[ + // static void + // my_actor_init (MyActor *self) + // { + // self->priv = SELF_ACTOR_GET_PRIVATE (self); + // + // clutter_actor_push_internal (CLUTTER_ACTOR (self)); + // + // /* calling clutter_actor_set_parent() now will result in + // * the internal flag being set on a child of MyActor + // */ + // + // /* internal child - a background texture */ + // self->priv->background_tex = clutter_texture_new (); + // clutter_actor_set_parent (self->priv->background_tex, + // CLUTTER_ACTOR (self)); + // + // /* internal child - a label */ + // self->priv->label = clutter_text_new (); + // clutter_actor_set_parent (self->priv->label, + // CLUTTER_ACTOR (self)); + // + // clutter_actor_pop_internal (CLUTTER_ACTOR (self)); + // + // /* calling clutter_actor_set_parent() now will not result in + // * the internal flag being set on a child of MyActor + // */ + // } + // ]| + // + // This function will be used by Clutter to toggle an "internal child" + // flag whenever clutter_actor_set_parent() is called; internal children + // are handled differently by Clutter, specifically when destroying their + // parent. + // + // Call clutter_actor_pop_internal() when you finished adding internal + // children. + // + // Nested calls to clutter_actor_push_internal() are allowed, but each + // one must by followed by a clutter_actor_pop_internal() call. + void push_internal() { + clutter_actor_push_internal(&this); + } + + // Queues up a redraw of an actor and any children. The redraw occurs + // once the main loop becomes idle (after the current batch of events + // has been processed, roughly). + // + // Applications rarely need to call this, as redraws are handled + // automatically by modification functions. + // + // This function will not do anything if @self is not visible, or + // if the actor is inside an invisible part of the scenegraph. + // + // Also be aware that painting is a NOP for actors with an opacity of + // 0 + // + // When you are implementing a custom actor you must queue a redraw + // whenever some private state changes that will affect painting or + // picking of your actor. + void queue_redraw() { + clutter_actor_queue_redraw(&this); + } + + // Indicates that the actor's size request or other layout-affecting + // properties may have changed. This function is used inside #ClutterActor + // subclass implementations, not by applications directly. + // + // Queueing a new layout automatically queues a redraw as well. + void queue_relayout() { + clutter_actor_queue_relayout(&this); + } + + // Puts @self above @below. + // + // Both actors must have the same parent, and the parent must implement + // the #ClutterContainer interface + // + // This function is the equivalent of clutter_container_raise_child(). + // : A #ClutterActor to raise above. + void raise(Actor* below=null) { + clutter_actor_raise(&this, below); + } + + // Raises @self to the top. + // + // This function calls clutter_actor_raise() internally. + void raise_top() { + clutter_actor_raise_top(&this); + } + + // Realization informs the actor that it is attached to a stage. It + // can use this to allocate resources if it wanted to delay allocation + // until it would be rendered. However it is perfectly acceptable for + // an actor to create resources before being realized because Clutter + // only ever has a single rendering context so that actor is free to + // be moved from one stage to another. + // + // This function does nothing if the actor is already realized. + // + // Because a realized actor must have realized parent actors, calling + // clutter_actor_realize() will also realize all parents of the actor. + // + // This function does not realize child actors, except in the special + // case that realizing the stage, when the stage is visible, will + // suddenly map (and thus realize) the children of the stage. + void realize() { + clutter_actor_realize(&this); + } + + // Removes @action from the list of actions applied to @self + // + // The reference held by @self on the #ClutterAction will be released + // : a #ClutterAction + void remove_action(Action* action) { + clutter_actor_remove_action(&this, action); + } + + // Removes the #ClutterAction with the given name from the list + // of actions applied to @self + // : the name of the action to remove + void remove_action_by_name(char* name) { + clutter_actor_remove_action_by_name(&this, name); + } + // Removes clip area from @self. + void remove_clip() { + clutter_actor_remove_clip(&this); + } + + // Removes @constraint from the list of constraints applied to @self + // + // The reference held by @self on the #ClutterConstraint will be released + // : a #ClutterConstraint + void remove_constraint(Constraint* constraint) { + clutter_actor_remove_constraint(&this, constraint); + } + + // Removes the #ClutterConstraint with the given name from the list + // of constraints applied to @self + // : the name of the constraint to remove + void remove_constraint_by_name(char* name) { + clutter_actor_remove_constraint_by_name(&this, name); + } + + // Removes @effect from the list of effects applied to @self + // + // The reference held by @self on the #ClutterEffect will be released + // : a #ClutterEffect + void remove_effect(Effect* effect) { + clutter_actor_remove_effect(&this, effect); + } + + // Removes the #ClutterEffect with the given name from the list + // of effects applied to @self + // : the name of the effect to remove + void remove_effect_by_name(char* name) { + clutter_actor_remove_effect_by_name(&this, name); + } + + // This function resets the parent actor of @self. It is + // logically equivalent to calling clutter_actor_unparent() + // and clutter_actor_set_parent(), but more efficiently + // implemented, ensures the child is not finalized + // when unparented, and emits the parent-set signal only + // one time. + // : the new #ClutterActor parent + void reparent(Actor* new_parent) { + clutter_actor_reparent(&this, new_parent); + } + + // Sets an anchor point for @self. The anchor point is a point in the + // coordinate space of an actor to which the actor position within its + // parent is relative; the default is (0, 0), i.e. the top-left corner + // of the actor. + // : X coordinate of the anchor point + // : Y coordinate of the anchor point + void set_anchor_point(float anchor_x, float anchor_y) { + clutter_actor_set_anchor_point(&this, anchor_x, anchor_y); + } + + // Sets an anchor point on the actor, based on the given gravity (this is a + // convenience function wrapping clutter_actor_set_anchor_point()). + // + // Since version 1.0 the anchor point will be stored as a gravity so + // that if the actor changes size then the anchor point will move. For + // example, if you set the anchor point to %CLUTTER_GRAVITY_SOUTH_EAST + // and later double the size of the actor, the anchor point will move + // to the bottom right. + // : #ClutterGravity. + void set_anchor_point_from_gravity(Gravity gravity) { + clutter_actor_set_anchor_point_from_gravity(&this, gravity); + } + + // Sets clip area for @self. The clip area is always computed from the + // upper left corner of the actor, even if the anchor point is set + // otherwise. + // : X offset of the clip rectangle + // : Y offset of the clip rectangle + // : Width of the clip rectangle + // : Height of the clip rectangle + void set_clip(float xoff, float yoff, float width, float height) { + clutter_actor_set_clip(&this, xoff, yoff, width, height); + } + + // Sets whether @self should be clipped to the same size as its + // allocation + // : %TRUE to apply a clip tracking the allocation + void set_clip_to_allocation(int clip_set) { + clutter_actor_set_clip_to_allocation(&this, clip_set); + } + + // Sets the Z coordinate of @self to @depth. + // + // The unit used by @depth is dependant on the perspective setup. See + // also clutter_stage_set_perspective(). + // : Z co-ord + void set_depth(float depth) { + clutter_actor_set_depth(&this, depth); + } + + // Sets whether an actor has a fixed position set (and will thus be + // unaffected by any layout manager). + // : whether to use fixed position + void set_fixed_position_set(int is_set) { + clutter_actor_set_fixed_position_set(&this, is_set); + } + + // Sets @flags on @self + // + // This function will emit notifications for the changed properties + // : the flags to set + void set_flags(ActorFlags flags) { + clutter_actor_set_flags(&this, flags); + } + + // Sets the actor's fixed position and forces its minimum and natural + // size, in pixels. This means the untransformed actor will have the + // given geometry. This is the same as calling clutter_actor_set_position() + // and clutter_actor_set_size(). + // : A #ClutterGeometry + void set_geometry(Geometry* geometry) { + clutter_actor_set_geometry(&this, geometry); + } + + // Forces a height on an actor, causing the actor's preferred width + // and height (if any) to be ignored. + // + // If @height is -1 the actor will use its preferred height instead of + // overriding it, i.e. you can "unset" the height with -1. + // + // This function sets both the minimum and natural size of the actor. + // : Requested new height for the actor, in pixels, or -1 + void set_height(float height) { + clutter_actor_set_height(&this, height); + } + + // Sets the given name to @self. The name can be used to identify + // a #ClutterActor. + // : Textual tag to apply to actor + void set_name(char* name) { + clutter_actor_set_name(&this, name); + } + + // Defines the circumstances where the actor should be redirected into + // an offscreen image. The offscreen image is used to flatten the + // actor into a single image while painting for two main reasons. + // Firstly, when the actor is painted a second time without any of its + // contents changing it can simply repaint the cached image without + // descending further down the actor hierarchy. Secondly, it will make + // the opacity look correct even if there are overlapping primitives + // in the actor. + // + // Caching the actor could in some cases be a performance win and in + // some cases be a performance lose so it is important to determine + // which value is right for an actor before modifying this value. For + // example, there is never any reason to flatten an actor that is just + // a single texture (such as a #ClutterTexture) because it is + // effectively already cached in an image so the offscreen would be + // redundant. Also if the actor contains primitives that are far apart + // with a large transparent area in the middle (such as a large + // CluterGroup with a small actor in the top left and a small actor in + // the bottom right) then the cached image will contain the entire + // image of the large area and the paint will waste time blending all + // of the transparent pixels in the middle. + // + // The default method of implementing opacity on a container simply + // forwards on the opacity to all of the children. If the children are + // overlapping then it will appear as if they are two separate glassy + // objects and there will be a break in the color where they + // overlap. By redirecting to an offscreen buffer it will be as if the + // two opaque objects are combined into one and then made transparent + // which is usually what is expected. + // + // The image below demonstrates the difference between redirecting and + // not. The image shows two Clutter groups, each containing a red and + // a green rectangle which overlap. The opacity on the group is set to + // 128 (which is 50%). When the offscreen redirect is not used, the + // red rectangle can be seen through the blue rectangle as if the two + // rectangles were separately transparent. When the redirect is used + // the group as a whole is transparent instead so the red rectangle is + // not visible where they overlap. + // + //
+ // Sample of using an offscreen redirect for transparency + // + //
+ // + // The default value for this property is 0, so we effectively will + // never redirect an actor offscreen by default. This means that there + // are times that transparent actors may look glassy as described + // above. The reason this is the default is because there is a + // performance trade off between quality and performance here. In many + // cases the default form of glassy opacity looks good enough, but if + // it's not you will need to set the + // %CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY flag to enable + // redirection for opacity. + // + // Custom actors that don't contain any overlapping primitives are + // recommended to override the has_overlaps() virtual to return %FALSE + // for maximum efficiency. + // : New offscreen redirect flags for the actor. + void set_offscreen_redirect(OffscreenRedirect redirect) { + clutter_actor_set_offscreen_redirect(&this, redirect); + } + + // Sets the actor's opacity, with zero being completely transparent and + // 255 (0xff) being fully opaque. + // : New opacity value for the actor. + void set_opacity(ubyte opacity) { + clutter_actor_set_opacity(&this, opacity); + } + + // Sets the parent of @self to @parent. The opposite function is + // clutter_actor_unparent(). + // + // This function should not be used by applications, but by custom + // container actor subclasses. + // : A new #ClutterActor parent + void set_parent(Actor* parent) { + clutter_actor_set_parent(&this, parent); + } + + // Sets the actor's fixed position in pixels relative to any parent + // actor. + // + // If a layout manager is in use, this position will override the + // layout manager and force a fixed position. + // : New left position of actor in pixels. + // : New top position of actor in pixels. + void set_position(float x, float y) { + clutter_actor_set_position(&this, x, y); + } + + // Sets @actor as reactive. Reactive actors will receive events. + // : whether the actor should be reactive to events + void set_reactive(int reactive) { + clutter_actor_set_reactive(&this, reactive); + } + + // Sets the geometry request mode of @self. + // + // The @mode determines the order for invoking + // clutter_actor_get_preferred_width() and + // clutter_actor_get_preferred_height() + // : the request mode + void set_request_mode(RequestMode mode) { + clutter_actor_set_request_mode(&this, mode); + } + + // Sets the rotation angle of @self around the given axis. + // + // The rotation center coordinates used depend on the value of @axis: + // + // %CLUTTER_X_AXIS requires @y and @z + // %CLUTTER_Y_AXIS requires @x and @z + // %CLUTTER_Z_AXIS requires @x and @y + // + // + // The rotation coordinates are relative to the anchor point of the + // actor, set using clutter_actor_set_anchor_point(). If no anchor + // point is set, the upper left corner is assumed as the origin. + // : the axis of rotation + // : the angle of rotation + // : X coordinate of the rotation center + // : Y coordinate of the rotation center + // : Z coordinate of the rotation center + void set_rotation(RotateAxis axis, double angle, float x, float y, float z) { + clutter_actor_set_rotation(&this, axis, angle, x, y, z); + } + + // Scales an actor with the given factors. The scaling is relative to + // the scale center and the anchor point. The scale center is + // unchanged by this function and defaults to 0,0. + // : double factor to scale actor by horizontally. + // : double factor to scale actor by vertically. + void set_scale(double scale_x, double scale_y) { + clutter_actor_set_scale(&this, scale_x, scale_y); + } + + // Scales an actor with the given factors around the given center + // point. The center point is specified in pixels relative to the + // anchor point (usually the top left corner of the actor). + // : double factor to scale actor by horizontally. + // : double factor to scale actor by vertically. + // : X coordinate of the center of the scale. + // : Y coordinate of the center of the scale + void set_scale_full(double scale_x, double scale_y, float center_x, float center_y) { + clutter_actor_set_scale_full(&this, scale_x, scale_y, center_x, center_y); + } + + // Scales an actor with the given factors around the given + // center point. The center point is specified as one of the compass + // directions in #ClutterGravity. For example, setting it to north + // will cause the top of the actor to remain unchanged and the rest of + // the actor to expand left, right and downwards. + // : double factor to scale actor by horizontally. + // : double factor to scale actor by vertically. + // : the location of the scale center expressed as a compass direction. + void set_scale_with_gravity(double scale_x, double scale_y, Gravity gravity) { + clutter_actor_set_scale_with_gravity(&this, scale_x, scale_y, gravity); + } + + // Sets the #ClutterShader to be used when rendering @self. + // + // If @shader is %NULL this function will unset any currently set shader + // for the actor. + // + // Any #ClutterEffect applied to @self will take the precedence + // over the #ClutterShader set using this function. + // + // or removed + // + // + // clutter_actor_add_effect() instead. + // RETURNS: %TRUE if the shader was successfully applied + // : a #ClutterShader or %NULL to unset the shader. + int set_shader(Shader* shader=null) { + return clutter_actor_set_shader(&this, shader); + } + + // Sets the value for a named parameter of the shader applied + // to @actor. + // : the name of the parameter + // : the value of the parameter + void set_shader_param(char* param, GObject2.Value* value) { + clutter_actor_set_shader_param(&this, param, value); + } + + // Sets the value for a named float parameter of the shader applied + // to @actor. + // : the name of the parameter + // : the value of the parameter + void set_shader_param_float(char* param, float value) { + clutter_actor_set_shader_param_float(&this, param, value); + } + + // Sets the value for a named int parameter of the shader applied to + // @actor. + // : the name of the parameter + // : the value of the parameter + void set_shader_param_int(char* param, int value) { + clutter_actor_set_shader_param_int(&this, param, value); + } + + // Sets the actor's size request in pixels. This overrides any + // "normal" size request the actor would have. For example + // a text actor might normally request the size of the text; + // this function would force a specific size instead. + // + // If @width and/or @height are -1 the actor will use its + // "normal" size request instead of overriding it, i.e. + // you can "unset" the size with -1. + // + // This function sets or unsets both the minimum and natural size. + // : New width of actor in pixels, or -1 + // : New height of actor in pixels, or -1 + void set_size(float width, float height) { + clutter_actor_set_size(&this, width, height); + } + + // Sets the #ClutterTextDirection for an actor + // + // The passed text direction must not be %CLUTTER_TEXT_DIRECTION_DEFAULT + // + // If @self implements #ClutterContainer then this function will recurse + // inside all the children of @self (including the internal ones). + // + // Composite actors not implementing #ClutterContainer, or actors requiring + // special handling when the text direction changes, should connect to + // the #GObject::notify signal for the #ClutterActor:text-direction property + // : the text direction for @self + void set_text_direction(TextDirection text_dir) { + clutter_actor_set_text_direction(&this, text_dir); + } + + // Forces a width on an actor, causing the actor's preferred width + // and height (if any) to be ignored. + // + // If @width is -1 the actor will use its preferred width request + // instead of overriding it, i.e. you can "unset" the width with -1. + // + // This function sets both the minimum and natural size of the actor. + // : Requested new width for the actor, in pixels, or -1 + void set_width(float width) { + clutter_actor_set_width(&this, width); + } + + // Sets the actor's X coordinate, relative to its parent, in pixels. + // + // Overrides any layout manager and forces a fixed position for + // the actor. + // : the actor's position on the X axis + void set_x(float x) { + clutter_actor_set_x(&this, x); + } + + // Sets the actor's Y coordinate, relative to its parent, in pixels.# + // + // Overrides any layout manager and forces a fixed position for + // the actor. + // : the actor's position on the Y axis + void set_y(float y) { + clutter_actor_set_y(&this, y); + } + + // Sets the rotation angle of @self around the Z axis using the center + // point specified as a compass point. For example to rotate such that + // the center of the actor remains static you can use + // %CLUTTER_GRAVITY_CENTER. If the actor changes size the center point + // will move accordingly. + // : the angle of rotation + // : the center point of the rotation + void set_z_rotation_from_gravity(double angle, Gravity gravity) { + clutter_actor_set_z_rotation_from_gravity(&this, angle, gravity); + } + + // Should be called inside the implementation of the + // #ClutterActor::pick virtual function in order to check whether + // the actor should paint itself in pick mode or not. + // + // This function should never be called directly by applications. + // + // %FALSE otherwise + // RETURNS: %TRUE if the actor should paint its silhouette, + int should_pick_paint() { + return clutter_actor_should_pick_paint(&this); + } + + // Flags an actor to be displayed. An actor that isn't shown will not + // be rendered on the stage. + // + // Actors are visible by default. + // + // If this function is called on an actor without a parent, the + // #ClutterActor:show-on-set-parent will be set to %TRUE as a side + // effect. + void show() { + clutter_actor_show(&this); + } + // Calls clutter_actor_show() on all children of an actor (if any). + void show_all() { + clutter_actor_show_all(&this); + } + + // This function translates screen coordinates (@x, @y) to + // coordinates relative to the actor. For example, it can be used to translate + // screen events from global screen coordinates into actor-local coordinates. + // + // The conversion can fail, notably if the transform stack results in the + // actor being projected on the screen as a mere line. + // + // The conversion should not be expected to be pixel-perfect due to the + // nature of the operation. In general the error grows when the skewing + // of the actor rectangle on screen increases. + // + // This function can be computationally intensive. + // + // This function only works when the allocation is up-to-date, + // i.e. inside of paint(). + // RETURNS: %TRUE if conversion was successful. + // : x screen coordinate of the point to unproject + // : y screen coordinate of the point to unproject + // : return location for the unprojected x coordinance + // : return location for the unprojected y coordinance + int transform_stage_point(float x, float y, /*out*/ float* x_out, /*out*/ float* y_out) { + return clutter_actor_transform_stage_point(&this, x, y, x_out, y_out); + } + + // Unsets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly + // unmaps its children if they were mapped. + // + // Calling this is allowed in only one case: you are implementing the + // #ClutterActor unmap() virtual function in an actor + // and you need to unmap the children of that actor. It is not necessary + // to call this if you implement #ClutterContainer because the default + // implementation will automatically unmap children of containers. + // + // When overriding unmap, it is mandatory to chain up to the parent + // implementation. + void unmap() { + clutter_actor_unmap(&this); + } + + // Removes the parent of @self. + // + // This function should not be used in applications. + // + // This function should only be called by implementations of the + // #ClutterContainer interface, or by composite actors that do + // not implicitly create their children. + void unparent() { + clutter_actor_unparent(&this); + } + + // Unrealization informs the actor that it may be being destroyed or + // moved to another stage. The actor may want to destroy any + // underlying graphics resources at this point. However it is + // perfectly acceptable for it to retain the resources until the actor + // is destroyed because Clutter only ever uses a single rendering + // context and all of the graphics resources are valid on any stage. + // + // Because mapped actors must be realized, actors may not be + // unrealized if they are mapped. This function hides the actor to be + // sure it isn't mapped, an application-visible side effect that you + // may not be expecting. + // + // This function should not be called by application code. + void unrealize() { + clutter_actor_unrealize(&this); + } + + // Unsets @flags on @self + // + // This function will emit notifications for the changed properties + // : the flags to unset + void unset_flags(ActorFlags flags) { + clutter_actor_unset_flags(&this, flags); + } + + // The ::allocation-changed signal is emitted when the + // #ClutterActor:allocation property changes. Usually, application + // code should just use the notifications for the :allocation property + // but if you want to track the allocation flags as well, for instance + // to know whether the absolute origin of @actor changed, then you might + // want use this signal instead. + // : a #ClutterActorBox with the new allocation + // : #ClutterAllocationFlags for the allocation + extern (C) alias static void function (Actor* this_, ActorBox* box, AllocationFlags* flags, void* user_data=null) signal_allocation_changed; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"allocation-changed", CB:signal_allocation_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"allocation-changed", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::button-press-event signal is emitted each time a mouse button + // is pressed on @actor. + // + // or %FALSE to continue the emission. + // RETURNS: %TRUE if the event has been handled by the actor, + // : a #ClutterButtonEvent + extern (C) alias static c_int function (Actor* this_, Event* event, void* user_data=null) signal_button_press_event; + ulong signal_connect(string name:"button-press-event", CB:signal_button_press_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"button-press-event", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::button-release-event signal is emitted each time a mouse button + // is released on @actor. + // + // or %FALSE to continue the emission. + // RETURNS: %TRUE if the event has been handled by the actor, + // : a #ClutterButtonEvent + extern (C) alias static c_int function (Actor* this_, Event* event, void* user_data=null) signal_button_release_event; + ulong signal_connect(string name:"button-release-event", CB:signal_button_release_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"button-release-event", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::captured-event signal is emitted when an event is captured + // by Clutter. This signal will be emitted starting from the top-level + // container (the #ClutterStage) to the actor which received the event + // going down the hierarchy. This signal can be used to intercept every + // event before the specialized events (like + // ClutterActor::button-press-event or ::key-released-event) are + // emitted. + // + // or %FALSE to continue the emission. + // RETURNS: %TRUE if the event has been handled by the actor, + // : a #ClutterEvent + extern (C) alias static c_int function (Actor* this_, Event* event, void* user_data=null) signal_captured_event; + ulong signal_connect(string name:"captured-event", CB:signal_captured_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"captured-event", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::destroy signal notifies that all references held on the + // actor which emitted it should be released. + // + // The ::destroy signal should be used by all holders of a reference + // on @actor. + // + // This signal might result in the finalization of the #ClutterActor + // if all references are released. + // + // Composite actors and actors implementing the #ClutterContainer + // interface should override the default implementation of the + // class handler of this signal and call clutter_actor_destroy() on + // their children. When overriding the default class handler, it is + // required to chain up to the parent's implementation. + extern (C) alias static void function (Actor* this_, void* user_data=null) signal_destroy; + ulong signal_connect(string name:"destroy", CB:signal_destroy)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"destroy", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::enter-event signal is emitted when the pointer enters the @actor + // + // or %FALSE to continue the emission. + // RETURNS: %TRUE if the event has been handled by the actor, + // : a #ClutterCrossingEvent + extern (C) alias static c_int function (Actor* this_, Event* event, void* user_data=null) signal_enter_event; + ulong signal_connect(string name:"enter-event", CB:signal_enter_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"enter-event", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::event signal is emitted each time an event is received + // by the @actor. This signal will be emitted on every actor, + // following the hierarchy chain, until it reaches the top-level + // container (the #ClutterStage). + // + // or %FALSE to continue the emission. + // RETURNS: %TRUE if the event has been handled by the actor, + // : a #ClutterEvent + extern (C) alias static c_int function (Actor* this_, Event* event, void* user_data=null) signal_event; + ulong signal_connect(string name:"event", CB:signal_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"event", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::hide signal is emitted when an actor is no longer rendered + // on the stage. + extern (C) alias static void function (Actor* this_, void* user_data=null) signal_hide; + ulong signal_connect(string name:"hide", CB:signal_hide)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"hide", + cast(GObject2.Callback)cb, data, null, cf); + } + // The ::key-focus-in signal is emitted when @actor receives key focus. + extern (C) alias static void function (Actor* this_, void* user_data=null) signal_key_focus_in; + ulong signal_connect(string name:"key-focus-in", CB:signal_key_focus_in)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"key-focus-in", + cast(GObject2.Callback)cb, data, null, cf); + } + // The ::key-focus-out signal is emitted when @actor loses key focus. + extern (C) alias static void function (Actor* this_, void* user_data=null) signal_key_focus_out; + ulong signal_connect(string name:"key-focus-out", CB:signal_key_focus_out)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"key-focus-out", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::key-press-event signal is emitted each time a keyboard button + // is pressed while @actor has key focus (see clutter_stage_set_key_focus()). + // + // or %FALSE to continue the emission. + // RETURNS: %TRUE if the event has been handled by the actor, + // : a #ClutterKeyEvent + extern (C) alias static c_int function (Actor* this_, Event* event, void* user_data=null) signal_key_press_event; + ulong signal_connect(string name:"key-press-event", CB:signal_key_press_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"key-press-event", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::key-release-event signal is emitted each time a keyboard button + // is released while @actor has key focus (see + // clutter_stage_set_key_focus()). + // + // or %FALSE to continue the emission. + // RETURNS: %TRUE if the event has been handled by the actor, + // : a #ClutterKeyEvent + extern (C) alias static c_int function (Actor* this_, Event* event, void* user_data=null) signal_key_release_event; + ulong signal_connect(string name:"key-release-event", CB:signal_key_release_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"key-release-event", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::leave-event signal is emitted when the pointer leaves the @actor. + // + // or %FALSE to continue the emission. + // RETURNS: %TRUE if the event has been handled by the actor, + // : a #ClutterCrossingEvent + extern (C) alias static c_int function (Actor* this_, Event* event, void* user_data=null) signal_leave_event; + ulong signal_connect(string name:"leave-event", CB:signal_leave_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"leave-event", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::motion-event signal is emitted each time the mouse pointer is + // moved over @actor. + // + // or %FALSE to continue the emission. + // RETURNS: %TRUE if the event has been handled by the actor, + // : a #ClutterMotionEvent + extern (C) alias static c_int function (Actor* this_, Event* event, void* user_data=null) signal_motion_event; + ulong signal_connect(string name:"motion-event", CB:signal_motion_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"motion-event", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::paint signal is emitted each time an actor is being painted. + // + // Subclasses of #ClutterActor should override the class signal handler + // and paint themselves in that function. + // + // It is possible to connect a handler to the ::paint signal in order + // to set up some custom aspect of a paint. + extern (C) alias static void function (Actor* this_, void* user_data=null) signal_paint; + ulong signal_connect(string name:"paint", CB:signal_paint)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"paint", + cast(GObject2.Callback)cb, data, null, cf); + } + + // This signal is emitted when the parent of the actor changes. + // : the previous parent of the actor, or %NULL + extern (C) alias static void function (Actor* this_, Actor* old_parent, void* user_data=null) signal_parent_set; + ulong signal_connect(string name:"parent-set", CB:signal_parent_set)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"parent-set", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::pick signal is emitted each time an actor is being painted + // in "pick mode". The pick mode is used to identify the actor during + // the event handling phase, or by clutter_stage_get_actor_at_pos(). + // The actor should paint its shape using the passed @pick_color. + // + // Subclasses of #ClutterActor should override the class signal handler + // and paint themselves in that function. + // + // It is possible to connect a handler to the ::pick signal in order + // to set up some custom aspect of a paint in pick mode. + // : the #ClutterColor to be used when picking + extern (C) alias static void function (Actor* this_, Color* color, void* user_data=null) signal_pick; + ulong signal_connect(string name:"pick", CB:signal_pick)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"pick", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::queue_redraw signal is emitted when clutter_actor_queue_redraw() + // is called on @origin. + // + // The default implementation for #ClutterActor chains up to the + // parent actor and queues a redraw on the parent, thus "bubbling" + // the redraw queue up through the actor graph. The default + // implementation for #ClutterStage queues a clutter_redraw() in a + // main loop idle handler. + // + // Note that the @origin actor may be the stage, or a container; it + // does not have to be a leaf node in the actor graph. + // + // Toolkits embedding a #ClutterStage which require a redraw and + // relayout cycle can stop the emission of this signal using the + // GSignal API, redraw the UI and then call clutter_redraw() + // themselves, like: + // + // |[ + // static void + // on_redraw_complete (void) + // { + // /* execute the Clutter drawing pipeline */ + // clutter_redraw (); + // } + // + // static void + // on_stage_queue_redraw (ClutterStage *stage) + // { + // /* this prevents the default handler to run */ + // g_signal_stop_emission_by_name (stage, "queue-redraw"); + // + // /* queue a redraw with the host toolkit and call + // * a function when the redraw has been completed + // */ + // queue_a_redraw (G_CALLBACK (on_redraw_complete)); + // } + // ]| + // + // This signal is emitted before the Clutter paint + // pipeline is executed. If you want to know when the pipeline has + // been completed you should connect to the ::paint signal on the + // Stage with g_signal_connect_after(). + // : the actor which initiated the redraw request + extern (C) alias static void function (Actor* this_, Actor* origin, void* user_data=null) signal_queue_redraw; + ulong signal_connect(string name:"queue-redraw", CB:signal_queue_redraw)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"queue-redraw", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::queue_layout signal is emitted when clutter_actor_queue_relayout() + // is called on an actor. + // + // The default implementation for #ClutterActor chains up to the + // parent actor and queues a relayout on the parent, thus "bubbling" + // the relayout queue up through the actor graph. + // + // The main purpose of this signal is to allow relayout to be propagated + // properly in the procense of #ClutterClone actors. Applications will + // not normally need to connect to this signal. + extern (C) alias static void function (Actor* this_, void* user_data=null) signal_queue_relayout; + ulong signal_connect(string name:"queue-relayout", CB:signal_queue_relayout)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"queue-relayout", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::realize signal is emitted each time an actor is being + // realized. + extern (C) alias static void function (Actor* this_, void* user_data=null) signal_realize; + ulong signal_connect(string name:"realize", CB:signal_realize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"realize", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::scroll-event signal is emitted each time the mouse is + // scrolled on @actor + // + // or %FALSE to continue the emission. + // RETURNS: %TRUE if the event has been handled by the actor, + // : a #ClutterScrollEvent + extern (C) alias static c_int function (Actor* this_, Event* event, void* user_data=null) signal_scroll_event; + ulong signal_connect(string name:"scroll-event", CB:signal_scroll_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"scroll-event", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::show signal is emitted when an actor is visible and + // rendered on the stage. + extern (C) alias static void function (Actor* this_, void* user_data=null) signal_show; + ulong signal_connect(string name:"show", CB:signal_show)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"show", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::unrealize signal is emitted each time an actor is being + // unrealized. + extern (C) alias static void function (Actor* this_, void* user_data=null) signal_unrealize; + ulong signal_connect(string name:"unrealize", CB:signal_unrealize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"unrealize", + cast(GObject2.Callback)cb, data, null, cf); + } +} + + +// Bounding box of an actor. The coordinates of the top left and right bottom +// corners of an actor. The coordinates of the two points are expressed in +// pixels with sub-pixel precision +struct ActorBox { + float x1, y1, x2, y2; + + + // Allocates a new #ClutterActorBox using the passed coordinates + // for the top left and bottom right points + // + // clutter_actor_box_free() to free the resources + // RETURNS: the newly allocated #ClutterActorBox. Use + // : X coordinate of the top left point + // : Y coordinate of the top left point + // : X coordinate of the bottom right point + // : Y coordinate of the bottom right point + static ActorBox* /*new*/ new_(float x_1, float y_1, float x_2, float y_2) { + return clutter_actor_box_new(x_1, y_1, x_2, y_2); + } + // Clamps the components of @box to the nearest integer + void clamp_to_pixel() { + clutter_actor_box_clamp_to_pixel(&this); + } + + // Checks whether a point with @x, @y coordinates is contained + // withing @box + // RETURNS: %TRUE if the point is contained by the #ClutterActorBox + // : X coordinate of the point + // : Y coordinate of the point + int contains(float x, float y) { + return clutter_actor_box_contains(&this, x, y); + } + + // Copies @box + // + // clutter_actor_box_free() to free the allocated resources + // RETURNS: a newly allocated copy of #ClutterActorBox. Use + ActorBox* /*new*/ copy() { + return clutter_actor_box_copy(&this); + } + + // Checks @box_a and @box_b for equality + // RETURNS: %TRUE if the passed #ClutterActorBox are equal + // : a #ClutterActorBox + int equal(ActorBox* box_b) { + return clutter_actor_box_equal(&this, box_b); + } + + // Frees a #ClutterActorBox allocated using clutter_actor_box_new() + // or clutter_actor_box_copy() + void free() { + clutter_actor_box_free(&this); + } + + // Calculates the bounding box represented by the four vertices; for details + // of the vertex array see clutter_actor_get_abs_allocation_vertices(). + // : array of four #ClutterVertex + void from_vertices(Vertex verts) { + clutter_actor_box_from_vertices(&this, verts); + } + + // Retrieves the area of @box + // RETURNS: the area of a #ClutterActorBox, in pixels + float get_area() { + return clutter_actor_box_get_area(&this); + } + + // Retrieves the height of the @box + // RETURNS: the height of the box + float get_height() { + return clutter_actor_box_get_height(&this); + } + + // Retrieves the origin of @box + // : return location for the X coordinate, or %NULL + // : return location for the Y coordinate, or %NULL + void get_origin(/*out*/ float* x=null, /*out*/ float* y=null) { + clutter_actor_box_get_origin(&this, x, y); + } + + // Retrieves the size of @box + // : return location for the width, or %NULL + // : return location for the height, or %NULL + void get_size(/*out*/ float* width=null, /*out*/ float* height=null) { + clutter_actor_box_get_size(&this, width, height); + } + + // Retrieves the width of the @box + // RETURNS: the width of the box + float get_width() { + return clutter_actor_box_get_width(&this); + } + + // Retrieves the X coordinate of the origin of @box + // RETURNS: the X coordinate of the origin + float get_x() { + return clutter_actor_box_get_x(&this); + } + + // Retrieves the Y coordinate of the origin of @box + // RETURNS: the Y coordinate of the origin + float get_y() { + return clutter_actor_box_get_y(&this); + } + + // Interpolates between @initial and @final #ClutterActorBoxes + // using @progress + // : the final #ClutterActorBox + // : the interpolation progress + // : return location for the interpolation + void interpolate(ActorBox* final, double progress, /*out*/ ActorBox* result) { + clutter_actor_box_interpolate(&this, final, progress, result); + } + + // Changes the origin of @box, maintaining the size of the #ClutterActorBox. + // : the X coordinate of the new origin + // : the Y coordinate of the new origin + void set_origin(float x, float y) { + clutter_actor_box_set_origin(&this, x, y); + } + + // Sets the size of @box, maintaining the origin of the #ClutterActorBox. + // : the new width + // : the new height + void set_size(float width, float height) { + clutter_actor_box_set_size(&this, width, height); + } + + // Unions the two boxes @a and @b and stores the result in @result. + // : the second #ClutterActorBox + // : the #ClutterActorBox representing a union of @a and @b + void union_(ActorBox* b, /*out*/ ActorBox* result) { + clutter_actor_box_union(&this, b, result); + } +} + +// Base class for actors. +struct ActorClass { + private GObject2.InitiallyUnownedClass parent_class; + extern (C) void function (Actor* self) show; + extern (C) void function (Actor* self) show_all; + extern (C) void function (Actor* self) hide; + extern (C) void function (Actor* self) hide_all; + extern (C) void function (Actor* self) realize; + extern (C) void function (Actor* self) unrealize; + extern (C) void function (Actor* self) map; + extern (C) void function (Actor* self) unmap; + extern (C) void function (Actor* self) paint; + extern (C) void function (Actor* actor, Actor* old_parent) parent_set; + extern (C) void function (Actor* self) destroy; + extern (C) void function (Actor* actor, Color* color) pick; + extern (C) void function (Actor* actor, Actor* leaf_that_queued) queue_redraw; + + // : available height when computing the preferred width, or a negative value to indicate that no height is defined + // : return location for minimum width, or %NULL + // : return location for the natural width, or %NULL + extern (C) void function (Actor* self, float for_height, /*out*/ float* min_width_p=null, /*out*/ float* natural_width_p=null) get_preferred_width; + + // : available width to assume in computing desired height, or a negative value to indicate that no width is defined + // : return location for minimum height, or %NULL + // : return location for natural height, or %NULL + extern (C) void function (Actor* self, float for_width, /*out*/ float* min_height_p=null, /*out*/ float* natural_height_p=null) get_preferred_height; + + // : new allocation of the actor, in parent-relative coordinates + // : flags that control the allocation + extern (C) void function (Actor* self, ActorBox* box, AllocationFlags flags) allocate; + extern (C) void function (Actor* actor, Cogl.Matrix* matrix) apply_transform; + extern (C) int function (Actor* actor, Event* event) event; + extern (C) int function (Actor* actor, ButtonEvent* event) button_press_event; + extern (C) int function (Actor* actor, ButtonEvent* event) button_release_event; + extern (C) int function (Actor* actor, ScrollEvent* event) scroll_event; + extern (C) int function (Actor* actor, KeyEvent* event) key_press_event; + extern (C) int function (Actor* actor, KeyEvent* event) key_release_event; + extern (C) int function (Actor* actor, MotionEvent* event) motion_event; + extern (C) int function (Actor* actor, CrossingEvent* event) enter_event; + extern (C) int function (Actor* actor, CrossingEvent* event) leave_event; + extern (C) int function (Actor* actor, Event* event) captured_event; + extern (C) void function (Actor* actor) key_focus_in; + extern (C) void function (Actor* actor) key_focus_out; + extern (C) void function (Actor* self) queue_relayout; + // RETURNS: the #AtkObject associated with @actor + extern (C) Atk.Object* function (Actor* self) get_accessible; + extern (C) int function (Actor* actor, PaintVolume* volume) get_paint_volume; + // RETURNS: %TRUE if the actor may have overlapping primitives, and + extern (C) int function (Actor* self) has_overlaps; + private void*[28] _padding_dummy; +} + +// Flags used to signal the state of an actor. +enum ActorFlags { + MAPPED = 2, + REALIZED = 4, + REACTIVE = 8, + VISIBLE = 16, + NO_LAYOUT = 32 +} + +// The ClutterActorMeta structure contains only +// private data and should be accessed using the provided API +struct ActorMeta /* : GObject.InitiallyUnowned */ /* Version 1.4 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance initiallyunowned; + GObject2.InitiallyUnowned parent_instance; + private ActorMetaPrivate* priv; + + + // Retrieves a pointer to the #ClutterActor that owns @meta + // RETURNS: a pointer to a #ClutterActor or %NULL + Actor* get_actor() { + return clutter_actor_meta_get_actor(&this); + } + + // Retrieves whether @meta is enabled + // RETURNS: %TRUE if the #ClutterActorMeta instance is enabled + int get_enabled() { + return clutter_actor_meta_get_enabled(&this); + } + + // Retrieves the name set using clutter_actor_meta_set_name() + // + // instance, or %NULL if none was set. The returned string is owned + // by the #ClutterActorMeta instance and it should not be modified + // or freed + // RETURNS: the name of the #ClutterActorMeta + char* get_name() { + return clutter_actor_meta_get_name(&this); + } + + // Sets whether @meta should be enabled or not + // : whether @meta is enabled + void set_enabled(int is_enabled) { + clutter_actor_meta_set_enabled(&this, is_enabled); + } + + // Sets the name of @meta + // + // The name can be used to identify the #ClutterActorMeta instance + // : the name of @meta + void set_name(char* name) { + clutter_actor_meta_set_name(&this, name); + } +} + + +// The ClutterActorMetaClass structure contains +// only private data +struct ActorMetaClass /* Version 1.4 */ { + private GObject2.InitiallyUnownedClass parent_class; + extern (C) void function (ActorMeta* meta, Actor* actor) set_actor; + extern (C) void function () _clutter_meta1; + extern (C) void function () _clutter_meta2; + extern (C) void function () _clutter_meta3; + extern (C) void function () _clutter_meta4; + extern (C) void function () _clutter_meta5; + extern (C) void function () _clutter_meta6; + extern (C) void function () _clutter_meta7; +} + +struct ActorMetaPrivate { +} + +struct ActorPrivate { +} + +enum int AddFavorite = 269025081; +enum int Adiaeresis = 196; +enum int Agrave = 192; +enum int Ahook = 16785058; + +// Specifies the axis on which #ClutterAlignConstraint should maintain +// the alignment +enum AlignAxis /* Version 1.4 */ { + X_AXIS = 0, + Y_AXIS = 1 +} + +// ClutterAlignConstraint is an opaque structure +// whose members cannot be directly accesses +struct AlignConstraint /* : Constraint */ /* Version 1.4 */ { + alias method_parent this; + alias method_parent super_; + alias method_parent constraint; + Constraint method_parent; + + + // Creates a new constraint, aligning a #ClutterActor's position with + // regards of the size of the actor to @source, with the given + // alignment @factor + // RETURNS: the newly created #ClutterAlignConstraint + // : the #ClutterActor to use as the source of the alignment, or %NULL + // : the axis to be used to compute the alignment + // : the alignment factor, between 0.0 and 1.0 + static AlignConstraint* new_(Actor* source, AlignAxis axis, float factor) { + return clutter_align_constraint_new(source, axis, factor); + } + + // Retrieves the value set using clutter_align_constraint_set_align_axis() + // RETURNS: the alignment axis + AlignAxis get_align_axis() { + return clutter_align_constraint_get_align_axis(&this); + } + + // Retrieves the factor set using clutter_align_constraint_set_factor() + // RETURNS: the alignment factor + float get_factor() { + return clutter_align_constraint_get_factor(&this); + } + + // Retrieves the source of the alignment + // + // of the alignment + // RETURNS: the #ClutterActor used as the source + Actor* get_source() { + return clutter_align_constraint_get_source(&this); + } + + // Sets the axis to which the alignment refers to + // : the axis to which the alignment refers to + void set_align_axis(AlignAxis axis) { + clutter_align_constraint_set_align_axis(&this, axis); + } + + // Sets the alignment factor of the constraint + // + // The factor depends on the #ClutterAlignConstraint:align-axis property + // and it is a value between 0.0 (meaning left, when + // #ClutterAlignConstraint:align-axis is set to %CLUTTER_ALIGN_X_AXIS; or + // meaning top, when #ClutterAlignConstraint:align-axis is set to + // %CLUTTER_ALIGN_Y_AXIS) and 1.0 (meaning right, when + // #ClutterAlignConstraint:align-axis is set to %CLUTTER_ALIGN_X_AXIS; or + // meaning bottom, when #ClutterAlignConstraint:align-axis is set to + // %CLUTTER_ALIGN_Y_AXIS). A value of 0.5 aligns in the middle in either + // cases + // : the alignment factor, between 0.0 and 1.0 + void set_factor(float factor) { + clutter_align_constraint_set_factor(&this, factor); + } + + // Sets the source of the alignment constraint + // : a #ClutterActor, or %NULL to unset the source + void set_source(Actor* source=null) { + clutter_align_constraint_set_source(&this, source); + } +} + +struct AlignConstraintClass { +} + + +// Flags passed to the #ClutterActor::allocate() virtual function and +// to the clutter_actor_allocate() function +enum AllocationFlags /* Version 1.0 */ { + ALLOCATION_NONE = 0, + ABSOLUTE_ORIGIN_CHANGED = 2 +} + +// #ClutterAlpha combines a #ClutterTimeline and a function. +// The contents of the #ClutterAlpha structure are private and should +// only be accessed using the provided API. +struct Alpha /* : GObject.InitiallyUnowned */ /* Version 0.2 */ { + alias parent this; + alias parent super_; + alias parent initiallyunowned; + GObject2.InitiallyUnowned parent; + private AlphaPrivate* priv; + + + // Creates a new #ClutterAlpha instance. You must set a function + // to compute the alpha value using clutter_alpha_set_func() and + // bind a #ClutterTimeline object to the #ClutterAlpha instance + // using clutter_alpha_set_timeline(). + // + // You should use the newly created #ClutterAlpha instance inside + // a #ClutterBehaviour object. + // RETURNS: the newly created empty #ClutterAlpha instance. + static Alpha* new_() { + return clutter_alpha_new(); + } + + // Creates a new #ClutterAlpha instance and sets the timeline + // and animation mode. + // + // See also clutter_alpha_set_timeline() and clutter_alpha_set_mode(). + // RETURNS: the newly created #ClutterAlpha + // : #ClutterTimeline timeline + // : animation mode + static Alpha* new_full(Timeline* timeline, c_ulong mode) { + return clutter_alpha_new_full(timeline, mode); + } + + // Creates a new #ClutterAlpha instances and sets the timeline + // and the alpha function. + // + // This function will not register @func as a global alpha function. + // + // See also clutter_alpha_set_timeline() and clutter_alpha_set_func(). + // RETURNS: the newly created #ClutterAlpha + // : a #ClutterTimeline + // : a #ClutterAlphaFunc + // : data to pass to the function, or %NULL + // : function to call when removing the alpha function, or %NULL + static Alpha* new_with_func(Timeline* timeline, AlphaFunc func, void* data, GLib2.DestroyNotify destroy) { + return clutter_alpha_new_with_func(timeline, func, data, destroy); + } + + // #GClosure variant of clutter_alpha_register_func(). + // + // Registers a global alpha function and returns its logical id + // to be used by clutter_alpha_set_mode() or by #ClutterAnimation. + // + // The logical id is always greater than %CLUTTER_ANIMATION_LAST. + // RETURNS: the logical id of the alpha function + // : a #GClosure + static c_ulong register_closure(GObject2.Closure* closure) { + return clutter_alpha_register_closure(closure); + } + + // Unintrospectable function: register_func() / clutter_alpha_register_func() + // Registers a global alpha function and returns its logical id + // to be used by clutter_alpha_set_mode() or by #ClutterAnimation. + // + // The logical id is always greater than %CLUTTER_ANIMATION_LAST. + // RETURNS: the logical id of the alpha function + // : a #ClutterAlphaFunc + // : user data to pass to @func, or %NULL + static c_ulong register_func(AlphaFunc func, void* data) { + return clutter_alpha_register_func(func, data); + } + + // Query the current alpha value. + // RETURNS: The current alpha value for the alpha + double get_alpha() { + return clutter_alpha_get_alpha(&this); + } + + // Retrieves the #ClutterAnimationMode used by @alpha. + // RETURNS: the animation mode + c_ulong get_mode() { + return clutter_alpha_get_mode(&this); + } + + // Gets the #ClutterTimeline bound to @alpha. + // RETURNS: a #ClutterTimeline instance + Timeline* get_timeline() { + return clutter_alpha_get_timeline(&this); + } + + // Sets the #GClosure used to compute the alpha value at each + // frame of the #ClutterTimeline bound to @alpha. + // : A #GClosure + void set_closure(GObject2.Closure* closure) { + clutter_alpha_set_closure(&this, closure); + } + + // Sets the #ClutterAlphaFunc function used to compute + // the alpha value at each frame of the #ClutterTimeline + // bound to @alpha. + // + // This function will not register @func as a global alpha function. + // : A #ClutterAlphaFunc + // : user data to be passed to the alpha function, or %NULL + // : notify function used when disposing the alpha function + void set_func(AlphaFunc func, void* data, GLib2.DestroyNotify destroy) { + clutter_alpha_set_func(&this, func, data, destroy); + } + + // Sets the progress function of @alpha using the symbolic value + // of @mode, as taken by the #ClutterAnimationMode enumeration or + // using the value returned by clutter_alpha_register_func(). + // : a #ClutterAnimationMode + void set_mode(c_ulong mode) { + clutter_alpha_set_mode(&this, mode); + } + + // Binds @alpha to @timeline. + // : A #ClutterTimeline + void set_timeline(Timeline* timeline) { + clutter_alpha_set_timeline(&this, timeline); + } +} + +// Base class for #ClutterAlpha +struct AlphaClass /* Version 0.2 */ { + private GObject2.InitiallyUnownedClass parent_class; + extern (C) void function () _clutter_alpha_1; + extern (C) void function () _clutter_alpha_2; + extern (C) void function () _clutter_alpha_3; + extern (C) void function () _clutter_alpha_4; + extern (C) void function () _clutter_alpha_5; +} + + +// A function returning a value depending on the position of +// the #ClutterTimeline bound to @alpha. +// RETURNS: a floating point value +// : a #ClutterAlpha +// : user data passed to the function +extern (C) alias double function (Alpha* alpha, void* user_data) AlphaFunc; + +struct AlphaPrivate { +} + +enum int Alt_L = 65513; +enum int Alt_R = 65514; +enum int Amacron = 960; + +// #ClutterAnimatable is an opaque structure whose members cannot be directly +// accessed +struct Animatable /* Version 1.0 */ { + + // Calls the animate_property() virtual function for @animatable. + // + // The @initial_value and @final_value #GValues must contain + // the same type; @value must have been initialized to the same + // type of @initial_value and @final_value. + // + // All implementation of the #ClutterAnimatable interface must + // implement this function. + // + // be applied to the #ClutterAnimatable, and %FALSE otherwise + // + // + // instead + // RETURNS: %TRUE if the value has been validated and can + // : a #ClutterAnimation + // : the name of the animated property + // : the initial value of the animation interval + // : the final value of the animation interval + // : the progress factor + // : return location for the animation value + int animate_property(Animation* animation, char* property_name, GObject2.Value* initial_value, GObject2.Value* final_value, double progress, GObject2.Value* value) { + return clutter_animatable_animate_property(&this, animation, property_name, initial_value, final_value, progress, value); + } + + // Finds the #GParamSpec for @property_name + // + // or %NULL + // RETURNS: The #GParamSpec for the given property + // : the name of the animatable property to find + GObject2.ParamSpec* find_property(char* property_name) { + return clutter_animatable_find_property(&this, property_name); + } + + // Retrieves the current state of @property_name and sets @value with it + // : the name of the animatable property to retrieve + // : a #GValue initialized to the type of the property to retrieve + void get_initial_state(char* property_name, GObject2.Value* value) { + clutter_animatable_get_initial_state(&this, property_name, value); + } + + // Asks a #ClutterAnimatable implementation to interpolate a + // a named property between the initial and final values of + // a #ClutterInterval, using @progress as the interpolation + // value, and store the result inside @value. + // + // This function should be used for every property animation + // involving #ClutterAnimatables. + // + // This function replaces clutter_animatable_animate_property(). + // + // and %FALSE otherwise + // RETURNS: %TRUE if the interpolation was successful, + // : the name of the property to interpolate + // : a #ClutterInterval with the animation range + // : the progress to use to interpolate between the initial and final values of the @interval + // : return location for an initialized #GValue using the same type of the @interval + int interpolate_value(char* property_name, Interval* interval, double progress, /*out*/ GObject2.Value* value) { + return clutter_animatable_interpolate_value(&this, property_name, interval, progress, value); + } + + // Sets the current state of @property_name to @value + // : the name of the animatable property to set + // : the value of the animatable property to set + void set_final_state(char* property_name, GObject2.Value* value) { + clutter_animatable_set_final_state(&this, property_name, value); + } +} + + +// Base interface for #GObjects that can be animated by a +// a #ClutterAnimation. +struct AnimatableIface /* Version 1.0 */ { + private GObject2.TypeInterface parent_iface; + + // RETURNS: %TRUE if the value has been validated and can + // : a #ClutterAnimation + // : the name of the animated property + // : the initial value of the animation interval + // : the final value of the animation interval + // : the progress factor + // : return location for the animation value + extern (C) int function (Animatable* animatable, Animation* animation, char* property_name, GObject2.Value* initial_value, GObject2.Value* final_value, double progress, GObject2.Value* value) animate_property; + + // RETURNS: The #GParamSpec for the given property + // : the name of the animatable property to find + extern (C) GObject2.ParamSpec* function (Animatable* animatable, char* property_name) find_property; + + // : the name of the animatable property to retrieve + // : a #GValue initialized to the type of the property to retrieve + extern (C) void function (Animatable* animatable, char* property_name, GObject2.Value* value) get_initial_state; + + // : the name of the animatable property to set + // : the value of the animatable property to set + extern (C) void function (Animatable* animatable, char* property_name, GObject2.Value* value) set_final_state; + + // RETURNS: %TRUE if the interpolation was successful, + // : the name of the property to interpolate + // : a #ClutterInterval with the animation range + // : the progress to use to interpolate between the initial and final values of the @interval + // : return location for an initialized #GValue using the same type of the @interval + extern (C) int function (Animatable* animatable, char* property_name, Interval* interval, double progress, /*out*/ GObject2.Value* value) interpolate_value; +} + + +// The #ClutterAnimation structure contains only private data and should +// be accessed using the provided functions. +struct Animation /* : GObject.Object */ /* Version 1.0 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance object; + GObject2.Object parent_instance; + private AnimationPrivate* priv; + + + // Creates a new #ClutterAnimation instance. You should set the + // #GObject to be animated using clutter_animation_set_object(), + // set the duration with clutter_animation_set_duration() and the + // easing mode using clutter_animation_set_mode(). + // + // Use clutter_animation_bind() or clutter_animation_bind_interval() + // to define the properties to be animated. The interval and the + // animated properties can be updated at runtime. + // + // The clutter_actor_animate() and relative family of functions provide + // an easy way to animate a #ClutterActor and automatically manage the + // lifetime of a #ClutterAnimation instance, so you should consider using + // those functions instead of manually creating an animation. + // + // to release the associated resources + // RETURNS: the newly created #ClutterAnimation. Use g_object_unref() + static Animation* /*new*/ new_() { + return clutter_animation_new(); + } + + // Adds a single property with name @property_name to the + // animation @animation. For more information about animations, + // see clutter_actor_animate(). + // + // This method returns the animation primarily to make chained + // calls convenient in language bindings. + // RETURNS: The animation itself. + // : the property to control + // : The final value of the property + Animation* bind(char* property_name, GObject2.Value* final) { + return clutter_animation_bind(&this, property_name, final); + } + + // Binds @interval to the @property_name of the #GObject + // attached to @animation. The #ClutterAnimation will take + // ownership of the passed #ClutterInterval. For more information + // about animations, see clutter_actor_animate(). + // + // If you need to update the interval instance use + // clutter_animation_update_interval() instead. + // RETURNS: The animation itself. + // : the property to control + // : a #ClutterInterval + Animation* bind_interval(char* property_name, Interval* interval) { + return clutter_animation_bind_interval(&this, property_name, interval); + } + + // Emits the ::completed signal on @animation + // + // When using this function with a #ClutterAnimation created + // by the clutter_actor_animate() family of functions, @animation + // will be unreferenced and it will not be valid anymore, + // unless g_object_ref() was called before calling this function + // or unless a reference was taken inside a handler for the + // #ClutterAnimation::completed signal + void completed() { + clutter_animation_completed(&this); + } + + // Retrieves the #ClutterAlpha used by @animation. + // RETURNS: the alpha object used by the animation + Alpha* get_alpha() { + return clutter_animation_get_alpha(&this); + } + + // Retrieves the duration of @animation, in milliseconds. + // RETURNS: the duration of the animation + uint get_duration() { + return clutter_animation_get_duration(&this); + } + + // Retrieves the #ClutterInterval associated to @property_name + // inside @animation. + // + // property with the same name was found. The returned interval is + // owned by the #ClutterAnimation and should not be unreferenced + // RETURNS: a #ClutterInterval or %NULL if no + // : name of the property + Interval* get_interval(char* property_name) { + return clutter_animation_get_interval(&this, property_name); + } + + // Retrieves whether @animation is looping. + // RETURNS: %TRUE if the animation is looping + int get_loop() { + return clutter_animation_get_loop(&this); + } + + // Retrieves the animation mode of @animation, as set by + // clutter_animation_set_mode(). + // RETURNS: the mode for the animation + c_ulong get_mode() { + return clutter_animation_get_mode(&this); + } + + // Retrieves the #GObject attached to @animation. + // RETURNS: a #GObject + GObject2.Object* get_object() { + return clutter_animation_get_object(&this); + } + + // Retrieves the #ClutterTimeline used by @animation + // RETURNS: the timeline used by the animation + Timeline* get_timeline() { + return clutter_animation_get_timeline(&this); + } + + // Checks whether @animation is controlling @property_name. + // + // #ClutterAnimation, %FALSE otherwise + // RETURNS: %TRUE if the property is animated by the + // : name of the property + int has_property(char* property_name) { + return clutter_animation_has_property(&this, property_name); + } + + // Sets @alpha as the #ClutterAlpha used by @animation. + // + // If @alpha is not %NULL, the #ClutterAnimation will take ownership + // of the #ClutterAlpha instance. + // : a #ClutterAlpha, or %NULL to unset the current #ClutterAlpha + void set_alpha(Alpha* alpha) { + clutter_animation_set_alpha(&this, alpha); + } + + // Sets the duration of @animation in milliseconds. + // + // This function will set #ClutterAnimation:alpha and + // #ClutterAnimation:timeline if needed. + // : the duration in milliseconds + void set_duration(uint msecs) { + clutter_animation_set_duration(&this, msecs); + } + + // Sets whether @animation should loop over itself once finished. + // + // A looping #ClutterAnimation will not emit the #ClutterAnimation::completed + // signal when finished. + // + // This function will set #ClutterAnimation:alpha and + // #ClutterAnimation:timeline if needed. + // : %TRUE if the animation should loop + void set_loop(int loop) { + clutter_animation_set_loop(&this, loop); + } + + // Sets the animation @mode of @animation. The animation @mode is + // a logical id, either coming from the #ClutterAnimationMode enumeration + // or the return value of clutter_alpha_register_func(). + // + // This function will also set #ClutterAnimation:alpha if needed. + // : an animation mode logical id + void set_mode(c_ulong mode) { + clutter_animation_set_mode(&this, mode); + } + + // Attaches @animation to @object. The #ClutterAnimation will take a + // reference on @object. + // : a #GObject + void set_object(GObject2.Object* object) { + clutter_animation_set_object(&this, object); + } + + // Sets the #ClutterTimeline used by @animation. + // : a #ClutterTimeline, or %NULL to unset the current #ClutterTimeline + void set_timeline(Timeline* timeline) { + clutter_animation_set_timeline(&this, timeline); + } + + // Removes @property_name from the list of animated properties. + // : name of the property + void unbind_property(char* property_name) { + clutter_animation_unbind_property(&this, property_name); + } + + // Updates the @final value of the interval for @property_name + // RETURNS: The animation itself. + // : name of the property + // : The final value of the property + Animation* update(char* property_name, GObject2.Value* final) { + return clutter_animation_update(&this, property_name, final); + } + + // Changes the @interval for @property_name. The #ClutterAnimation + // will take ownership of the passed #ClutterInterval. + // : name of the property + // : a #ClutterInterval + void update_interval(char* property_name, Interval* interval) { + clutter_animation_update_interval(&this, property_name, interval); + } + + // The ::completed signal is emitted once the animation has + // been completed. + // + // The @animation instance is guaranteed to be valid for the entire + // duration of the signal emission chain. + extern (C) alias static void function (Animation* this_, void* user_data=null) signal_completed; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"completed", CB:signal_completed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"completed", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::started signal is emitted once the animation has been + // started + extern (C) alias static void function (Animation* this_, void* user_data=null) signal_started; + ulong signal_connect(string name:"started", CB:signal_started)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"started", + cast(GObject2.Callback)cb, data, null, cf); + } +} + + +// The #ClutterAnimationClass structure contains only private data and +// should be accessed using the provided functions. +struct AnimationClass /* Version 1.0 */ { + private GObject2.ObjectClass parent_class; + extern (C) void function (Animation* animation) started; + extern (C) void function (Animation* animation) completed; + extern (C) void function () _clutter_reserved1; + extern (C) void function () _clutter_reserved2; + extern (C) void function () _clutter_reserved3; + extern (C) void function () _clutter_reserved4; + extern (C) void function () _clutter_reserved5; + extern (C) void function () _clutter_reserved6; + extern (C) void function () _clutter_reserved7; + extern (C) void function () _clutter_reserved8; +} + + +// The animation modes used by #ClutterAlpha and #ClutterAnimation. This +// enumeration can be expanded in later versions of Clutter. See the +// #ClutterAlpha documentation for a graph of all the animation modes. +// +// Every global alpha function registered using clutter_alpha_register_func() +// or clutter_alpha_register_closure() will have a logical id greater than +// %CLUTTER_ANIMATION_LAST. +enum AnimationMode /* Version 1.0 */ { + CUSTOM_MODE = 0, + LINEAR = 1, + EASE_IN_QUAD = 2, + EASE_OUT_QUAD = 3, + EASE_IN_OUT_QUAD = 4, + EASE_IN_CUBIC = 5, + EASE_OUT_CUBIC = 6, + EASE_IN_OUT_CUBIC = 7, + EASE_IN_QUART = 8, + EASE_OUT_QUART = 9, + EASE_IN_OUT_QUART = 10, + EASE_IN_QUINT = 11, + EASE_OUT_QUINT = 12, + EASE_IN_OUT_QUINT = 13, + EASE_IN_SINE = 14, + EASE_OUT_SINE = 15, + EASE_IN_OUT_SINE = 16, + EASE_IN_EXPO = 17, + EASE_OUT_EXPO = 18, + EASE_IN_OUT_EXPO = 19, + EASE_IN_CIRC = 20, + EASE_OUT_CIRC = 21, + EASE_IN_OUT_CIRC = 22, + EASE_IN_ELASTIC = 23, + EASE_OUT_ELASTIC = 24, + EASE_IN_OUT_ELASTIC = 25, + EASE_IN_BACK = 26, + EASE_OUT_BACK = 27, + EASE_IN_OUT_BACK = 28, + EASE_IN_BOUNCE = 29, + EASE_OUT_BOUNCE = 30, + EASE_IN_OUT_BOUNCE = 31, + ANIMATION_LAST = 32 +} +struct AnimationPrivate { +} + + +// The #ClutterAnimator structure contains only private data and +// should be accessed using the provided API +struct Animator /* : GObject.Object */ /* Version 1.2 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance object; + GObject2.Object parent_instance; + private AnimatorPrivate* priv; + + + // Creates a new #ClutterAnimator instance + // RETURNS: a new #ClutterAnimator. + static Animator* /*new*/ new_() { + return clutter_animator_new(); + } + + // Compute the value for a managed property at a given progress. + // + // If the property is an ease-in property, the current value of the property + // on the object will be used as the starting point for computation. + // + // an error occurs or the progress is before any of the keys) %FALSE is + // returned and the #GValue is left untouched + // RETURNS: %TRUE if the computation yields has a value, otherwise (when + // : a #GObject + // : the name of the property on object to check + // : a value between 0.0 and 1.0 + // : an initialized value to store the computed result + int compute_value(GObject2.Object* object, char* property_name, double progress, GObject2.Value* value) { + return clutter_animator_compute_value(&this, object, property_name, progress, value); + } + + // Retrieves the current duration of an animator + // RETURNS: the duration of the animation, in milliseconds + uint get_duration() { + return clutter_animator_get_duration(&this); + } + + // Returns a list of pointers to opaque structures with accessor functions + // that describe the keys added to an animator. + // + // list of #ClutterAnimatorKeys; the contents of the list are owned + // by the #ClutterAnimator, but you should free the returned list when done, + // using g_list_free() + // RETURNS: a + // : a #GObject to search for, or %NULL for all objects + // : a specific property name to query for, or %NULL for all properties + // : a specific progress to search for, or a negative value for all progresses + GLib2.List* /*new container*/ get_keys(GObject2.Object* object, char* property_name, double progress) { + return clutter_animator_get_keys(&this, object, property_name, progress); + } + + // Get the timeline hooked up for driving the #ClutterAnimator + // RETURNS: the #ClutterTimeline that drives the animator + Timeline* get_timeline() { + return clutter_animator_get_timeline(&this); + } + + // Checks if a property value is to be eased into the animation. + // RETURNS: %TRUE if the property is eased in + // : a #GObject + // : the name of a property on object + int property_get_ease_in(GObject2.Object* object, char* property_name) { + return clutter_animator_property_get_ease_in(&this, object, property_name); + } + + // Get the interpolation used by animator for a property on a particular + // object. + // RETURNS: a ClutterInterpolation value. + // : a #GObject + // : the name of a property on object + Interpolation property_get_interpolation(GObject2.Object* object, char* property_name) { + return clutter_animator_property_get_interpolation(&this, object, property_name); + } + + // Sets whether a property value is to be eased into the animation. + // : a #GObject + // : the name of a property on object + // : we are going to be easing in this property + void property_set_ease_in(GObject2.Object* object, char* property_name, int ease_in) { + clutter_animator_property_set_ease_in(&this, object, property_name, ease_in); + } + + // Set the interpolation method to use, %CLUTTER_INTERPOLATION_LINEAR causes + // the values to linearly change between the values, and + // %CLUTTER_INTERPOLATION_CUBIC causes the values to smoothly change between + // the values. + // : a #GObject + // : the name of a property on object + // : the #ClutterInterpolation to use + void property_set_interpolation(GObject2.Object* object, char* property_name, Interpolation interpolation) { + clutter_animator_property_set_interpolation(&this, object, property_name, interpolation); + } + + // Removes all keys matching the conditions specificed in the arguments. + // : a #GObject to search for, or %NULL for all + // : a specific property name to query for, or %NULL for all + // : a specific progress to search for or a negative value for all + void remove_key(GObject2.Object* object, char* property_name, double progress) { + clutter_animator_remove_key(&this, object, property_name, progress); + } + + // Unintrospectable method: set() / clutter_animator_set() + // Adds multiple keys to a #ClutterAnimator, specifying the value a given + // property should have at a given progress of the animation. The mode + // specified is the mode used when going to this key from the previous key of + // the @property_name + // + // If a given (object, property, progress) tuple already exist the mode and + // value will be replaced with the new values. + // : a #GObject + // : the property to specify a key for + // : the id of the alpha function to use + // : at which stage of the animation this value applies; the range is a normalized floating point value between 0 and 1 + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_animator_set set; // Variadic + +/ + + // Runs the timeline of the #ClutterAnimator with a duration in msecs + // as specified. + // : milliseconds a run of the animator should last. + void set_duration(uint duration) { + clutter_animator_set_duration(&this, duration); + } + + // Sets a single key in the #ClutterAnimator for the @property_name of + // @object at @progress. + // + // See also: clutter_animator_set() + // RETURNS: The animator instance + // : a #GObject + // : the property to specify a key for + // : the id of the alpha function to use + // : the normalized range at which stage of the animation this value applies + // : the value property_name should have at progress. + Animator* set_key(GObject2.Object* object, char* property_name, uint mode, double progress, GObject2.Value* value) { + return clutter_animator_set_key(&this, object, property_name, mode, progress, value); + } + + // Sets an external timeline that will be used for driving the animation + // : a #ClutterTimeline + void set_timeline(Timeline* timeline) { + clutter_animator_set_timeline(&this, timeline); + } + + // Start the ClutterAnimator, this is a thin wrapper that rewinds + // and starts the animators current timeline. + // + // the animator. The returned timeline is owned by the #ClutterAnimator + // and it should not be unreferenced + // RETURNS: the #ClutterTimeline that drives + Timeline* start() { + return clutter_animator_start(&this); + } +} + +// The #ClutterAnimatorClass structure contains only private data +struct AnimatorClass /* Version 1.2 */ { + private GObject2.ObjectClass parent_class; + private void*[16] _padding_dummy; +} + +// A key frame inside a #ClutterAnimator +struct AnimatorKey /* Version 1.2 */ { + + // Retrieves the mode of a #ClutterAnimator key, for the first key of a + // property for an object this represents the whether the animation is + // open ended and or curved for the remainding keys for the property it + // represents the easing mode. + // RETURNS: the mode of a #ClutterAnimatorKey + c_ulong get_mode() { + return clutter_animator_key_get_mode(&this); + } + + // Retrieves the object a key applies to. + // RETURNS: the object an animator_key exist for. + GObject2.Object* get_object() { + return clutter_animator_key_get_object(&this); + } + + // Retrieves the progress of an clutter_animator_key + // RETURNS: the progress defined for a #ClutterAnimator key. + double get_progress() { + return clutter_animator_key_get_progress(&this); + } + + // Retrieves the name of the property a key applies to. + // RETURNS: the name of the property an animator_key exist for. + char* get_property_name() { + return clutter_animator_key_get_property_name(&this); + } + + // Retrieves the #GType of the property a key applies to + // + // You can use this type to initialize the #GValue to pass to + // clutter_animator_key_get_value() + // RETURNS: the #GType of the property + Type get_property_type() { + return clutter_animator_key_get_property_type(&this); + } + + // Retrieves a copy of the value for a #ClutterAnimatorKey. + // + // The passed in #GValue needs to be already initialized for the value + // type of the key or to a type that allow transformation from the value + // type of the key. + // + // Use g_value_unset() when done. + // + // %FALSE otherwise + // RETURNS: %TRUE if the passed #GValue was successfully set, and + // : a #GValue initialized with the correct type for the animator key + int get_value(GObject2.Value* value) { + return clutter_animator_key_get_value(&this, value); + } +} + +struct AnimatorPrivate { +} + +// Common members for a #ClutterEvent +struct AnyEvent /* Version 0.2 */ { + EventType type; + uint time; + EventFlags flags; + Stage* stage; + Actor* source; +} + +enum int Aogonek = 417; +enum int ApplicationLeft = 269025104; +enum int ApplicationRight = 269025105; +enum int Arabic_0 = 16778848; +enum int Arabic_1 = 16778849; +enum int Arabic_2 = 16778850; +enum int Arabic_3 = 16778851; +enum int Arabic_4 = 16778852; +enum int Arabic_5 = 16778853; +enum int Arabic_6 = 16778854; +enum int Arabic_7 = 16778855; +enum int Arabic_8 = 16778856; +enum int Arabic_9 = 16778857; +enum int Arabic_ain = 1497; +enum int Arabic_alef = 1479; +enum int Arabic_alefmaksura = 1513; +enum int Arabic_beh = 1480; +enum int Arabic_comma = 1452; +enum int Arabic_dad = 1494; +enum int Arabic_dal = 1487; +enum int Arabic_damma = 1519; +enum int Arabic_dammatan = 1516; +enum int Arabic_ddal = 16778888; +enum int Arabic_farsi_yeh = 16778956; +enum int Arabic_fatha = 1518; +enum int Arabic_fathatan = 1515; +enum int Arabic_feh = 1505; +enum int Arabic_fullstop = 16778964; +enum int Arabic_gaf = 16778927; +enum int Arabic_ghain = 1498; +enum int Arabic_ha = 1511; +enum int Arabic_hah = 1485; +enum int Arabic_hamza = 1473; +enum int Arabic_hamza_above = 16778836; +enum int Arabic_hamza_below = 16778837; +enum int Arabic_hamzaonalef = 1475; +enum int Arabic_hamzaonwaw = 1476; +enum int Arabic_hamzaonyeh = 1478; +enum int Arabic_hamzaunderalef = 1477; +enum int Arabic_heh = 1511; +enum int Arabic_heh_doachashmee = 16778942; +enum int Arabic_heh_goal = 16778945; +enum int Arabic_jeem = 1484; +enum int Arabic_jeh = 16778904; +enum int Arabic_kaf = 1507; +enum int Arabic_kasra = 1520; +enum int Arabic_kasratan = 1517; +enum int Arabic_keheh = 16778921; +enum int Arabic_khah = 1486; +enum int Arabic_lam = 1508; +enum int Arabic_madda_above = 16778835; +enum int Arabic_maddaonalef = 1474; +enum int Arabic_meem = 1509; +enum int Arabic_noon = 1510; +enum int Arabic_noon_ghunna = 16778938; +enum int Arabic_peh = 16778878; +enum int Arabic_percent = 16778858; +enum int Arabic_qaf = 1506; +enum int Arabic_question_mark = 1471; +enum int Arabic_ra = 1489; +enum int Arabic_rreh = 16778897; +enum int Arabic_sad = 1493; +enum int Arabic_seen = 1491; +enum int Arabic_semicolon = 1467; +enum int Arabic_shadda = 1521; +enum int Arabic_sheen = 1492; +enum int Arabic_sukun = 1522; +enum int Arabic_superscript_alef = 16778864; +enum int Arabic_switch = 65406; +enum int Arabic_tah = 1495; +enum int Arabic_tatweel = 1504; +enum int Arabic_tcheh = 16778886; +enum int Arabic_teh = 1482; +enum int Arabic_tehmarbuta = 1481; +enum int Arabic_thal = 1488; +enum int Arabic_theh = 1483; +enum int Arabic_tteh = 16778873; +enum int Arabic_veh = 16778916; +enum int Arabic_waw = 1512; +enum int Arabic_yeh = 1514; +enum int Arabic_yeh_baree = 16778962; +enum int Arabic_zah = 1496; +enum int Arabic_zain = 1490; +enum int Aring = 197; +enum int Armenian_AT = 16778552; +enum int Armenian_AYB = 16778545; +enum int Armenian_BEN = 16778546; +enum int Armenian_CHA = 16778569; +enum int Armenian_DA = 16778548; +enum int Armenian_DZA = 16778561; +enum int Armenian_E = 16778551; +enum int Armenian_FE = 16778582; +enum int Armenian_GHAT = 16778562; +enum int Armenian_GIM = 16778547; +enum int Armenian_HI = 16778565; +enum int Armenian_HO = 16778560; +enum int Armenian_INI = 16778555; +enum int Armenian_JE = 16778571; +enum int Armenian_KE = 16778580; +enum int Armenian_KEN = 16778559; +enum int Armenian_KHE = 16778557; +enum int Armenian_LYUN = 16778556; +enum int Armenian_MEN = 16778564; +enum int Armenian_NU = 16778566; +enum int Armenian_O = 16778581; +enum int Armenian_PE = 16778570; +enum int Armenian_PYUR = 16778579; +enum int Armenian_RA = 16778572; +enum int Armenian_RE = 16778576; +enum int Armenian_SE = 16778573; +enum int Armenian_SHA = 16778567; +enum int Armenian_TCHE = 16778563; +enum int Armenian_TO = 16778553; +enum int Armenian_TSA = 16778558; +enum int Armenian_TSO = 16778577; +enum int Armenian_TYUN = 16778575; +enum int Armenian_VEV = 16778574; +enum int Armenian_VO = 16778568; +enum int Armenian_VYUN = 16778578; +enum int Armenian_YECH = 16778549; +enum int Armenian_ZA = 16778550; +enum int Armenian_ZHE = 16778554; +enum int Armenian_accent = 16778587; +enum int Armenian_amanak = 16778588; +enum int Armenian_apostrophe = 16778586; +enum int Armenian_at = 16778600; +enum int Armenian_ayb = 16778593; +enum int Armenian_ben = 16778594; +enum int Armenian_but = 16778589; +enum int Armenian_cha = 16778617; +enum int Armenian_da = 16778596; +enum int Armenian_dza = 16778609; +enum int Armenian_e = 16778599; +enum int Armenian_exclam = 16778588; +enum int Armenian_fe = 16778630; +enum int Armenian_full_stop = 16778633; +enum int Armenian_ghat = 16778610; +enum int Armenian_gim = 16778595; +enum int Armenian_hi = 16778613; +enum int Armenian_ho = 16778608; +enum int Armenian_hyphen = 16778634; +enum int Armenian_ini = 16778603; +enum int Armenian_je = 16778619; +enum int Armenian_ke = 16778628; +enum int Armenian_ken = 16778607; +enum int Armenian_khe = 16778605; +enum int Armenian_ligature_ew = 16778631; +enum int Armenian_lyun = 16778604; +enum int Armenian_men = 16778612; +enum int Armenian_nu = 16778614; +enum int Armenian_o = 16778629; +enum int Armenian_paruyk = 16778590; +enum int Armenian_pe = 16778618; +enum int Armenian_pyur = 16778627; +enum int Armenian_question = 16778590; +enum int Armenian_ra = 16778620; +enum int Armenian_re = 16778624; +enum int Armenian_se = 16778621; +enum int Armenian_separation_mark = 16778589; +enum int Armenian_sha = 16778615; +enum int Armenian_shesht = 16778587; +enum int Armenian_tche = 16778611; +enum int Armenian_to = 16778601; +enum int Armenian_tsa = 16778606; +enum int Armenian_tso = 16778625; +enum int Armenian_tyun = 16778623; +enum int Armenian_verjaket = 16778633; +enum int Armenian_vev = 16778622; +enum int Armenian_vo = 16778616; +enum int Armenian_vyun = 16778626; +enum int Armenian_yech = 16778597; +enum int Armenian_yentamna = 16778634; +enum int Armenian_za = 16778598; +enum int Armenian_zhe = 16778602; +enum int Atilde = 195; +enum int AudibleBell_Enable = 65146; +enum int AudioCycleTrack = 269025179; +enum int AudioForward = 269025175; +enum int AudioLowerVolume = 269025041; +enum int AudioMedia = 269025074; +enum int AudioMute = 269025042; +enum int AudioNext = 269025047; +enum int AudioPause = 269025073; +enum int AudioPlay = 269025044; +enum int AudioPrev = 269025046; +enum int AudioRaiseVolume = 269025043; +enum int AudioRandomPlay = 269025177; +enum int AudioRecord = 269025052; +enum int AudioRepeat = 269025176; +enum int AudioRewind = 269025086; +enum int AudioStop = 269025045; +enum int Away = 269025165; +enum int B = 66; +enum int Babovedot = 16784898; +enum int Back = 269025062; +enum int BackForward = 269025087; +enum int BackSpace = 65288; + +// ClutterBackend is an opaque structure whose +// members cannot be directly accessed. +struct Backend /* : GObject.Object */ /* Version 0.4 */ { + alias method_parent this; + alias method_parent super_; + alias method_parent object; + GObject2.Object method_parent; + + + // Retrieves the distance used to verify a double click event + // RETURNS: a distance, in pixels. + uint get_double_click_distance() { + return clutter_backend_get_double_click_distance(&this); + } + + // Gets the maximum time between two button press events, as set + // by clutter_backend_set_double_click_time(). + // RETURNS: a time in milliseconds + uint get_double_click_time() { + return clutter_backend_get_double_click_time(&this); + } + + // Retrieves the default font name as set by + // clutter_backend_set_font_name(). + // + // owned by the #ClutterBackend and should never be modified or freed + // RETURNS: the font name for the backend. The returned string is + char* get_font_name() { + return clutter_backend_get_font_name(&this); + } + + // Retrieves the font options for @backend. + // + // The returned #cairo_font_options_t is owned by the backend and should + // not be modified or freed + // RETURNS: the font options of the #ClutterBackend. + cairo.FontOptions* get_font_options() { + return clutter_backend_get_font_options(&this); + } + + // Gets the resolution for font handling on the screen. + // + // The resolution is a scale factor between points specified in a + // #PangoFontDescription and cairo units. The default value is 96.0, + // meaning that a 10 point font will be 13 units + // high (10 * 96. / 72. = 13.3). + // + // Clutter will set the resolution using the current backend when + // initializing; the resolution is also stored in the + // #ClutterSettings:font-dpi property. + // + // has been set. + // RETURNS: the current resolution, or -1 if no resolution + double get_resolution() { + return clutter_backend_get_resolution(&this); + } + + // Sets the maximum distance used to verify a double click event. + // : a distance, in pixels + void set_double_click_distance(uint distance) { + clutter_backend_set_double_click_distance(&this, distance); + } + + // Sets the maximum time between two button press events, used to + // verify whether it's a double click event or not. + // : milliseconds between two button press events + void set_double_click_time(uint msec) { + clutter_backend_set_double_click_time(&this, msec); + } + + // Sets the default font to be used by Clutter. The @font_name string + // must either be %NULL, which means that the font name from the + // default #ClutterBackend will be used; or be something that can + // be parsed by the pango_font_description_from_string() function. + // : the name of the font + void set_font_name(char* font_name) { + clutter_backend_set_font_name(&this, font_name); + } + + // Sets the new font options for @backend. The #ClutterBackend will + // copy the #cairo_font_options_t. + // + // If @options is %NULL, the first following call to + // clutter_backend_get_font_options() will return the default font + // options for @backend. + // + // This function is intended for actors creating a Pango layout + // using the PangoCairo API. + // : Cairo font options for the backend, or %NULL + void set_font_options(cairo.FontOptions* options) { + clutter_backend_set_font_options(&this, options); + } + + // Sets the resolution for font handling on the screen. This is a + // scale factor between points specified in a #PangoFontDescription + // and cairo units. The default value is 96, meaning that a 10 point + // font will be 13 units high. (10 * 96. / 72. = 13.3). + // + // Applications should never need to call this function. + // : the resolution in "dots per inch" (Physical inches aren't actually involved; the terminology is conventional). + void set_resolution(double dpi) { + clutter_backend_set_resolution(&this, dpi); + } + + // The ::font-changed signal is emitted each time the font options + // have been changed through #ClutterSettings. + extern (C) alias static void function (Backend* this_, void* user_data=null) signal_font_changed; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"font-changed", CB:signal_font_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"font-changed", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::resolution-changed signal is emitted each time the font + // resolutions has been changed through #ClutterSettings. + extern (C) alias static void function (Backend* this_, void* user_data=null) signal_resolution_changed; + ulong signal_connect(string name:"resolution-changed", CB:signal_resolution_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"resolution-changed", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::settings-changed signal is emitted each time the #ClutterSettings + // properties have been changed. + extern (C) alias static void function (Backend* this_, void* user_data=null) signal_settings_changed; + ulong signal_connect(string name:"settings-changed", CB:signal_settings_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"settings-changed", + cast(GObject2.Callback)cb, data, null, cf); + } +} + +struct BackendClass { +} + +enum int Battery = 269025171; +enum int Begin = 65368; + +// #ClutterBehaviour-struct contains only private data and should +// be accessed with the functions below. +struct Behaviour /* : GObject.Object */ /* Version 0.2 */ { + alias parent this; + alias parent super_; + alias parent object; + GObject2.Object parent; + private BehaviourPrivate* priv; + + + // Calls @func for every actor driven by @behave. + // : a function called for each actor + // : optional data to be passed to the function, or %NULL + void actors_foreach(BehaviourForeachFunc func, void* data) { + clutter_behaviour_actors_foreach(&this, func, data); + } + + // Applies @behave to @actor. This function adds a reference on + // the actor. + // : a #ClutterActor + void apply(Actor* actor) { + clutter_behaviour_apply(&this, actor); + } + + // Retrieves all the actors to which @behave applies. It is not recommended + // for derived classes to use this in there alpha notify method but use + // #clutter_behaviour_actors_foreach as it avoids alot of needless allocations. + // + // actors. You should free the returned list with g_slist_free() when + // finished using it. + // RETURNS: a list of + GLib2.SList* /*new container*/ get_actors() { + return clutter_behaviour_get_actors(&this); + } + + // Retrieves the #ClutterAlpha object bound to @behave. + // + // object has been bound to this behaviour. + // RETURNS: a #ClutterAlpha object, or %NULL if no alpha + Alpha* get_alpha() { + return clutter_behaviour_get_alpha(&this); + } + + // Gets the number of actors this behaviour is applied too. + // RETURNS: The number of applied actors + int get_n_actors() { + return clutter_behaviour_get_n_actors(&this); + } + + // Gets an actor the behaviour was applied to referenced by index num. + // RETURNS: A Clutter actor or NULL if @index_ is invalid. + // : the index of an actor this behaviour is applied too. + Actor* get_nth_actor(int index_) { + return clutter_behaviour_get_nth_actor(&this, index_); + } + + // Check if @behave applied to @actor. + // RETURNS: TRUE if actor has behaviour. FALSE otherwise. + // : a #ClutterActor + int is_applied(Actor* actor) { + return clutter_behaviour_is_applied(&this, actor); + } + + // Removes @actor from the list of #ClutterActors to which + // @behave applies. This function removes a reference on the actor. + // : a #ClutterActor + void remove(Actor* actor) { + clutter_behaviour_remove(&this, actor); + } + // Removes every actor from the list that @behave holds. + void remove_all() { + clutter_behaviour_remove_all(&this); + } + + // Binds @alpha to a #ClutterBehaviour. The #ClutterAlpha object + // is what makes a behaviour work: for each tick of the timeline + // used by #ClutterAlpha a new value of the alpha parameter is + // computed by the alpha function; the value should be used by + // the #ClutterBehaviour to update one or more properties of the + // actors to which the behaviour applies. + // + // If @alpha is not %NULL, the #ClutterBehaviour will take ownership + // of the #ClutterAlpha instance. + // : a #ClutterAlpha or %NULL to unset a previously set alpha + void set_alpha(Alpha* alpha) { + clutter_behaviour_set_alpha(&this, alpha); + } + + // The ::apply signal is emitted each time the behaviour is applied + // to an actor. + // : the actor the behaviour was applied to. + extern (C) alias static void function (Behaviour* this_, Actor* actor, void* user_data=null) signal_applied; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"applied", CB:signal_applied)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"applied", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::removed signal is emitted each time a behaviour is not applied + // to an actor anymore. + // : the removed actor + extern (C) alias static void function (Behaviour* this_, Actor* actor, void* user_data=null) signal_removed; + ulong signal_connect(string name:"removed", CB:signal_removed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"removed", + cast(GObject2.Callback)cb, data, null, cf); + } +} + +// Base class for behaviours. +struct BehaviourClass /* Version 0.2 */ { + private GObject2.ObjectClass parent_class; + extern (C) void function (Behaviour* behave, double alpha_value) alpha_notify; + extern (C) void function (Behaviour* behave, Actor* actor) applied; + extern (C) void function (Behaviour* behave, Actor* actor) removed; + extern (C) void function () _clutter_behaviour1; + extern (C) void function () _clutter_behaviour2; + extern (C) void function () _clutter_behaviour3; + extern (C) void function () _clutter_behaviour4; + extern (C) void function () _clutter_behaviour5; + extern (C) void function () _clutter_behaviour6; +} + + +// The #ClutterBehaviourDepth structure contains only private data +// and should be accessed using the provided API +// +// +// instead. +struct BehaviourDepth /* : Behaviour */ /* Version 0.2 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance behaviour; + Behaviour parent_instance; + private BehaviourDepthPrivate* priv; + + + // Creates a new #ClutterBehaviourDepth which can be used to control + // the ClutterActor:depth property of a set of #ClutterActors. + // + // If @alpha is not %NULL, the #ClutterBehaviour will take ownership + // of the #ClutterAlpha instance. In the case when @alpha is %NULL, + // it can be set later with clutter_behaviour_set_alpha(). + // RETURNS: the newly created behaviour + // : a #ClutterAlpha instance, or %NULL + // : initial value of the depth + // : final value of the depth + static BehaviourDepth* /*new*/ new_(Alpha* alpha, int depth_start, int depth_end) { + return clutter_behaviour_depth_new(alpha, depth_start, depth_end); + } + + // Gets the boundaries of the @behaviour + // : return location for the initial depth value, or %NULL + // : return location for the final depth value, or %NULL + void get_bounds(/*out*/ int* depth_start, /*out*/ int* depth_end) { + clutter_behaviour_depth_get_bounds(&this, depth_start, depth_end); + } + + // Sets the boundaries of the @behaviour. + // : initial value of the depth + // : final value of the depth + void set_bounds(int depth_start, int depth_end) { + clutter_behaviour_depth_set_bounds(&this, depth_start, depth_end); + } +} + +// The #ClutterBehaviourDepthClass structure contains only private data +struct BehaviourDepthClass /* Version 0.2 */ { + private BehaviourClass parent_class; +} + +struct BehaviourDepthPrivate { +} + + +// The #ClutterBehaviourEllipse struct contains only private data +// and should be accessed using the provided API +struct BehaviourEllipse /* : Behaviour */ /* Version 0.4 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance behaviour; + Behaviour parent_instance; + private BehaviourEllipsePrivate* priv; + + + // Creates a behaviour that drives actors along an elliptical path with + // given center, width and height; the movement starts at @start + // degrees (with 0 corresponding to 12 o'clock) and ends at @end + // degrees. Angles greated than 360 degrees get clamped to the canonical + // interval <0, 360); if @start is equal to @end, the behaviour will + // rotate by exacly 360 degrees. + // + // If @alpha is not %NULL, the #ClutterBehaviour will take ownership + // of the #ClutterAlpha instance. In the case when @alpha is %NULL, + // it can be set later with clutter_behaviour_set_alpha(). + // RETURNS: the newly created #ClutterBehaviourEllipse + // : a #ClutterAlpha instance, or %NULL + // : x coordinace of the center + // : y coordiance of the center + // : width of the ellipse + // : height of the ellipse + // : #ClutterRotateDirection of rotation + // : angle in degrees at which movement starts, between 0 and 360 + // : angle in degrees at which movement ends, between 0 and 360 + static BehaviourEllipse* /*new*/ new_(Alpha* alpha, int x, int y, int width, int height, RotateDirection direction, double start, double end) { + return clutter_behaviour_ellipse_new(alpha, x, y, width, height, direction, start, end); + } + + // Gets the at which movements ends. + // RETURNS: angle in degrees + double get_angle_end() { + return clutter_behaviour_ellipse_get_angle_end(&this); + } + + // Gets the angle at which movements starts. + // RETURNS: angle in degrees + double get_angle_start() { + return clutter_behaviour_ellipse_get_angle_start(&this); + } + + // Gets the tilt of the ellipse around the center in the given axis. + // RETURNS: angle in degrees. + // : a #ClutterRotateAxis + double get_angle_tilt(RotateAxis axis) { + return clutter_behaviour_ellipse_get_angle_tilt(&this, axis); + } + + // Gets the center of the elliptical path path. + // : return location for the X coordinate of the center, or %NULL + // : return location for the Y coordinate of the center, or %NULL + void get_center(/*out*/ int* x, /*out*/ int* y) { + clutter_behaviour_ellipse_get_center(&this, x, y); + } + + // Retrieves the #ClutterRotateDirection used by the ellipse behaviour. + // RETURNS: the rotation direction + RotateDirection get_direction() { + return clutter_behaviour_ellipse_get_direction(&this); + } + + // Gets the height of the elliptical path. + // RETURNS: the height of the path + int get_height() { + return clutter_behaviour_ellipse_get_height(&this); + } + + // Gets the tilt of the ellipse around the center in Y axis. + // : return location for tilt angle on the X axis, or %NULL. + // : return location for tilt angle on the Y axis, or %NULL. + // : return location for tilt angle on the Z axis, or %NULL. + void get_tilt(/*out*/ double* angle_tilt_x, /*out*/ double* angle_tilt_y, /*out*/ double* angle_tilt_z) { + clutter_behaviour_ellipse_get_tilt(&this, angle_tilt_x, angle_tilt_y, angle_tilt_z); + } + + // Gets the width of the elliptical path. + // RETURNS: the width of the path + int get_width() { + return clutter_behaviour_ellipse_get_width(&this); + } + + // Sets the angle at which movement ends; angles >= 360 degress get clamped + // to the canonical interval <0, 360). + // : angle at which movement ends in degrees, between 0 and 360. + void set_angle_end(double angle_end) { + clutter_behaviour_ellipse_set_angle_end(&this, angle_end); + } + + // Sets the angle at which movement starts; angles >= 360 degress get clamped + // to the canonical interval <0, 360). + // : angle at which movement starts in degrees, between 0 and 360. + void set_angle_start(double angle_start) { + clutter_behaviour_ellipse_set_angle_start(&this, angle_start); + } + + // Sets the angle at which the ellipse should be tilted around it's center. + // : a #ClutterRotateAxis + // : tilt of the elipse around the center in the given axis in degrees. + void set_angle_tilt(RotateAxis axis, double angle_tilt) { + clutter_behaviour_ellipse_set_angle_tilt(&this, axis, angle_tilt); + } + + // Sets the center of the elliptical path to the point represented by knot. + // : x coordinace of centre + // : y coordinace of centre + void set_center(int x, int y) { + clutter_behaviour_ellipse_set_center(&this, x, y); + } + + // Sets the rotation direction used by the ellipse behaviour. + // : the rotation direction + void set_direction(RotateDirection direction) { + clutter_behaviour_ellipse_set_direction(&this, direction); + } + + // Sets the height of the elliptical path. + // : height of the ellipse + void set_height(int height) { + clutter_behaviour_ellipse_set_height(&this, height); + } + + // Sets the angles at which the ellipse should be tilted around it's center. + // : tilt of the elipse around the center in X axis in degrees. + // : tilt of the elipse around the center in Y axis in degrees. + // : tilt of the elipse around the center in Z axis in degrees. + void set_tilt(double angle_tilt_x, double angle_tilt_y, double angle_tilt_z) { + clutter_behaviour_ellipse_set_tilt(&this, angle_tilt_x, angle_tilt_y, angle_tilt_z); + } + + // Sets the width of the elliptical path. + // : width of the ellipse + void set_width(int width) { + clutter_behaviour_ellipse_set_width(&this, width); + } +} + +// The #ClutterBehaviourEllipseClass struct contains only private data +struct BehaviourEllipseClass /* Version 0.4 */ { + private BehaviourClass parent_class; +} + +struct BehaviourEllipsePrivate { +} + + +// This function is passed to clutter_behaviour_actors_foreach() and +// will be called for each actor driven by @behaviour. +// : the #ClutterBehaviour +// : an actor driven by @behaviour +// : optional data passed to the function +extern (C) alias void function (Behaviour* behaviour, Actor* actor, void* data) BehaviourForeachFunc; + + +// The #ClutterBehaviourOpacity structure contains only private data and +// should be accessed using the provided API +// +// +// instead. +struct BehaviourOpacity /* : Behaviour */ /* Version 0.2 */ { + alias parent this; + alias parent super_; + alias parent behaviour; + Behaviour parent; + private BehaviourOpacityPrivate* priv; + + + // Creates a new #ClutterBehaviourOpacity object, driven by @alpha + // which controls the opacity property of every actor, making it + // change in the interval between @opacity_start and @opacity_end. + // + // If @alpha is not %NULL, the #ClutterBehaviour will take ownership + // of the #ClutterAlpha instance. In the case when @alpha is %NULL, + // it can be set later with clutter_behaviour_set_alpha(). + // RETURNS: the newly created #ClutterBehaviourOpacity + // : a #ClutterAlpha instance, or %NULL + // : minimum level of opacity + // : maximum level of opacity + static BehaviourOpacity* /*new*/ new_(Alpha* alpha, ubyte opacity_start, ubyte opacity_end) { + return clutter_behaviour_opacity_new(alpha, opacity_start, opacity_end); + } + + // Gets the initial and final levels of the opacity applied by @behaviour + // on each actor it controls. + // : return location for the minimum level of opacity, or %NULL + // : return location for the maximum level of opacity, or %NULL + void get_bounds(/*out*/ ubyte* opacity_start, /*out*/ ubyte* opacity_end) { + clutter_behaviour_opacity_get_bounds(&this, opacity_start, opacity_end); + } + + // Sets the initial and final levels of the opacity applied by @behaviour + // on each actor it controls. + // : minimum level of opacity + // : maximum level of opacity + void set_bounds(ubyte opacity_start, ubyte opacity_end) { + clutter_behaviour_opacity_set_bounds(&this, opacity_start, opacity_end); + } +} + +// The #ClutterBehaviourOpacityClass structure contains only private data +struct BehaviourOpacityClass /* Version 0.2 */ { + private BehaviourClass parent_class; +} + +struct BehaviourOpacityPrivate { +} + + +// The #ClutterBehaviourPath structure contains only private data +// and should be accessed using the provided API +// +// +// instead. +struct BehaviourPath /* : Behaviour */ /* Version 0.2 */ { + alias parent this; + alias parent super_; + alias parent behaviour; + Behaviour parent; + private BehaviourPathPrivate* priv; + + + // Creates a new path behaviour. You can use this behaviour to drive + // actors along the nodes of a path, described by @path. + // + // This will claim the floating reference on the #ClutterPath so you + // do not need to unref if it. + // + // If @alpha is not %NULL, the #ClutterBehaviour will take ownership + // of the #ClutterAlpha instance. In the case when @alpha is %NULL, + // it can be set later with clutter_behaviour_set_alpha(). + // RETURNS: a #ClutterBehaviour + // : a #ClutterAlpha instance, or %NULL + // : a #ClutterPath or %NULL for an empty path + static BehaviourPath* /*new*/ new_(Alpha* alpha, Path* path) { + return clutter_behaviour_path_new(alpha, path); + } + + // Creates a new path behaviour using the path described by @desc. See + // clutter_path_add_string() for a description of the format. + // + // If @alpha is not %NULL, the #ClutterBehaviour will take ownership + // of the #ClutterAlpha instance. In the case when @alpha is %NULL, + // it can be set later with clutter_behaviour_set_alpha(). + // RETURNS: a #ClutterBehaviour + // : a #ClutterAlpha instance, or %NULL + // : a string description of the path + static BehaviourPath* /*new*/ new_with_description(Alpha* alpha, char* desc) { + return clutter_behaviour_path_new_with_description(alpha, desc); + } + + // Creates a new path behaviour that will make the actors visit all of + // the given knots in order with straight lines in between. + // + // A path will be created where the first knot is used in a + // %CLUTTER_PATH_MOVE_TO and the subsequent knots are used in + // %CLUTTER_PATH_LINE_TOs. + // + // If @alpha is not %NULL, the #ClutterBehaviour will take ownership + // of the #ClutterAlpha instance. In the case when @alpha is %NULL, + // it can be set later with clutter_behaviour_set_alpha(). + // RETURNS: a #ClutterBehaviour + // : a #ClutterAlpha instance, or %NULL + // : an array of #ClutterKnots + // : number of entries in @knots + static BehaviourPath* /*new*/ new_with_knots(Alpha* alpha, Knot* knots, uint n_knots) { + return clutter_behaviour_path_new_with_knots(alpha, knots, n_knots); + } + + // Get the current path of the behaviour + // RETURNS: the path + Path* get_path() { + return clutter_behaviour_path_get_path(&this); + } + + // Change the path that the actors will follow. This will take the + // floating reference on the #ClutterPath so you do not need to unref + // it. + // : the new path to follow + void set_path(Path* path) { + clutter_behaviour_path_set_path(&this, path); + } + + // This signal is emitted each time a node defined inside the path + // is reached. + // : the index of the #ClutterKnot reached + extern (C) alias static void function (BehaviourPath* this_, c_uint knot_num, void* user_data=null) signal_knot_reached; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"knot-reached", CB:signal_knot_reached)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"knot-reached", + cast(GObject2.Callback)cb, data, null, cf); + } +} + +// The #ClutterBehaviourPathClass struct contains only private data +struct BehaviourPathClass /* Version 0.2 */ { + private BehaviourClass parent_class; + extern (C) void function (BehaviourPath* pathb, uint knot_num) knot_reached; + extern (C) void function () _clutter_path_1; + extern (C) void function () _clutter_path_2; + extern (C) void function () _clutter_path_3; + extern (C) void function () _clutter_path_4; +} + +struct BehaviourPathPrivate { +} + +struct BehaviourPrivate { +} + + +// The #ClutterBehaviourRotate struct contains only private data and +// should be accessed using the provided API +struct BehaviourRotate /* : Behaviour */ /* Version 0.4 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance behaviour; + Behaviour parent_instance; + private BehaviourRotatePrivate* priv; + + + // Creates a new #ClutterBehaviourRotate. This behaviour will rotate actors + // bound to it on @axis, following @direction, between @angle_start and + // @angle_end. Angles >= 360 degrees will be clamped to the canonical interval + // <0, 360), if angle_start == angle_end, the behaviour will carry out a + // single rotation of 360 degrees. + // + // If @alpha is not %NULL, the #ClutterBehaviour will take ownership + // of the #ClutterAlpha instance. In the case when @alpha is %NULL, + // it can be set later with clutter_behaviour_set_alpha(). + // RETURNS: the newly created #ClutterBehaviourRotate. + // : a #ClutterAlpha instance, or %NULL + // : the rotation axis + // : the rotation direction + // : the starting angle in degrees, between 0 and 360. + // : the final angle in degrees, between 0 and 360. + static BehaviourRotate* /*new*/ new_(Alpha* alpha, RotateAxis axis, RotateDirection direction, double angle_start, double angle_end) { + return clutter_behaviour_rotate_new(alpha, axis, direction, angle_start, angle_end); + } + + // Retrieves the #ClutterRotateAxis used by the rotate behaviour. + // RETURNS: the rotation axis + RotateAxis get_axis() { + return clutter_behaviour_rotate_get_axis(&this); + } + + // Retrieves the rotation boundaries of the rotate behaviour. + // : return value for the initial angle + // : return value for the final angle + void get_bounds(/*out*/ double* angle_start, /*out*/ double* angle_end) { + clutter_behaviour_rotate_get_bounds(&this, angle_start, angle_end); + } + + // Retrieves the center of rotation set using + // clutter_behaviour_rotate_set_center(). + // : return location for the X center of rotation + // : return location for the Y center of rotation + // : return location for the Z center of rotation + void get_center(/*out*/ int* x, /*out*/ int* y, /*out*/ int* z) { + clutter_behaviour_rotate_get_center(&this, x, y, z); + } + + // Retrieves the #ClutterRotateDirection used by the rotate behaviour. + // RETURNS: the rotation direction + RotateDirection get_direction() { + return clutter_behaviour_rotate_get_direction(&this); + } + + // Sets the axis used by the rotate behaviour. + // : a #ClutterRotateAxis + void set_axis(RotateAxis axis) { + clutter_behaviour_rotate_set_axis(&this, axis); + } + + // Sets the initial and final angles of a rotation behaviour; angles >= 360 + // degrees get clamped to the canonical interval <0, 360). + // : initial angle in degrees, between 0 and 360. + // : final angle in degrees, between 0 and 360. + void set_bounds(double angle_start, double angle_end) { + clutter_behaviour_rotate_set_bounds(&this, angle_start, angle_end); + } + + // Sets the center of rotation. The coordinates are relative to the plane + // normal to the rotation axis set with clutter_behaviour_rotate_set_axis(). + // : X axis center of rotation + // : Y axis center of rotation + // : Z axis center of rotation + void set_center(int x, int y, int z) { + clutter_behaviour_rotate_set_center(&this, x, y, z); + } + + // Sets the rotation direction used by the rotate behaviour. + // : the rotation direction + void set_direction(RotateDirection direction) { + clutter_behaviour_rotate_set_direction(&this, direction); + } +} + +// The #ClutterBehaviourRotateClass struct contains only private data +struct BehaviourRotateClass /* Version 0.4 */ { + private BehaviourClass parent_class; +} + +struct BehaviourRotatePrivate { +} + + +// The #ClutterBehaviourScale struct contains only private data and +// should be accessed using the provided API +// +// +// and #ClutterActor:scale-y instead. +struct BehaviourScale /* : Behaviour */ /* Version 0.2 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance behaviour; + Behaviour parent_instance; + private BehaviourScalePrivate* priv; + + + // Creates a new #ClutterBehaviourScale instance. + // + // If @alpha is not %NULL, the #ClutterBehaviour will take ownership + // of the #ClutterAlpha instance. In the case when @alpha is %NULL, + // it can be set later with clutter_behaviour_set_alpha(). + // RETURNS: the newly created #ClutterBehaviourScale + // : a #ClutterAlpha instance, or %NULL + // : initial scale factor on the X axis + // : initial scale factor on the Y axis + // : final scale factor on the X axis + // : final scale factor on the Y axis + static BehaviourScale* /*new*/ new_(Alpha* alpha, double x_scale_start, double y_scale_start, double x_scale_end, double y_scale_end) { + return clutter_behaviour_scale_new(alpha, x_scale_start, y_scale_start, x_scale_end, y_scale_end); + } + + // Retrieves the bounds used by scale behaviour. + // : return location for the initial scale factor on the X axis, or %NULL + // : return location for the initial scale factor on the Y axis, or %NULL + // : return location for the final scale factor on the X axis, or %NULL + // : return location for the final scale factor on the Y axis, or %NULL + void get_bounds(/*out*/ double* x_scale_start, /*out*/ double* y_scale_start, /*out*/ double* x_scale_end, /*out*/ double* y_scale_end) { + clutter_behaviour_scale_get_bounds(&this, x_scale_start, y_scale_start, x_scale_end, y_scale_end); + } + + // Sets the bounds used by scale behaviour. + // : initial scale factor on the X axis + // : initial scale factor on the Y axis + // : final scale factor on the X axis + // : final scale factor on the Y axis + void set_bounds(double x_scale_start, double y_scale_start, double x_scale_end, double y_scale_end) { + clutter_behaviour_scale_set_bounds(&this, x_scale_start, y_scale_start, x_scale_end, y_scale_end); + } +} + +// The #ClutterBehaviourScaleClass struct contains only private data +struct BehaviourScaleClass /* Version 0.2 */ { + private BehaviourClass parent_class; +} + +struct BehaviourScalePrivate { +} + +// The alignment policies available on each axis for #ClutterBinLayout +enum BinAlignment /* Version 1.2 */ { + FIXED = 0, + FILL = 1, + START = 2, + END = 3, + CENTER = 4 +} + +// The #ClutterBinLayout structure contains only private data +// and should be accessed using the provided API +struct BinLayout /* : LayoutManager */ /* Version 1.2 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance layoutmanager; + LayoutManager parent_instance; + private BinLayoutPrivate* priv; + + + // Creates a new #ClutterBinLayout layout manager + // RETURNS: the newly created layout manager + // : the default alignment policy to be used on the horizontal axis + // : the default alignment policy to be used on the vertical axis + static BinLayout* new_(BinAlignment x_align, BinAlignment y_align) { + return clutter_bin_layout_new(x_align, y_align); + } + + // Adds a #ClutterActor to the container using @self and + // sets the alignment policies for it + // + // This function is equivalent to clutter_container_add_actor() + // and clutter_layout_manager_child_set_property() but it does not + // require a pointer to the #ClutterContainer associated to the + // #ClutterBinLayout + // : a #ClutterActor + // : horizontal alignment policy for @child + // : vertical alignment policy for @child + void add(Actor* child, BinAlignment x_align, BinAlignment y_align) { + clutter_bin_layout_add(&this, child, x_align, y_align); + } + + // Retrieves the horizontal and vertical alignment policies for + // a child of @self + // + // If @child is %NULL the default alignment policies will be returned + // instead + // : a child of @container + // : return location for the horizontal alignment policy + // : return location for the vertical alignment policy + void get_alignment(Actor* child=null, /*out*/ BinAlignment* x_align=null, /*out*/ BinAlignment* y_align=null) { + clutter_bin_layout_get_alignment(&this, child, x_align, y_align); + } + + // Sets the horizontal and vertical alignment policies to be applied + // to a @child of @self + // + // If @child is %NULL then the @x_align and @y_align values will + // be set as the default alignment policies + // : a child of @container + // : the horizontal alignment policy to be used for the @child inside @container + // : the vertical aligment policy to be used on the @child inside @container + void set_alignment(Actor* child, BinAlignment x_align, BinAlignment y_align) { + clutter_bin_layout_set_alignment(&this, child, x_align, y_align); + } +} + + +// The #ClutterBinLayoutClass structure contains only private +// data and should be accessed using the provided API +struct BinLayoutClass /* Version 1.2 */ { + private LayoutManagerClass parent_class; +} + +struct BinLayoutPrivate { +} + + +// ClutterBindConstraint is an opaque structure +// whose members cannot be directly accessed +struct BindConstraint /* : Constraint */ /* Version 1.4 */ { + alias method_parent this; + alias method_parent super_; + alias method_parent constraint; + Constraint method_parent; + + + // Creates a new constraint, binding a #ClutterActor's position to + // the given @coordinate of the position of @source + // RETURNS: the newly created #ClutterBindConstraint + // : the #ClutterActor to use as the source of the binding, or %NULL + // : the coordinate to bind + // : the offset to apply to the binding, in pixels + static BindConstraint* new_(Actor* source, BindCoordinate coordinate, float offset) { + return clutter_bind_constraint_new(source, coordinate, offset); + } + + // Retrieves the bound coordinate of the constraint + // RETURNS: the bound coordinate + BindCoordinate get_coordinate() { + return clutter_bind_constraint_get_coordinate(&this); + } + + // Retrieves the offset set using clutter_bind_constraint_set_offset() + // RETURNS: the offset, in pixels + float get_offset() { + return clutter_bind_constraint_get_offset(&this); + } + + // Retrieves the #ClutterActor set using clutter_bind_constraint_set_source() + // RETURNS: a pointer to the source actor + Actor* get_source() { + return clutter_bind_constraint_get_source(&this); + } + + // Sets the coordinate to bind in the constraint + // : the coordinate to bind + void set_coordinate(BindCoordinate coordinate) { + clutter_bind_constraint_set_coordinate(&this, coordinate); + } + + // Sets the offset to be applied to the constraint + // : the offset to apply, in pixels + void set_offset(float offset) { + clutter_bind_constraint_set_offset(&this, offset); + } + + // Sets the source #ClutterActor for the constraint + // : a #ClutterActor, or %NULL to unset the source + void set_source(Actor* source=null) { + clutter_bind_constraint_set_source(&this, source); + } +} + +struct BindConstraintClass { +} + +// Specifies which property should be used in a binding +enum BindCoordinate /* Version 1.4 */ { + X = 0, + Y = 1, + WIDTH = 2, + HEIGHT = 3, + POSITION = 4, + SIZE = 5 +} + +// The prototype for the callback function registered with +// clutter_binding_pool_install_action() and invoked by +// clutter_binding_pool_activate(). +// +// binding has been handled, and return %FALSE otherwise +// RETURNS: the function should return %TRUE if the key +// : a #GObject +// : the name of the action +// : the key symbol +// : bitmask of the modifier flags +extern (C) alias int function (GObject2.Object* gobject, char* action_name, uint key_val, ModifierType modifiers) BindingActionFunc; + + +// Container of key bindings. The #ClutterBindingPool struct is +// private. +struct BindingPool /* : GObject.Object */ /* Version 1.0 */ { + alias method_parent this; + alias method_parent super_; + alias method_parent object; + GObject2.Object method_parent; + + + // Creates a new #ClutterBindingPool that can be used to store + // key bindings for an actor. The @name must be a unique identifier + // for the binding pool, so that clutter_binding_pool_find() will + // be able to return the correct binding pool. + // + // name. Use g_object_unref() when done. + // RETURNS: the newly created binding pool with the given + // : the name of the binding pool + static BindingPool* /*new*/ new_(char* name) { + return clutter_binding_pool_new(name); + } + + // Finds the #ClutterBindingPool with @name. + // RETURNS: a pointer to the #ClutterBindingPool, or %NULL + // : the name of the binding pool to find + static BindingPool* find(char* name) { + return clutter_binding_pool_find(name); + } + + // Retrieves the #ClutterBindingPool for the given #GObject class + // and, eventually, creates it. This function is a wrapper around + // clutter_binding_pool_new() and uses the class type name as the + // unique name for the binding pool. + // + // Calling this function multiple times will return the same + // #ClutterBindingPool. + // + // A binding pool for a class can also be retrieved using + // clutter_binding_pool_find() with the class type name: + // + // |[ + // pool = clutter_binding_pool_find (G_OBJECT_TYPE_NAME (instance)); + // ]| + // + // The returned #ClutterBindingPool is owned by Clutter and should not + // be freed directly + // RETURNS: the binding pool for the given class. + // : a #GObjectClass pointer + static BindingPool* get_for_class(void* klass) { + return clutter_binding_pool_get_for_class(klass); + } + + // Activates the callback associated to the action that is + // bound to the @key_val and @modifiers pair. + // + // The callback has the following signature: + // + // |[ + // void (* callback) (GObject *gobject, + // const gchar *action_name, + // guint key_val, + // ClutterModifierType modifiers, + // gpointer user_data); + // ]| + // + // Where the #GObject instance is @gobject and the user data + // is the one passed when installing the action with + // clutter_binding_pool_install_action(). + // + // If the action bound to the @key_val, @modifiers pair has been + // blocked using clutter_binding_pool_block_action(), the callback + // will not be invoked, and this function will return %FALSE. + // RETURNS: %TRUE if an action was found and was activated + // : the key symbol + // : bitmask for the modifiers + // : a #GObject + int activate(uint key_val, ModifierType modifiers, GObject2.Object* gobject) { + return clutter_binding_pool_activate(&this, key_val, modifiers, gobject); + } + + // Blocks all the actions with name @action_name inside @pool. + // : an action name + void block_action(char* action_name) { + clutter_binding_pool_block_action(&this, action_name); + } + + // Retrieves the name of the action matching the given key symbol + // and modifiers bitmask. + // + // returned string is owned by the binding pool and should never + // be modified or freed + // RETURNS: the name of the action, if found, or %NULL. The + // : a key symbol + // : a bitmask for the modifiers + char* find_action(uint key_val, ModifierType modifiers) { + return clutter_binding_pool_find_action(&this, key_val, modifiers); + } + + // Installs a new action inside a #ClutterBindingPool. The action + // is bound to @key_val and @modifiers. + // + // The same action name can be used for multiple @key_val, @modifiers + // pairs. + // + // When an action has been activated using clutter_binding_pool_activate() + // the passed @callback will be invoked (with @data). + // + // Actions can be blocked with clutter_binding_pool_block_action() + // and then unblocked using clutter_binding_pool_unblock_action(). + // : the name of the action + // : key symbol + // : bitmask of modifiers + // : function to be called when the action is activated + // : data to be passed to @callback + // : function to be called when the action is removed from the pool + void install_action(char* action_name, uint key_val, ModifierType modifiers, GObject2.Callback callback, void* data, GLib2.DestroyNotify notify) { + clutter_binding_pool_install_action(&this, action_name, key_val, modifiers, callback, data, notify); + } + + // A #GClosure variant of clutter_binding_pool_install_action(). + // + // Installs a new action inside a #ClutterBindingPool. The action + // is bound to @key_val and @modifiers. + // + // The same action name can be used for multiple @key_val, @modifiers + // pairs. + // + // When an action has been activated using clutter_binding_pool_activate() + // the passed @closure will be invoked. + // + // Actions can be blocked with clutter_binding_pool_block_action() + // and then unblocked using clutter_binding_pool_unblock_action(). + // : the name of the action + // : key symbol + // : bitmask of modifiers + // : a #GClosure + void install_closure(char* action_name, uint key_val, ModifierType modifiers, GObject2.Closure* closure) { + clutter_binding_pool_install_closure(&this, action_name, key_val, modifiers, closure); + } + + // Allows overriding the action for @key_val and @modifiers inside a + // #ClutterBindingPool. See clutter_binding_pool_install_action(). + // + // When an action has been activated using clutter_binding_pool_activate() + // the passed @callback will be invoked (with @data). + // + // Actions can be blocked with clutter_binding_pool_block_action() + // and then unblocked using clutter_binding_pool_unblock_action(). + // : key symbol + // : bitmask of modifiers + // : function to be called when the action is activated + // : data to be passed to @callback + // : function to be called when the action is removed from the pool + void override_action(uint key_val, ModifierType modifiers, GObject2.Callback callback, void* data, GLib2.DestroyNotify notify) { + clutter_binding_pool_override_action(&this, key_val, modifiers, callback, data, notify); + } + + // A #GClosure variant of clutter_binding_pool_override_action(). + // + // Allows overriding the action for @key_val and @modifiers inside a + // #ClutterBindingPool. See clutter_binding_pool_install_closure(). + // + // When an action has been activated using clutter_binding_pool_activate() + // the passed @callback will be invoked (with @data). + // + // Actions can be blocked with clutter_binding_pool_block_action() + // and then unblocked using clutter_binding_pool_unblock_action(). + // : key symbol + // : bitmask of modifiers + // : a #GClosure + void override_closure(uint key_val, ModifierType modifiers, GObject2.Closure* closure) { + clutter_binding_pool_override_closure(&this, key_val, modifiers, closure); + } + + // Removes the action matching the given @key_val, @modifiers pair, + // if any exists. + // : a key symbol + // : a bitmask for the modifiers + void remove_action(uint key_val, ModifierType modifiers) { + clutter_binding_pool_remove_action(&this, key_val, modifiers); + } + + // Unblockes all the actions with name @action_name inside @pool. + // + // Unblocking an action does not cause the callback bound to it to + // be invoked in case clutter_binding_pool_activate() was called on + // an action previously blocked with clutter_binding_pool_block_action(). + // : an action name + void unblock_action(char* action_name) { + clutter_binding_pool_unblock_action(&this, action_name); + } +} + +struct BindingPoolClass { +} + +enum int Blue = 269025190; +enum int Bluetooth = 269025172; + +// ClutterBlurEffect is an opaque structure +// whose members cannot be accessed directly +struct BlurEffect /* : OffscreenEffect */ /* Version 1.4 */ { + alias method_parent this; + alias method_parent super_; + alias method_parent offscreeneffect; + OffscreenEffect method_parent; + + + // Creates a new #ClutterBlurEffect to be used with + // clutter_actor_add_effect() + // RETURNS: the newly created #ClutterBlurEffect or %NULL + static BlurEffect* new_() { + return clutter_blur_effect_new(); + } +} + +struct BlurEffectClass { +} + +enum int Book = 269025106; +enum int BounceKeys_Enable = 65140; + +// The #ClutterBox structure contains only private data and should +// be accessed using the provided API +struct Box /* : Actor */ /* Version 1.2 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance actor; + Actor parent_instance; + private BoxPrivate* priv; + + + // Creates a new #ClutterBox. The children of the box will be layed + // out by the passed @manager + // RETURNS: the newly created #ClutterBox actor + // : a #ClutterLayoutManager + static Box* new_(LayoutManager* manager) { + return clutter_box_new(manager); + } + + // Retrieves the background color of @box + // + // If the #ClutterBox:color-set property is set to %FALSE the + // returned #ClutterColor is undefined + // : return location for a #ClutterColor + void get_color(/*out*/ Color* color) { + clutter_box_get_color(&this, color); + } + + // Retrieves the #ClutterLayoutManager instance used by @box + // + // #ClutterLayoutManager is owned by the #ClutterBox and it should not + // be unreferenced + // RETURNS: a #ClutterLayoutManager. The returned + LayoutManager* get_layout_manager() { + return clutter_box_get_layout_manager(&this); + } + + // Unintrospectable method: pack() / clutter_box_pack() + // Adds @actor to @box and sets layout properties at the same time, + // if the #ClutterLayoutManager used by @box has them + // + // This function is a wrapper around clutter_container_add_actor() + // and clutter_layout_manager_child_set() + // + // Language bindings should use the vector-based clutter_box_packv() + // variant instead + // : a #ClutterActor + // : the name of the first property to set, or %NULL + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_box_pack pack; // Variadic + +/ + + // Unintrospectable method: pack_after() / clutter_box_pack_after() + // Adds @actor to @box, placing it after @sibling, and sets layout + // properties at the same time, if the #ClutterLayoutManager used by + // @box supports them + // + // If @sibling is %NULL then @actor is placed at the end of the + // list of children, to be allocated and painted after every other child + // + // This function is a wrapper around clutter_container_add_actor(), + // clutter_container_raise_child() and clutter_layout_manager_child_set() + // : a #ClutterActor + // : a #ClutterActor or %NULL + // : the name of the first property to set, or %NULL + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_box_pack_after pack_after; // Variadic + +/ + + // Unintrospectable method: pack_at() / clutter_box_pack_at() + // Adds @actor to @box, placing it at @position, and sets layout + // properties at the same time, if the #ClutterLayoutManager used by + // @box supports them + // + // If @position is a negative number, or is larger than the number of + // children of @box, the new child is added at the end of the list of + // children + // : a #ClutterActor + // : the position to insert the @actor at + // : the name of the first property to set, or %NULL + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_box_pack_at pack_at; // Variadic + +/ + + // Unintrospectable method: pack_before() / clutter_box_pack_before() + // Adds @actor to @box, placing it before @sibling, and sets layout + // properties at the same time, if the #ClutterLayoutManager used by + // @box supports them + // + // If @sibling is %NULL then @actor is placed at the beginning of the + // list of children, to be allocated and painted below every other child + // + // This function is a wrapper around clutter_container_add_actor(), + // clutter_container_lower_child() and clutter_layout_manager_child_set() + // : a #ClutterActor + // : a #ClutterActor or %NULL + // : the name of the first property to set, or %NULL + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_box_pack_before pack_before; // Variadic + +/ + + // Vector-based variant of clutter_box_pack(), intended for language + // bindings to use + // : a #ClutterActor + // : the number of properties to set + // : a vector containing the property names to set + // : a vector containing the property values to set + void packv(Actor* actor, uint n_properties, char* properties, GObject2.Value* values) { + clutter_box_packv(&this, actor, n_properties, properties, values); + } + + // Sets (or unsets) the background color for @box + // : the background color, or %NULL to unset + void set_color(Color* color=null) { + clutter_box_set_color(&this, color); + } + + // Sets the #ClutterLayoutManager for @box + // + // A #ClutterLayoutManager is a delegate object that controls the + // layout of the children of @box + // : a #ClutterLayoutManager + void set_layout_manager(LayoutManager* manager) { + clutter_box_set_layout_manager(&this, manager); + } +} + +// The alignment policies available on each axis of the #ClutterBoxLayout +enum BoxAlignment /* Version 1.2 */ { + START = 0, + END = 1, + CENTER = 2 +} +// The #ClutterBoxClass structure contains only private data +struct BoxClass /* Version 1.2 */ { + private ActorClass parent_class; + extern (C) void function () clutter_padding_1; + extern (C) void function () clutter_padding_2; + extern (C) void function () clutter_padding_3; + extern (C) void function () clutter_padding_4; + extern (C) void function () clutter_padding_5; + extern (C) void function () clutter_padding_6; +} + + +// The #ClutterBoxLayout structure contains only private data +// and should be accessed using the provided API +struct BoxLayout /* : LayoutManager */ /* Version 1.2 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance layoutmanager; + LayoutManager parent_instance; + private BoxLayoutPrivate* priv; + + + // Creates a new #ClutterBoxLayout layout manager + // RETURNS: the newly created #ClutterBoxLayout + static BoxLayout* new_() { + return clutter_box_layout_new(); + } + + // Retrieves the horizontal and vertical alignment policies for @actor + // as set using clutter_box_layout_pack() or clutter_box_layout_set_alignment() + // : a #ClutterActor child of @layout + // : return location for the horizontal alignment policy + // : return location for the vertical alignment policy + void get_alignment(Actor* actor, /*out*/ BoxAlignment* x_align, /*out*/ BoxAlignment* y_align) { + clutter_box_layout_get_alignment(&this, actor, x_align, y_align); + } + + // Retrieves the duration set using clutter_box_layout_set_easing_duration() + // RETURNS: the duration of the animations, in milliseconds + uint get_easing_duration() { + return clutter_box_layout_get_easing_duration(&this); + } + + // Retrieves the easing mode set using clutter_box_layout_set_easing_mode() + // RETURNS: an easing mode + c_ulong get_easing_mode() { + return clutter_box_layout_get_easing_mode(&this); + } + + // Retrieves whether @actor should expand inside @layout + // RETURNS: %TRUE if the #ClutterActor should expand, %FALSE otherwise + // : a #ClutterActor child of @layout + int get_expand(Actor* actor) { + return clutter_box_layout_get_expand(&this, actor); + } + + // Retrieves the horizontal and vertical fill policies for @actor + // as set using clutter_box_layout_pack() or clutter_box_layout_set_fill() + // : a #ClutterActor child of @layout + // : return location for the horizontal fill policy + // : return location for the vertical fill policy + void get_fill(Actor* actor, /*out*/ int* x_fill, /*out*/ int* y_fill) { + clutter_box_layout_get_fill(&this, actor, x_fill, y_fill); + } + + // Retrieves if the children sizes are allocated homogeneously. + // + // homogeneously, and %FALSE otherwise + // RETURNS: %TRUE if the #ClutterBoxLayout is arranging its children + int get_homogeneous() { + return clutter_box_layout_get_homogeneous(&this); + } + + // Retrieves the value set using clutter_box_layout_set_pack_start() + // + // at the beginning of the layout, and %FALSE otherwise + // RETURNS: %TRUE if the #ClutterBoxLayout should pack children + int get_pack_start() { + return clutter_box_layout_get_pack_start(&this); + } + + // Retrieves the spacing set using clutter_box_layout_set_spacing() + // RETURNS: the spacing between children of the #ClutterBoxLayout + uint get_spacing() { + return clutter_box_layout_get_spacing(&this); + } + + // Retrieves whether @layout should animate changes in the layout properties + // + // Since clutter_box_layout_set_use_animations() + // RETURNS: %TRUE if the animations should be used, %FALSE otherwise + int get_use_animations() { + return clutter_box_layout_get_use_animations(&this); + } + + // Retrieves the orientation of the @layout as set using the + // clutter_box_layout_set_vertical() function + // + // vertically, and %FALSE otherwise + // RETURNS: %TRUE if the #ClutterBoxLayout is arranging its children + int get_vertical() { + return clutter_box_layout_get_vertical(&this); + } + + // Packs @actor inside the #ClutterContainer associated to @layout + // and sets the layout properties + // : a #ClutterActor + // : whether the @actor should expand + // : whether the @actor should fill horizontally + // : whether the @actor should fill vertically + // : the horizontal alignment policy for @actor + // : the vertical alignment policy for @actor + void pack(Actor* actor, int expand, int x_fill, int y_fill, BoxAlignment x_align, BoxAlignment y_align) { + clutter_box_layout_pack(&this, actor, expand, x_fill, y_fill, x_align, y_align); + } + + // Sets the horizontal and vertical alignment policies for @actor + // inside @layout + // : a #ClutterActor child of @layout + // : Horizontal alignment policy for @actor + // : Vertical alignment policy for @actor + void set_alignment(Actor* actor, BoxAlignment x_align, BoxAlignment y_align) { + clutter_box_layout_set_alignment(&this, actor, x_align, y_align); + } + + // Sets the duration of the animations used by @layout when animating changes + // in the layout properties + // + // Use clutter_box_layout_set_use_animations() to enable and disable the + // animations + // : the duration of the animations, in milliseconds + void set_easing_duration(uint msecs) { + clutter_box_layout_set_easing_duration(&this, msecs); + } + + // Sets the easing mode to be used by @layout when animating changes in layout + // properties + // + // Use clutter_box_layout_set_use_animations() to enable and disable the + // animations + // : an easing mode, either from #ClutterAnimationMode or a logical id from clutter_alpha_register_func() + void set_easing_mode(c_ulong mode) { + clutter_box_layout_set_easing_mode(&this, mode); + } + + // Sets whether @actor should expand inside @layout + // : a #ClutterActor child of @layout + // : whether @actor should expand + void set_expand(Actor* actor, int expand) { + clutter_box_layout_set_expand(&this, actor, expand); + } + + // Sets the horizontal and vertical fill policies for @actor + // inside @layout + // : a #ClutterActor child of @layout + // : whether @actor should fill horizontally the allocated space + // : whether @actor should fill vertically the allocated space + void set_fill(Actor* actor, int x_fill, int y_fill) { + clutter_box_layout_set_fill(&this, actor, x_fill, y_fill); + } + + // Sets whether the size of @layout children should be + // homogeneous + // : %TRUE if the layout should be homogeneous + void set_homogeneous(int homogeneous) { + clutter_box_layout_set_homogeneous(&this, homogeneous); + } + + // Sets whether children of @layout should be layed out by appending + // them or by prepending them + // : %TRUE if the @layout should pack children at the beginning of the layout + void set_pack_start(int pack_start) { + clutter_box_layout_set_pack_start(&this, pack_start); + } + + // Sets the spacing between children of @layout + // : the spacing between children of the layout, in pixels + void set_spacing(uint spacing) { + clutter_box_layout_set_spacing(&this, spacing); + } + + // Sets whether @layout should animate changes in the layout properties + // + // The duration of the animations is controlled by + // clutter_box_layout_set_easing_duration(); the easing mode to be used + // by the animations is controlled by clutter_box_layout_set_easing_mode() + // : %TRUE if the @layout should use animations + void set_use_animations(int animate) { + clutter_box_layout_set_use_animations(&this, animate); + } + + // Sets whether @layout should arrange its children vertically alongside + // the Y axis, instead of horizontally alongside the X axis + // : %TRUE if the layout should be vertical + void set_vertical(int vertical) { + clutter_box_layout_set_vertical(&this, vertical); + } +} + + +// The #ClutterBoxLayoutClass structure contains only private +// data and should be accessed using the provided API +struct BoxLayoutClass /* Version 1.2 */ { + private LayoutManagerClass parent_class; +} + +struct BoxLayoutPrivate { +} + +struct BoxPrivate { +} + +enum int Break = 65387; +enum int BrightnessAdjust = 269025083; + +// Button event. +// +// The event coordinates are relative to the stage that received the +// event, and can be transformed into actor-relative coordinates by +// using clutter_actor_transform_stage_point(). +struct ButtonEvent /* Version 0.2 */ { + EventType type; + uint time; + EventFlags flags; + Stage* stage; + Actor* source; + float x, y; + ModifierType modifier_state; + uint button; + uint click_count; + double* axes; + InputDevice* device; +} + +enum int Byelorussian_SHORTU = 1726; +enum int Byelorussian_shortu = 1710; +enum int C = 67; +enum int CD = 269025107; +enum COGL = "undefined"; +enum int CURRENT_TIME = 0; +enum int Cabovedot = 709; +enum int Cacute = 454; +// The #ClutterCairoTexture struct contains only private data. +struct CairoTexture /* : Texture */ /* Version 1.0 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance texture; + Texture parent_instance; + private CairoTexturePrivate* priv; + + + // Creates a new #ClutterCairoTexture actor, with a surface of @width by + // @height pixels. + // RETURNS: the newly created #ClutterCairoTexture actor + // : the width of the surface + // : the height of the surface + static CairoTexture* new_(uint width, uint height) { + return clutter_cairo_texture_new(width, height); + } + + // Clears @self's internal drawing surface, so that the next upload + // will replace the previous contents of the #ClutterCairoTexture + // rather than adding to it. + // + // Calling this function from within a #ClutterCairoTexture::draw + // signal handler will clear the invalidated area. + void clear() { + clutter_cairo_texture_clear(&this); + } + + // Creates a new Cairo context for the @cairo texture. It is + // similar to using clutter_cairo_texture_create_region() with @x_offset + // and @y_offset of 0, @width equal to the @cairo texture surface width + // and @height equal to the @cairo texture surface height. + // + // Do not call this function within the paint virtual + // function or from a callback to the #ClutterActor::paint + // signal. + // + // to upload the contents of the context when done drawing + // + // + // the clutter_cairo_texture_invalidate() function to obtain a + // Cairo context for 2D drawing. + // RETURNS: a newly created Cairo context. Use cairo_destroy() + cairo.Context* /*new*/ create() { + return clutter_cairo_texture_create(&this); + } + + // Creates a new Cairo context that will updat the region defined + // by @x_offset, @y_offset, @width and @height. + // + // Do not call this function within the paint virtual + // function or from a callback to the #ClutterActor::paint + // signal. + // + // to upload the contents of the context when done drawing + // + // + // clutter_cairo_texture_invalidate_rectangle() to obtain a + // clipped Cairo context for 2D drawing. + // RETURNS: a newly created Cairo context. Use cairo_destroy() + // : offset of the region on the X axis + // : offset of the region on the Y axis + // : width of the region, or -1 for the full surface width + // : height of the region, or -1 for the full surface height + cairo.Context* /*new*/ create_region(int x_offset, int y_offset, int width, int height) { + return clutter_cairo_texture_create_region(&this, x_offset, y_offset, width, height); + } + + // Retrieves the value set using clutter_cairo_texture_set_auto_resize(). + // + // allocation, and %FALSE otherwise + // RETURNS: %TRUE if the #ClutterCairoTexture should track the + int get_auto_resize() { + return clutter_cairo_texture_get_auto_resize(&this); + } + + // Retrieves the surface width and height for @self. + // : return location for the surface width, or %NULL + // : return location for the surface height, or %NULL + void get_surface_size(/*out*/ uint* width, /*out*/ uint* height) { + clutter_cairo_texture_get_surface_size(&this, width, height); + } + + // Invalidates the whole surface of a #ClutterCairoTexture. + // + // This function will cause the #ClutterCairoTexture::draw signal + // to be emitted. + // + // See also: clutter_cairo_texture_invalidate_rectangle() + void invalidate() { + clutter_cairo_texture_invalidate(&this); + } + + // Invalidates a rectangular region of a #ClutterCairoTexture. + // + // The invalidation will cause the #ClutterCairoTexture::draw signal + // to be emitted. + // + // See also: clutter_cairo_texture_invalidate() + // : a rectangle with the area to invalida, or %NULL to perform an unbounded invalidation + void invalidate_rectangle(cairo.RectangleInt* rect=null) { + clutter_cairo_texture_invalidate_rectangle(&this, rect); + } + + // Sets whether the #ClutterCairoTexture should ensure that the + // backing Cairo surface used matches the allocation assigned to + // the actor. If the allocation changes, the contents of the + // #ClutterCairoTexture will also be invalidated automatically. + // : %TRUE if the #ClutterCairoTexture should bind the surface size to the allocation + void set_auto_resize(int value) { + clutter_cairo_texture_set_auto_resize(&this, value); + } + + // Resizes the Cairo surface used by @self to @width and @height. + // + // This function will not invalidate the contents of the Cairo + // texture: you will have to explicitly call either + // clutter_cairo_texture_invalidate_rectangle() or + // clutter_cairo_texture_invalidate(). + // : the new width of the surface + // : the new height of the surface + void set_surface_size(uint width, uint height) { + clutter_cairo_texture_set_surface_size(&this, width, height); + } + + // The ::create-surface signal is emitted when a #ClutterCairoTexture + // news its surface (re)created, which happens either when the Cairo + // context is created with clutter_cairo_texture_create() or + // clutter_cairo_texture_create_region(), or when the surface is resized + // through clutter_cairo_texture_set_surface_size(). + // + // The first signal handler that returns a non-%NULL, valid surface will + // stop any further signal emission, and the returned surface will be + // the one used. + // RETURNS: the newly created #cairo_surface_t for the texture + // : the width of the surface to create + // : the height of the surface to create + extern (C) alias static cairo.Surface* /*new*/ function (CairoTexture* this_, c_uint width, c_uint height, void* user_data=null) signal_create_surface; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"create-surface", CB:signal_create_surface)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"create-surface", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::draw signal is emitted each time a #ClutterCairoTexture has + // been invalidated. + // + // The passed Cairo context passed will be clipped to the invalidated + // area. + // + // It is safe to connect multiple callbacks to this signals; the state + // of the Cairo context passed to each callback is automatically saved + // and restored, so it's not necessary to call cairo_save() and + // cairo_restore(). + // + // to continue + // RETURNS: %TRUE if the signal emission should stop, and %FALSE + // : the Cairo context to use to draw + extern (C) alias static c_int function (CairoTexture* this_, cairo.Context* cr, void* user_data=null) signal_draw; + ulong signal_connect(string name:"draw", CB:signal_draw)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"draw", + cast(GObject2.Callback)cb, data, null, cf); + } +} + +// The #ClutterCairoTextureClass struct contains only private data. +struct CairoTextureClass /* Version 1.0 */ { + private TextureClass parent_class; + extern (C) cairo.Surface* /*new*/ function (CairoTexture* texture, uint width, uint height) create_surface; + extern (C) int function (CairoTexture* texture, cairo.Context* cr) draw; + extern (C) void function () _clutter_cairo_3; + extern (C) void function () _clutter_cairo_4; +} + +struct CairoTexturePrivate { +} + +enum int Calculator = 269025053; +enum int Calendar = 269025056; + +// Generic callback +// : a #ClutterActor +// : user data +extern (C) alias void function (Actor* actor, void* data) Callback; + +enum int Cancel = 65385; +enum int Caps_Lock = 65509; +enum int Ccaron = 456; +enum int Ccedilla = 199; +enum int Ccircumflex = 710; + +// Base interface for container specific state for child actors. A child +// data is meant to be used when you need to keep track of information +// about each individual child added to a container. +// +// In order to use it you should create your own subclass of +// #ClutterChildMeta and set the #ClutterContainerIface child_meta_type +// interface member to your subclass type, like: +// +// |[ +// static void +// my_container_iface_init (ClutterContainerIface *iface) +// { +// /* set the rest of the #ClutterContainer vtable */ +// +// container_iface->child_meta_type = MY_TYPE_CHILD_META; +// } +// ]| +// +// This will automatically create a #ClutterChildMeta of type +// MY_TYPE_CHILD_META for every actor that is added to the container. +// +// The child data for an actor can be retrieved using the +// clutter_container_get_child_meta() function. +// +// The properties of the data and your subclass can be manipulated with +// clutter_container_child_set() and clutter_container_child_get() which +// act like g_object_set() and g_object_get(). +// +// You can provide hooks for your own storage as well as control the +// instantiation by overriding the #ClutterContainerIface virtual functions +// create_child_meta, +// destroy_child_meta, +// and get_child_meta. +struct ChildMeta /* : GObject.Object */ /* Version 0.8 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance object; + GObject2.Object parent_instance; + Container* container; + Actor* actor; + + + // Retrieves the actor wrapped by @data + // RETURNS: a #ClutterActor + Actor* get_actor() { + return clutter_child_meta_get_actor(&this); + } + + // Retrieves the container using @data + // RETURNS: a #ClutterContainer + Container* get_container() { + return clutter_child_meta_get_container(&this); + } +} + +// The #ClutterChildMetaClass contains only private data +struct ChildMetaClass /* Version 0.8 */ { + private GObject2.ObjectClass parent_class; +} + +enum int Clear = 65291; +enum int ClearGrab = 269024801; + +// The ClutterClickAction structure contains +// only private data and should be accessed using the provided API +struct ClickAction /* : Action */ /* Version 1.4 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance action; + Action parent_instance; + private ClickActionPrivate* priv; + + + // Creates a new #ClutterClickAction instance + // RETURNS: the newly created #ClutterClickAction + static ClickAction* new_() { + return clutter_click_action_new(); + } + + // Retrieves the button that was pressed. + // RETURNS: the button value + uint get_button() { + return clutter_click_action_get_button(&this); + } + + // Retrieves the screen coordinates of the button press. + // : return location for the X coordinate, or %NULL + // : return location for the Y coordinate, or %NULL + void get_coords(/*out*/ float* press_x, /*out*/ float* press_y) { + clutter_click_action_get_coords(&this, press_x, press_y); + } + + // Retrieves the modifier state of the click action. + // RETURNS: the modifier state parameter, or 0 + ModifierType get_state() { + return clutter_click_action_get_state(&this); + } + + // Emulates a release of the pointer button, which ungrabs the pointer + // and unsets the #ClutterClickAction:pressed state. + // + // This function will also cancel the long press gesture if one was + // initiated. + // + // This function is useful to break a grab, for instance after a certain + // amount of time has passed. + void release() { + clutter_click_action_release(&this); + } + + // The ::clicked signal is emitted when the #ClutterActor to which + // a #ClutterClickAction has been applied should respond to a + // pointer button press and release events + // : the #ClutterActor attached to the @action + extern (C) alias static void function (ClickAction* this_, Actor* actor, void* user_data=null) signal_clicked; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"clicked", CB:signal_clicked)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"clicked", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::long-press signal is emitted during the long press gesture + // handling. + // + // This signal can be emitted multiple times with different states. + // + // The %CLUTTER_LONG_PRESS_QUERY state will be emitted on button presses, + // and its return value will determine whether the long press handling + // should be initiated. If the signal handlers will return %TRUE, the + // %CLUTTER_LONG_PRESS_QUERY state will be followed either by a signal + // emission with the %CLUTTER_LONG_PRESS_ACTIVATE state if the long press + // constraints were respected, or by a signal emission with the + // %CLUTTER_LONG_PRESS_CANCEL state if the long press was cancelled. + // + // It is possible to forcibly cancel a long press detection using + // clutter_click_action_release(). + // + // returned value of the handler; other states will ignore it + // RETURNS: Only the %CLUTTER_LONG_PRESS_QUERY state uses the + // : the #ClutterActor attached to the @action + // : the long press state + extern (C) alias static c_int function (ClickAction* this_, Actor* actor, LongPressState* state, void* user_data=null) signal_long_press; + ulong signal_connect(string name:"long-press", CB:signal_long_press)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"long-press", + cast(GObject2.Callback)cb, data, null, cf); + } +} + + +// The ClutterClickActionClass structure +// contains only private data +struct ClickActionClass /* Version 1.4 */ { + private ActionClass parent_class; + extern (C) void function (ClickAction* action, Actor* actor) clicked; + extern (C) int function (ClickAction* action, Actor* actor, LongPressState state) long_press; + extern (C) void function () _clutter_click_action1; + extern (C) void function () _clutter_click_action2; + extern (C) void function () _clutter_click_action3; + extern (C) void function () _clutter_click_action4; + extern (C) void function () _clutter_click_action5; + extern (C) void function () _clutter_click_action6; + extern (C) void function () _clutter_click_action7; +} + +struct ClickActionPrivate { +} + + +// The #ClutterClone structure contains only private data +// and should be accessed using the provided API +struct Clone /* : Actor */ /* Version 1.0 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance actor; + Actor parent_instance; + private ClonePrivate* priv; + + + // Creates a new #ClutterActor which clones @source/ + // RETURNS: the newly created #ClutterClone + // : a #ClutterActor, or %NULL + static Clone* new_(Actor* source) { + return clutter_clone_new(source); + } + + // Retrieves the source #ClutterActor being cloned by @clone + // RETURNS: the actor source for the clone + Actor* get_source() { + return clutter_clone_get_source(&this); + } + + // Sets @source as the source actor to be cloned by @clone. + // : a #ClutterActor, or %NULL + void set_source(Actor* source) { + clutter_clone_set_source(&this, source); + } +} + +// The #ClutterCloneClass structure contains only private data +struct CloneClass /* Version 1.0 */ { + private ActorClass parent_class; + extern (C) void function () _clutter_actor_clone1; + extern (C) void function () _clutter_actor_clone2; + extern (C) void function () _clutter_actor_clone3; + extern (C) void function () _clutter_actor_clone4; +} + +struct ClonePrivate { +} + +enum int Close = 269025110; +enum int Codeinput = 65335; +enum int ColonSign = 16785569; +// Color representation. +struct Color { + ubyte red, green, blue, alpha; + + + // Creates a new #ClutterColor with the given values. + // + // Use clutter_color_free() when done + // RETURNS: the newly allocated color. + // : red component of the color, between 0 and 255 + // : green component of the color, between 0 and 255 + // : blue component of the color, between 0 and 255 + // : alpha component of the color, between 0 and 255 + static Color* /*new*/ new_(ubyte red, ubyte green, ubyte blue, ubyte alpha) { + return clutter_color_new(red, green, blue, alpha); + } + + // Adds @a to @b and saves the resulting color inside @result. + // + // The alpha channel of @result is set as as the maximum value + // between the alpha channels of @a and @b. + // : a #ClutterColor + // : return location for the result + void add(Color* b, /*out*/ Color* result) { + clutter_color_add(&this, b, result); + } + + // Makes a copy of the color structure. The result must be + // freed using clutter_color_free(). + // RETURNS: an allocated copy of @color. + Color* /*new*/ copy() { + return clutter_color_copy(&this); + } + + // Darkens @color by a fixed amount, and saves the changed color + // in @result. + // : return location for the darker color + void darken(/*out*/ Color* result) { + clutter_color_darken(&this, result); + } + // Frees a color structure created with clutter_color_copy(). + void free() { + clutter_color_free(&this); + } + + // Converts a color expressed in HLS (hue, luminance and saturation) + // values into a #ClutterColor. + // : hue value, in the 0 .. 360 range + // : luminance value, in the 0 .. 1 range + // : saturation value, in the 0 .. 1 range + void from_hls(float hue, float luminance, float saturation) { + clutter_color_from_hls(&this, hue, luminance, saturation); + } + + // Converts @pixel from the packed representation of a four 8 bit channel + // color to a #ClutterColor. + // : a 32 bit packed integer containing a color + void from_pixel(uint pixel) { + clutter_color_from_pixel(&this, pixel); + } + + // Parses a string definition of a color, filling the + // red, green, + // blue and alpha + // channels of @color. + // + // The @color is not allocated. + // + // The format of @str can be either one of: + // + // + // + // a standard name (as taken from the X11 rgb.txt file) + // + // + // an hexadecimal value in the form: #rgb, + // #rrggbb, #rgba or + // #rrggbbaa + // + // + // a RGB color in the form: rgb(r, g, b) + // + // + // a RGB color in the form: rgba(r, g, b, a) + // + // + // a HSL color in the form: hsl(h, s, l) + // + // + // a HSL color in the form: hsla(h, s, l, a) + // + // + // + // where 'r', 'g', 'b' and 'a' are (respectively) the red, green, blue color + // intensities and the opacity. The 'h', 's' and 'l' are (respectively) the + // hue, saturation and luminance values. + // + // In the rgb() and rgba() formats, the 'r', 'g', and 'b' values are either + // integers between 0 and 255, or percentage values in the range between 0% + // and 100%; the percentages require the '%' character. The 'a' value, if + // specified, can only be a floating point value between 0.0 and 1.0. + // + // In the hls() and hlsa() formats, the 'h' value (hue) it's an angle between + // 0 and 360.0 degrees; the 'l' and 's' values (luminance and saturation) are + // a floating point value between 0.0 and 1.0. The 'a' value, if specified, + // can only be a floating point value between 0.0 and 1.0. + // + // Whitespace inside the definitions is ignored; no leading whitespace + // is allowed. + // + // If the alpha component is not specified then it is assumed to be set to + // be fully opaque. + // RETURNS: %TRUE if parsing succeeded, and %FALSE otherwise + // : a string specifiying a color + int from_string(char* str) { + return clutter_color_from_string(&this, str); + } + + // Interpolates between @initial and @final #ClutterColors + // using @progress + // : the final #ClutterColor + // : the interpolation progress + // : return location for the interpolation + void interpolate(Color* final, double progress, /*out*/ Color* result) { + clutter_color_interpolate(&this, final, progress, result); + } + + // Lightens @color by a fixed amount, and saves the changed color + // in @result. + // : return location for the lighter color + void lighten(/*out*/ Color* result) { + clutter_color_lighten(&this, result); + } + + // Shades @color by @factor and saves the modified color into @result. + // : the shade factor to apply + // : return location for the shaded color + void shade(double factor, /*out*/ Color* result) { + clutter_color_shade(&this, factor, result); + } + + // Subtracts @b from @a and saves the resulting color inside @result. + // + // This function assumes that the components of @a are greater than the + // components of @b; the result is, otherwise, undefined. + // + // The alpha channel of @result is set as the minimum value + // between the alpha channels of @a and @b. + // : a #ClutterColor + // : return location for the result + void subtract(Color* b, /*out*/ Color* result) { + clutter_color_subtract(&this, b, result); + } + + // Converts @color to the HLS format. + // + // The @hue value is in the 0 .. 360 range. The @luminance and + // @saturation values are in the 0 .. 1 range. + // : return location for the hue value or %NULL + // : return location for the luminance value or %NULL + // : return location for the saturation value or %NULL + void to_hls(/*out*/ float* hue, /*out*/ float* luminance, /*out*/ float* saturation) { + clutter_color_to_hls(&this, hue, luminance, saturation); + } + + // Converts @color into a packed 32 bit integer, containing + // all the four 8 bit channels used by #ClutterColor. + // RETURNS: a packed color + uint to_pixel() { + return clutter_color_to_pixel(&this); + } + + // Returns a textual specification of @color in the hexadecimal form + // #rrggbbaa, where r, + // g, b and a are + // hexadecimal digits representing the red, green, blue and alpha components + // respectively. + // RETURNS: a newly-allocated text string + char* /*new*/ to_string() { + return clutter_color_to_string(&this); + } + + // Compares two #ClutterColors and checks if they are the same. + // + // This function can be passed to g_hash_table_new() as the @key_equal_func + // parameter, when using #ClutterColors as keys in a #GHashTable. + // RETURNS: %TRUE if the two colors are the same. + // : a #ClutterColor + // : a #ClutterColor + static int equal(const(void)* v1, const(void)* v2) { + return clutter_color_equal(v1, v2); + } + + // Retrieves a static color for the given @color name + // + // Static colors are created by Clutter and are guaranteed to always be + // available and valid + // + // is owned by Clutter and it should never be modified or freed + // RETURNS: a pointer to a static color; the returned pointer + // : the named global color + static Color* get_static(StaticColor color) { + return clutter_color_get_static(color); + } + + // Converts a #ClutterColor to a hash value. + // + // This function can be passed to g_hash_table_new() as the @hash_func + // parameter, when using #ClutterColors as keys in a #GHashTable. + // RETURNS: a hash value corresponding to the color + // : a #ClutterColor + static uint hash(const(void)* v) { + return clutter_color_hash(v); + } +} + + +// ClutterColorizeEffect is an opaque structure +// whose members cannot be directly accessed +struct ColorizeEffect /* : OffscreenEffect */ /* Version 1.4 */ { + alias method_parent this; + alias method_parent super_; + alias method_parent offscreeneffect; + OffscreenEffect method_parent; + + + // Creates a new #ClutterColorizeEffect to be used with + // clutter_actor_add_effect() + // RETURNS: the newly created #ClutterColorizeEffect or %NULL + // : the color to be used + static ColorizeEffect* new_(Color* tint) { + return clutter_colorize_effect_new(tint); + } + + // Retrieves the tint used by @effect + // : return location for the color used + void get_tint(/*out*/ Color* tint) { + clutter_colorize_effect_get_tint(&this, tint); + } + + // Sets the tint to be used when colorizing + // : the color to be used + void set_tint(Color* tint) { + clutter_colorize_effect_set_tint(&this, tint); + } +} + +struct ColorizeEffectClass { +} + +enum int Community = 269025085; + +// The ClutterConstraint structure contains only +// private data and should be accessed using the provided API +struct Constraint /* : ActorMeta */ /* Version 1.4 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance actormeta; + ActorMeta parent_instance; +} + + +// The ClutterConstraintClass structure contains +// only private data +struct ConstraintClass /* Version 1.4 */ { + private ActorMetaClass parent_class; + extern (C) void function (Constraint* constraint, Actor* actor, ActorBox* allocation) update_allocation; + extern (C) void function () _clutter_constraint1; + extern (C) void function () _clutter_constraint2; + extern (C) void function () _clutter_constraint3; + extern (C) void function () _clutter_constraint4; + extern (C) void function () _clutter_constraint5; + extern (C) void function () _clutter_constraint6; + extern (C) void function () _clutter_constraint7; + extern (C) void function () _clutter_constraint8; +} + + +// #ClutterContainer is an opaque structure whose members cannot be directly +// accessed +struct Container /* Version 0.4 */ { + + // Looks up the #GParamSpec for a child property of @klass. + // + // if no such property exist. + // RETURNS: The #GParamSpec for the property or %NULL + // : a #GObjectClass implementing the #ClutterContainer interface. + // : a property name. + static GObject2.ParamSpec* class_find_child_property(GObject2.ObjectClass* klass, char* property_name) { + return clutter_container_class_find_child_property(klass, property_name); + } + + // Returns an array of #GParamSpec for all child properties. + // + // of #GParamSpecs which should be freed after use. + // RETURNS: an array + // : a #GObjectClass implementing the #ClutterContainer interface. + // : return location for length of returned array. + static GObject2.ParamSpec** /*new*/ class_list_child_properties(GObject2.ObjectClass* klass, /*out*/ uint* n_properties) { + return clutter_container_class_list_child_properties(klass, n_properties); + } + + // Unintrospectable method: add() / clutter_container_add() + // Adds a list of #ClutterActors to @container. Each time and + // actor is added, the "actor-added" signal is emitted. Each actor should + // be parented to @container, which takes a reference on the actor. You + // cannot add a #ClutterActor to more than one #ClutterContainer. + // : the first #ClutterActor to add + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_container_add add; // Variadic + +/ + + // Adds a #ClutterActor to @container. This function will emit the + // "actor-added" signal. The actor should be parented to + // @container. You cannot add a #ClutterActor to more than one + // #ClutterContainer. + // : the first #ClutterActor to add + void add_actor(Actor* actor) { + clutter_container_add_actor(&this, actor); + } + + // Unintrospectable method: add_valist() / clutter_container_add_valist() + // Alternative va_list version of clutter_container_add(). + // : the first #ClutterActor to add + // : list of actors to add, followed by %NULL + void add_valist(Actor* first_actor, va_list var_args) { + clutter_container_add_valist(&this, first_actor, var_args); + } + + // Unintrospectable method: child_get() / clutter_container_child_get() + // Gets @container specific properties of an actor. + // + // In general, a copy is made of the property contents and the caller is + // responsible for freeing the memory in the appropriate manner for the type, for + // instance by calling g_free() or g_object_unref(). + // : a #ClutterActor that is a child of @container. + // : name of the first property to be set. + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_container_child_get child_get; // Variadic + +/ + + // Gets a container specific property of a child of @container, In general, + // a copy is made of the property contents and the caller is responsible for + // freeing the memory by calling g_value_unset(). + // + // Note that clutter_container_child_set_property() is really intended for + // language bindings, clutter_container_child_set() is much more convenient + // for C programming. + // : a #ClutterActor that is a child of @container. + // : the name of the property to set. + // : the value. + void child_get_property(Actor* child, char* property, GObject2.Value* value) { + clutter_container_child_get_property(&this, child, property, value); + } + + // Calls the child_notify() virtual function of + // #ClutterContainer. The default implementation will emit the + // #ClutterContainer::child-notify signal. + // : a #ClutterActor + // : a #GParamSpec + void child_notify(Actor* child, GObject2.ParamSpec* pspec) { + clutter_container_child_notify(&this, child, pspec); + } + + // Unintrospectable method: child_set() / clutter_container_child_set() + // Sets container specific properties on the child of a container. + // : a #ClutterActor that is a child of @container. + // : name of the first property to be set. + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_container_child_set child_set; // Variadic + +/ + + // Sets a container-specific property on a child of @container. + // : a #ClutterActor that is a child of @container. + // : the name of the property to set. + // : the value. + void child_set_property(Actor* child, char* property, GObject2.Value* value) { + clutter_container_child_set_property(&this, child, property, value); + } + + // Creates the #ClutterChildMeta wrapping @actor inside the + // @container, if the #ClutterContainerIface::child_meta_type + // class member is not set to %G_TYPE_INVALID. + // + // This function is only useful when adding a #ClutterActor to + // a #ClutterContainer implementation outside of the + // #ClutterContainer::add() virtual function implementation. + // + // Applications should not call this function. + // : a #ClutterActor + void create_child_meta(Actor* actor) { + clutter_container_create_child_meta(&this, actor); + } + + // Destroys the #ClutterChildMeta wrapping @actor inside the + // @container, if any. + // + // This function is only useful when removing a #ClutterActor to + // a #ClutterContainer implementation outside of the + // #ClutterContainer::add() virtual function implementation. + // + // Applications should not call this function. + // : a #ClutterActor + void destroy_child_meta(Actor* actor) { + clutter_container_destroy_child_meta(&this, actor); + } + + // Finds a child actor of a container by its name. Search recurses + // into any child container. + // + // or %NULL if no actor with that name was found. + // RETURNS: The child actor with the requested name, + // : the name of the requested child. + Actor* find_child_by_name(char* child_name) { + return clutter_container_find_child_by_name(&this, child_name); + } + + // Calls @callback for each child of @container that was added + // by the application (with clutter_container_add_actor()). Does + // not iterate over "internal" children that are part of the + // container's own implementation, if any. + // : a function to be called for each child + // : data to be passed to the function, or %NULL + void foreach_(Callback callback, void* user_data) { + clutter_container_foreach(&this, callback, user_data); + } + + // Calls @callback for each child of @container, including "internal" + // children built in to the container itself that were never added + // by the application. + // : a function to be called for each child + // : data to be passed to the function, or %NULL + void foreach_with_internals(Callback callback, void* user_data) { + clutter_container_foreach_with_internals(&this, callback, user_data); + } + + // Retrieves the #ClutterChildMeta which contains the data about the + // @container specific state for @actor. + // + // of @container or %NULL if the specifiec actor does not exist or the + // container is not configured to provide #ClutterChildMetas + // RETURNS: the #ClutterChildMeta for the @actor child + // : a #ClutterActor that is a child of @container. + ChildMeta* get_child_meta(Actor* actor) { + return clutter_container_get_child_meta(&this, actor); + } + + // Retrieves all the children of @container. + // + // of #ClutterActors. Use g_list_free() on the returned + // list when done. + // RETURNS: a list + GLib2.List* /*new container*/ get_children() { + return clutter_container_get_children(&this); + } + + // Lowers @actor to @sibling level, in the depth ordering. + // : the actor to raise + // : the sibling to lower to, or %NULL to lower to the bottom + void lower_child(Actor* actor, Actor* sibling=null) { + clutter_container_lower_child(&this, actor, sibling); + } + + // Raises @actor to @sibling level, in the depth ordering. + // : the actor to raise + // : the sibling to raise to, or %NULL to raise to the top + void raise_child(Actor* actor, Actor* sibling=null) { + clutter_container_raise_child(&this, actor, sibling); + } + + // Unintrospectable method: remove() / clutter_container_remove() + // Removes a %NULL terminated list of #ClutterActors from + // @container. Each actor should be unparented, so if you want to keep it + // around you must hold a reference to it yourself, using g_object_ref(). + // Each time an actor is removed, the "actor-removed" signal is + // emitted by @container. + // : first #ClutterActor to remove + /+ Not available -- variadic methods unsupported - use the C function directly. + alias clutter_container_remove remove; // Variadic + +/ + + // Removes @actor from @container. The actor should be unparented, so + // if you want to keep it around you must hold a reference to it + // yourself, using g_object_ref(). When the actor has been removed, + // the "actor-removed" signal is emitted by @container. + // : a #ClutterActor + void remove_actor(Actor* actor) { + clutter_container_remove_actor(&this, actor); + } + + // Unintrospectable method: remove_valist() / clutter_container_remove_valist() + // Alternative va_list version of clutter_container_remove(). + // : the first #ClutterActor to add + // : list of actors to remove, followed by %NULL + void remove_valist(Actor* first_actor, va_list var_args) { + clutter_container_remove_valist(&this, first_actor, var_args); + } + + // Sorts a container's children using their depth. This function should not + // be normally used by applications. + void sort_depth_order() { + clutter_container_sort_depth_order(&this); + } + + // The ::actor-added signal is emitted each time an actor + // has been added to @container. + // : the new child that has been added to @container + extern (C) alias static void function (Container* this_, Actor* actor, void* user_data=null) signal_actor_added; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"actor-added", CB:signal_actor_added)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"actor-added", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::actor-removed signal is emitted each time an actor + // is removed from @container. + // : the child that has been removed from @container + extern (C) alias static void function (Container* this_, Actor* actor, void* user_data=null) signal_actor_removed; + ulong signal_connect(string name:"actor-removed", CB:signal_actor_removed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"actor-removed", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::child-notify signal is emitted each time a property is + // being set through the clutter_container_child_set() and + // clutter_container_child_set_property() calls. + // : the child that has had a property set + // : the #GParamSpec of the property set + extern (C) alias static void function (Container* this_, Actor* actor, GObject2.ParamSpec* pspec, void* user_data=null) signal_child_notify; + ulong signal_connect(string name:"child-notify", CB:signal_child_notify)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"child-notify", + cast(GObject2.Callback)cb, data, null, cf); + } +} + + +// Base interface for container actors. The @add, @remove and @foreach +// virtual functions must be provided by any implementation; the other +// virtual functions are optional. +struct ContainerIface /* Version 0.4 */ { + private GObject2.TypeInterface g_iface; + // : the first #ClutterActor to add + extern (C) void function (Container* container, Actor* actor) add; + // : a #ClutterActor + extern (C) void function (Container* container, Actor* actor) remove; + + // : a function to be called for each child + // : data to be passed to the function, or %NULL + extern (C) void function (Container* container, Callback callback, void* user_data) foreach_; + + // : a function to be called for each child + // : data to be passed to the function, or %NULL + extern (C) void function (Container* container, Callback callback, void* user_data) foreach_with_internals; + + // : the actor to raise + // : the sibling to raise to, or %NULL to raise to the top + extern (C) void function (Container* container, Actor* actor, Actor* sibling=null) raise; + + // : the actor to raise + // : the sibling to lower to, or %NULL to lower to the bottom + extern (C) void function (Container* container, Actor* actor, Actor* sibling=null) lower; + extern (C) void function (Container* container) sort_depth_order; + Type child_meta_type; + // : a #ClutterActor + extern (C) void function (Container* container, Actor* actor) create_child_meta; + // : a #ClutterActor + extern (C) void function (Container* container, Actor* actor) destroy_child_meta; + + // RETURNS: the #ClutterChildMeta for the @actor child + // : a #ClutterActor that is a child of @container. + extern (C) ChildMeta* function (Container* container, Actor* actor) get_child_meta; + extern (C) void function (Container* container, Actor* actor) actor_added; + extern (C) void function (Container* container, Actor* actor) actor_removed; + + // : a #ClutterActor + // : a #GParamSpec + extern (C) void function (Container* container, Actor* child, GObject2.ParamSpec* pspec) child_notify; +} + +enum int ContrastAdjust = 269025058; +enum int Control_L = 65507; +enum int Control_R = 65508; +enum int Copy = 269025111; +// Event for the movement of the pointer across different actors +struct CrossingEvent /* Version 0.2 */ { + EventType type; + uint time; + EventFlags flags; + Stage* stage; + Actor* source; + float x, y; + InputDevice* device; + Actor* related; +} + +enum int CruzeiroSign = 16785570; +enum int Cut = 269025112; +enum int CycleAngle = 269025180; +enum int Cyrillic_A = 1761; +enum int Cyrillic_BE = 1762; +enum int Cyrillic_CHE = 1790; +enum int Cyrillic_CHE_descender = 16778422; +enum int Cyrillic_CHE_vertstroke = 16778424; +enum int Cyrillic_DE = 1764; +enum int Cyrillic_DZHE = 1727; +enum int Cyrillic_E = 1788; +enum int Cyrillic_EF = 1766; +enum int Cyrillic_EL = 1772; +enum int Cyrillic_EM = 1773; +enum int Cyrillic_EN = 1774; +enum int Cyrillic_EN_descender = 16778402; +enum int Cyrillic_ER = 1778; +enum int Cyrillic_ES = 1779; +enum int Cyrillic_GHE = 1767; +enum int Cyrillic_GHE_bar = 16778386; +enum int Cyrillic_HA = 1768; +enum int Cyrillic_HARDSIGN = 1791; +enum int Cyrillic_HA_descender = 16778418; +enum int Cyrillic_I = 1769; +enum int Cyrillic_IE = 1765; +enum int Cyrillic_IO = 1715; +enum int Cyrillic_I_macron = 16778466; +enum int Cyrillic_JE = 1720; +enum int Cyrillic_KA = 1771; +enum int Cyrillic_KA_descender = 16778394; +enum int Cyrillic_KA_vertstroke = 16778396; +enum int Cyrillic_LJE = 1721; +enum int Cyrillic_NJE = 1722; +enum int Cyrillic_O = 1775; +enum int Cyrillic_O_bar = 16778472; +enum int Cyrillic_PE = 1776; +enum int Cyrillic_SCHWA = 16778456; +enum int Cyrillic_SHA = 1787; +enum int Cyrillic_SHCHA = 1789; +enum int Cyrillic_SHHA = 16778426; +enum int Cyrillic_SHORTI = 1770; +enum int Cyrillic_SOFTSIGN = 1784; +enum int Cyrillic_TE = 1780; +enum int Cyrillic_TSE = 1763; +enum int Cyrillic_U = 1781; +enum int Cyrillic_U_macron = 16778478; +enum int Cyrillic_U_straight = 16778414; +enum int Cyrillic_U_straight_bar = 16778416; +enum int Cyrillic_VE = 1783; +enum int Cyrillic_YA = 1777; +enum int Cyrillic_YERU = 1785; +enum int Cyrillic_YU = 1760; +enum int Cyrillic_ZE = 1786; +enum int Cyrillic_ZHE = 1782; +enum int Cyrillic_ZHE_descender = 16778390; +enum int Cyrillic_a = 1729; +enum int Cyrillic_be = 1730; +enum int Cyrillic_che = 1758; +enum int Cyrillic_che_descender = 16778423; +enum int Cyrillic_che_vertstroke = 16778425; +enum int Cyrillic_de = 1732; +enum int Cyrillic_dzhe = 1711; +enum int Cyrillic_e = 1756; +enum int Cyrillic_ef = 1734; +enum int Cyrillic_el = 1740; +enum int Cyrillic_em = 1741; +enum int Cyrillic_en = 1742; +enum int Cyrillic_en_descender = 16778403; +enum int Cyrillic_er = 1746; +enum int Cyrillic_es = 1747; +enum int Cyrillic_ghe = 1735; +enum int Cyrillic_ghe_bar = 16778387; +enum int Cyrillic_ha = 1736; +enum int Cyrillic_ha_descender = 16778419; +enum int Cyrillic_hardsign = 1759; +enum int Cyrillic_i = 1737; +enum int Cyrillic_i_macron = 16778467; +enum int Cyrillic_ie = 1733; +enum int Cyrillic_io = 1699; +enum int Cyrillic_je = 1704; +enum int Cyrillic_ka = 1739; +enum int Cyrillic_ka_descender = 16778395; +enum int Cyrillic_ka_vertstroke = 16778397; +enum int Cyrillic_lje = 1705; +enum int Cyrillic_nje = 1706; +enum int Cyrillic_o = 1743; +enum int Cyrillic_o_bar = 16778473; +enum int Cyrillic_pe = 1744; +enum int Cyrillic_schwa = 16778457; +enum int Cyrillic_sha = 1755; +enum int Cyrillic_shcha = 1757; +enum int Cyrillic_shha = 16778427; +enum int Cyrillic_shorti = 1738; +enum int Cyrillic_softsign = 1752; +enum int Cyrillic_te = 1748; +enum int Cyrillic_tse = 1731; +enum int Cyrillic_u = 1749; +enum int Cyrillic_u_macron = 16778479; +enum int Cyrillic_u_straight = 16778415; +enum int Cyrillic_u_straight_bar = 16778417; +enum int Cyrillic_ve = 1751; +enum int Cyrillic_ya = 1745; +enum int Cyrillic_yeru = 1753; +enum int Cyrillic_yu = 1728; +enum int Cyrillic_ze = 1754; +enum int Cyrillic_zhe = 1750; +enum int Cyrillic_zhe_descender = 16778391; +enum int D = 68; +enum int DOS = 269025114; +enum int Dabovedot = 16784906; +enum int Dcaron = 463; + +// The ClutterDeformEffect structure contains +// only private data and should be accessed using the provided API +struct DeformEffect /* : OffscreenEffect */ /* Version 1.4 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance offscreeneffect; + OffscreenEffect parent_instance; + private DeformEffectPrivate* priv; + + + // Retrieves the handle to the back face material used by @effect + // + // The returned material is owned by the #ClutterDeformEffect and it + // should not be freed directly + // RETURNS: a handle for the material, or %NULL. + Cogl.Handle get_back_material() { + return clutter_deform_effect_get_back_material(&this); + } + + // Retrieves the number of horizontal and vertical tiles used to sub-divide + // the actor's geometry during the effect + // : return location for the number of horizontal tiles, or %NULL + // : return location for the number of vertical tiles, or %NULL + void get_n_tiles(/*out*/ uint* x_tiles, /*out*/ uint* y_tiles) { + clutter_deform_effect_get_n_tiles(&this, x_tiles, y_tiles); + } + + // Invalidates the @effect's vertices and, if it is associated + // to an actor, it will queue a redraw + void invalidate() { + clutter_deform_effect_invalidate(&this); + } + + // Sets the material that should be used when drawing the back face + // of the actor during a deformation + // + // The #ClutterDeformEffect will take a reference on the material's + // handle + // : a handle to a Cogl material + void set_back_material(Cogl.Handle material=null) { + clutter_deform_effect_set_back_material(&this, material); + } + + // Sets the number of horizontal and vertical tiles to be used + // when applying the effect + // + // More tiles allow a finer grained deformation at the expenses + // of computation + // : number of horizontal tiles + // : number of vertical tiles + void set_n_tiles(uint x_tiles, uint y_tiles) { + clutter_deform_effect_set_n_tiles(&this, x_tiles, y_tiles); + } +} + + +// The ClutterDeformEffectClass structure contains +// only private data +struct DeformEffectClass /* Version 1.4 */ { + private OffscreenEffectClass parent_class; + extern (C) void function (DeformEffect* effect, float width, float height, Cogl.TextureVertex* vertex) deform_vertex; + extern (C) void function () _clutter_deform1; + extern (C) void function () _clutter_deform2; + extern (C) void function () _clutter_deform3; + extern (C) void function () _clutter_deform4; + extern (C) void function () _clutter_deform5; + extern (C) void function () _clutter_deform6; + extern (C) void function () _clutter_deform7; +} + +struct DeformEffectPrivate { +} + +enum int Delete = 65535; + +// ClutterDesaturateEffect is an opaque structure +// whose members cannot be directly accessed +struct DesaturateEffect /* : OffscreenEffect */ /* Version 1.4 */ { + alias method_parent this; + alias method_parent super_; + alias method_parent offscreeneffect; + OffscreenEffect method_parent; + + + // Creates a new #ClutterDesaturateEffect to be used with + // clutter_actor_add_effect() + // RETURNS: the newly created #ClutterDesaturateEffect or %NULL + // : the desaturation factor, between 0.0 and 1.0 + static DesaturateEffect* new_(double factor) { + return clutter_desaturate_effect_new(factor); + } + + // Retrieves the desaturation factor of @effect + // RETURNS: the desaturation factor + double get_factor() { + return clutter_desaturate_effect_get_factor(&this); + } + + // Sets the desaturation factor for @effect, with 0.0 being "do not desaturate" + // and 1.0 being "fully desaturate" + // : the desaturation factor, between 0.0 and 1.0 + void set_factor(double factor) { + clutter_desaturate_effect_set_factor(&this, factor); + } +} + +struct DesaturateEffectClass { +} + +// The #ClutterDeviceManager structure contains only private data +struct DeviceManager /* : GObject.Object */ /* Version 1.2 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance object; + GObject2.Object parent_instance; + private DeviceManagerPrivate* priv; + + + // Retrieves the device manager singleton + // + // The returned instance is owned by Clutter and it should not be + // modified or freed + // RETURNS: the #ClutterDeviceManager singleton. + static DeviceManager* get_default() { + return clutter_device_manager_get_default(); + } + + // Retrieves the core #ClutterInputDevice of type @device_type + // + // Core devices are devices created automatically by the default + // Clutter backend + // + // returned device is owned by the #ClutterDeviceManager and should + // not be modified or freed + // RETURNS: a #ClutterInputDevice or %NULL. The + // : the type of the core device + InputDevice* get_core_device(InputDeviceType device_type) { + return clutter_device_manager_get_core_device(&this, device_type); + } + + // Retrieves the #ClutterInputDevice with the given @device_id + // + // returned device is owned by the #ClutterDeviceManager and should + // never be modified or freed + // RETURNS: a #ClutterInputDevice or %NULL. The + // : the integer id of a device + InputDevice* get_device(int device_id) { + return clutter_device_manager_get_device(&this, device_id); + } + + // Lists all currently registered input devices + // + // a newly allocated list of #ClutterInputDevice objects. Use + // g_slist_free() to deallocate it when done + GLib2.SList* /*new container*/ list_devices() { + return clutter_device_manager_list_devices(&this); + } + + // Lists all currently registered input devices + // + // a pointer to the internal list of #ClutterInputDevice objects. The + // returned list is owned by the #ClutterDeviceManager and should never + // be modified or freed + GLib2.SList* peek_devices() { + return clutter_device_manager_peek_devices(&this); + } + + // The ::device-added signal is emitted each time a device has been + // added to the #ClutterDeviceManager + // : the newly added #ClutterInputDevice + extern (C) alias static void function (DeviceManager* this_, InputDevice* device, void* user_data=null) signal_device_added; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"device-added", CB:signal_device_added)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"device-added", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::device-removed signal is emitted each time a device has been + // removed from the #ClutterDeviceManager + // : the removed #ClutterInputDevice + extern (C) alias static void function (DeviceManager* this_, InputDevice* device, void* user_data=null) signal_device_removed; + ulong signal_connect(string name:"device-removed", CB:signal_device_removed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"device-removed", + cast(GObject2.Callback)cb, data, null, cf); + } +} + +// The #ClutterDeviceManagerClass structure contains only private data +struct DeviceManagerClass /* Version 1.2 */ { + private GObject2.ObjectClass parent_class; + // Unintrospectable functionp: get_devices() / () + extern (C) GLib2.SList* function (DeviceManager* device_manager) get_devices; + + // RETURNS: a #ClutterInputDevice or %NULL. The + // : the type of the core device + extern (C) InputDevice* function (DeviceManager* device_manager, InputDeviceType device_type) get_core_device; + + // RETURNS: a #ClutterInputDevice or %NULL. The + // : the integer id of a device + extern (C) InputDevice* function (DeviceManager* device_manager, int device_id) get_device; + extern (C) void function (DeviceManager* manager, InputDevice* device) add_device; + extern (C) void function (DeviceManager* manager, InputDevice* device) remove_device; + private void*[8] _padding; +} + +struct DeviceManagerPrivate { +} + +enum int Display = 269025113; +enum int Documents = 269025115; +enum int DongSign = 16785579; +enum int Down = 65364; + +// The ClutterDragAction structure contains only +// private data and should be accessed using the provided API +struct DragAction /* : Action */ /* Version 1.4 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance action; + Action parent_instance; + private DragActionPrivate* priv; + + + // Creates a new #ClutterDragAction instance + // RETURNS: the newly created #ClutterDragAction + static DragAction* new_() { + return clutter_drag_action_new(); + } + + // Retrieves the axis constraint set by clutter_drag_action_set_drag_axis() + // RETURNS: the axis constraint + DragAxis get_drag_axis() { + return clutter_drag_action_get_drag_axis(&this); + } + + // Retrieves the drag handle set by clutter_drag_action_set_drag_handle() + // + // handle, or %NULL if none was set + // RETURNS: a #ClutterActor, used as the drag + Actor* get_drag_handle() { + return clutter_drag_action_get_drag_handle(&this); + } + + // Retrieves the values set by clutter_drag_action_set_drag_threshold(). + // + // If the #ClutterDragAction:x-drag-threshold property or the + // #ClutterDragAction:y-drag-threshold property have been set to -1 then + // this function will return the default drag threshold value as stored + // by the #ClutterSettings:dnd-drag-threshold property of #ClutterSettings. + // : return location for the horizontal drag threshold value, in pixels + // : return location for the vertical drag threshold value, in pixels + void get_drag_threshold(/*out*/ uint* x_threshold, /*out*/ uint* y_threshold) { + clutter_drag_action_get_drag_threshold(&this, x_threshold, y_threshold); + } + + // Retrieves the coordinates, in stage space, of the latest motion + // event during the dragging + // : return location for the latest motion event's X coordinate + // : return location for the latest motion event's Y coordinate + void get_motion_coords(/*out*/ float* motion_x, /*out*/ float* motion_y) { + clutter_drag_action_get_motion_coords(&this, motion_x, motion_y); + } + + // Retrieves the coordinates, in stage space, of the press event + // that started the dragging + // : return location for the press event's X coordinate + // : return location for the press event's Y coordinate + void get_press_coords(/*out*/ float* press_x, /*out*/ float* press_y) { + clutter_drag_action_get_press_coords(&this, press_x, press_y); + } + + // Restricts the dragging action to a specific axis + // : the axis to constraint the dragging to + void set_drag_axis(DragAxis axis) { + clutter_drag_action_set_drag_axis(&this, axis); + } + + // Sets the actor to be used as the drag handle. + // : a #ClutterActor, or %NULL to unset + void set_drag_handle(Actor* handle=null) { + clutter_drag_action_set_drag_handle(&this, handle); + } + + // Sets the horizontal and vertical drag thresholds that must be + // cleared by the pointer before @action can begin the dragging. + // + // If @x_threshold or @y_threshold are set to -1 then the default + // drag threshold stored in the #ClutterSettings:dnd-drag-threshold + // property of #ClutterSettings will be used. + // : a distance on the horizontal axis, in pixels, or -1 to use the default drag threshold from #ClutterSettings + // : a distance on the vertical axis, in pixels, or -1 to use the default drag threshold from #ClutterSettings + void set_drag_threshold(int x_threshold, int y_threshold) { + clutter_drag_action_set_drag_threshold(&this, x_threshold, y_threshold); + } + + // The ::drag-begin signal is emitted when the #ClutterDragAction + // starts the dragging + // + // The emission of this signal can be delayed by using the + // #ClutterDragAction:x-drag-threshold and + // #ClutterDragAction:y-drag-threshold properties + // : the #ClutterActor attached to the action + // : the X coordinate (in stage space) of the press event + // : the Y coordinate (in stage space) of the press event + // : the modifiers of the press event + extern (C) alias static void function (DragAction* this_, Actor* actor, float event_x, float event_y, ModifierType* modifiers, void* user_data=null) signal_drag_begin; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"drag-begin", CB:signal_drag_begin)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"drag-begin", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::drag-end signal is emitted at the end of the dragging, + // when the pointer button's is released + // + // This signal is emitted if and only if the #ClutterDragAction::drag-begin + // signal has been emitted first + // : the #ClutterActor attached to the action + // : the X coordinate (in stage space) of the release event + // : the Y coordinate (in stage space) of the release event + // : the modifiers of the release event + extern (C) alias static void function (DragAction* this_, Actor* actor, float event_x, float event_y, ModifierType* modifiers, void* user_data=null) signal_drag_end; + ulong signal_connect(string name:"drag-end", CB:signal_drag_end)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"drag-end", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::drag-motion signal is emitted for each motion event after + // the #ClutterDragAction::drag-begin signal has been emitted. + // + // The components of the distance between the press event and the + // latest motion event are computed in the actor's coordinate space, + // to take into account eventual transformations. If you want the + // stage coordinates of the latest motion event you can use + // clutter_drag_action_get_motion_coords(). + // + // The default handler of the signal will call clutter_actor_move_by() + // either on @actor or, if set, of #ClutterDragAction:drag-handle using + // the @delta_x and @delta_y components of the dragging motion. If you + // want to override the default behaviour, you can connect to this + // signal and call g_signal_stop_emission_by_name() from within your + // callback. + // : the #ClutterActor attached to the action + // : the X component of the distance between the press event that began the dragging and the current position of the pointer, as of the latest motion event + // : the Y component of the distance between the press event that began the dragging and the current position of the pointer, as of the latest motion event + extern (C) alias static void function (DragAction* this_, Actor* actor, float delta_x, float delta_y, void* user_data=null) signal_drag_motion; + ulong signal_connect(string name:"drag-motion", CB:signal_drag_motion)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"drag-motion", + cast(GObject2.Callback)cb, data, null, cf); + } +} + + +// The ClutterDragActionClass structure contains +// only private data +struct DragActionClass /* Version 1.4 */ { + private ActionClass parent_class; + extern (C) void function (DragAction* action, Actor* actor, float event_x, float event_y, ModifierType modifiers) drag_begin; + extern (C) void function (DragAction* action, Actor* actor, float delta_x, float delta_y) drag_motion; + extern (C) void function (DragAction* action, Actor* actor, float event_x, float event_y, ModifierType modifiers) drag_end; + extern (C) void function () _clutter_drag_action1; + extern (C) void function () _clutter_drag_action2; + extern (C) void function () _clutter_drag_action3; + extern (C) void function () _clutter_drag_action4; + extern (C) void function () _clutter_drag_action5; +} + +struct DragActionPrivate { +} + + +// The axis of the constraint that should be applied on the +// dragging action +enum DragAxis /* Version 1.4 */ { + AXIS_NONE = 0, + X_AXIS = 1, + Y_AXIS = 2 +} + +// The ClutterDropAction structure contains only +// private data and should be accessed using the provided API. +struct DropAction /* : Action */ /* Version 1.8 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance action; + Action parent_instance; + private DropActionPrivate* priv; + + + // Creates a new #ClutterDropAction. + // + // Use clutter_actor_add_action() to add the action to a #ClutterActor. + // RETURNS: the newly created #ClutterDropAction + static DropAction* new_() { + return clutter_drop_action_new(); + } + + // The ::can-drop signal is emitted when the dragged actor is dropped + // on @actor. The return value of the ::can-drop signal will determine + // whether or not the #ClutterDropAction::drop signal is going to be + // emitted on @action. + // + // The default implementation of #ClutterDropAction returns %TRUE for + // this signal. + // RETURNS: %TRUE if the drop is accepted, and %FALSE otherwise + // : the #ClutterActor attached to the @action + // : %TRUE if the drop is accepted, and %FALSE otherwise + extern (C) alias static c_int function (DropAction* this_, Actor* actor, float returns, float since, void* user_data=null) signal_can_drop; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"can-drop", CB:signal_can_drop)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"can-drop", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::drop signal is emitted when the dragged actor is dropped + // on @actor. This signal is only emitted if at least an handler of + // #ClutterDropAction::can-drop returns %TRUE. + extern (C) alias static void function (DropAction* this_, Actor* object, float p0, float p1, void* user_data=null) signal_drop; + ulong signal_connect(string name:"drop", CB:signal_drop)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"drop", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::over-in signal is emitted when the dragged actor crosses + // into @actor. + // : the #ClutterActor attached to the @action + extern (C) alias static void function (DropAction* this_, Actor* actor, void* user_data=null) signal_over_in; + ulong signal_connect(string name:"over-in", CB:signal_over_in)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"over-in", + cast(GObject2.Callback)cb, data, null, cf); + } + + // The ::over-out signal is emitted when the dragged actor crosses + // outside @actor. + // : the #ClutterActor attached to the @action + extern (C) alias static void function (DropAction* this_, Actor* actor, void* user_data=null) signal_over_out; + ulong signal_connect(string name:"over-out", CB:signal_over_out)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data(&this, cast(char*)"over-out", + cast(GObject2.Callback)cb, data, null, cf); + } +} + + +// The ClutterDropActionClass structure contains +// only private data. +struct DropActionClass /* Version 1.8 */ { + private ActionClass parent_class; + extern (C) int function (DropAction* action, Actor* actor, float event_x, float event_y) can_drop; + extern (C) void function (DropAction* action, Actor* actor) over_in; + extern (C) void function (DropAction* action, Actor* actor) over_out; + extern (C) void function (DropAction* action, Actor* actor, float event_x, float event_y) drop; + extern (C) void function () _clutter_drop_action1; + extern (C) void function () _clutter_drop_action2; + extern (C) void function () _clutter_drop_action3; + extern (C) void function () _clutter_drop_action4; + extern (C) void function () _clutter_drop_action5; + extern (C) void function () _clutter_drop_action6; + extern (C) void function () _clutter_drop_action7; + extern (C) void function () _clutter_drop_action8; +} + +struct DropActionPrivate { +} + +enum int Dstroke = 464; +enum int E = 69; +enum int ENG = 957; +enum int ETH = 208; +enum int Eabovedot = 972; +enum int Eacute = 201; +enum int Ebelowdot = 16785080; +enum int Ecaron = 460; +enum int Ecircumflex = 202; +enum int Ecircumflexacute = 16785086; +enum int Ecircumflexbelowdot = 16785094; +enum int Ecircumflexgrave = 16785088; +enum int Ecircumflexhook = 16785090; +enum int Ecircumflextilde = 16785092; +enum int EcuSign = 16785568; +enum int Ediaeresis = 203; + +// The #ClutterEffect structure contains only private data and should +// be accessed using the provided API +struct Effect /* : ActorMeta */ /* Version 1.4 */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance actormeta; + ActorMeta parent_instance; + + + // Queues a repaint of the effect. The effect can detect when the ‘paint’ + // method is called as a result of this function because it will not + // have the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY flag set. In that case the + // effect is free to assume that the actor has not changed its + // appearance since the last time it was painted so it doesn't need to + // call clutter_actor_continue_paint() if it can draw a cached + // image. This is mostly intended for effects that are using a + // %CoglOffscreen to redirect the actor (such as + // %ClutterOffscreenEffect). In that case the effect can save a bit of + // rendering time by painting the cached texture without causing the + // entire actor to be painted. + // + // This function can be used by effects that have their own animatable + // parameters. For example, an effect which adds a varying degree of a + // red tint to an actor by redirecting it through a CoglOffscreen + // might have a property to specify the level of tint. When this value + // changes, the underlying actor doesn't need to be redrawn so the + // effect can call clutter_effect_queue_repaint() to make sure the + // effect is repainted. + // + // Note however that modifying the position of the parent of an actor + // may change the appearance of the actor because its transformation + // matrix would change. In this case a redraw wouldn't be queued on + // the actor itself so the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY would still + // not be set. The effect can detect this case by keeping track of the + // last modelview matrix that was used to render the actor and + // veryifying that it remains the same in the next paint. + // + // Any other effects that are layered on top of the passed in effect + // will still be passed the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY flag. If + // anything queues a redraw on the actor without specifying an effect + // or with an effect that is lower in the chain of effects than this + // one then that will override this call. In that case this effect + // will instead be called with the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY + // flag set. + void queue_repaint() { + clutter_effect_queue_repaint(&this); + } +} + +// The #ClutterEffectClass structure contains only private data +struct EffectClass /* Version 1.4 */ { + private ActorMetaClass parent_class; + extern (C) int function (Effect* effect) pre_paint; + extern (C) void function (Effect* effect) post_paint; + extern (C) int function (Effect* effect, PaintVolume* volume) get_paint_volume; + extern (C) void function (Effect* effect, EffectPaintFlags flags) paint; + extern (C) void function (Effect* effect, EffectPaintFlags flags) pick; + extern (C) void function () _clutter_effect4; + extern (C) void function () _clutter_effect5; + extern (C) void function () _clutter_effect6; +} + +// Flags passed to the ‘paint’ or ‘pick’ method of #ClutterEffect. +enum EffectPaintFlags { + ACTOR_DIRTY = 1 +} +enum int Egrave = 200; +enum int Ehook = 16785082; +enum int Eisu_Shift = 65327; +enum int Eisu_toggle = 65328; +enum int Eject = 269025068; +enum int Emacron = 938; +enum int End = 65367; +enum int Eogonek = 458; +enum int Escape = 65307; +enum int Eth = 208; +enum int Etilde = 16785084; +enum int EuroSign = 8364; +// Generic event wrapper. +union Event /* Version 0.2 */ { + private EventType type_; + private AnyEvent any; + private ButtonEvent button; + private KeyEvent key; + private MotionEvent motion; + private ScrollEvent scroll; + private StageStateEvent stage_state; + private CrossingEvent crossing; + + + // Creates a new #ClutterEvent of the specified type. + // RETURNS: A newly allocated #ClutterEvent. + // : The type of event. + static Event* /*new*/ new_(EventType type) { + return clutter_event_new(type); + } + + // Copies @event. + // RETURNS: A newly allocated #ClutterEvent + Event* /*new*/ copy() { + return clutter_event_copy(&this); + } + // Frees all resources used by @event. + void free() { + clutter_event_free(&this); + } + + // Retrieves the array of axes values attached to the event. + // RETURNS: an array of axis values + // : return location for the number of axes returned + double* get_axes(/*out*/ uint* n_axes) { + return clutter_event_get_axes(&this, n_axes); + } + + // Retrieves the button number of @event + // RETURNS: the button number + uint get_button() { + return clutter_event_get_button(&this); + } + + // Retrieves the number of clicks of @event + // RETURNS: the click count + uint get_click_count() { + return clutter_event_get_click_count(&this); + } + + // Retrieves the coordinates of @event and puts them into @x and @y. + // : return location for the X coordinate, or %NULL + // : return location for the Y coordinate, or %NULL + void get_coords(/*out*/ float* x, /*out*/ float* y) { + clutter_event_get_coords(&this, x, y); + } + + // Retrieves the #ClutterInputDevice for the event. + // + // The #ClutterInputDevice structure is completely opaque and should + // be cast to the platform-specific implementation. + // + // returned device is owned by the #ClutterEvent and it should not + // be unreferenced + // RETURNS: the #ClutterInputDevice or %NULL. The + InputDevice* get_device() { + return clutter_event_get_device(&this); + } + + // Retrieves the events device id if set. + // + // no specific device set. + // RETURNS: A unique identifier for the device or -1 if the event has + int get_device_id() { + return clutter_event_get_device_id(&this); + } + + // Retrieves the type of the device for @event + // + // any is set + // RETURNS: the #ClutterInputDeviceType for the device, if + InputDeviceType get_device_type() { + return clutter_event_get_device_type(&this); + } + + // Retrieves the #ClutterEventFlags of @event + // RETURNS: the event flags + EventFlags get_flags() { + return clutter_event_get_flags(&this); + } + + // Retrieves the keycode of the key that caused @event + // RETURNS: The keycode representing the key + ushort get_key_code() { + return clutter_event_get_key_code(&this); + } + + // Retrieves the key symbol of @event + // RETURNS: the key symbol representing the key + uint get_key_symbol() { + return clutter_event_get_key_symbol(&this); + } + + // Retrieves the unicode value for the key that caused @keyev. + // RETURNS: The unicode value representing the key + uint get_key_unicode() { + return clutter_event_get_key_unicode(&this); + } + + // Retrieves the related actor of a crossing event. + // RETURNS: the related #ClutterActor, or %NULL + Actor* get_related() { + return clutter_event_get_related(&this); + } + + // Retrieves the direction of the scrolling of @event + // RETURNS: the scrolling direction + ScrollDirection get_scroll_direction() { + return clutter_event_get_scroll_direction(&this); + } + + // Retrieves the source #ClutterActor the event originated from, or + // NULL if the event has no source. + // RETURNS: a #ClutterActor + Actor* get_source() { + return clutter_event_get_source(&this); + } + + // Retrieves the hardware device that originated the event. + // + // If you need the virtual device, use clutter_event_get_device(). + // + // If no hardware device originated this event, this function will + // return the same device as clutter_event_get_device(). + // + // or %NULL + // RETURNS: a pointer to a #ClutterInputDevice + InputDevice* get_source_device() { + return clutter_event_get_source_device(&this); + } + + // Retrieves the source #ClutterStage the event originated for, or + // %NULL if the event has no stage. + // RETURNS: a #ClutterStage + Stage* get_stage() { + return clutter_event_get_stage(&this); + } + + // Retrieves the modifier state of the event. + // RETURNS: the modifier state parameter, or 0 + ModifierType get_state() { + return clutter_event_get_state(&this); + } + + // Retrieves the time of the event. + // RETURNS: the time of the event, or %CLUTTER_CURRENT_TIME + uint get_time() { + return clutter_event_get_time(&this); + } + + // Puts a copy of the event on the back of the event queue. The event will + // have the %CLUTTER_EVENT_FLAG_SYNTHETIC flag set. If the source is set + // event signals will be emitted for this source and capture/bubbling for + // its ancestors. If the source is not set it will be generated by picking + // or use the actor that currently has keyboard focus + void put() { + clutter_event_put(&this); + } + + // Sets the button number of @event + //