HildonAnimationActor

HildonAnimationActor

Synopsis

                    HildonAnimationActor;
GtkWidget*          hildon_animation_actor_new          (void);
void                hildon_animation_actor_send_message (HildonAnimationActor *self,
                                                         guint32 message_type,
                                                         guint32 l0,
                                                         guint32 l1,
                                                         guint32 l2,
                                                         guint32 l3,
                                                         guint32 l4);
void                hildon_animation_actor_set_anchor   (HildonAnimationActor *self,
                                                         gint x,
                                                         gint y);
void                hildon_animation_actor_set_anchor_from_gravity
                                                        (HildonAnimationActor *self,
                                                         guint gravity);
void                hildon_animation_actor_set_depth    (HildonAnimationActor *self,
                                                         gint depth);
void                hildon_animation_actor_set_opacity  (HildonAnimationActor *self,
                                                         gint opacity);
void                hildon_animation_actor_set_parent   (HildonAnimationActor *self,
                                                         GtkWindow *parent);
void                hildon_animation_actor_set_position (HildonAnimationActor *self,
                                                         gint x,
                                                         gint y);
void                hildon_animation_actor_set_position_full
                                                        (HildonAnimationActor *self,
                                                         gint x,
                                                         gint y,
                                                         gint depth);
void                hildon_animation_actor_set_rotation (HildonAnimationActor *self,
                                                         gint axis,
                                                         double degrees,
                                                         gint x,
                                                         gint y,
                                                         gint z);
void                hildon_animation_actor_set_rotationx
                                                        (HildonAnimationActor *self,
                                                         gint axis,
                                                         gint32 degrees,
                                                         gint x,
                                                         gint y,
                                                         gint z);
void                hildon_animation_actor_set_scale    (HildonAnimationActor *self,
                                                         double x_scale,
                                                         double y_scale);
void                hildon_animation_actor_set_scalex   (HildonAnimationActor *self,
                                                         gint32 x_scale,
                                                         gint32 y_scale);
void                hildon_animation_actor_set_show     (HildonAnimationActor *self,
                                                         gint show);
void                hildon_animation_actor_set_show_full
                                                        (HildonAnimationActor *self,
                                                         gint show,
                                                         gint opacity);
#define             HILDON_AA_CENTER_GRAVITY
#define             HILDON_AA_E_GRAVITY
#define             HILDON_AA_NE_GRAVITY
#define             HILDON_AA_NW_GRAVITY
#define             HILDON_AA_N_GRAVITY
#define             HILDON_AA_SE_GRAVITY
#define             HILDON_AA_SW_GRAVITY
#define             HILDON_AA_S_GRAVITY
#define             HILDON_AA_W_GRAVITY
#define             HILDON_AA_X_AXIS
#define             HILDON_AA_Y_AXIS
#define             HILDON_AA_Z_AXIS

Description

Details

HildonAnimationActor

typedef struct {
    GtkWindow parent;
} HildonAnimationActor;


hildon_animation_actor_new ()

GtkWidget*          hildon_animation_actor_new          (void);

Creates a new HildonAnimationActor.

Returns : A HildonAnimationActor

Since 2.2


hildon_animation_actor_send_message ()

void                hildon_animation_actor_send_message (HildonAnimationActor *self,
                                                         guint32 message_type,
                                                         guint32 l0,
                                                         guint32 l1,
                                                         guint32 l2,
                                                         guint32 l3,
                                                         guint32 l4);

Sends an X11 ClientMessage event to the window manager with the specified parameters -- id (message_type) and data (l0, l1, l2, l3, l4).

This is an internal utility function that application will not need to call directly.

self : A HildonAnimationActor
message_type : Message id for the animation actor message.
l0 : 1st animation actor message parameter.
l1 : 2nd animation actor message parameter.
l2 : 3rd animation actor message parameter.
l3 : 4th animation actor message parameter.
l4 : 5th animation actor message parameter.

Since 2.2


hildon_animation_actor_set_anchor ()

void                hildon_animation_actor_set_anchor   (HildonAnimationActor *self,
                                                         gint x,
                                                         gint y);

Send a message to the window manager setting the anchor point for the animation actor. The anchor point is the point to which the actor position within its parent it is relative.

If the animation actor WM-counterpart is not ready, the show message will be queued until the WM is ready for it.

self : A HildonAnimationActor
x : The X coordinate of the anchor point.
y : The Y coordinate of the anchor point.

Since 2.2


hildon_animation_actor_set_anchor_from_gravity ()

void                hildon_animation_actor_set_anchor_from_gravity
                                                        (HildonAnimationActor *self,
                                                         guint gravity);

Send a message to the window manager setting the anchor point for the animation actor. The anchor point is the point to which the actor position within its parent it is relative. Instead of being defined in (x, y)-coordinates, the anchor point is defined in the relative "gravity" constant as:

* HILDON_AA_N_GRAVITY translates to (width / 2, 0) coordinate * HILDON_AA_NE_GRAVITY translates to (width, 0) coordinate * HILDON_AA_E_GRAVITY translates to (width, height / 2) coordinate * HILDON_AA_SE_GRAVITY translates to (width, height) coordinate * HILDON_AA_S_GRAVITY translates to (width / 2, height) coordinate * HILDON_AA_SW_GRAVITY translates to (0, height) coordinate * HILDON_AA_W_GRAVITY translates to (0, height / 2) coordinate * HILDON_AA_NW_GRAVITY translates to (0, 0) coordinate * HILDON_AA_CENTER_GRAVITY translates to (width / 2, height / 2) coordinate

If the animation actor WM-counterpart is not ready, the show message will be queued until the WM is ready for it.

self : A HildonAnimationActor
gravity : The gravity constant.

Since 2.2


hildon_animation_actor_set_depth ()

void                hildon_animation_actor_set_depth    (HildonAnimationActor *self,
                                                         gint depth);

A shortcut for hildon_animation_actor_set_position_full(), changing the window depth, but preserving it's position.

self : A HildonAnimationActor
depth : Desired window depth (Z coordinate)

Since 2.2


hildon_animation_actor_set_opacity ()

void                hildon_animation_actor_set_opacity  (HildonAnimationActor *self,
                                                         gint opacity);

This function is a shortcut for hildon_animation_actor_set_show_full(), setting actor opacity without changing it's overall visibility.

See hildon_animation_actor_set_show_full() for description of the range of values opacity argument takes.

self : A HildonAnimationActor
opacity : Desired opacity setting

Since 2.2


hildon_animation_actor_set_parent ()

void                hildon_animation_actor_set_parent   (HildonAnimationActor *self,
                                                         GtkWindow *parent);

Send a message to the window manager setting the parent window for the animation actor. Parenting an actor will not affect the X window that the HildonAnimationActor represents, but it's off-screen bitmap as it is handled by the compositing window manager.

Parenting an animation actor will affect its visibility as set by the gtk_widget_show(), gtk_widget_hide() and hildon_animation_actor_set_show(). The animation actor will only be visible when the top-level window it is parented is visible.

Passing NULL as a parent argument will unparent the animation actor. This will restore the actor's visibility if it was suppressed by being unparented or parented to an unmapped window.

If the animation actor WM-counterpart is not ready, the show message will be queued until the WM is ready for it.

self : A HildonAnimationActor
parent : A GtkWindow that the actor will be parented to.

Since 2.2


hildon_animation_actor_set_position ()

void                hildon_animation_actor_set_position (HildonAnimationActor *self,
                                                         gint x,
                                                         gint y);

A shortcut for hildon_animation_actor_set_position_full(), changing the window position, but preserving it's depth setting.

self : A HildonAnimationActor
x : Desired window X coordinate
y : Desired window Y coordinate

Since 2.2


hildon_animation_actor_set_position_full ()

void                hildon_animation_actor_set_position_full
                                                        (HildonAnimationActor *self,
                                                         gint x,
                                                         gint y,
                                                         gint depth);

Send a message to the window manager setting the position of the animation actor. This will set the position of the animation actor off-screen bitmap as it is rendered to the screen. The position of the actor is relative to the parent window. The actor is also subject to the animation effects rendered by the compositing window manager on that window (like those by task switcher).

The window depth affects the stacking of animation actors within a parent window and, more generally, the stacking of clutter actors within a stage/container. The default depth is 0 and a parent window's container will have it's window texture stacked at that level. The stacking at any depth level is sequential -- animation actor B created/parented after animation actor A will obscure the latter if they overlap.

Animation actors with non-zero depth settings are subject to scaling as per the global scene perspective setup, which limits the depth setting as the primary parameter to control the stacking order. Since the stacking order follows the parenting order, it may be better to use hildon_animation_actor_set_parent() for setting the stacking.

If the animation actor WM-counterpart is not ready, the show message will be queued until the WM is ready for it.

self : A HildonAnimationActor
x : Desired X coordinate
y : Desired Y coordinate
depth : Desired window depth (Z coordinate)

Since 2.2


hildon_animation_actor_set_rotation ()

void                hildon_animation_actor_set_rotation (HildonAnimationActor *self,
                                                         gint axis,
                                                         double degrees,
                                                         gint x,
                                                         gint y,
                                                         gint z);

Send a message to the window manager setting the animation actor rotation around one of the three axes. The rotation center coordinates depend on the axis of rotation:

* HILDON_AA_X_AXIS requires y and z coordinates. * HILDON_AA_Y_AXIS requires x and z coordinates. * HILDON_AA_Z_AXIS requires x and y coordinates.

If the animation actor WM-counterpart is not ready, the show message will be queued until the WM is ready for it.

self : A HildonAnimationActor
axis : The rotation axis.
degrees : The rotation angle in degrees.
x : Center of the rotation, X coordinate.
y : Center of the rotation, Y coordinate.
z : Center of the rotation, Z coordinate.

Since 2.2


hildon_animation_actor_set_rotationx ()

void                hildon_animation_actor_set_rotationx
                                                        (HildonAnimationActor *self,
                                                         gint axis,
                                                         gint32 degrees,
                                                         gint x,
                                                         gint y,
                                                         gint z);

This function is just like hildon_animation_actor_set_rotation(), but the rotation angle is given as 16-bit fixed-point number.

self : A HildonAnimationActor
axis : The rotation axis.
degrees : The rotation angle in degrees.
x : Center of the rotation, X coordinate.
y : Center of the rotation, Y coordinate.
z : Center of the rotation, Z coordinate.

Since 2.2


hildon_animation_actor_set_scale ()

void                hildon_animation_actor_set_scale    (HildonAnimationActor *self,
                                                         double x_scale,
                                                         double y_scale);

Send a message to the window manager setting the scale factors of the animation actor. This will set the scale factors on the animation actor off-screen bitmap as it is rendered to the screen. If the animation actor is parented to another top-level window, the animation effects rendered by the compositing window manager on that top-level window (like those by task switcher) will also affect the animation actor.

If the animation actor WM-counterpart is not ready, the show message will be queued until the WM is ready for it.

self : A HildonAnimationActor
x_scale : Window's desired scale factor along the X-axis
y_scale : Window's desired scale factor along the Y-axis

Since 2.2


hildon_animation_actor_set_scalex ()

void                hildon_animation_actor_set_scalex   (HildonAnimationActor *self,
                                                         gint32 x_scale,
                                                         gint32 y_scale);

This function is just like hildon_animation_actor_set_scale(), but the scale factors are given as 16-bit fixed-point number.

self : A HildonAnimationActor
x_scale : Window's desired scale factor along the X-axis
y_scale : Window's desired scale factor along the Y-axis

Since 2.2


hildon_animation_actor_set_show ()

void                hildon_animation_actor_set_show     (HildonAnimationActor *self,
                                                         gint show);

This function is a shortcut for hildon_animation_actor_set_show_full(), setting the overall actor visibility without changing it's opacity setting.

self : A HildonAnimationActor
show : A boolean flag setting the visibility of the animation actor.

Since 2.2


hildon_animation_actor_set_show_full ()

void                hildon_animation_actor_set_show_full
                                                        (HildonAnimationActor *self,
                                                         gint show,
                                                         gint opacity);

Send a message to the window manager setting the visibility of the animation actor. This will only affect the visibility of the animation actor set by the compositing window manager in its own rendering pipeline, after X has drawn the window to the off-screen buffer. This setting, naturally, has no effect if the HildonAnimationActor widget is not visible in X11 terms (i.e. realized and mapped).

Furthermore, if a widget is parented, its final visibility will be affected by that of the parent window.

The opacity setting ranges from zero (0), being completely transparent to 255 (0xff) being fully opaque.

If the animation actor WM-counterpart is not ready, the show message will be queued until the WM is ready for it.

self : A HildonAnimationActor
show : A boolean flag setting the visibility of the animation actor.
opacity : Desired opacity setting

Since 2.2


HILDON_AA_CENTER_GRAVITY

#define HILDON_AA_CENTER_GRAVITY    9


HILDON_AA_E_GRAVITY

#define HILDON_AA_E_GRAVITY	    3


HILDON_AA_NE_GRAVITY

#define HILDON_AA_NE_GRAVITY	    2


HILDON_AA_NW_GRAVITY

#define HILDON_AA_NW_GRAVITY	    8


HILDON_AA_N_GRAVITY

#define HILDON_AA_N_GRAVITY	    1


HILDON_AA_SE_GRAVITY

#define HILDON_AA_SE_GRAVITY	    4


HILDON_AA_SW_GRAVITY

#define HILDON_AA_SW_GRAVITY	    6


HILDON_AA_S_GRAVITY

#define HILDON_AA_S_GRAVITY	    5


HILDON_AA_W_GRAVITY

#define HILDON_AA_W_GRAVITY	    7


HILDON_AA_X_AXIS

#define HILDON_AA_X_AXIS	    0


HILDON_AA_Y_AXIS

#define HILDON_AA_Y_AXIS	    1


HILDON_AA_Z_AXIS

#define HILDON_AA_Z_AXIS	    2