[gnome-photos] tool: Use G_DECLARE_DERIVABLE_TYPE
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] tool: Use G_DECLARE_DERIVABLE_TYPE
- Date: Thu, 27 Oct 2016 09:49:52 +0000 (UTC)
commit 2b55aa683375760e132d0712e15645b9540edfd0
Author: Kartikeya Sharma <09kartikeya gmail com>
Date: Wed Oct 26 02:19:23 2016 +0530
tool: Use G_DECLARE_DERIVABLE_TYPE
https://bugzilla.gnome.org/show_bug.cgi?id=764423
src/photos-tool.h | 31 +------------------------------
1 files changed, 1 insertions(+), 30 deletions(-)
---
diff --git a/src/photos-tool.h b/src/photos-tool.h
index de4b3c0..b304643 100644
--- a/src/photos-tool.h
+++ b/src/photos-tool.h
@@ -31,34 +31,7 @@
G_BEGIN_DECLS
#define PHOTOS_TYPE_TOOL (photos_tool_get_type ())
-
-#define PHOTOS_TOOL(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- PHOTOS_TYPE_TOOL, PhotosTool))
-
-#define PHOTOS_TOOL_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), \
- PHOTOS_TYPE_TOOL, PhotosToolClass))
-
-#define PHOTOS_IS_TOOL(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- PHOTOS_TYPE_TOOL))
-
-#define PHOTOS_IS_TOOL_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), \
- PHOTOS_TYPE_TOOL))
-
-#define PHOTOS_TOOL_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), \
- PHOTOS_TYPE_TOOL, PhotosToolClass))
-
-typedef struct _PhotosTool PhotosTool;
-typedef struct _PhotosToolClass PhotosToolClass;
-
-struct _PhotosTool
-{
- GObject parent_instance;
-};
+G_DECLARE_DERIVABLE_TYPE (PhotosTool, photos_tool, PHOTOS, TOOL, GObject);
struct _PhotosToolClass
{
@@ -81,8 +54,6 @@ struct _PhotosToolClass
void (*hide_requested) (PhotosTool *self);
};
-GType photos_tool_get_type (void) G_GNUC_CONST;
-
void photos_tool_activate (PhotosTool *self,
PhotosBaseItem *item,
PhotosImageView *view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]