[buoh/cleanups: 7/7] wip: Use G_DECLARE_{FINAL,DERIVABLE}_TYPE



commit 08d432e373da7901efc3ac352d25c847e486e70d
Author: Jan Tojnar <jtojnar gmail com>
Date:   Tue Sep 25 02:07:07 2018 +0200

    wip: Use G_DECLARE_{FINAL,DERIVABLE}_TYPE

 src/buoh-comic-manager.h | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/buoh-comic-manager.h b/src/buoh-comic-manager.h
index 342ef96..bb1d654 100644
--- a/src/buoh-comic-manager.h
+++ b/src/buoh-comic-manager.h
@@ -24,17 +24,10 @@
 
 G_BEGIN_DECLS
 
-typedef struct _BuohComicManager        BuohComicManager;
-typedef struct _BuohComicManagerClass   BuohComicManagerClass;
 typedef struct _BuohComicManagerPrivate BuohComicManagerPrivate;
 
 #define BUOH_TYPE_COMIC_MANAGER                (buoh_comic_manager_get_type ())
-#define BUOH_COMIC_MANAGER(o)                (G_TYPE_CHECK_INSTANCE_CAST ((o), BUOH_TYPE_COMIC_MANAGER, 
BuohComicManager))
-#define BUOH_COMIC_MANAGER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), BUOH_TYPE_COMIC_MANAGER, 
BuohComicManagerClass))
-#define BUOH_IS_COMIC_MANAGER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), BUOH_TYPE_COMIC_MANAGER))
-#define BUOH_IS_COMIC_MANAGER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), BUOH_TYPE_COMIC_MANAGER))
-#define BUOH_COMIC_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), BUOH_TYPE_COMIC_MANAGER, 
BuohComicManagerClass))
-
+G_DECLARE_DERIVABLE_TYPE (BuohComicManager, buoh_comic_manager, BUOH, COMIC_MANAGER, GObject)
 
 struct _BuohComicManager {
         GObject parent;
@@ -42,6 +35,7 @@ struct _BuohComicManager {
         BuohComicManagerPrivate *priv;
 };
 
+// TODO: not sure what to do about this
 struct _BuohComicManagerClass {
         GObjectClass      parent_class;
 


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