[rhythmbox/wip/hadess/cleanups: 36/37] notification: Use G_DECLARE_FINAL_TYPE()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/wip/hadess/cleanups: 36/37] notification: Use G_DECLARE_FINAL_TYPE()
- Date: Wed, 17 Nov 2021 08:35:27 +0000 (UTC)
commit 409f033e9b1561287344e5ca554de8c21c859c29
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 3 13:57:33 2021 +0100
notification: Use G_DECLARE_FINAL_TYPE()
plugins/notification/rb-notification-plugin.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/plugins/notification/rb-notification-plugin.c b/plugins/notification/rb-notification-plugin.c
index a9bde68f2..40c62a8ac 100644
--- a/plugins/notification/rb-notification-plugin.c
+++ b/plugins/notification/rb-notification-plugin.c
@@ -47,13 +47,9 @@
#define PLAYING_ENTRY_NOTIFY_TIME 4
#define RB_TYPE_NOTIFICATION_PLUGIN (rb_notification_plugin_get_type ())
-#define RB_NOTIFICATION_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o),
RB_TYPE_NOTIFICATION_PLUGIN, RBNotificationPlugin))
-#define RB_NOTIFICATION_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_NOTIFICATION_PLUGIN,
RBNotificationPluginClass))
-#define RB_IS_NOTIFICATION_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o),
RB_TYPE_NOTIFICATION_PLUGIN))
-#define RB_IS_NOTIFICATION_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_NOTIFICATION_PLUGIN))
-#define RB_NOTIFICATION_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_NOTIFICATION_PLUGIN,
RBNotificationPluginClass))
+G_DECLARE_FINAL_TYPE (RBNotificationPlugin, rb_notification_plugin, RB, NOTIFICATION_PLUGIN,
PeasExtensionBase)
-typedef struct
+struct _RBNotificationPlugin
{
PeasExtensionBase parent;
@@ -72,12 +68,12 @@ typedef struct
RBShellPlayer *shell_player;
RhythmDB *db;
RBExtDB *art_store;
-} RBNotificationPlugin;
+};
-typedef struct
+struct _RBNotificationPluginClass
{
PeasExtensionBaseClass parent_class;
-} RBNotificationPluginClass;
+};
G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]