CClosure
- class CClosure(*args, **kwargs)
A GCClosure
is a specialization of Closure
for C function callbacks.
Methods
- class CClosure
- marshal_BOOLEAN__BOXED_BOXED(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function 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 assignal_accumulator_true_handled()
.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_BOOLEAN__FLAGS(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function 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 assignal_accumulator_true_handled()
.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_STRING__OBJECT_POINTER(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with handlers that take aObject
and a pointer and produce a string. It is highly unlikely that your signal handler fits this description.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__BOOLEAN(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a single boolean argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__BOXED(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a single argument which is any boxed pointer type.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__CHAR(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a single character argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__DOUBLE(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with one double-precision floating point argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__ENUM(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a single argument with an enumerated type.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__FLAGS(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a single argument with a flags types.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__FLOAT(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with one single-precision floating point argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__INT(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a single integer argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__LONG(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with with a single long integer argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__OBJECT(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a singleObject
argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__PARAM(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a single argument of typeParamSpec
.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__POINTER(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function 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()
ormarshal_VOID__OBJECT()
.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__STRING(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a single string argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__UCHAR(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a single unsigned character argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__UINT(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with with a single unsigned integer argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__UINT_POINTER(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with an unsigned int and a pointer as arguments.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__ULONG(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a single unsigned long integer argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__VARIANT(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with a singleVariant
argument.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_VOID__VOID(closure: Callable[[...], Any], return_value: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: None) None
A
ClosureMarshal
function for use with signals with no arguments.- Parameters:
closure – A
Closure
.return_value – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()
- marshal_generic(closure: Callable[[...], Any], return_gvalue: Any, n_param_values: int, param_values: Any, invocation_hint: None, marshal_data: 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 aNone
marshaller.Added in version 2.30.
- Parameters:
closure – A
Closure
.return_gvalue – A
Value
to store the return value. May beNone
if the callback of closure doesn’t return a value.n_param_values – The length of the
param_values
array.param_values – An array of
Value
holding 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()
andset_meta_marshal()