[rhythmbox/wip/hadess/cleanups] power-manager: Use G_DECLARE_FINAL_TYPE()



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

    power-manager: Use G_DECLARE_FINAL_TYPE()

 plugins/power-manager/rb-power-manager-plugin.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/plugins/power-manager/rb-power-manager-plugin.c b/plugins/power-manager/rb-power-manager-plugin.c
index f60446c40..68df617ad 100644
--- a/plugins/power-manager/rb-power-manager-plugin.c
+++ b/plugins/power-manager/rb-power-manager-plugin.c
@@ -42,25 +42,21 @@
 #include "rb-shell.h"
 
 #define RB_TYPE_GPM_PLUGIN             (rb_gpm_plugin_get_type ())
-#define RB_GPM_PLUGIN(o)               (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_GPM_PLUGIN, RBGPMPlugin))
-#define RB_GPM_PLUGIN_CLASS(k)         (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_GPM_PLUGIN, RBGPMPluginClass))
-#define RB_IS_GPM_PLUGIN(o)            (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_GPM_PLUGIN))
-#define RB_IS_GPM_PLUGIN_CLASS(k)      (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_GPM_PLUGIN))
-#define RB_GPM_PLUGIN_GET_CLASS(o)     (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_GPM_PLUGIN, 
RBGPMPluginClass))
+G_DECLARE_FINAL_TYPE (RBGPMPlugin, rb_gpm_plugin, RB, GPM_PLUGIN, PeasExtensionBase)
 
-typedef struct
+struct _RBGPMPlugin
 {
        PeasExtensionBase parent;
 
        guint cookie;
        gint handler_id;
        gint timeout_id;
-} RBGPMPlugin;
+};
 
-typedef struct
+struct _RBGPMPluginClass
 {
        PeasExtensionBaseClass parent_class;
-} RBGPMPluginClass;
+};
 
 G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
 


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