[rhythmbox/wip/hadess/cleanups: 32/33] notification: Use G_DECLARE_FINAL_TYPE()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/wip/hadess/cleanups: 32/33] notification: Use G_DECLARE_FINAL_TYPE()
- Date: Mon, 15 Nov 2021 13:58:56 +0000 (UTC)
commit 9d34447bc1d6d962bd4d0e56521b4131793abed4
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]