diff options
author | Benjamin Otte <otte@redhat.com> | 2012-01-04 04:06:50 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-01-09 18:37:58 +0100 |
commit | 9b47a6a4e3b927a75c5b0f16a4e43c3b6de3bccd (patch) | |
tree | bf4e4d6d78eb22f7c48e1f81f8ddf22bd7a3b526 /gtk | |
parent | 96abf8c725e164e7b2a0045d9aafcb01f82caffa (diff) | |
download | gtk+-9b47a6a4e3b927a75c5b0f16a4e43c3b6de3bccd.tar.gz |
border-image: Remove pack/unpack functions
They are not used anymore. Also, it's no longer necessary to register
GtkBorderImage as a custom GType.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkborderimage.c | 71 | ||||
-rw-r--r-- | gtk/gtkborderimageprivate.h | 12 |
2 files changed, 0 insertions, 83 deletions
diff --git a/gtk/gtkborderimage.c b/gtk/gtkborderimage.c index f13b0a83db..00ea0c3984 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 (¶meter[0].value, GTK_TYPE_CSS_IMAGE); - - parameter[1].name = "border-image-slice"; - g_value_init (¶meter[1].value, GTK_TYPE_BORDER); - - parameter[2].name = "border-image-repeat"; - g_value_init (¶meter[2].value, GTK_TYPE_CSS_BORDER_IMAGE_REPEAT); - - parameter[3].name = "border-image-width"; - g_value_init (¶meter[3].value, GTK_TYPE_BORDER); - - if (image != NULL) - { - g_value_set_object (¶meter[0].value, image->source); - g_value_set_boxed (¶meter[1].value, &image->slice); - g_value_set_boxed (¶meter[2].value, &image->repeat); - g_value_set_boxed (¶meter[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 f9654daba2..a9d19d0e27 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__ */ |