diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-08-27 00:26:20 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-08-27 00:26:20 (GMT) |
commit | e07a541d1dea13a19a587f2b97d12ed3443f235b (patch) | |
tree | 95ef0ba21345c34c7c246ff824ba70317b810717 /plugins/pychrysa/plugin.h | |
parent | 50a657889a32a6df365bf9880a6f56bf3a0e828c (diff) |
Redefined and improved the load process for Python plugins.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@572 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/pychrysa/plugin.h')
-rw-r--r-- | plugins/pychrysa/plugin.h | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/plugins/pychrysa/plugin.h b/plugins/pychrysa/plugin.h index c86a343..74e2e26 100644 --- a/plugins/pychrysa/plugin.h +++ b/plugins/pychrysa/plugin.h @@ -22,8 +22,8 @@ */ -#ifndef _PLUGINS_PYOIDA_PLUGIN_H -#define _PLUGINS_PYOIDA_PLUGIN_H +#ifndef _PLUGINS_PYCHRYSA_PLUGIN_H +#define _PLUGINS_PYCHRYSA_PLUGIN_H #include <Python.h> @@ -31,16 +31,13 @@ #include <stdbool.h> -#include "../../src/plugins/plugin.h" +#include <plugins/plugin.h> /* --------------------- INTERFACE INTERNE POUR GREFFONS PYTHON --------------------- */ - - - #define G_TYPE_PYTHON_PLUGIN (g_python_plugin_get_type()) #define G_PYTHON_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_PYTHON_PLUGIN, GPythonPlugin)) #define G_IS_PYTHON_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_PYTHON_PLUGIN)) @@ -60,29 +57,19 @@ typedef struct _GPythonPluginClass GPythonPluginClass; GType g_python_plugin_get_type(void); /* Crée un greffon à partir de code Python. */ -GPluginModule *g_python_plugin_new(const char *, const char *); - - - - - - - - -int -main2(const char *filename, const char *method); - - - +GPluginModule *g_python_plugin_new(const char *, const char *, GObject *); /* ------------------------- MODULE PYTHON POUR LES SCRIPTS ------------------------- */ -/* Ajoute l'objet 'plugin' au module Python. */ -bool add_plugin_to_python_module(PyObject *); +/* Fournit un accès à une définition de type à diffuser. */ +PyTypeObject *get_python_plugin_module_type(void); + +/* Prend en charge l'objet 'pychrysalide.PluginModule'. */ +bool register_python_plugin_module(PyObject *); -#endif /* _PLUGINS_PYOIDA_PLUGIN_H */ +#endif /* _PLUGINS_PYCHRYSA_PLUGIN_H */ |