[gtk/wip/nielsdg/g-declare-interface: 2/3] colorpicker: Use G_DECLARE_INTEFACE



commit 372a4276ae539634a4041e6d3b22438785360fd8
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Fri Apr 3 18:56:12 2020 +0200

    colorpicker: Use G_DECLARE_INTEFACE

 gtk/gtkcolorpicker.c        |  4 ++--
 gtk/gtkcolorpickerprivate.h | 11 ++---------
 2 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkcolorpicker.c b/gtk/gtkcolorpicker.c
index 6b3f5f79c1..9c3d32b168 100644
--- a/gtk/gtkcolorpicker.c
+++ b/gtk/gtkcolorpicker.c
@@ -37,7 +37,7 @@ gtk_color_picker_pick (GtkColorPicker      *picker,
                        GAsyncReadyCallback  callback,
                        gpointer             user_data)
 {
-  GTK_COLOR_PICKER_GET_INTERFACE (picker)->pick (picker, callback, user_data);
+  GTK_COLOR_PICKER_GET_IFACE (picker)->pick (picker, callback, user_data);
 }
 
 GdkRGBA *
@@ -45,7 +45,7 @@ gtk_color_picker_pick_finish (GtkColorPicker  *picker,
                               GAsyncResult    *res,
                               GError         **error)
 {
-  return GTK_COLOR_PICKER_GET_INTERFACE (picker)->pick_finish (picker, res, error);
+  return GTK_COLOR_PICKER_GET_IFACE (picker)->pick_finish (picker, res, error);
 }
 
 GtkColorPicker *
diff --git a/gtk/gtkcolorpickerprivate.h b/gtk/gtkcolorpickerprivate.h
index 8e74b0be22..b2a142dbbc 100644
--- a/gtk/gtkcolorpickerprivate.h
+++ b/gtk/gtkcolorpickerprivate.h
@@ -30,14 +30,8 @@
 G_BEGIN_DECLS
 
 
-#define GTK_TYPE_COLOR_PICKER             (gtk_color_picker_get_type ())
-#define GTK_COLOR_PICKER(o)               (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_COLOR_PICKER, 
GtkColorPicker))
-#define GTK_IS_COLOR_PICKER(o)            (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_COLOR_PICKER))
-#define GTK_COLOR_PICKER_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GTK_TYPE_COLOR_PICKER, 
GtkColorPickerInterface))
-
-
-typedef struct _GtkColorPicker            GtkColorPicker;
-typedef struct _GtkColorPickerInterface   GtkColorPickerInterface;
+#define GTK_TYPE_COLOR_PICKER (gtk_color_picker_get_type ())
+G_DECLARE_INTERFACE (GtkColorPicker, gtk_color_picker, GTK, COLOR_PICKER, GObject)
 
 struct _GtkColorPickerInterface {
   GTypeInterface g_iface;
@@ -51,7 +45,6 @@ struct _GtkColorPickerInterface {
                              GError             **error);
 };
 
-GType            gtk_color_picker_get_type    (void) G_GNUC_CONST;
 GtkColorPicker * gtk_color_picker_new         (void);
 void             gtk_color_picker_pick        (GtkColorPicker       *picker,
                                                GAsyncReadyCallback   callback,


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