[gnome-photos] base-manager: Use G_DECLARE_DERIVABLE_TYPE



commit 20e5069c9cd6bdabf42b52114617a70cd80c8574
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Oct 7 08:32:33 2016 +0200

    base-manager: Use G_DECLARE_DERIVABLE_TYPE
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764423

 src/photos-base-manager.h |   30 +-----------------------------
 1 files changed, 1 insertions(+), 29 deletions(-)
---
diff --git a/src/photos-base-manager.h b/src/photos-base-manager.h
index 99ce8c6..e6298d5 100644
--- a/src/photos-base-manager.h
+++ b/src/photos-base-manager.h
@@ -30,36 +30,10 @@
 G_BEGIN_DECLS
 
 #define PHOTOS_TYPE_BASE_MANAGER (photos_base_manager_get_type ())
+G_DECLARE_DERIVABLE_TYPE (PhotosBaseManager, photos_base_manager, PHOTOS, BASE_MANAGER, GObject);
 
-#define PHOTOS_BASE_MANAGER(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-   PHOTOS_TYPE_BASE_MANAGER, PhotosBaseManager))
-
-#define PHOTOS_BASE_MANAGER_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), \
-   PHOTOS_TYPE_BASE_MANAGER, PhotosBaseManagerClass))
-
-#define PHOTOS_IS_BASE_MANAGER(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-   PHOTOS_TYPE_BASE_MANAGER))
-
-#define PHOTOS_IS_BASE_MANAGER_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
-   PHOTOS_TYPE_BASE_MANAGER))
-
-#define PHOTOS_BASE_MANAGER_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
-   PHOTOS_TYPE_BASE_MANAGER, PhotosBaseManagerClass))
-
-typedef struct _PhotosBaseManager        PhotosBaseManager;
-typedef struct _PhotosBaseManagerClass   PhotosBaseManagerClass;
 typedef struct _PhotosBaseManagerPrivate PhotosBaseManagerPrivate;
 
-struct _PhotosBaseManager
-{
-  GObject parent_instance;
-};
-
 struct _PhotosBaseManagerClass
 {
   GObjectClass parent_class;
@@ -81,8 +55,6 @@ struct _PhotosBaseManagerClass
   void           (*object_removed)         (PhotosBaseManager *self, GObject *object);
 };
 
-GType               photos_base_manager_get_type                 (void) G_GNUC_CONST;
-
 PhotosBaseManager  *photos_base_manager_new                      (void);
 
 void                photos_base_manager_add_object               (PhotosBaseManager *self, GObject *object);


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