summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-11-17 11:10:41 +0100
committerBastien Nocera <hadess@hadess.net>2022-11-17 11:10:41 +0100
commit6753353adc90b663eab3add5b488bcd773a58172 (patch)
tree76a7063f84bd641e3b8067ca9ae31b09f12082f0
parentd9ad52972ca817088994554aa1d9e299b8b6c915 (diff)
downloadtotem-6753353adc90b663eab3add5b488bcd773a58172.tar.gz
plugins: Simplify TOTEM_PLUGIN_REGISTER() macro
Type and register codes aren't used anymore.
-rw-r--r--src/plugins/totem-plugin.h24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/plugins/totem-plugin.h b/src/plugins/totem-plugin.h
index bb4ad7801..4689a3b67 100644
--- a/src/plugins/totem-plugin.h
+++ b/src/plugins/totem-plugin.h
@@ -36,17 +36,16 @@
#include <totem.h>
/**
- * _TOTEM_PLUGIN_REGISTER:
+ * TOTEM_PLUGIN_REGISTER:
* @TYPE_NAME: the name of the plugin type, in UPPER_CASE
* @TypeName: the name of the plugin type, in CamelCase
* @type_name: the name of the plugin type, in lower_case
- * @TYPE_CODE: code to go in the fifth parameter to %G_DEFINE_DYNAMIC_TYPE_EXTENDED
- * @REGISTER_CODE: code to go in the peas_register_types() exported function
*
- * Registers a plugin with the Totem plugin system, including registering the type specified in the parameters and declaring its activate and
+ * Registers a plugin with the Totem plugin system, including registering the
+ * type specified in the parameters and declaring its activate and
* deactivate functions.
**/
-#define _TOTEM_PLUGIN_REGISTER(TYPE_NAME, TypeName, type_name, TYPE_CODE, REGISTER_CODE) \
+#define TOTEM_PLUGIN_REGISTER(TYPE_NAME, TypeName, type_name) \
typedef struct { \
PeasExtensionBaseClass parent_class; \
} TypeName##Class; \
@@ -65,7 +64,7 @@
0, \
G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE, \
peas_activatable_iface_init) \
- TYPE_CODE) \
+ ) \
static void \
peas_activatable_iface_init (PeasActivatableInterface *iface) \
{ \
@@ -129,17 +128,4 @@
peas_object_module_register_extension_type (module, \
PEAS_TYPE_ACTIVATABLE, \
TYPE_NAME); \
- REGISTER_CODE \
}
-
-/**
- * TOTEM_PLUGIN_REGISTER:
- * @TYPE_NAME: the name of the plugin type, in UPPER_CASE
- * @TypeName: the name of the plugin type, in CamelCase
- * @type_name: the name of the plugin type, in lower_case
- *
- * Registers a plugin with the Totem plugin system, including registering the type specified in the parameters and declaring its activate and
- * deactivate functions.
- **/
-#define TOTEM_PLUGIN_REGISTER(TYPE_NAME, TypeName, type_name) \
- _TOTEM_PLUGIN_REGISTER(TYPE_NAME, TypeName, type_name,,)