[rhythmbox/wip/hadess/cleanups: 29/33] lirc: Use G_DECLARE_FINAL_TYPE()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/wip/hadess/cleanups: 29/33] lirc: Use G_DECLARE_FINAL_TYPE()
- Date: Mon, 15 Nov 2021 13:45:52 +0000 (UTC)
commit ba7888d1de87aa278539e1f2a320974e36e53604
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 3 13:57:33 2021 +0100
lirc: Use G_DECLARE_FINAL_TYPE()
plugins/lirc/rb-lirc-plugin.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/plugins/lirc/rb-lirc-plugin.c b/plugins/lirc/rb-lirc-plugin.c
index b69c4faeb..9176eccf2 100644
--- a/plugins/lirc/rb-lirc-plugin.c
+++ b/plugins/lirc/rb-lirc-plugin.c
@@ -47,11 +47,7 @@
#include "rb-file-helpers.h"
#define RB_TYPE_LIRC_PLUGIN (rb_lirc_plugin_get_type ())
-#define RB_LIRC_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_LIRC_PLUGIN, RBLircPlugin))
-#define RB_LIRC_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_LIRC_PLUGIN,
RBLircPluginClass))
-#define RB_IS_LIRC_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_LIRC_PLUGIN))
-#define RB_IS_LIRC_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_LIRC_PLUGIN))
-#define RB_LIRC_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_LIRC_PLUGIN,
RBLircPluginClass))
+G_DECLARE_FINAL_TYPE (RBLircPlugin, rb_lirc_plugin, RB, LIRC_PLUGIN, PeasExtensionBase)
#define RB_IR_COMMAND_PLAY "play"
#define RB_IR_COMMAND_PAUSE "pause"
@@ -68,18 +64,18 @@
#define RB_IR_COMMAND_MUTE "mute"
#define RB_IR_COMMAND_QUIT "quit"
-typedef struct
+struct _RBLircPlugin
{
PeasExtensionBase parent;
RBShellPlayer *shell_player;
struct lirc_config *lirc_config;
GIOChannel *lirc_channel;
-} RBLircPlugin;
+};
-typedef struct
+struct _RBLircPluginClass
{
PeasExtensionBaseClass parent_class;
-} RBLircPluginClass;
+};
G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]