[mutter/wip/iainl/startup-notification-declarations] meta, startup-notification: Make type declarations public
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/iainl/startup-notification-declarations] meta, startup-notification: Make type declarations public
- Date: Thu, 24 Jan 2019 16:39:41 +0000 (UTC)
commit 2e53ce8e753b972525f70a944500d95df9df2cc3
Author: Iain Lane <iainl gnome org>
Date: Thu Jan 24 11:40:27 2019 +0000
meta, 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 structs private, so in practice MetaStartupSequence
and MetaBackend can't be derived from (the are semi-private).
src/backends/meta-backend-private.h | 4 ----
src/core/startup-notification-private.h | 14 --------------
src/meta/meta-backend.h | 9 +++------
src/meta/meta-startup-notification.h | 19 ++++++++++---------
4 files changed, 13 insertions(+), 33 deletions(-)
---
diff --git a/src/backends/meta-backend-private.h b/src/backends/meta-backend-private.h
index ce5183778..510e6aa34 100644
--- a/src/backends/meta-backend-private.h
+++ b/src/backends/meta-backend-private.h
@@ -49,10 +49,6 @@
#define DEFAULT_XKB_RULES_FILE "evdev"
#define DEFAULT_XKB_MODEL "pc105+inet"
-#define META_TYPE_BACKEND (meta_backend_get_type ())
-META_EXPORT
-G_DECLARE_DERIVABLE_TYPE (MetaBackend, meta_backend, META, BACKEND, GObject)
-
struct _MetaBackendClass
{
GObjectClass parent_class;
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-backend.h b/src/meta/meta-backend.h
index 3d57c5174..aaa6aae97 100644
--- a/src/meta/meta-backend.h
+++ b/src/meta/meta-backend.h
@@ -31,12 +31,9 @@
#include "meta/meta-dnd.h"
#include "meta/meta-remote-access-controller.h"
-typedef struct _MetaBackend MetaBackend;
-typedef struct _MetaBackendClass MetaBackendClass;
-
-#ifdef __GI_SCANNER__
-GType meta_backend_get_type (void);
-#endif
+#define META_TYPE_BACKEND (meta_backend_get_type ())
+META_EXPORT
+G_DECLARE_DERIVABLE_TYPE (MetaBackend, meta_backend, META, BACKEND, GObject)
META_EXPORT
MetaBackend * meta_get_backend (void);
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]