[clutter] Removed unused ClutterKnot



commit d2fbe4db1b25908151e32e150352a671ada141fa
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Fri May 3 10:16:25 2013 -0400

    Removed unused ClutterKnot
    
    Migration Complete. When you want to use ClutterKnot
    use ClutterPoint instead.
    Updated clutter.symbols to pass 'make check'

 clutter/clutter-path.c           |   62 -----------------------------
 clutter/clutter-script-parser.c  |   80 +-------------------------------------
 clutter/clutter-script-private.h |    3 -
 clutter/clutter-types.h          |   22 ----------
 clutter/clutter.symbols          |    4 --
 5 files changed, 1 insertions(+), 170 deletions(-)
---
diff --git a/clutter/clutter-path.c b/clutter/clutter-path.c
index d4740d5..8d09396 100644
--- a/clutter/clutter-path.c
+++ b/clutter/clutter-path.c
@@ -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;
-}
diff --git a/clutter/clutter-script-parser.c b/clutter/clutter-script-parser.c
index 0929c61..31a65ac 100644
--- a/clutter/clutter-script-parser.c
+++ b/clutter/clutter-script-parser.c
@@ -294,60 +294,6 @@ _clutter_script_flags_from_string (GType        type,
 }
 
 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)
 {
@@ -1077,18 +1023,6 @@ _clutter_script_parse_node (ClutterScript *script,
                   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;
-                }
-            }
           else if (p_type == CLUTTER_TYPE_RECT)
             {
               ClutterRect rect = CLUTTER_RECT_INIT_ZERO;
@@ -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;
 
diff --git a/clutter/clutter-script-private.h b/clutter/clutter-script-private.h
index 7a6a6a9..e10107f 100644
--- a/clutter/clutter-script-private.h
+++ b/clutter/clutter-script-private.h
@@ -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);
diff --git a/clutter/clutter-types.h b/clutter/clutter-types.h
index 65b5e8c..34b1e08 100644
--- a/clutter/clutter-types.h
+++ b/clutter/clutter-types.h
@@ -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;
@@ -518,27 +517,6 @@ void             clutter_actor_box_set_size       (ClutterActorBox       *box,
                                                    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
  * @points: the coordinates of the node
diff --git a/clutter/clutter.symbols b/clutter/clutter.symbols
index f79c9dd..1cd846e 100644
--- a/clutter/clutter.symbols
+++ b/clutter/clutter.symbols
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]