[rhythmbox/wip/hadess/cleanups: 21/37] mpris: Use G_DECLARE_FINAL_TYPE()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/wip/hadess/cleanups: 21/37] mpris: Use G_DECLARE_FINAL_TYPE()
- Date: Wed, 17 Nov 2021 08:35:27 +0000 (UTC)
commit 436fae305658205e0ff7957778dd02ee6a7c223e
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 3 13:36:21 2021 +0100
mpris: Use G_DECLARE_FINAL_TYPE()
plugins/mpris/rb-mpris-plugin.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/plugins/mpris/rb-mpris-plugin.c b/plugins/mpris/rb-mpris-plugin.c
index 7cd2cf585..2812ed7c6 100644
--- a/plugins/mpris/rb-mpris-plugin.c
+++ b/plugins/mpris/rb-mpris-plugin.c
@@ -46,11 +46,7 @@
#include <metadata/rb-ext-db.h>
#define RB_TYPE_MPRIS_PLUGIN (rb_mpris_plugin_get_type ())
-#define RB_MPRIS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_MPRIS_PLUGIN,
RBMprisPlugin))
-#define RB_MPRIS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_MPRIS_PLUGIN,
RBMprisPluginClass))
-#define RB_IS_MPRIS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_MPRIS_PLUGIN))
-#define RB_IS_MPRIS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_MPRIS_PLUGIN))
-#define RB_MPRIS_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_MPRIS_PLUGIN,
RBMprisPluginClass))
+G_DECLARE_FINAL_TYPE (RBMprisPlugin, rb_mpris_plugin, RB, MPRIS_PLUGIN, PeasExtensionBase)
#define ENTRY_OBJECT_PATH_PREFIX "/org/mpris/MediaPlayer2/Track/"
@@ -58,7 +54,7 @@
#include "mpris-spec.h"
-typedef struct
+struct _RBMprisPlugin
{
PeasExtensionBase parent;
@@ -82,13 +78,12 @@ typedef struct
guint property_emit_id;
gint64 last_elapsed;
-} RBMprisPlugin;
+};
-typedef struct
+struct _RBMprisPluginClass
{
PeasExtensionBaseClass parent_class;
-} RBMprisPluginClass;
-
+};
G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]