~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to clutter/clutter-script-private.h

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * Lesser General Public License for more details.
19
19
 *
20
20
 * You should have received a copy of the GNU Lesser General Public
21
 
 * License along with this library; if not, write to the
22
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23
 
 * Boston, MA 02111-1307, USA.
 
21
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 
22
 *
 
23
 *
24
24
 */
25
25
 
26
26
#ifndef __CLUTTER_SCRIPT_PRIVATE_H__
27
27
#define __CLUTTER_SCRIPT_PRIVATE_H__
28
28
 
29
29
#include <glib-object.h>
30
 
#include "json/json-types.h"
 
30
#include "clutter-json.h"
31
31
#include "clutter-color.h"
32
32
#include "clutter-types.h"
33
33
#include "clutter-script.h"
34
34
 
35
35
G_BEGIN_DECLS
36
36
 
 
37
#define CLUTTER_TYPE_SCRIPT_PARSER      (clutter_script_parser_get_type ())
 
38
#define CLUTTER_SCRIPT_PARSER(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_SCRIPT_PARSER, ClutterScriptParser))
 
39
#define CLUTTER_IS_SCRIPT_PARSER(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_SCRIPT_PARSER))
 
40
 
 
41
typedef struct _ClutterScriptParser     ClutterScriptParser;
 
42
typedef struct _JsonParserClass         ClutterScriptParserClass;
 
43
 
 
44
struct _ClutterScriptParser
 
45
{
 
46
  JsonParser parent_instance;
 
47
 
 
48
  /* back reference */
 
49
  ClutterScript *script;
 
50
};
 
51
 
37
52
typedef GType (* GTypeGetFunc) (void);
38
53
 
39
54
typedef struct {
63
78
  gchar *name;
64
79
  JsonNode *node;
65
80
  GParamSpec *pspec;
 
81
 
 
82
  guint is_child : 1;
66
83
} PropertyInfo;
67
84
 
68
85
typedef struct {
75
92
 
76
93
void property_info_free (gpointer data);
77
94
 
 
95
GType clutter_script_parser_get_type (void) G_GNUC_CONST;
 
96
 
78
97
gboolean clutter_script_parse_node        (ClutterScript *script,
79
98
                                           GValue        *value,
80
99
                                           const gchar   *name,
84
103
GType    clutter_script_get_type_from_symbol (const gchar *symbol);
85
104
GType    clutter_script_get_type_from_class  (const gchar *name);
86
105
 
87
 
GObject *clutter_script_construct_object  (ClutterScript *script,
88
 
                                           ObjectInfo    *info);
 
106
gulong   clutter_script_resolve_animation_mode (JsonNode *node);
89
107
 
90
108
gboolean clutter_script_enum_from_string  (GType          gtype,
91
109
                                           const gchar   *string,
103
121
gboolean clutter_script_parse_color       (ClutterScript   *script,
104
122
                                           JsonNode        *node,
105
123
                                           ClutterColor    *color);
106
 
GObject *clutter_script_parse_alpha       (ClutterScript   *script,
107
 
                                           JsonNode        *node);
 
124
GObject *_clutter_script_parse_alpha       (ClutterScript   *script,
 
125
                                            JsonNode        *node);
 
126
 
 
127
void _clutter_script_construct_object (ClutterScript *script,
 
128
                                       ObjectInfo    *oinfo);
 
129
void _clutter_script_apply_properties (ClutterScript *script,
 
130
                                       ObjectInfo    *oinfo);
 
131
 
 
132
gchar *_clutter_script_generate_fake_id (ClutterScript *script);
 
133
 
 
134
void _clutter_script_warn_missing_attribute (ClutterScript *script,
 
135
                                             const gchar   *id,
 
136
                                             const gchar   *attribute);
 
137
 
 
138
void _clutter_script_warn_invalid_value (ClutterScript *script,
 
139
                                         const gchar   *attribute,
 
140
                                         const gchar   *expected,
 
141
                                         JsonNode      *node);
 
142
 
 
143
ObjectInfo *_clutter_script_get_object_info (ClutterScript *script,
 
144
                                             const gchar   *script_id);
 
145
 
 
146
guint _clutter_script_get_last_merge_id (ClutterScript *script);
 
147
 
 
148
void _clutter_script_add_object_info (ClutterScript *script,
 
149
                                      ObjectInfo    *oinfo);
108
150
 
109
151
G_END_DECLS
110
152