:right-sidebar: True CClosure =================================================================== .. currentmodule:: gi.repository.GObject .. class:: CClosure(*args, **kwargs) :no-contents-entry: :Constructors: :: CClosure() Methods ------- .. rst-class:: interim-class .. class:: CClosure :no-index: .. method:: marshal_BOOLEAN__BOXED_BOXED(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.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 as :func:`~gi.repository.GObject.signal_accumulator_true_handled`. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_BOOLEAN__FLAGS(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.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 as :func:`~gi.repository.GObject.signal_accumulator_true_handled`. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_STRING__OBJECT_POINTER(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with handlers that take a :obj:`~gi.repository.GObject.Object` and a pointer and produce a string. It is highly unlikely that your signal handler fits this description. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__BOOLEAN(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single boolean argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__BOXED(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single argument which is any boxed pointer type. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__CHAR(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single character argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__DOUBLE(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with one double-precision floating point argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__ENUM(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single argument with an enumerated type. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__FLAGS(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single argument with a flags types. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__FLOAT(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with one single-precision floating point argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__INT(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single integer argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__LONG(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with with a single long integer argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__OBJECT(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single :obj:`~gi.repository.GObject.Object` argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__PARAM(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single argument of type :obj:`~gi.repository.GObject.ParamSpec`. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__POINTER(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.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 :func:`~gi.repository.GObject.CClosure.marshal_VOID__OBJECT` or :func:`~gi.repository.GObject.CClosure.marshal_VOID__OBJECT`. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__STRING(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single string argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__UCHAR(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single unsigned character argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__UINT(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with with a single unsigned integer argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__UINT_POINTER(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with an unsigned int and a pointer as arguments. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__ULONG(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single unsigned long integer argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__VARIANT(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with a single :obj:`~gi.repository.GLib.Variant` argument. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_VOID__VOID(closure: ~typing.Callable[[...], ~typing.Any], return_value: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A :obj:`~gi.repository.GObject.ClosureMarshal` function for use with signals with no arguments. :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_value: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` .. method:: marshal_generic(closure: ~typing.Callable[[...], ~typing.Any], return_gvalue: ~typing.Any, n_param_values: int, param_values: ~typing.Any, invocation_hint: None, marshal_data: None) -> None A generic marshaller function implemented via `libffi `_. Normally this function is not passed explicitly to :func:`~gi.repository.GObject.signal_new`, but used automatically by GLib when specifying a :const:`None` marshaller. .. versionadded:: 2.30 :param closure: A :obj:`~gi.repository.GObject.Closure`. :param return_gvalue: A :obj:`~gi.repository.GObject.Value` to store the return value. May be :const:`None` if the callback of closure doesn't return a value. :param n_param_values: The length of the ``param_values`` array. :param param_values: An array of :obj:`~gi.repository.GObject.Value` holding the arguments on which to invoke the callback of closure. :param invocation_hint: The invocation hint given as the last argument to :func:`~gi.repository.GObject.Closure.invoke`. :param marshal_data: Additional data specified when registering the marshaller, see :func:`~gi.repository.GObject.Closure.set_marshal` and :func:`~gi.repository.GObject.Closure.set_meta_marshal` Fields ------ .. rst-class:: interim-class .. class:: CClosure :no-index: .. attribute:: callback The callback function .. attribute:: closure The :obj:`~gi.repository.GObject.Closure`