meta: Only declare types when generating gir files

Some types were declared in the public headers so that g-ir-scanner
could resolve the types. This caused warnings when using
-Wredundant-decls, so only redeclare them for the gir scanner.
This commit is contained in:
Jonas Ådahl 2019-01-20 17:41:53 +01:00
parent 12a42a9295
commit 1bbb5c8107
3 changed files with 10 additions and 0 deletions

View File

@ -34,6 +34,10 @@
typedef struct _MetaBackend MetaBackend;
typedef struct _MetaBackendClass MetaBackendClass;
#ifdef __GI_SCANNER__
GType meta_backend_get_type (void);
#endif
MetaBackend * meta_get_backend (void);
void meta_backend_set_keymap (MetaBackend *backend,

View File

@ -54,7 +54,9 @@ MetaMonitorSwitchConfigType meta_monitor_manager_get_switch_config (MetaMonitorM
gint meta_monitor_manager_get_display_configuration_timeout (void);
#ifdef __GI_SCANNER__
/* Re-declaration of parent type for introspection */
GType meta_dbus_display_config_skeleton_get_type (void) G_GNUC_CONST;
#endif
#endif /* META_MONITOR_MANAGER_H */

View File

@ -27,7 +27,9 @@
typedef struct _MetaStartupNotification MetaStartupNotification;
typedef struct _MetaStartupSequence MetaStartupSequence;
#ifdef __GI_SCANNER__
GType meta_startup_notification_get_type (void);
#endif
/**
* meta_startup_notification_get_sequences: (skip)
@ -37,7 +39,9 @@ GSList * meta_startup_notification_get_sequences (MetaStartupNotification *
MetaLaunchContext *
meta_startup_notification_create_launcher (MetaStartupNotification *sn);
#ifdef __GI_SCANNER__
GType meta_startup_sequence_get_type (void);
#endif
const char * meta_startup_sequence_get_id (MetaStartupSequence *sequence);
gboolean meta_startup_sequence_get_completed (MetaStartupSequence *sequence);