4 * An OpenGL based 'interactive canvas' library.
6 * Authored By Matthew Allum <mallum@openedhand.com>
8 * Copyright (C) 2006 OpenedHand
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
26 #ifndef __CLUTTER_SCRIPT_PRIVATE_H__
27 #define __CLUTTER_SCRIPT_PRIVATE_H__
29 #include <glib-object.h>
30 #include <json-glib/json-glib.h>
32 #include "clutter-color.h"
33 #include "clutter-types.h"
34 #include "clutter-script.h"
38 #define CLUTTER_TYPE_SCRIPT_PARSER (_clutter_script_parser_get_type ())
39 #define CLUTTER_SCRIPT_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_SCRIPT_PARSER, ClutterScriptParser))
40 #define CLUTTER_IS_SCRIPT_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_SCRIPT_PARSER))
42 typedef struct _ClutterScriptParser ClutterScriptParser;
43 typedef struct _JsonParserClass ClutterScriptParserClass;
45 struct _ClutterScriptParser
47 JsonParser parent_instance;
50 ClutterScript *script;
53 typedef GType (* GTypeGetFunc) (void);
71 guint is_stage_default : 1;
72 guint has_unresolved : 1;
73 guint is_unmerged : 1;
76 void object_info_free (gpointer data);
100 void property_info_free (gpointer data);
102 GType _clutter_script_parser_get_type (void) G_GNUC_CONST;
104 gboolean _clutter_script_parse_node (ClutterScript *script,
110 GType _clutter_script_get_type_from_symbol (const gchar *symbol);
111 GType _clutter_script_get_type_from_class (const gchar *name);
113 gulong _clutter_script_resolve_animation_mode (JsonNode *node);
115 gboolean _clutter_script_enum_from_string (GType gtype,
118 gboolean _clutter_script_flags_from_string (GType gtype,
122 gboolean _clutter_script_parse_knot (ClutterScript *script,
125 gboolean _clutter_script_parse_geometry (ClutterScript *script,
127 ClutterGeometry *geometry);
128 gboolean _clutter_script_parse_color (ClutterScript *script,
130 ClutterColor *color);
131 GObject *_clutter_script_parse_alpha (ClutterScript *script,
133 gboolean _clutter_script_parse_point (ClutterScript *script,
135 ClutterPoint *point);
136 gboolean _clutter_script_parse_size (ClutterScript *script,
140 gboolean _clutter_script_parse_translatable_string (ClutterScript *script,
144 void _clutter_script_construct_object (ClutterScript *script,
146 void _clutter_script_apply_properties (ClutterScript *script,
149 gchar *_clutter_script_generate_fake_id (ClutterScript *script);
151 void _clutter_script_warn_missing_attribute (ClutterScript *script,
153 const gchar *attribute);
155 void _clutter_script_warn_invalid_value (ClutterScript *script,
156 const gchar *attribute,
157 const gchar *expected,
160 ObjectInfo *_clutter_script_get_object_info (ClutterScript *script,
161 const gchar *script_id);
163 guint _clutter_script_get_last_merge_id (ClutterScript *script);
165 void _clutter_script_add_object_info (ClutterScript *script,
168 const gchar *_clutter_script_get_id_from_node (JsonNode *node);
172 #endif /* __CLUTTER_SCRIPT_PRIVATE_H__ */