Replace ClutterPoint by graphene_point_t

Remove the tests for ClutterPoint since it's
corresponding code moved to private ClutterStage
methods.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
This commit is contained in:
Georges Basile Stavracas Neto
2019-02-20 11:53:44 -03:00
parent cd293f764e
commit 160cc9182d
48 changed files with 275 additions and 606 deletions

View File

@ -492,8 +492,8 @@ _clutter_script_parse_color (ClutterScript *script,
}
static gboolean
parse_point_from_array (JsonArray *array,
ClutterPoint *point)
parse_point_from_array (JsonArray *array,
graphene_point_t *point)
{
if (json_array_get_length (array) != 2)
return FALSE;
@ -505,8 +505,8 @@ parse_point_from_array (JsonArray *array,
}
static gboolean
parse_point_from_object (JsonObject *object,
ClutterPoint *point)
parse_point_from_object (JsonObject *object,
graphene_point_t *point)
{
if (json_object_has_member (object, "x"))
point->x = json_object_get_double_member (object, "x");
@ -522,9 +522,9 @@ parse_point_from_object (JsonObject *object,
}
gboolean
_clutter_script_parse_point (ClutterScript *script,
JsonNode *node,
ClutterPoint *point)
_clutter_script_parse_point (ClutterScript *script,
JsonNode *node,
graphene_point_t *point)
{
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
g_return_val_if_fail (node != NULL, FALSE);
@ -1364,9 +1364,9 @@ _clutter_script_parse_node (ClutterScript *script,
return TRUE;
}
}
else if (p_type == CLUTTER_TYPE_POINT)
else if (p_type == GRAPHENE_TYPE_POINT)
{
ClutterPoint point = CLUTTER_POINT_INIT_ZERO;
graphene_point_t point = GRAPHENE_POINT_INIT_ZERO;
if (_clutter_script_parse_point (script, node, &point))
{
@ -1441,9 +1441,9 @@ _clutter_script_parse_node (ClutterScript *script,
return TRUE;
}
}
else if (G_VALUE_HOLDS (value, CLUTTER_TYPE_POINT))
else if (G_VALUE_HOLDS (value, GRAPHENE_TYPE_POINT))
{
ClutterPoint point = CLUTTER_POINT_INIT_ZERO;
graphene_point_t point = GRAPHENE_POINT_INIT_ZERO;
if (_clutter_script_parse_point (script, node, &point))
{