}
GType
-clutter_script_get_type_from_symbol (const gchar *symbol)
+_clutter_script_get_type_from_symbol (const gchar *symbol)
{
static GModule *module = NULL;
GTypeGetFunc func;
}
GType
-clutter_script_get_type_from_class (const gchar *name)
+_clutter_script_get_type_from_class (const gchar *name)
{
static GModule *module = NULL;
GString *symbol_name = g_string_sized_new (64);
* Return value: %TRUE if the conversion was successfull.
*/
gboolean
-clutter_script_enum_from_string (GType type,
- const gchar *string,
- gint *enum_value)
+_clutter_script_enum_from_string (GType type,
+ const gchar *string,
+ gint *enum_value)
{
GEnumClass *eclass;
GEnumValue *ev;
}
gboolean
-clutter_script_flags_from_string (GType type,
- const gchar *string,
- gint *flags_value)
+_clutter_script_flags_from_string (GType type,
+ const gchar *string,
+ gint *flags_value)
{
gchar *endptr, *prevptr;
guint i, j, ret, value;
}
gboolean
-clutter_script_parse_knot (ClutterScript *script,
- JsonNode *node,
- ClutterKnot *knot)
+_clutter_script_parse_knot (ClutterScript *script,
+ JsonNode *node,
+ ClutterKnot *knot)
{
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
g_return_val_if_fail (node != NULL, FALSE);
}
gboolean
-clutter_script_parse_geometry (ClutterScript *script,
- JsonNode *node,
- ClutterGeometry *geometry)
+_clutter_script_parse_geometry (ClutterScript *script,
+ JsonNode *node,
+ ClutterGeometry *geometry)
{
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
g_return_val_if_fail (node != NULL, FALSE);
}
gboolean
-clutter_script_parse_color (ClutterScript *script,
- JsonNode *node,
- ClutterColor *color)
+_clutter_script_parse_color (ClutterScript *script,
+ JsonNode *node,
+ ClutterColor *color)
{
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
g_return_val_if_fail (node != NULL, FALSE);
static const gint n_animation_modes = G_N_ELEMENTS (animation_modes);
gulong
-clutter_script_resolve_animation_mode (JsonNode *node)
+_clutter_script_resolve_animation_mode (JsonNode *node)
{
gint i, res = CLUTTER_CUSTOM_MODE;
return animation_modes[i].mode;
}
- if (clutter_script_enum_from_string (CLUTTER_TYPE_ANIMATION_MODE,
- name,
- &res))
+ if (_clutter_script_enum_from_string (CLUTTER_TYPE_ANIMATION_MODE,
+ name,
+ &res))
return res;
g_warning ("Unable to find the animation mode '%s'", name);
val = json_object_get_member (object, "mode");
if (val != NULL)
- mode = clutter_script_resolve_animation_mode (val);
+ mode = _clutter_script_resolve_animation_mode (val);
if (mode == CLUTTER_CUSTOM_MODE)
{
}
gboolean
-clutter_script_parse_node (ClutterScript *script,
- GValue *value,
- const gchar *name,
- JsonNode *node,
- GParamSpec *pspec)
+_clutter_script_parse_node (ClutterScript *script,
+ GValue *value,
+ const gchar *name,
+ JsonNode *node,
+ GParamSpec *pspec)
{
GValue node_value = { 0, };
gboolean retval = FALSE;
/* knot := { "x" : (int), "y" : (int) } */
- if (clutter_script_parse_knot (script, node, &knot))
+ if (_clutter_script_parse_knot (script, node, &knot))
{
g_value_set_boxed (value, &knot);
return TRUE;
* }
*/
- if (clutter_script_parse_geometry (script, node, &geom))
+ if (_clutter_script_parse_geometry (script, node, &geom))
{
g_value_set_boxed (value, &geom);
return TRUE;
* }
*/
- if (clutter_script_parse_color (script, node, &color))
+ if (_clutter_script_parse_color (script, node, &color))
{
g_value_set_boxed (value, &color);
return TRUE;
/* knot := [ (int), (int) ] */
- if (clutter_script_parse_knot (script, node, &knot))
+ if (_clutter_script_parse_knot (script, node, &knot))
{
g_value_set_boxed (value, &knot);
return TRUE;
/* geometry := [ (int), (int), (int), (int) ] */
- if (clutter_script_parse_geometry (script, node, &geom))
+ if (_clutter_script_parse_geometry (script, node, &geom))
{
g_value_set_boxed (value, &geom);
return TRUE;
/* color := [ (int), (int), (int), (int) ] */
- if (clutter_script_parse_color (script, node, &color))
+ if (_clutter_script_parse_color (script, node, &color))
{
g_value_set_boxed (value, &color);
return TRUE;
{
gint enum_value;
- retval = clutter_script_enum_from_string (G_VALUE_TYPE (value),
- g_value_get_string (&node_value),
- &enum_value);
+ retval = _clutter_script_enum_from_string (G_VALUE_TYPE (value),
+ g_value_get_string (&node_value),
+ &enum_value);
if (retval)
g_value_set_enum (value, enum_value);
}
{
gint flags_value;
- retval = clutter_script_flags_from_string (G_VALUE_TYPE (value),
- g_value_get_string (&node_value),
- &flags_value);
+ retval = _clutter_script_flags_from_string (G_VALUE_TYPE (value),
+ g_value_get_string (&node_value),
+ &flags_value);
if (retval)
g_value_set_flags (value, flags_value);
}
{
ClutterColor color = { 0, };
- retval = clutter_script_parse_color (script, node, &color);
+ retval = _clutter_script_parse_color (script, node, &color);
if (retval)
clutter_value_set_color (value, &color);
}
pinfo->node);
if (!res)
- res = clutter_script_parse_node (script, ¶m.value,
- pinfo->name,
- pinfo->node,
- pinfo->pspec);
+ res = _clutter_script_parse_node (script, ¶m.value,
+ pinfo->name,
+ pinfo->node,
+ pinfo->pspec);
if (!res)
{
param.name = g_strdup (pinfo->name);
- if (!clutter_script_parse_node (script, ¶m.value,
- pinfo->name,
- pinfo->node,
- pinfo->pspec))
+ if (!_clutter_script_parse_node (script, ¶m.value,
+ pinfo->name,
+ pinfo->node,
+ pinfo->pspec))
{
unparsed = g_list_prepend (unparsed, pinfo);
continue;
pinfo->node);
if (!res)
- res = clutter_script_parse_node (script, &value,
- name,
- pinfo->node,
- pinfo->pspec);
+ res = _clutter_script_parse_node (script, &value,
+ name,
+ pinfo->node,
+ pinfo->pspec);
if (!res)
{
pinfo->node);
if (!res)
- res = clutter_script_parse_node (script, &value,
- name,
- pinfo->node,
- pinfo->pspec);
+ res = _clutter_script_parse_node (script, &value,
+ name,
+ pinfo->node,
+ pinfo->pspec);
if (!res)
{
if (oinfo->gtype == G_TYPE_INVALID)
{
if (G_UNLIKELY (oinfo->type_func))
- oinfo->gtype = clutter_script_get_type_from_symbol (oinfo->type_func);
+ oinfo->gtype = _clutter_script_get_type_from_symbol (oinfo->type_func);
else
oinfo->gtype = clutter_script_get_type_from_name (script, oinfo->class_name);
GType clutter_script_parser_get_type (void) G_GNUC_CONST;
-gboolean clutter_script_parse_node (ClutterScript *script,
- GValue *value,
- const gchar *name,
- JsonNode *node,
- GParamSpec *pspec);
-
-GType clutter_script_get_type_from_symbol (const gchar *symbol);
-GType clutter_script_get_type_from_class (const gchar *name);
-
-gulong clutter_script_resolve_animation_mode (JsonNode *node);
-
-gboolean clutter_script_enum_from_string (GType gtype,
- const gchar *string,
- gint *enum_value);
-gboolean clutter_script_flags_from_string (GType gtype,
- const gchar *string,
- gint *flags_value);
-
-gboolean clutter_script_parse_knot (ClutterScript *script,
- JsonNode *node,
- ClutterKnot *knot);
-gboolean clutter_script_parse_geometry (ClutterScript *script,
- JsonNode *node,
- ClutterGeometry *geometry);
-gboolean clutter_script_parse_color (ClutterScript *script,
- JsonNode *node,
- ClutterColor *color);
+gboolean _clutter_script_parse_node (ClutterScript *script,
+ GValue *value,
+ const gchar *name,
+ JsonNode *node,
+ GParamSpec *pspec);
+
+GType _clutter_script_get_type_from_symbol (const gchar *symbol);
+GType _clutter_script_get_type_from_class (const gchar *name);
+
+gulong _clutter_script_resolve_animation_mode (JsonNode *node);
+
+gboolean _clutter_script_enum_from_string (GType gtype,
+ const gchar *string,
+ gint *enum_value);
+gboolean _clutter_script_flags_from_string (GType gtype,
+ const gchar *string,
+ gint *flags_value);
+
+gboolean _clutter_script_parse_knot (ClutterScript *script,
+ JsonNode *node,
+ ClutterKnot *knot);
+gboolean _clutter_script_parse_geometry (ClutterScript *script,
+ JsonNode *node,
+ ClutterGeometry *geometry);
+gboolean _clutter_script_parse_color (ClutterScript *script,
+ JsonNode *node,
+ ClutterColor *color);
GObject *_clutter_script_parse_alpha (ClutterScript *script,
JsonNode *node);