[gnome-photos] searchbar: Use G_DECLARE_DERIVABLE_TYPE



commit a39e8f8cb01d81be68fe04032a73cbfec0708507
Author: Kartikeya Sharma <09kartikeya gmail com>
Date:   Wed Oct 26 18:15:48 2016 +0530

    searchbar: Use G_DECLARE_DERIVABLE_TYPE
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764423

 src/photos-searchbar.h |   30 +-----------------------------
 1 files changed, 1 insertions(+), 29 deletions(-)
---
diff --git a/src/photos-searchbar.h b/src/photos-searchbar.h
index 29f71a6..f25d34c 100644
--- a/src/photos-searchbar.h
+++ b/src/photos-searchbar.h
@@ -30,36 +30,10 @@
 G_BEGIN_DECLS
 
 #define PHOTOS_TYPE_SEARCHBAR (photos_searchbar_get_type ())
+G_DECLARE_DERIVABLE_TYPE (PhotosSearchbar, photos_searchbar, PHOTOS, SEARCHBAR, GtkRevealer);
 
-#define PHOTOS_SEARCHBAR(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-   PHOTOS_TYPE_SEARCHBAR, PhotosSearchbar))
-
-#define PHOTOS_SEARCHBAR_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), \
-   PHOTOS_TYPE_SEARCHBAR, PhotosSearchbarClass))
-
-#define PHOTOS_IS_SEARCHBAR(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-   PHOTOS_TYPE_SEARCHBAR))
-
-#define PHOTOS_IS_SEARCHBAR_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
-   PHOTOS_TYPE_SEARCHBAR))
-
-#define PHOTOS_SEARCHBAR_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
-   PHOTOS_TYPE_SEARCHBAR, PhotosSearchbarClass))
-
-typedef struct _PhotosSearchbar        PhotosSearchbar;
-typedef struct _PhotosSearchbarClass   PhotosSearchbarClass;
 typedef struct _PhotosSearchbarPrivate PhotosSearchbarPrivate;
 
-struct _PhotosSearchbar
-{
-  GtkRevealer parent_instance;
-};
-
 struct _PhotosSearchbarClass
 {
   GtkRevealerClass parent_class;
@@ -74,8 +48,6 @@ struct _PhotosSearchbarClass
   void (*activate_result) (PhotosSearchbar *self);
 };
 
-GType                photos_searchbar_get_type                      (void) G_GNUC_CONST;
-
 GtkWidget           *photos_searchbar_new                           (void);
 
 gboolean             photos_searchbar_handle_event                  (PhotosSearchbar *self, GdkEventKey 
*event);


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