ClutterPaintNode

ClutterPaintNode — Paint objects

Synopsis

                    ClutterPaintNode;
                    ClutterPaintNodeClass;
ClutterPaintNode *  clutter_paint_node_ref              (ClutterPaintNode *node);
void                clutter_paint_node_unref            (ClutterPaintNode *node);
void                clutter_paint_node_set_name         (ClutterPaintNode *node,
                                                         const char *name);

void                clutter_paint_node_add_child        (ClutterPaintNode *node,
                                                         ClutterPaintNode *child);

void                clutter_paint_node_add_rectangle    (ClutterPaintNode *node,
                                                         const ClutterActorBox *rect);
void                clutter_paint_node_add_texture_rectangle
                                                        (ClutterPaintNode *node,
                                                         const ClutterActorBox *rect,
                                                         float x_1,
                                                         float y_1,
                                                         float x_2,
                                                         float y_2);
void                clutter_paint_node_add_path         (ClutterPaintNode *node,
                                                         CoglPath *path);
void                clutter_paint_node_add_primitive    (ClutterPaintNode *node,
                                                         CoglPrimitive *primitive);

#define             CLUTTER_VALUE_HOLDS_PAINT_NODE      (value)
void                clutter_value_set_paint_node        (GValue *value,
                                                         gpointer node);
void                clutter_value_take_paint_node       (GValue *value,
                                                         gpointer node);
gpointer            clutter_value_get_paint_node        (const GValue *value);
gpointer            clutter_value_dup_paint_node        (const GValue *value);

Object Hierarchy

  ClutterPaintNode

Description

ClutterPaintNode is an element in the render graph.

The render graph contains all the elements that need to be painted by Clutter when submitting a frame to the graphics system.

The render graph is distinct from the scene graph: the scene graph is composed by actors, which can be visible or invisible; the scene graph elements also respond to events. The render graph, instead, is only composed by nodes that will be painted.

Each ClutterActor can submit multiple ClutterPaintNodes to the render graph.

Details

ClutterPaintNode

typedef struct _ClutterPaintNode ClutterPaintNode;

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

Ref Func: clutter_paint_node_ref Unref Func: clutter_paint_node_unref Set Value Func: clutter_value_set_paint_node Get Value Func: clutter_value_get_paint_node

Since 1.10


ClutterPaintNodeClass

typedef struct _ClutterPaintNodeClass ClutterPaintNodeClass;

The ClutterPaintNodeClass structure contains only private data.

Since 1.10


clutter_paint_node_ref ()

ClutterPaintNode *  clutter_paint_node_ref              (ClutterPaintNode *node);

Acquires a reference on node.

node :

a ClutterPaintNode

Returns :

the ClutterPaintNode. [transfer full]

Since 1.10


clutter_paint_node_unref ()

void                clutter_paint_node_unref            (ClutterPaintNode *node);

Releases a reference on node.

node :

a ClutterPaintNode

Since 1.10


clutter_paint_node_set_name ()

void                clutter_paint_node_set_name         (ClutterPaintNode *node,
                                                         const char *name);

Sets a user-readable name for node.

The name will be used for debugging purposes.

The node will copy the passed string.

node :

a ClutterPaintNode

name :

a string annotating the node

Since 1.10


clutter_paint_node_add_child ()

void                clutter_paint_node_add_child        (ClutterPaintNode *node,
                                                         ClutterPaintNode *child);

Adds child to the list of children of node.

This function will acquire a reference on child.

node :

a ClutterPaintNode

child :

the child ClutterPaintNode to add

Since 1.10


clutter_paint_node_add_rectangle ()

void                clutter_paint_node_add_rectangle    (ClutterPaintNode *node,
                                                         const ClutterActorBox *rect);

Adds a rectangle region to the node, as described by the passed rect.

node :

a ClutterPaintNode

rect :

a ClutterActorBox

Since 1.10


clutter_paint_node_add_texture_rectangle ()

void                clutter_paint_node_add_texture_rectangle
                                                        (ClutterPaintNode *node,
                                                         const ClutterActorBox *rect,
                                                         float x_1,
                                                         float y_1,
                                                         float x_2,
                                                         float y_2);

Adds a rectangle region to the node, with texture coordinates.

node :

a ClutterPaintNode

rect :

a ClutterActorBox

x_1 :

the left X coordinate of the texture

y_1 :

the top Y coordinate of the texture

x_2 :

the right X coordinate of the texture

y_2 :

the bottom Y coordinate of the texture

Since 1.10


clutter_paint_node_add_path ()

void                clutter_paint_node_add_path         (ClutterPaintNode *node,
                                                         CoglPath *path);

Adds a region described as a path to the node.

This function acquires a reference on the passed path, so it is safe to call cogl_object_unref() when it returns.

node :

a ClutterPaintNode

path :

a Cogl path

Since 1.10

Stability Level: Unstable


clutter_paint_node_add_primitive ()

void                clutter_paint_node_add_primitive    (ClutterPaintNode *node,
                                                         CoglPrimitive *primitive);

Adds a region described by a Cogl primitive to the node.

This function acquires a reference on primitive, so it is safe to call cogl_object_unref() when it returns.

node :

a ClutterPaintNode

primitive :

a Cogl primitive

Since 1.10


CLUTTER_VALUE_HOLDS_PAINT_NODE()

#define CLUTTER_VALUE_HOLDS_PAINT_NODE(value)   (G_VALUE_HOLDS (value, CLUTTER_TYPE_PAINT_NODE))

Evaluates to TRUE if the value has been initialized to hold a ClutterPaintNode.

value :

a GValue

Since 1.10


clutter_value_set_paint_node ()

void                clutter_value_set_paint_node        (GValue *value,
                                                         gpointer node);

Sets the contents of a GValue initialized with CLUTTER_TYPE_PAINT_NODE.

This function increased the reference count of node; if you do not wish to increase the reference count, use clutter_value_take_paint_node() instead. The reference count will be released by g_value_unset().

value :

a GValue initialized with CLUTTER_TYPE_PAINT_NODE

node :

a ClutterPaintNode, or NULL. [type Clutter.PaintNode][allow-none]

Since 1.10


clutter_value_take_paint_node ()

void                clutter_value_take_paint_node       (GValue *value,
                                                         gpointer node);

Sets the contents of a GValue initialized with CLUTTER_TYPE_PAINT_NODE.

Unlike clutter_value_set_paint_node(), this function will not take a reference on the passed node: instead, it will take ownership of the current reference count.

value :

a GValue, initialized with CLUTTER_TYPE_PAINT_NODE

node :

a ClutterPaintNode, or NULL. [type Clutter.PaintNode][allow-none]

Since 1.10


clutter_value_get_paint_node ()

gpointer            clutter_value_get_paint_node        (const GValue *value);

Retrieves a pointer to the ClutterPaintNode contained inside the passed GValue.

value :

a GValue initialized with CLUTTER_TYPE_PAINT_NODE

Returns :

a pointer to a ClutterPaintNode, or NULL. [transfer none][type Clutter.PaintNode]

Since 1.10


clutter_value_dup_paint_node ()

gpointer            clutter_value_dup_paint_node        (const GValue *value);

Retrieves a pointer to the ClutterPaintNode contained inside the passed GValue, and if not NULL it will increase the reference count.

value :

a GValue initialized with CLUTTER_TYPE_PAINT_NODE

Returns :

a pointer to the ClutterPaintNode, with its reference count increased, or NULL. [transfer full][type Clutter.PaintNode]

Since 1.10