Remmina - The GTK+ Remote Desktop Client
v1.4.33
Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travellers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. Remmina supports multiple network protocols in an integrated and consistent user interface. Currently RDP, VNC, NX, XDMCP and SSH are supported.
|
Contains functions and constants that are commonly used throughout the Python plugin implementation. More...
Go to the source code of this file.
Data Structures | |
struct | PyRemminaProtocolWidget |
The Python abstraction of the protocol widget struct. More... | |
struct | PyPlugin |
Maps an instance of a Python plugin to a Remmina one. More... | |
struct | PyGeneric |
A struct used to communicate data between Python and C without strict data type. More... | |
Functions | |
PyGeneric * | python_wrapper_generic_new (void) |
Creates a new instance of PyGeneric. More... | |
void | python_wrapper_add_plugin (PyPlugin *plugin) |
Registers the given plugin if no other plugin with the same name has been already registered. More... | |
void | python_wrapper_set_service (RemminaPluginService *service) |
Sets the pointer to the plugin service of Remmina. More... | |
RemminaPluginService * | python_wrapper_get_service (void) |
Gets the pointer to the plugin service of Remmina. More... | |
RemminaTypeHint | python_wrapper_to_generic (PyObject *field, gpointer *target) |
Extracts data from a PyObject instance to a generic pointer and returns a type hint if it could be determined. More... | |
PyObject * | python_wrapper_last_result (void) |
Gets the result of the last python method call. More... | |
PyObject * | python_wrapper_last_result_set (PyObject *result) |
Sets the result of the last python method call. More... | |
void | python_wrapper_log_method_call (PyObject *instance, const char *method) |
Prints a log message to inform the user a python message has been called. More... | |
gboolean | python_wrapper_check_error (void) |
Checks if an error has occurred and prints it. More... | |
long | python_wrapper_get_attribute_long (PyObject *instance, const char *attr_name, long def) |
Gets the attribute as long value. More... | |
gboolean | python_wrapper_check_attribute (PyObject *instance, const char *attr_name) |
Checks if a given attribute exists. More... | |
void * | python_wrapper_malloc (int bytes) |
Allocates memory and checks for errors before returning. More... | |
char * | python_wrapper_copy_string_from_python (PyObject *string, Py_ssize_t len) |
Copies a string from a Python object to a new point in memory. More... | |
PyPlugin * | python_wrapper_get_plugin (const gchar *name) |
Tries to find the Python plugin matching to the given instance of RemminaPlugin. More... | |
PyPlugin * | python_wrapper_get_plugin_by_protocol_widget (RemminaProtocolWidget *gp) |
Tries to find the Python plugin matching to the given instance of RemminaPlugin. More... | |
GtkWidget * | new_pywidget (GObject *obj) |
Creates a new GtkWidget. More... | |
GtkWidget * | get_pywidget (PyObject *obj) |
Extracts a GtkWidget from a PyObject instance. More... | |
void | init_pygobject (void) |
Initializes the pygobject library. More... | |
Variables | |
G_BEGIN_DECLS const char * | ATTR_NAME |
const char * | ATTR_ICON_NAME |
const char * | ATTR_DESCRIPTION |
const char * | ATTR_VERSION |
const char * | ATTR_ICON_NAME_SSH |
const char * | ATTR_FEATURES |
const char * | ATTR_BASIC_SETTINGS |
const char * | ATTR_ADVANCED_SETTINGS |
const char * | ATTR_SSH_SETTING |
const char * | ATTR_EXPORT_HINTS |
const char * | ATTR_PREF_LABEL |
const char * | ATTR_INIT_ORDER |
Contains functions and constants that are commonly used throughout the Python plugin implementation.
These functions should not be used outside of the Python plugin implementation, since everything is intended to be used with the Python engine.
Definition in file python_wrapper_common.h.
GtkWidget* get_pywidget | ( | PyObject * | obj | ) |
Extracts a GtkWidget from a PyObject instance.
obj |
Definition at line 324 of file python_wrapper_common.c.
void init_pygobject | ( | void | ) |
Initializes the pygobject library.
This needs to be called before any Python plugin is being initialized.
Definition at line 314 of file python_wrapper_common.c.
GtkWidget* new_pywidget | ( | GObject * | obj | ) |
Creates a new GtkWidget.
obj |
Definition at line 319 of file python_wrapper_common.c.
void python_wrapper_add_plugin | ( | PyPlugin * | plugin | ) |
Registers the given plugin if no other plugin with the same name has been already registered.
Definition at line 204 of file python_wrapper_common.c.
gboolean python_wrapper_check_attribute | ( | PyObject * | instance, |
const char * | attr_name | ||
) |
Checks if a given attribute exists.
instance | The object to check for the attribute. |
attr_name | The name of the attribute to check. |
Definition at line 139 of file python_wrapper_common.c.
gboolean python_wrapper_check_error | ( | void | ) |
Checks if an error has occurred and prints it.
Definition at line 98 of file python_wrapper_common.c.
char* python_wrapper_copy_string_from_python | ( | PyObject * | string, |
Py_ssize_t | len | ||
) |
Copies a string from a Python object to a new point in memory.
string | The python object, containing the string to copy. |
len | The length of the string to copy. |
Definition at line 172 of file python_wrapper_common.c.
PyGeneric* python_wrapper_generic_new | ( | void | ) |
Creates a new instance of PyGeneric.
Definition at line 547 of file python_wrapper_remmina.c.
long python_wrapper_get_attribute_long | ( | PyObject * | instance, |
const char * | attr_name, | ||
long | def | ||
) |
Gets the attribute as long value.
instance | The instance of the object to get the attribute. |
constant_name | The name of the attribute to get. |
def | The value to return if the attribute doesn't exist or is not set. |
Definition at line 124 of file python_wrapper_common.c.
PyPlugin* python_wrapper_get_plugin | ( | const gchar * | name | ) |
Tries to find the Python plugin matching to the given instance of RemminaPlugin.
plugin_map | An array of PyPlugin pointers to search. |
instance | The RemminaPlugin instance to find the correct PyPlugin instance for. |
Definition at line 280 of file python_wrapper_common.c.
PyPlugin* python_wrapper_get_plugin_by_protocol_widget | ( | RemminaProtocolWidget * | gp | ) |
Tries to find the Python plugin matching to the given instance of RemminaPlugin.
plugin_map | An array of PyPlugin pointers to search. |
instance | The RemminaPlugin instance to find the correct PyPlugin instance for. |
Definition at line 299 of file python_wrapper_common.c.
RemminaPluginService* python_wrapper_get_service | ( | void | ) |
Gets the pointer to the plugin service of Remmina.
Definition at line 199 of file python_wrapper_common.c.
PyObject* python_wrapper_last_result | ( | void | ) |
Gets the result of the last python method call.
Definition at line 84 of file python_wrapper_common.c.
PyObject* python_wrapper_last_result_set | ( | PyObject * | result | ) |
Sets the result of the last python method call.
Definition at line 91 of file python_wrapper_common.c.
void python_wrapper_log_method_call | ( | PyObject * | instance, |
const char * | method | ||
) |
Prints a log message to inform the user a python message has been called.
This method is called from the CALL_PYTHON macro if WITH_PYTHON_TRACE_CALLS is defined.
instance | The instance that contains the called method. |
method | The name of the method called. |
Definition at line 111 of file python_wrapper_common.c.
void* python_wrapper_malloc | ( | int | bytes | ) |
Allocates memory and checks for errors before returning.
bytes | Amount of bytes to allocate. |
Definition at line 154 of file python_wrapper_common.c.
void python_wrapper_set_service | ( | RemminaPluginService * | service | ) |
Sets the pointer to the plugin service of Remmina.
Definition at line 194 of file python_wrapper_common.c.
RemminaTypeHint python_wrapper_to_generic | ( | PyObject * | field, |
gpointer * | target | ||
) |
Extracts data from a PyObject instance to a generic pointer and returns a type hint if it could be determined.
Definition at line 224 of file python_wrapper_common.c.
const char* ATTR_ADVANCED_SETTINGS |
Definition at line 68 of file python_wrapper_common.c.
const char* ATTR_BASIC_SETTINGS |
Definition at line 67 of file python_wrapper_common.c.
const char* ATTR_DESCRIPTION |
Definition at line 63 of file python_wrapper_common.c.
const char* ATTR_EXPORT_HINTS |
Definition at line 70 of file python_wrapper_common.c.
const char* ATTR_FEATURES |
Definition at line 66 of file python_wrapper_common.c.
const char* ATTR_ICON_NAME |
Definition at line 62 of file python_wrapper_common.c.
const char* ATTR_ICON_NAME_SSH |
Definition at line 65 of file python_wrapper_common.c.
const char* ATTR_INIT_ORDER |
Definition at line 72 of file python_wrapper_common.c.
G_BEGIN_DECLS const char* ATTR_NAME |
Definition at line 61 of file python_wrapper_common.c.
const char* ATTR_PREF_LABEL |
Definition at line 71 of file python_wrapper_common.c.
const char* ATTR_SSH_SETTING |
Definition at line 69 of file python_wrapper_common.c.
const char* ATTR_VERSION |
Definition at line 64 of file python_wrapper_common.c.