[epiphany] middle-clickable-button: Use G_DECLARE_FINAL_TYPE



commit 7401f486ffeaca6a472111136ba57c1e274ba3c1
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Tue Feb 9 23:37:51 2016 -0600

    middle-clickable-button: Use G_DECLARE_FINAL_TYPE

 lib/widgets/ephy-middle-clickable-button.c |    5 +++++
 lib/widgets/ephy-middle-clickable-button.h |   19 ++-----------------
 2 files changed, 7 insertions(+), 17 deletions(-)
---
diff --git a/lib/widgets/ephy-middle-clickable-button.c b/lib/widgets/ephy-middle-clickable-button.c
index 58b097d..aa7ad55 100644
--- a/lib/widgets/ephy-middle-clickable-button.c
+++ b/lib/widgets/ephy-middle-clickable-button.c
@@ -20,6 +20,11 @@
 #include "config.h"
 #include "ephy-middle-clickable-button.h"
 
+struct _EphyMiddleClickableButton
+{
+  GtkButton parent_instance;
+};
+
 G_DEFINE_TYPE (EphyMiddleClickableButton, ephy_middle_clickable_button, GTK_TYPE_BUTTON)
 
 static gboolean 
diff --git a/lib/widgets/ephy-middle-clickable-button.h b/lib/widgets/ephy-middle-clickable-button.h
index 88cd736..1b9a69a 100644
--- a/lib/widgets/ephy-middle-clickable-button.h
+++ b/lib/widgets/ephy-middle-clickable-button.h
@@ -24,25 +24,10 @@
 
 G_BEGIN_DECLS
 
-#define EPHY_TYPE_MIDDLE_CLICKABLE_BUTTON             (ephy_middle_clickable_button_get_type ())
-#define EPHY_MIDDLE_CLICKABLE_BUTTON(obj)             (G_TYPE_CHECK_INSTANCE_CAST 
((obj),EPHY_TYPE_MIDDLE_CLICKABLE_BUTTN, EphyMiddleClickableButton))
-#define EPHY_MIDDLE_CLICKABLE_BUTTON_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), 
EPHY_TYPE_MIDDLE_CLICKABLE_BUTTN, EphyMiddleClickableButtonClass))
-#define EPHY_IS_MIDDLE_CLICKABLE_BUTTON(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
EPHY_TYPE_MIDDLE_CLICKABLE_BUTON))
-#define EPHY_IS_MIDDLE_CLICKABLE_BUTTON_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), 
EPHY_TYPE_MIDDLE_CLICKABLE_BUTTN))
-#define EPHY_MIDDLE_CLICKABLE_BUTTON_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), 
EPHY_TYPE_MIDDLE_CLICKABLE_BUTTN, EphyMiddleClickableButtonClass))
+#define EPHY_TYPE_MIDDLE_CLICKABLE_BUTTON  (ephy_middle_clickable_button_get_type ())
 
-typedef struct _EphyMiddleClickableButton       EphyMiddleClickableButton;
-typedef struct _EphyMiddleClickableButtonClass  EphyMiddleClickableButtonClass;
+G_DECLARE_FINAL_TYPE (EphyMiddleClickableButton, ephy_middle_clickable_button, EPHY, 
MIDDLE_CLICKABLE_BUTTON, GtkButton)
 
-struct _EphyMiddleClickableButton {
-  GtkButton parent;
-};
-
-struct _EphyMiddleClickableButtonClass {
-  GtkButtonClass parent_class;
-};
-
-GType      ephy_middle_clickable_button_get_type (void) G_GNUC_CONST;
 GtkWidget *ephy_middle_clickable_button_new      (void);
 
 G_END_DECLS


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