[mutter/wip/iainl/startup-notification-declarations] startup-notification: Make type declarations public



commit 3c5700924321301b0e3b9023c832f276f566efe0
Author: Iain Lane <iainl gnome org>
Date:   Thu Jan 24 11:40:27 2019 +0000

    startup-notification: Make type declarations public
    
    Shell is using these, which was revealed by
    1bbb5c8107ab77435f97c1b037a89a76121f6e3c breaking its build when
    generating its introspection due to meta_startup_notification_get_type()
    not being found.
    
    We keep the class struct private, so in practice MetaStartupSequence
    can't be derived from (it is semi-private).

 src/core/startup-notification-private.h | 14 --------------
 src/meta/meta-startup-notification.h    | 19 ++++++++++---------
 2 files changed, 10 insertions(+), 23 deletions(-)
---
diff --git a/src/core/startup-notification-private.h b/src/core/startup-notification-private.h
index 4cdbff61b..5bdf2ac1a 100644
--- a/src/core/startup-notification-private.h
+++ b/src/core/startup-notification-private.h
@@ -28,8 +28,6 @@
 #include "core/display-private.h"
 #include "meta/meta-startup-notification.h"
 
-typedef struct _MetaStartupSequenceClass MetaStartupSequenceClass;
-
 struct _MetaStartupSequenceClass
 {
   GObjectClass parent_class;
@@ -37,18 +35,6 @@ struct _MetaStartupSequenceClass
   void (* complete) (MetaStartupSequence *sequence);
 };
 
-META_EXPORT
-G_DECLARE_FINAL_TYPE (MetaStartupNotification,
-                      meta_startup_notification,
-                      META, STARTUP_NOTIFICATION,
-                      GObject)
-
-META_EXPORT
-G_DECLARE_DERIVABLE_TYPE (MetaStartupSequence,
-                          meta_startup_sequence,
-                          META, STARTUP_SEQUENCE,
-                          GObject)
-
 MetaStartupNotification *
          meta_startup_notification_new             (MetaDisplay             *display);
 
diff --git a/src/meta/meta-startup-notification.h b/src/meta/meta-startup-notification.h
index f8dfae554..11afb3e05 100644
--- a/src/meta/meta-startup-notification.h
+++ b/src/meta/meta-startup-notification.h
@@ -24,12 +24,17 @@
 #define META_TYPE_STARTUP_SEQUENCE (meta_startup_sequence_get_type ())
 #define META_TYPE_STARTUP_NOTIFICATION (meta_startup_notification_get_type ())
 
-typedef struct _MetaStartupNotification MetaStartupNotification;
-typedef struct _MetaStartupSequence MetaStartupSequence;
+META_EXPORT
+G_DECLARE_FINAL_TYPE (MetaStartupNotification,
+                      meta_startup_notification,
+                      META, STARTUP_NOTIFICATION,
+                      GObject)
 
-#ifdef __GI_SCANNER__
-GType         meta_startup_notification_get_type      (void);
-#endif
+META_EXPORT
+G_DECLARE_DERIVABLE_TYPE (MetaStartupSequence,
+                          meta_startup_sequence,
+                          META, STARTUP_SEQUENCE,
+                          GObject)
 
 /**
  * meta_startup_notification_get_sequences: (skip)
@@ -41,10 +46,6 @@ META_EXPORT
 MetaLaunchContext *
              meta_startup_notification_create_launcher (MetaStartupNotification *sn);
 
-#ifdef __GI_SCANNER__
-GType         meta_startup_sequence_get_type          (void);
-#endif
-
 META_EXPORT
 const char * meta_startup_sequence_get_id             (MetaStartupSequence *sequence);
 


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