paint-nodes: Make part of the API internal
[profile/ivi/clutter.git] / clutter / clutter-paint-node.h
1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Copyright (C) 2011  Intel Corporation.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
20  *
21  * Author:
22  *   Emmanuele Bassi <ebassi@linux.intel.com>
23  */
24
25 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
26 #error "Only <clutter/clutter.h> can be included directly."
27 #endif
28
29 #ifndef __CLUTTER_PAINT_NODE_H__
30 #define __CLUTTER_PAINT_NODE_H__
31
32 #include <cogl/cogl.h>
33 #include <clutter/clutter-types.h>
34
35 G_BEGIN_DECLS
36
37 #define CLUTTER_TYPE_PAINT_NODE                 (clutter_paint_node_get_type ())
38 #define CLUTTER_PAINT_NODE(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_PAINT_NODE, ClutterPaintNode))
39 #define CLUTTER_IS_PAINT_NODE(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_PAINT_NODE))
40
41 typedef struct _ClutterPaintNodePrivate ClutterPaintNodePrivate;
42 typedef struct _ClutterPaintNodeClass   ClutterPaintNodeClass;
43
44 GType clutter_paint_node_get_type (void) G_GNUC_CONST;
45
46 ClutterPaintNode *      clutter_paint_node_ref                          (ClutterPaintNode      *node);
47 void                    clutter_paint_node_unref                        (ClutterPaintNode      *node);
48
49 void                    clutter_paint_node_set_name                     (ClutterPaintNode      *node,
50                                                                          const char            *name);
51
52 void                    clutter_paint_node_add_child                    (ClutterPaintNode      *node,
53                                                                          ClutterPaintNode      *child);
54 void                    clutter_paint_node_add_rectangle                (ClutterPaintNode      *node,
55                                                                          const ClutterActorBox *rect);
56 void                    clutter_paint_node_add_texture_rectangle        (ClutterPaintNode      *node,
57                                                                          const ClutterActorBox *rect,
58                                                                          float                  x_1,
59                                                                          float                  y_1,
60                                                                          float                  x_2,
61                                                                          float                  y_2);
62 #if defined(COGL_ENABLE_EXPERIMENTAL_2_0_API) && defined(CLUTTER_ENABLE_EXPERIMENTAL_API)
63 void                    clutter_paint_node_add_path                     (ClutterPaintNode      *node,
64                                                                          CoglPath              *path);
65 void                    clutter_paint_node_add_primitive                (ClutterPaintNode      *node,
66                                                                          CoglPrimitive         *primitive);
67 #endif /* COGL_ENABLE_EXPERIMENTAL_2_0_API && CLUTTER_ENABLE_EXPERIMENTAL_API */
68
69 #define CLUTTER_VALUE_HOLDS_PAINT_NODE(value)   (G_VALUE_HOLDS (value, CLUTTER_TYPE_PAINT_NODE))
70
71 void                    clutter_value_set_paint_node                    (GValue                *value,
72                                                                          gpointer               node);
73 void                    clutter_value_take_paint_node                   (GValue                *value,
74                                                                          gpointer               node);
75 gpointer                clutter_value_get_paint_node                    (const GValue          *value);
76 gpointer                clutter_value_dup_paint_node                    (const GValue          *value);
77
78 G_END_DECLS
79
80 #endif /* __CLUTTER_PAINT_NODE_H__ */