Removed unused ClutterKnot
Migration Complete. When you want to use ClutterKnot use ClutterPoint instead. Updated clutter.symbols to pass 'make check'
This commit is contained in:
parent
29271a2d73
commit
d2fbe4db1b
@ -1590,65 +1590,3 @@ clutter_path_node_equal (const ClutterPathNode *node_a,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
G_DEFINE_BOXED_TYPE (ClutterKnot, clutter_knot,
|
||||
clutter_knot_copy,
|
||||
clutter_knot_free);
|
||||
|
||||
/**
|
||||
* clutter_knot_copy:
|
||||
* @knot: a #ClutterKnot
|
||||
*
|
||||
* Makes an allocated copy of a knot.
|
||||
*
|
||||
* Return value: the copied knot.
|
||||
*
|
||||
*
|
||||
*/
|
||||
ClutterKnot *
|
||||
clutter_knot_copy (const ClutterKnot *knot)
|
||||
{
|
||||
if (G_UNLIKELY (knot == NULL))
|
||||
return NULL;
|
||||
|
||||
return g_slice_dup (ClutterKnot, knot);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_knot_free:
|
||||
* @knot: a #ClutterKnot
|
||||
*
|
||||
* Frees the memory of an allocated knot.
|
||||
*
|
||||
*
|
||||
*/
|
||||
void
|
||||
clutter_knot_free (ClutterKnot *knot)
|
||||
{
|
||||
if (G_LIKELY (knot != NULL))
|
||||
g_slice_free (ClutterKnot, knot);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_knot_equal:
|
||||
* @knot_a: First knot
|
||||
* @knot_b: Second knot
|
||||
*
|
||||
* Compares to knot and checks if the point to the same location.
|
||||
*
|
||||
* Return value: %TRUE if the knots point to the same location.
|
||||
*
|
||||
*
|
||||
*/
|
||||
gboolean
|
||||
clutter_knot_equal (const ClutterKnot *knot_a,
|
||||
const ClutterKnot *knot_b)
|
||||
{
|
||||
g_return_val_if_fail (knot_a != NULL, FALSE);
|
||||
g_return_val_if_fail (knot_b != NULL, FALSE);
|
||||
|
||||
if (knot_a == knot_b)
|
||||
return TRUE;
|
||||
|
||||
return knot_a->x == knot_b->x && knot_a->y == knot_b->y;
|
||||
}
|
||||
|
@ -293,60 +293,6 @@ _clutter_script_flags_from_string (GType type,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_knot_from_array (JsonArray *array,
|
||||
ClutterKnot *knot)
|
||||
{
|
||||
if (json_array_get_length (array) != 2)
|
||||
return FALSE;
|
||||
|
||||
knot->x = json_array_get_int_element (array, 0);
|
||||
knot->y = json_array_get_int_element (array, 1);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_knot_from_object (JsonObject *object,
|
||||
ClutterKnot *knot)
|
||||
{
|
||||
if (json_object_has_member (object, "x"))
|
||||
knot->x = json_object_get_int_member (object, "x");
|
||||
else
|
||||
knot->x = 0;
|
||||
|
||||
if (json_object_has_member (object, "y"))
|
||||
knot->y = json_object_get_int_member (object, "y");
|
||||
else
|
||||
knot->y = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_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);
|
||||
g_return_val_if_fail (knot != NULL, FALSE);
|
||||
|
||||
switch (JSON_NODE_TYPE (node))
|
||||
{
|
||||
case JSON_NODE_ARRAY:
|
||||
return parse_knot_from_array (json_node_get_array (node), knot);
|
||||
|
||||
case JSON_NODE_OBJECT:
|
||||
return parse_knot_from_object (json_node_get_object (node), knot);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_rect_from_array (JsonArray *array,
|
||||
ClutterRect *rect)
|
||||
@ -1074,18 +1020,6 @@ _clutter_script_parse_node (ClutterScript *script,
|
||||
|
||||
g_value_set_object (value, oinfo->object);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (p_type == CLUTTER_TYPE_KNOT)
|
||||
{
|
||||
ClutterKnot knot = { 0, };
|
||||
|
||||
/* knot := { "x" : (int), "y" : (int) } */
|
||||
|
||||
if (_clutter_script_parse_knot (script, node, &knot))
|
||||
{
|
||||
g_value_set_boxed (value, &knot);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@ -1166,19 +1100,7 @@ _clutter_script_parse_node (ClutterScript *script,
|
||||
if (!G_IS_VALUE (value))
|
||||
g_value_init (value, G_PARAM_SPEC_VALUE_TYPE (pspec));
|
||||
|
||||
if (G_VALUE_HOLDS (value, CLUTTER_TYPE_KNOT))
|
||||
{
|
||||
ClutterKnot knot = { 0, };
|
||||
|
||||
/* knot := [ (int), (int) ] */
|
||||
|
||||
if (_clutter_script_parse_knot (script, node, &knot))
|
||||
{
|
||||
g_value_set_boxed (value, &knot);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (G_VALUE_HOLDS (value, CLUTTER_TYPE_RECT))
|
||||
if (G_VALUE_HOLDS (value, CLUTTER_TYPE_RECT))
|
||||
{
|
||||
ClutterRect rect = CLUTTER_RECT_INIT_ZERO;
|
||||
|
||||
|
@ -116,9 +116,6 @@ 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_rect (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterRect *rect);
|
||||
|
@ -77,7 +77,6 @@ typedef struct _ClutterPathNode ClutterPathNode;
|
||||
|
||||
typedef struct _ClutterActorBox ClutterActorBox;
|
||||
typedef struct _ClutterColor ClutterColor;
|
||||
typedef struct _ClutterKnot ClutterKnot;
|
||||
typedef struct _ClutterMargin ClutterMargin;
|
||||
typedef struct _ClutterPerspective ClutterPerspective;
|
||||
typedef struct _ClutterPoint ClutterPoint;
|
||||
@ -517,27 +516,6 @@ void clutter_actor_box_set_size (ClutterActorBox *box,
|
||||
gfloat width,
|
||||
gfloat height);
|
||||
|
||||
/**
|
||||
* ClutterKnot:
|
||||
* @x: X coordinate of the knot
|
||||
* @y: Y coordinate of the knot
|
||||
*
|
||||
* Point in a path behaviour.
|
||||
*
|
||||
*
|
||||
*/
|
||||
struct _ClutterKnot
|
||||
{
|
||||
gint x;
|
||||
gint y;
|
||||
};
|
||||
|
||||
GType clutter_knot_get_type (void) G_GNUC_CONST;
|
||||
ClutterKnot *clutter_knot_copy (const ClutterKnot *knot);
|
||||
void clutter_knot_free (ClutterKnot *knot);
|
||||
gboolean clutter_knot_equal (const ClutterKnot *knot_a,
|
||||
const ClutterKnot *knot_b);
|
||||
|
||||
/**
|
||||
* ClutterPathNode:
|
||||
* @type: the node's type
|
||||
|
@ -615,10 +615,6 @@ clutter_keyframe_transition_set_modes
|
||||
clutter_keyframe_transition_set_values
|
||||
clutter_keyframe_transition_set
|
||||
clutter_keysym_to_unicode
|
||||
clutter_knot_copy
|
||||
clutter_knot_equal
|
||||
clutter_knot_free
|
||||
clutter_knot_get_type
|
||||
clutter_layout_meta_get_manager
|
||||
clutter_layout_meta_get_type
|
||||
clutter_layout_manager_allocate
|
||||
|
Loading…
Reference in New Issue
Block a user