GObject.CClosure¶
Fields¶
| Name | Type | Access | Description | 
|---|---|---|---|
| callback | object | r/w | the callback function | 
| closure | GObject.Closure | r/w | the GObject.Closure | 
Methods¶
| class | marshal_BOOLEAN__BOXED_BOXED(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_BOOLEAN__FLAGS(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_STRING__OBJECT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__BOOLEAN(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__BOXED(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__CHAR(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__DOUBLE(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__ENUM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__FLAGS(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__FLOAT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__LONG(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__OBJECT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__PARAM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__STRING(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__UCHAR(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__UINT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__ULONG(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__VARIANT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_VOID__VOID(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) | 
| class | marshal_generic(closure, return_gvalue, n_param_values, param_values, invocation_hint, marshal_data) | 
Details¶
- 
class GObject.CClosure¶
- A - GObject.CClosureis a specialization of- GObject.Closurefor C function callbacks.- 
classmethod marshal_BOOLEAN__BOXED_BOXED(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – AGObject.Closure.
- return_value (GObject.Value) – AGObject.Valueto store the return value. May beNoneif the callback of closure doesn’t return a value.
- n_param_values (int) – The length of the param_values array.
- param_values (GObject.Value) – An array ofGObject.Valuesholding the arguments on which to invoke the callback of closure.
- invocation_hint (objectorNone) – The invocation hint given as the last argument toGObject.Closure.invoke().
- marshal_data (objectorNone) – Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
 - A - GObject.ClosureMarshalfunction for use with signals with handlers that take two boxed pointers as arguments and return a boolean. If you have such a signal, you will probably also need to use an accumulator, such as- GObject.signal_accumulator_true_handled().
- closure (
 - 
classmethod marshal_BOOLEAN__FLAGS(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – aGObject.Valuewhich can store the returnedbool
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding instance and arg1
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)where the- intparameter denotes a flags type.
- closure (
 - 
classmethod marshal_STRING__OBJECT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – aGObject.Value, which can store the returned string
- n_param_values (int) – 3
- param_values (GObject.Value) – aGObject.Valuearray holding instance, arg1 and arg2
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__BOOLEAN(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theboolparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gboolean arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__BOXED(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theGObject.GBoxedparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__CHAR(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and thestrparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gchar arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__DOUBLE(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and thefloatparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gdouble arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__ENUM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and the enumeration parameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gint arg1, gpointer user_data)where the- intparameter denotes an enumeration type..
- closure (
 - 
classmethod marshal_VOID__FLAGS(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and the flags parameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gint arg1, gpointer user_data)where the- intparameter denotes a flags type.
- closure (
 - 
classmethod marshal_VOID__FLOAT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and thefloatparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gfloat arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theintparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gint arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__LONG(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theintparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, glong arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__OBJECT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theGObject.Objectparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, GObject *arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__PARAM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theGObject.ParamSpecparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theobjectparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gpointer arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__STRING(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and thestrparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__UCHAR(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and the #guchar parameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, guchar arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theintparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, guint arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__UINT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 3
- param_values (GObject.Value) – aGObject.Valuearray holding instance, arg1 and arg2
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__ULONG(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theintparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gulong arg1, gpointer user_data).
- closure (
 - 
classmethod marshal_VOID__VARIANT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 2
- param_values (GObject.Value) – aGObject.Valuearray holding the instance and theGLib.Variantparameter
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data).- New in version 2.26. 
- closure (
 - 
classmethod marshal_VOID__VOID(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – theGObject.Closureto which the marshaller belongs
- return_value (GObject.Value) – ignored
- n_param_values (int) – 1
- param_values (GObject.Value) – aGObject.Valuearray holding only the instance
- invocation_hint (objectorNone) – the invocation hint given as the last argument toGObject.Closure.invoke()
- marshal_data (objectorNone) – additional data specified when registering the marshaller
 - A marshaller for a - GObject.CClosurewith a callback of type- void (*callback) (gpointer instance, gpointer user_data).
- closure (
 - 
classmethod marshal_generic(closure, return_gvalue, n_param_values, param_values, invocation_hint, marshal_data)[source]¶
- Parameters: - closure (GObject.Closure) – AGObject.Closure.
- return_gvalue (GObject.Value) – AGObject.Valueto store the return value. May beNoneif the callback of closure doesn’t return a value.
- n_param_values (int) – The length of the param_values array.
- param_values (GObject.Value) – An array ofGObject.Valuesholding the arguments on which to invoke the callback of closure.
- invocation_hint (objectorNone) – The invocation hint given as the last argument toGObject.Closure.invoke().
- marshal_data (objectorNone) – Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
 - A generic marshaller function implemented via libffi. - Normally this function is not passed explicitly to - GObject.signal_new(), but used automatically by GLib when specifying a- Nonemarshaller.- New in version 2.30. 
- closure (
 
- 
classmethod