194 lines
4.9 KiB
Plaintext
194 lines
4.9 KiB
Plaintext
%%
|
|
headers
|
|
#include <xedit/xedit-plugin.h>
|
|
#include <xedit/xedit-window.h>
|
|
%%
|
|
override xedit_plugin_activate kwargs
|
|
static PyObject *
|
|
_wrap_xedit_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!:XeditPlugin.activate",
|
|
kwlist,
|
|
&PyXeditWindow_Type,
|
|
&window))
|
|
return NULL;
|
|
|
|
klass = g_type_class_ref (pyg_type_from_object (cls));
|
|
|
|
if (XEDIT_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 (XEDIT_PLUGIN_CLASS (klass)->activate)
|
|
XEDIT_PLUGIN_CLASS (klass)->activate (XEDIT_PLUGIN (self->obj),
|
|
XEDIT_WINDOW (window->obj));
|
|
else {
|
|
PyErr_SetString (PyExc_NotImplementedError,
|
|
"virtual method XeditPlugin.activate not implemented");
|
|
g_type_class_unref (klass);
|
|
return NULL;
|
|
}
|
|
|
|
g_type_class_unref (klass);
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
|
|
%%
|
|
override xedit_plugin_deactivate kwargs
|
|
static PyObject *
|
|
_wrap_xedit_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!:XeditPlugin.deactivate",
|
|
kwlist,
|
|
&PyXeditWindow_Type,
|
|
&window))
|
|
return NULL;
|
|
|
|
klass = g_type_class_ref (pyg_type_from_object (cls));
|
|
|
|
if (XEDIT_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 (XEDIT_PLUGIN_CLASS (klass)->deactivate)
|
|
XEDIT_PLUGIN_CLASS (klass)->deactivate (XEDIT_PLUGIN (self->obj),
|
|
XEDIT_WINDOW (window->obj));
|
|
else {
|
|
PyErr_SetString (PyExc_NotImplementedError,
|
|
"virtual method XeditPlugin.deactivate not implemented");
|
|
g_type_class_unref (klass);
|
|
return NULL;
|
|
}
|
|
|
|
g_type_class_unref (klass);
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
|
|
%%
|
|
override xedit_plugin_update_ui kwargs
|
|
static PyObject *
|
|
_wrap_xedit_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!:XeditPlugin.update_ui",
|
|
kwlist,
|
|
&PyXeditWindow_Type,
|
|
&window))
|
|
return NULL;
|
|
|
|
klass = g_type_class_ref (pyg_type_from_object (cls));
|
|
|
|
if (XEDIT_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 (XEDIT_PLUGIN_CLASS (klass)->update_ui)
|
|
XEDIT_PLUGIN_CLASS (klass)->update_ui (XEDIT_PLUGIN (self->obj),
|
|
XEDIT_WINDOW (window->obj));
|
|
else {
|
|
PyErr_SetString (PyExc_NotImplementedError,
|
|
"virtual method XeditPlugin.update_ui not implemented");
|
|
g_type_class_unref (klass);
|
|
return NULL;
|
|
}
|
|
|
|
g_type_class_unref (klass);
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
|
|
%%
|
|
override xedit_plugin_is_configurable
|
|
static PyObject *
|
|
_wrap_xedit_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 (XEDIT_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 (XEDIT_PLUGIN_CLASS (klass)->is_configurable)
|
|
ret = XEDIT_PLUGIN_CLASS (klass)->is_configurable (XEDIT_PLUGIN (self->obj));
|
|
else {
|
|
PyErr_SetString (PyExc_NotImplementedError,
|
|
"virtual method XeditPlugin.is_configurable not implemented");
|
|
g_type_class_unref (klass);
|
|
return NULL;
|
|
}
|
|
|
|
g_type_class_unref (klass);
|
|
return PyBool_FromLong (ret);
|
|
}
|
|
|
|
%%
|
|
override xedit_plugin_configure_dialog
|
|
static PyObject *
|
|
_wrap_xedit_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 (XEDIT_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 (XEDIT_PLUGIN_CLASS (klass)->create_configure_dialog)
|
|
ret = XEDIT_PLUGIN_CLASS (klass)->create_configure_dialog (XEDIT_PLUGIN (self->obj));
|
|
else {
|
|
PyErr_SetString (PyExc_NotImplementedError,
|
|
"virtual method XeditPlugin.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);
|
|
}
|