summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2024-05-20 15:15:25 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2024-05-20 15:15:25 (GMT)
commit6decc8c40dfaf7cb04156f1ab233cd856ed06b37 (patch)
tree7a326fc66d2465bdedc978146faef55e53531652 /src/plugins
parent79662ede83b35ad9d91b942218cf09e856e48b4c (diff)
Improve the DECLARE_GTYPE() macro and use it everywhere.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/plugin.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/plugins/plugin.h b/src/plugins/plugin.h
index 7e51f6e..5c473b2 100644
--- a/src/plugins/plugin.h
+++ b/src/plugins/plugin.h
@@ -31,6 +31,7 @@
#include "plugin-def.h"
#include "../core/logs.h"
+#include "../glibext/helpers.h"
#if 0
#include "../analysis/binary.h"
#include "../core/logs.h"
@@ -46,11 +47,9 @@
-/* Greffon pour Chrysalide (instance) */
-typedef struct _GPluginModule GPluginModule;
+#define G_TYPE_PLUGIN_MODULE (g_plugin_module_get_type())
-/* Greffon pour Chrysalide (classe) */
-typedef struct _GPluginModuleClass GPluginModuleClass;
+DECLARE_GTYPE(GPluginModule, g_plugin_module, G, PLUGIN_MODULE);
/* Fanions indiquant le statut du greffon */
@@ -68,17 +67,6 @@ typedef enum _PluginStatusFlags
#define BROKEN_PLUGIN_STATUS (PSF_UNKNOW_DEP | PSF_DEP_LOOP | PSF_FAILURE)
-#define G_TYPE_PLUGIN_MODULE (g_plugin_module_get_type())
-#define G_PLUGIN_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_PLUGIN_MODULE, GPluginModule))
-#define G_IS_PLUGIN_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_PLUGIN_MODULE))
-#define G_PLUGIN_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_PLUGIN_MODULE, GPluginModuleClass))
-#define G_IS_PLUGIN_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_PLUGIN_MODULE))
-#define G_PLUGIN_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_PLUGIN_MODULE, GPluginModuleClass))
-
-
-/* Indique le type défini pour un greffon. */
-GType g_plugin_module_get_type(void);
-
/* Crée un module pour un greffon donné. */
GPluginModule *g_plugin_module_new(const gchar *);