CClosure#
- class CClosure(*args, **kwargs)#
A GCClosure is a specialization of Closure for C function callbacks.
Methods#
- class CClosure
- classmethod marshal_BOOLEAN__BOXED_BOXED(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - 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- signal_accumulator_true_handled().- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_BOOLEAN__FLAGS(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with handlers that take a flags type as an argument and return a boolean. If you have such a signal, you will probably also need to use an accumulator, such as- signal_accumulator_true_handled().- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_STRING__OBJECT_POINTER(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with handlers that take a- Objectand a pointer and produce a string. It is highly unlikely that your signal handler fits this description.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__BOOLEAN(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single boolean argument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__BOXED(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single argument which is any boxed pointer type.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__CHAR(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single character argument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__DOUBLE(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with one double-precision floating point argument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__ENUM(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single argument with an enumerated type.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__FLAGS(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single argument with a flags types.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__FLOAT(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with one single-precision floating point argument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__INT(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single integer argument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__LONG(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with with a single long integer argument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__OBJECT(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single- Objectargument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__PARAM(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single argument of type- ParamSpec.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__POINTER(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single raw pointer argument type.- If it is possible, it is better to use one of the more specific functions such as - marshal_VOID__OBJECT()or- marshal_VOID__OBJECT().- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__STRING(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single string argument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__UCHAR(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single unsigned character argument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__UINT(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with with a single unsigned integer argument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__UINT_POINTER(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with an unsigned int and a pointer as arguments.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__ULONG(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single unsigned long integer argument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__VARIANT(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with a single- Variantargument.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_VOID__VOID(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A - ClosureMarshalfunction for use with signals with no arguments.- Parameters:
- return_value – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()
 
 
 - classmethod marshal_generic(return_gvalue: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None#
- A generic marshaller function implemented via libffi. - Normally this function is not passed explicitly to - signal_new(), but used automatically by GLib when specifying a- Nonemarshaller.- Added in version 2.30. - Parameters:
- return_gvalue – A - Valueto store the return value. May be- Noneif the callback of closure doesn’t return a value.
- n_param_values – The length of the - param_valuesarray.
- param_values – An array of - Valueholding the arguments on which to invoke the callback of closure.
- invocation_hint – The invocation hint given as the last argument to - invoke().
- marshal_data – Additional data specified when registering the marshaller, see - set_marshal()and- set_meta_marshal()