ClutterAction

ClutterAction — Abstract class for event-related logic

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActorMeta
            ╰── ClutterAction
                ├── ClutterClickAction
                ├── ClutterDragAction
                ├── ClutterDropAction
                ╰── ClutterGestureAction

Description

ClutterAction is an abstract base class for event-related actions that modify the user interaction of a ClutterActor, just like ClutterConstraint is an abstract class for modifiers of an actor's position or size.

Implementations of ClutterAction are associated to an actor and can provide behavioral changes when dealing with user input - for instance drag and drop capabilities, or scrolling, or panning - by using the various event-related signals provided by ClutterActor itself.

ClutterAction is available since Clutter 1.4

Functions

clutter_actor_add_action ()

void
clutter_actor_add_action (ClutterActor *self,
                          ClutterAction *action);

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

Parameters

self

a ClutterActor

 

action

a ClutterAction

 

Since: 1.4


clutter_actor_add_action_with_name ()

void
clutter_actor_add_action_with_name (ClutterActor *self,
                                    const gchar *name,
                                    ClutterAction *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:

1
2
clutter_actor_meta_set_name (CLUTTER_ACTOR_META (action), name);
clutter_actor_add_action (self, action);

Parameters

self

a ClutterActor

 

name

the name to set on the action

 

action

a ClutterAction

 

Since: 1.4


clutter_actor_remove_action ()

void
clutter_actor_remove_action (ClutterActor *self,
                             ClutterAction *action);

Removes action from the list of actions applied to self

The reference held by self on the ClutterAction will be released

Parameters

self

a ClutterActor

 

action

a ClutterAction

 

Since: 1.4


clutter_actor_remove_action_by_name ()

void
clutter_actor_remove_action_by_name (ClutterActor *self,
                                     const gchar *name);

Removes the ClutterAction with the given name from the list of actions applied to self

Parameters

self

a ClutterActor

 

name

the name of the action to remove

 

Since: 1.4


clutter_actor_get_action ()

ClutterAction *
clutter_actor_get_action (ClutterActor *self,
                          const gchar *name);

Retrieves the ClutterAction with the given name in the list of actions applied to self

Parameters

self

a ClutterActor

 

name

the name of the action to retrieve

 

Returns

a ClutterAction for the given name, or NULL. The returned ClutterAction is owned by the actor and it should not be unreferenced directly.

[transfer none]

Since: 1.4


clutter_actor_get_actions ()

GList *
clutter_actor_get_actions (ClutterActor *self);

Retrieves the list of actions applied to self

Parameters

self

a ClutterActor

 

Returns

a copy 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.

[transfer container][element-type Clutter.Action]

Since: 1.4


clutter_actor_clear_actions ()

void
clutter_actor_clear_actions (ClutterActor *self);

Clears the list of actions applied to self

Parameters

self

a ClutterActor

 

Since: 1.4


clutter_actor_has_actions ()

gboolean
clutter_actor_has_actions (ClutterActor *self);

Returns whether the actor has any actions applied.

Parameters

self

A ClutterActor

 

Returns

TRUE if the actor has any actions, FALSE otherwise

Since: 1.10

Types and Values

ClutterAction

typedef struct _ClutterAction ClutterAction;

The ClutterAction structure contains only private data and should be accessed using the provided API.

Since: 1.4


struct ClutterActionClass

struct ClutterActionClass {
};

The ClutterActionClass structure contains only private data

Since: 1.4

See Also

ClutterConstraint