summaryrefslogtreecommitdiff
path: root/plugin-loaders/python/bindings/plumaplugin.override
diff options
context:
space:
mode:
Diffstat (limited to 'plugin-loaders/python/bindings/plumaplugin.override')
-rwxr-xr-xplugin-loaders/python/bindings/plumaplugin.override193
1 files changed, 193 insertions, 0 deletions
diff --git a/plugin-loaders/python/bindings/plumaplugin.override b/plugin-loaders/python/bindings/plumaplugin.override
new file mode 100755
index 00000000..a2aad78f
--- /dev/null
+++ b/plugin-loaders/python/bindings/plumaplugin.override
@@ -0,0 +1,193 @@
+%%
+headers
+#include <pluma/pluma-plugin.h>
+#include <pluma/pluma-window.h>
+%%
+override pluma_plugin_activate kwargs
+static PyObject *
+_wrap_pluma_plugin_activate(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ gpointer klass, klass2;
+ static char *kwlist[] = { "window", NULL };
+ PyGObject *window;
+ PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
+
+ if (!PyArg_ParseTupleAndKeywords (args,
+ kwargs,
+ "O!:PlumaPlugin.activate",
+ kwlist,
+ &PyPlumaWindow_Type,
+ &window))
+ return NULL;
+
+ klass = g_type_class_ref (pyg_type_from_object (cls));
+
+ if (PLUMA_IS_PLUGIN_PYTHON_CLASS (klass))
+ {
+ klass2 = g_type_class_peek_parent (klass);
+ g_type_class_unref (klass);
+ klass = g_type_class_ref (G_TYPE_FROM_CLASS (klass2));
+ }
+
+ if (PLUMA_PLUGIN_CLASS (klass)->activate)
+ PLUMA_PLUGIN_CLASS (klass)->activate (PLUMA_PLUGIN (self->obj),
+ PLUMA_WINDOW (window->obj));
+ else {
+ PyErr_SetString (PyExc_NotImplementedError,
+ "virtual method PlumaPlugin.activate not implemented");
+ g_type_class_unref (klass);
+ return NULL;
+ }
+
+ g_type_class_unref (klass);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+%%
+override pluma_plugin_deactivate kwargs
+static PyObject *
+_wrap_pluma_plugin_deactivate(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ gpointer klass, klass2;
+ static char *kwlist[] = {"window", NULL};
+ PyGObject *window;
+ PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
+
+ if (!PyArg_ParseTupleAndKeywords (args,
+ kwargs,
+ "O!:PlumaPlugin.deactivate",
+ kwlist,
+ &PyPlumaWindow_Type,
+ &window))
+ return NULL;
+
+ klass = g_type_class_ref (pyg_type_from_object (cls));
+
+ if (PLUMA_IS_PLUGIN_PYTHON_CLASS (klass))
+ {
+ klass2 = g_type_class_peek_parent (klass);
+ g_type_class_unref (klass);
+ klass = g_type_class_ref (G_TYPE_FROM_CLASS (klass2));
+ }
+
+ if (PLUMA_PLUGIN_CLASS (klass)->deactivate)
+ PLUMA_PLUGIN_CLASS (klass)->deactivate (PLUMA_PLUGIN (self->obj),
+ PLUMA_WINDOW (window->obj));
+ else {
+ PyErr_SetString (PyExc_NotImplementedError,
+ "virtual method PlumaPlugin.deactivate not implemented");
+ g_type_class_unref (klass);
+ return NULL;
+ }
+
+ g_type_class_unref (klass);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+%%
+override pluma_plugin_update_ui kwargs
+static PyObject *
+_wrap_pluma_plugin_update_ui (PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ gpointer klass, klass2;
+ static char *kwlist[] = {"window", NULL};
+ PyGObject *window;
+ PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
+
+ if (!PyArg_ParseTupleAndKeywords (args,
+ kwargs,
+ "O!:PlumaPlugin.update_ui",
+ kwlist,
+ &PyPlumaWindow_Type,
+ &window))
+ return NULL;
+
+ klass = g_type_class_ref (pyg_type_from_object (cls));
+
+ if (PLUMA_IS_PLUGIN_PYTHON_CLASS (klass))
+ {
+ klass2 = g_type_class_peek_parent (klass);
+ g_type_class_unref (klass);
+ klass = g_type_class_ref (G_TYPE_FROM_CLASS (klass2));
+ }
+
+ if (PLUMA_PLUGIN_CLASS (klass)->update_ui)
+ PLUMA_PLUGIN_CLASS (klass)->update_ui (PLUMA_PLUGIN (self->obj),
+ PLUMA_WINDOW (window->obj));
+ else {
+ PyErr_SetString (PyExc_NotImplementedError,
+ "virtual method PlumaPlugin.update_ui not implemented");
+ g_type_class_unref (klass);
+ return NULL;
+ }
+
+ g_type_class_unref (klass);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+%%
+override pluma_plugin_is_configurable
+static PyObject *
+_wrap_pluma_plugin_is_configurable (PyGObject *self)
+{
+ int ret;
+ gpointer klass, klass2;
+ PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
+
+ klass = g_type_class_ref (pyg_type_from_object (cls));
+
+ if (PLUMA_IS_PLUGIN_PYTHON_CLASS (klass))
+ {
+ klass2 = g_type_class_peek_parent (klass);
+ g_type_class_unref (klass);
+ klass = g_type_class_ref (G_TYPE_FROM_CLASS (klass2));
+ }
+
+ if (PLUMA_PLUGIN_CLASS (klass)->is_configurable)
+ ret = PLUMA_PLUGIN_CLASS (klass)->is_configurable (PLUMA_PLUGIN (self->obj));
+ else {
+ PyErr_SetString (PyExc_NotImplementedError,
+ "virtual method PlumaPlugin.is_configurable not implemented");
+ g_type_class_unref (klass);
+ return NULL;
+ }
+
+ g_type_class_unref (klass);
+ return PyBool_FromLong (ret);
+}
+
+%%
+override pluma_plugin_configure_dialog
+static PyObject *
+_wrap_pluma_plugin_create_configure_dialog (PyGObject *self)
+{
+ GtkWidget *ret;
+ gpointer klass, klass2;
+ PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
+
+ klass = g_type_class_ref(pyg_type_from_object (cls));
+
+ if (PLUMA_IS_PLUGIN_PYTHON_CLASS (klass))
+ {
+ klass2 = g_type_class_peek_parent (klass);
+ g_type_class_unref (klass);
+ klass = g_type_class_ref (G_TYPE_FROM_CLASS (klass2));
+ }
+
+ if (PLUMA_PLUGIN_CLASS (klass)->create_configure_dialog)
+ ret = PLUMA_PLUGIN_CLASS (klass)->create_configure_dialog (PLUMA_PLUGIN (self->obj));
+ else {
+ PyErr_SetString (PyExc_NotImplementedError,
+ "virtual method PlumaPlugin.create_configure_dialog not implemented");
+ g_type_class_unref (klass);
+ return NULL;
+ }
+
+ g_type_class_unref (klass);
+
+ /* pygobject_new handles NULL checking */
+ return pygobject_new ((GObject *)ret);
+}