[rhythmbox/wip/hadess/cleanups: 29/43] audiocd: Use G_DECLARE_FINAL_TYPE()




commit 4c89f503076ded4b0ae36d1fe1ce8598932582bb
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Nov 3 13:57:33 2021 +0100

    audiocd: Use G_DECLARE_FINAL_TYPE()

 plugins/audiocd/rb-audiocd-plugin.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/plugins/audiocd/rb-audiocd-plugin.c b/plugins/audiocd/rb-audiocd-plugin.c
index 77c6ad4d1..70a9fba98 100644
--- a/plugins/audiocd/rb-audiocd-plugin.c
+++ b/plugins/audiocd/rb-audiocd-plugin.c
@@ -54,13 +54,9 @@
 
 
 #define RB_TYPE_AUDIOCD_PLUGIN         (rb_audiocd_plugin_get_type ())
-#define RB_AUDIOCD_PLUGIN(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_AUDIOCD_PLUGIN, 
RBAudioCdPlugin))
-#define RB_AUDIOCD_PLUGIN_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_AUDIOCD_PLUGIN, 
RBAudioCdPluginClass))
-#define RB_IS_AUDIOCD_PLUGIN(o)                (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_AUDIOCD_PLUGIN))
-#define RB_IS_AUDIOCD_PLUGIN_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_AUDIOCD_PLUGIN))
-#define RB_AUDIOCD_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_AUDIOCD_PLUGIN, 
RBAudioCdPluginClass))
+G_DECLARE_FINAL_TYPE (RBAudioCdPlugin, rb_audiocd_plugin, RB, AUDIOCD_PLUGIN, PeasExtensionBase)
 
-typedef struct
+struct _RBAudioCdPlugin
 {
        PeasExtensionBase parent;
 
@@ -68,12 +64,12 @@ typedef struct
 
        GHashTable *sources;
        char       *playing_uri;
-} RBAudioCdPlugin;
+};
 
-typedef struct
+struct _RBAudioCdPluginClass
 {
        PeasExtensionBaseClass parent_class;
-} RBAudioCdPluginClass;
+};
 
 
 G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]