64 PyObject* result = CallPythonMethod(plugin->
instance,
"get_pref_body", NULL, NULL);
65 if (result == Py_None || result == NULL)
77 PyObject* instance = plugin->
instance;
84 g_printerr(
"Unable to create pref plugin. Aborting!\n");
91 remmina_plugin->
domain = GETTEXT_PACKAGE;
92 remmina_plugin->
name = PyUnicode_AsUTF8(PyObject_GetAttrString(instance,
ATTR_NAME));
void remmina_plugin_python_pref_init(void)
Initializes the Python plugin specialisation for preferences plugins.
Maps an instance of a Python plugin to a Remmina one.
GtkWidget * remmina_plugin_python_pref_get_pref_body_wrapper(RemminaPrefPlugin *instance)
static RemminaProtocolPlugin remmina_plugin
PyPlugin * remmina_plugin_python_get_plugin(const char *name)
Tries to find the Python plugin matching to the given instance of RemminaPlugin.
GtkWidget * get_pywidget(PyObject *obj)
Extracts a GtkWidget from a PyObject instance.
const char * ATTR_PREF_LABEL
const char * ATTR_DESCRIPTION
const gchar * description
RemminaPlugin * generic_plugin
RemminaPlugin * remmina_plugin_python_create_pref_plugin(PyPlugin *plugin)
Creates a new instance of the RemminaPluginPref, initializes its members and references the wrapper f...
void remmina_plugin_python_add_plugin(PyPlugin *plugin)
Registers the given plugin if no other plugin with the same name has been already registered...
gboolean remmina_plugin_python_check_attribute(PyObject *instance, const char *attr_name)
Checks if a given attribute exists.
GtkWidget *(* get_pref_body)(struct _RemminaPrefPlugin *instance)
Contains functions and constants that are commonly used throughout the Python plugin implementation...
void * remmina_plugin_python_malloc(int bytes)
Allocates memory and checks for errors before returning.
RemminaPrefPlugin * pref_plugin
Contains the specialisation of RemminaPluginFile plugins in Python.
const char * ATTR_VERSION