1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 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);
}
|