GObject.CClosure¶
record (struct)
A CClosure is a specialization of Closure for C function callbacks.
Static functions¶
marshal_BOOLEAN__BOXED_BOXED¶
@staticmethod
def marshal_BOOLEAN__BOXED_BOXED(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal 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 as signal_accumulator_true_handled.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_BOOLEAN__FLAGS¶
@staticmethod
def marshal_BOOLEAN__FLAGS(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal 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 as signal_accumulator_true_handled.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_STRING__OBJECT_POINTER¶
@staticmethod
def marshal_STRING__OBJECT_POINTER(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with handlers that
take a Object and a pointer and produce a string. It is highly
unlikely that your signal handler fits this description.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__BOOLEAN¶
@staticmethod
def marshal_VOID__BOOLEAN(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
boolean argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__BOXED¶
@staticmethod
def marshal_VOID__BOXED(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
argument which is any boxed pointer type.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__CHAR¶
@staticmethod
def marshal_VOID__CHAR(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
character argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__DOUBLE¶
@staticmethod
def marshal_VOID__DOUBLE(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with one
double-precision floating point argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__ENUM¶
@staticmethod
def marshal_VOID__ENUM(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
argument with an enumerated type.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__FLAGS¶
@staticmethod
def marshal_VOID__FLAGS(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
argument with a flags types.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__FLOAT¶
@staticmethod
def marshal_VOID__FLOAT(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with one
single-precision floating point argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__INT¶
@staticmethod
def marshal_VOID__INT(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
integer argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__LONG¶
@staticmethod
def marshal_VOID__LONG(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with with a single
long integer argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__OBJECT¶
@staticmethod
def marshal_VOID__OBJECT(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
Object argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__PARAM¶
@staticmethod
def marshal_VOID__PARAM(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
argument of type ParamSpec.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__POINTER¶
@staticmethod
def marshal_VOID__POINTER(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal 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 CClosure.marshal_VOID__OBJECT or
CClosure.marshal_VOID__OBJECT.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__STRING¶
@staticmethod
def marshal_VOID__STRING(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single string
argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__UCHAR¶
@staticmethod
def marshal_VOID__UCHAR(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
unsigned character argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__UINT¶
@staticmethod
def marshal_VOID__UINT(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with with a single
unsigned integer argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__UINT_POINTER¶
@staticmethod
def marshal_VOID__UINT_POINTER(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with an unsigned int
and a pointer as arguments.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__ULONG¶
@staticmethod
def marshal_VOID__ULONG(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
unsigned long integer argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__VARIANT¶
@staticmethod
def marshal_VOID__VARIANT(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with a single
GLib.Variant argument.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_VOID__VOID¶
@staticmethod
def marshal_VOID__VOID(closure: Closure, return_value: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A GClosureMarshal function for use with signals with no arguments.
Parameters:
closure— AClosure.return_value— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
marshal_generic¶
@staticmethod
def marshal_generic(closure: Closure, return_gvalue: Value, n_param_values: int, param_values: Value, invocation_hint: int | None = ..., marshal_data: int | None = ...) -> None
A generic marshaller function implemented via libffi.
Normally this function is not passed explicitly to g_signal_new(),
but used automatically by GLib when specifying a None marshaller.
Parameters:
closure— AClosure.return_gvalue— AValueto store the return value. May beNoneif the callback of closure doesn't return a value.n_param_values— The length of theparam_valuesarray.param_values— An array ofGValuesholding the arguments on which to invoke the callback of closure.invocation_hint— The invocation hint given as the last argument toClosure.invoke.marshal_data— Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()