summaryrefslogtreecommitdiff
path: root/plugin-loaders/python/bindings/plumaplugin.override
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-11-07 19:52:18 -0300
committerPerberos <[email protected]>2011-11-07 19:52:18 -0300
commit5ded9cba8563f336939400303d6a841d5089b107 (patch)
treec5676588cff26ba37e12369fe4de24b54e9f6682 /plugin-loaders/python/bindings/plumaplugin.override
parentf00b3a11a199f9f85a4d46a600f9d14179b37dbf (diff)
downloadpluma-5ded9cba8563f336939400303d6a841d5089b107.tar.bz2
pluma-5ded9cba8563f336939400303d6a841d5089b107.tar.xz
renaming from gedit to pluma
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);
+}