[gnome-photos] search-context: Use G_DECLARE_INTERFACE



commit d15cba2a3c0ea37ad51eb24a07863dcd0d0d87a0
Author: Rashi Sah <rashi 747 gmail com>
Date:   Wed May 10 12:27:42 2017 +0200

    search-context: Use G_DECLARE_INTERFACE
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764423

 src/photos-search-context.h |   18 +-----------------
 1 files changed, 1 insertions(+), 17 deletions(-)
---
diff --git a/src/photos-search-context.h b/src/photos-search-context.h
index 003cd65..a3f8496 100644
--- a/src/photos-search-context.h
+++ b/src/photos-search-context.h
@@ -30,24 +30,10 @@
 G_BEGIN_DECLS
 
 #define PHOTOS_TYPE_SEARCH_CONTEXT (photos_search_context_get_type ())
-
-#define PHOTOS_SEARCH_CONTEXT(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-   PHOTOS_TYPE_SEARCH_CONTEXT, PhotosSearchContext))
-
-#define PHOTOS_IS_SEARCH_CONTEXT(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-   PHOTOS_TYPE_SEARCH_CONTEXT))
-
-#define PHOTOS_SEARCH_CONTEXT_GET_IFACE(inst) \
-  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
-   PHOTOS_TYPE_SEARCH_CONTEXT, PhotosSearchContextInterface))
+G_DECLARE_INTERFACE (PhotosSearchContext, photos_search_context, PHOTOS, SEARCH_CONTEXT, GObject);
 
 typedef struct _PhotosSearchContextState PhotosSearchContextState;
 
-typedef struct _PhotosSearchContext          PhotosSearchContext;
-typedef struct _PhotosSearchContextInterface PhotosSearchContextInterface;
-
 struct _PhotosSearchContextState
 {
   gpointer item_mngr;
@@ -71,8 +57,6 @@ struct _PhotosSearchContextInterface
   PhotosSearchContextState *(*get_state) (PhotosSearchContext *self);
 };
 
-GType                        photos_search_context_get_type           (void) G_GNUC_CONST;
-
 PhotosSearchContextState    *photos_search_context_get_state          (PhotosSearchContext *self);
 
 G_END_DECLS


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