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
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:
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()
- classmethod marshal_BOOLEAN__FLAGS(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = 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:
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()
- 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
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:
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()
- classmethod marshal_VOID__BOOLEAN(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a single boolean argument.- Parameters:
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()
- classmethod marshal_VOID__BOXED(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a single argument which is any boxed pointer type.- Parameters:
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()
- classmethod marshal_VOID__CHAR(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a single character argument.- Parameters:
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()
- classmethod marshal_VOID__DOUBLE(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with one double-precision floating point argument.- Parameters:
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()
- classmethod marshal_VOID__ENUM(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a single argument with an enumerated type.- Parameters:
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()
- classmethod marshal_VOID__FLAGS(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a single argument with a flags types.- Parameters:
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()
- classmethod marshal_VOID__FLOAT(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with one single-precision floating point argument.- Parameters:
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()
- classmethod marshal_VOID__INT(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a single integer argument.- Parameters:
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()
- classmethod marshal_VOID__LONG(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with with a single long integer argument.- Parameters:
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()
- classmethod marshal_VOID__OBJECT(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a singleObject
argument.- Parameters:
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()
- classmethod marshal_VOID__PARAM(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a single argument of typeParamSpec
.- Parameters:
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()
- classmethod marshal_VOID__POINTER(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = 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:
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()
- classmethod marshal_VOID__STRING(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a single string argument.- Parameters:
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()
- classmethod marshal_VOID__UCHAR(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a single unsigned character argument.- Parameters:
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()
- classmethod marshal_VOID__UINT(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with with a single unsigned integer argument.- Parameters:
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()
- 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
ClosureMarshal
function for use with signals with an unsigned int and a pointer as arguments.- Parameters:
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()
- classmethod marshal_VOID__ULONG(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a single unsigned long integer argument.- Parameters:
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()
- classmethod marshal_VOID__VARIANT(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with a singleVariant
argument.- Parameters:
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()
- classmethod marshal_VOID__VOID(return_value: Value, n_param_values: int, param_values: Value, invocation_hint: Any = None, marshal_data: Any = None) None #
A
ClosureMarshal
function for use with signals with no arguments.- Parameters:
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()
- 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 aNone
marshaller.Added in version 2.30.
- Parameters:
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()