mirror of
https://github.com/brl/mutter.git
synced 2025-03-03 11:58:09 +00:00
script: Move all parser code inside ClutterScriptParser
ClutterScript is currently a mix of parser-related code and the ClutterScript object. All the parser-related code should be moved inside a private class, ClutterScriptParser, inheriting from JsonParser.
This commit is contained in:
parent
d7cfa15851
commit
31e5dadb68
File diff suppressed because it is too large
Load Diff
@ -34,6 +34,21 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define CLUTTER_TYPE_SCRIPT_PARSER (clutter_script_parser_get_type ())
|
||||||
|
#define CLUTTER_SCRIPT_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_SCRIPT_PARSER, ClutterScriptParser))
|
||||||
|
#define CLUTTER_IS_SCRIPT_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_SCRIPT_PARSER))
|
||||||
|
|
||||||
|
typedef struct _ClutterScriptParser ClutterScriptParser;
|
||||||
|
typedef struct _JsonParserClass ClutterScriptParserClass;
|
||||||
|
|
||||||
|
struct _ClutterScriptParser
|
||||||
|
{
|
||||||
|
JsonParser parent_instance;
|
||||||
|
|
||||||
|
/* back reference */
|
||||||
|
ClutterScript *script;
|
||||||
|
};
|
||||||
|
|
||||||
typedef GType (* GTypeGetFunc) (void);
|
typedef GType (* GTypeGetFunc) (void);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -75,6 +90,8 @@ typedef struct {
|
|||||||
|
|
||||||
void property_info_free (gpointer data);
|
void property_info_free (gpointer data);
|
||||||
|
|
||||||
|
GType clutter_script_parser_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
gboolean clutter_script_parse_node (ClutterScript *script,
|
gboolean clutter_script_parse_node (ClutterScript *script,
|
||||||
GValue *value,
|
GValue *value,
|
||||||
const gchar *name,
|
const gchar *name,
|
||||||
@ -84,7 +101,7 @@ gboolean clutter_script_parse_node (ClutterScript *script,
|
|||||||
GType clutter_script_get_type_from_symbol (const gchar *symbol);
|
GType clutter_script_get_type_from_symbol (const gchar *symbol);
|
||||||
GType clutter_script_get_type_from_class (const gchar *name);
|
GType clutter_script_get_type_from_class (const gchar *name);
|
||||||
|
|
||||||
GObject *clutter_script_construct_object (ClutterScript *script,
|
GObject *_clutter_script_construct_object (ClutterScript *script,
|
||||||
ObjectInfo *info);
|
ObjectInfo *info);
|
||||||
|
|
||||||
gulong clutter_script_resolve_animation_mode (const gchar *namer);
|
gulong clutter_script_resolve_animation_mode (const gchar *namer);
|
||||||
@ -108,6 +125,25 @@ gboolean clutter_script_parse_color (ClutterScript *script,
|
|||||||
GObject *clutter_script_parse_alpha (ClutterScript *script,
|
GObject *clutter_script_parse_alpha (ClutterScript *script,
|
||||||
JsonNode *node);
|
JsonNode *node);
|
||||||
|
|
||||||
|
gchar *_clutter_script_generate_fake_id (ClutterScript *script);
|
||||||
|
|
||||||
|
void _clutter_script_warn_missing_attribute (ClutterScript *script,
|
||||||
|
const gchar *id,
|
||||||
|
const gchar *attribute);
|
||||||
|
|
||||||
|
void _clutter_script_warn_invalid_value (ClutterScript *script,
|
||||||
|
const gchar *attribute,
|
||||||
|
const gchar *expected,
|
||||||
|
JsonNode *node);
|
||||||
|
|
||||||
|
ObjectInfo *_clutter_script_get_object_info (ClutterScript *script,
|
||||||
|
const gchar *script_id);
|
||||||
|
|
||||||
|
guint _clutter_script_get_last_merge_id (ClutterScript *script);
|
||||||
|
|
||||||
|
void _clutter_script_add_object_info (ClutterScript *script,
|
||||||
|
ObjectInfo *oinfo);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __CLUTTER_SCRIPT_PRIVATE_H__ */
|
#endif /* __CLUTTER_SCRIPT_PRIVATE_H__ */
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user