[gtk+/wip/css: 133/153] border-image: Remove pack/unpack functions



commit 8d43578cf2ad17a7facc0105d7f6a742df5997ac
Author: Benjamin Otte <otte redhat com>
Date:   Wed Jan 4 04:06:50 2012 +0100

    border-image: Remove pack/unpack functions
    
    They are not used anymore. Also, it's no longer necessary to register
    GtkBorderImage as a custom GType.

 gtk/gtkborderimage.c        |   71 -------------------------------------------
 gtk/gtkborderimageprivate.h |   12 -------
 2 files changed, 0 insertions(+), 83 deletions(-)
---
diff --git a/gtk/gtkborderimage.c b/gtk/gtkborderimage.c
index f13b0a8..00ea0c3 100644
--- a/gtk/gtkborderimage.c
+++ b/gtk/gtkborderimage.c
@@ -35,9 +35,6 @@
  */
 #include "fallback-c89.c"
 
-G_DEFINE_BOXED_TYPE (GtkBorderImage, _gtk_border_image,
-                     _gtk_border_image_ref, _gtk_border_image_unref)
-
 struct _GtkBorderImage {
   GtkCssImage *source;
 
@@ -116,74 +113,6 @@ _gtk_border_image_unref (GtkBorderImage *image)
     }
 }
 
-GParameter *
-_gtk_border_image_unpack (const GValue *value,
-                          guint        *n_params)
-{
-  GParameter *parameter = g_new0 (GParameter, 4);
-  GtkBorderImage *image = g_value_get_boxed (value);
-
-  parameter[0].name = "border-image-source";
-  g_value_init (&parameter[0].value, GTK_TYPE_CSS_IMAGE);
-
-  parameter[1].name = "border-image-slice";
-  g_value_init (&parameter[1].value, GTK_TYPE_BORDER);
-
-  parameter[2].name = "border-image-repeat";
-  g_value_init (&parameter[2].value, GTK_TYPE_CSS_BORDER_IMAGE_REPEAT);
-
-  parameter[3].name = "border-image-width";
-  g_value_init (&parameter[3].value, GTK_TYPE_BORDER);
-
-  if (image != NULL)
-    {
-      g_value_set_object (&parameter[0].value, image->source);
-      g_value_set_boxed (&parameter[1].value, &image->slice);
-      g_value_set_boxed (&parameter[2].value, &image->repeat);
-      g_value_set_boxed (&parameter[3].value, image->width);
-    }
-
-  *n_params = 4;
-  return parameter;
-}
-
-void
-_gtk_border_image_pack (GValue             *value,
-                        GtkStyleProperties *props,
-                        GtkStateFlags       state)
-{
-  GtkBorderImage *image;
-  GtkBorder *slice, *width;
-  GtkCssBorderImageRepeat *repeat;
-  GtkCssImage *source;
-  const GValue *val;
-
-  val = _gtk_style_properties_peek_property (props,
-                                             GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("border-image-source")),
-                                             state);
-  source = g_value_get_object (val);
-  if (source == NULL)
-    return;
-
-  gtk_style_properties_get (props, state,
-			    "border-image-slice", &slice,
-			    "border-image-repeat", &repeat,
-			    "border-image-width", &width,
-			    NULL);
-
-  image = _gtk_border_image_new (source, slice, width, repeat);
-  g_value_take_boxed (value, image);
-
-  if (slice != NULL)
-    gtk_border_free (slice);
-
-  if (width != NULL)
-    gtk_border_free (width);
-
-  if (repeat != NULL)
-    g_free (repeat);
-}
-
 typedef struct _GtkBorderImageSliceSize GtkBorderImageSliceSize;
 struct _GtkBorderImageSliceSize {
   double offset;
diff --git a/gtk/gtkborderimageprivate.h b/gtk/gtkborderimageprivate.h
index f9654da..a9d19d0 100644
--- a/gtk/gtkborderimageprivate.h
+++ b/gtk/gtkborderimageprivate.h
@@ -26,19 +26,13 @@
 
 #include "gtkborder.h"
 #include "gtkcssimageprivate.h"
-#include "gtkstyleproperties.h"
 #include "gtkthemingengine.h"
 #include "gtkcsstypesprivate.h"
-#include "gtkstylecontextprivate.h"
 
 G_BEGIN_DECLS
 
 typedef struct _GtkBorderImage GtkBorderImage;
 
-#define GTK_TYPE_BORDER_IMAGE (_gtk_border_image_get_type ())
-
-GType             _gtk_border_image_get_type         (void) G_GNUC_CONST;
-
 GtkBorderImage *  _gtk_border_image_new              (GtkCssImage          *source,
                                                       GtkBorder            *slice,
                                                       GtkBorder            *width,
@@ -56,12 +50,6 @@ void              _gtk_border_image_render           (GtkBorderImage       *imag
                                                       gdouble               width,
                                                       gdouble               height);
 
-GParameter *      _gtk_border_image_unpack           (const GValue         *value,
-                                                      guint                *n_params);
-void              _gtk_border_image_pack             (GValue               *value,
-                                                      GtkStyleProperties   *props,
-                                                      GtkStateFlags         state);
-
 G_END_DECLS
 
 #endif /* __GTK_BORDER_IMAGE_H__ */



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