[gnome-photos] base-item: Use G_DECLARE_DERIVABLE_TYPE
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] base-item: Use G_DECLARE_DERIVABLE_TYPE
- Date: Mon, 29 Aug 2016 15:57:41 +0000 (UTC)
commit d01d6201b3dd0e7008031faf7b355331b3057a72
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Aug 29 17:52:42 2016 +0200
base-item: Use G_DECLARE_DERIVABLE_TYPE
https://bugzilla.gnome.org/show_bug.cgi?id=764423
src/photos-base-item.h | 30 +-----------------------------
1 files changed, 1 insertions(+), 29 deletions(-)
---
diff --git a/src/photos-base-item.h b/src/photos-base-item.h
index 55b7f19..69ed550 100644
--- a/src/photos-base-item.h
+++ b/src/photos-base-item.h
@@ -35,26 +35,7 @@
G_BEGIN_DECLS
#define PHOTOS_TYPE_BASE_ITEM (photos_base_item_get_type ())
-
-#define PHOTOS_BASE_ITEM(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- PHOTOS_TYPE_BASE_ITEM, PhotosBaseItem))
-
-#define PHOTOS_BASE_ITEM_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), \
- PHOTOS_TYPE_BASE_ITEM, PhotosBaseItemClass))
-
-#define PHOTOS_IS_BASE_ITEM(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- PHOTOS_TYPE_BASE_ITEM))
-
-#define PHOTOS_IS_BASE_ITEM_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), \
- PHOTOS_TYPE_BASE_ITEM))
-
-#define PHOTOS_BASE_ITEM_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), \
- PHOTOS_TYPE_BASE_ITEM, PhotosBaseItemClass))
+G_DECLARE_DERIVABLE_TYPE (PhotosBaseItem, photos_base_item, PHOTOS, BASE_ITEM, GObject);
typedef struct _PhotosBaseItemSize PhotosBaseItemSize;
@@ -66,15 +47,8 @@ struct _PhotosBaseItemSize
gsize bytes;
};
-typedef struct _PhotosBaseItem PhotosBaseItem;
-typedef struct _PhotosBaseItemClass PhotosBaseItemClass;
typedef struct _PhotosBaseItemPrivate PhotosBaseItemPrivate;
-struct _PhotosBaseItem
-{
- GObject parent_instance;
-};
-
struct _PhotosBaseItemClass
{
GObjectClass parent_class;
@@ -98,8 +72,6 @@ struct _PhotosBaseItemClass
void (*info_updated) (PhotosBaseItem *self);
};
-GType photos_base_item_get_type (void) G_GNUC_CONST;
-
gboolean photos_base_item_can_edit (PhotosBaseItem *self);
gboolean photos_base_item_can_trash (PhotosBaseItem *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]