Class (GI Struct)

GObject-2.0GObjectCClosure

A GObject.CClosure is a specialization of GObject.Closure for C function callbacks.

Index

Constructors

Properties

callback: any
$gtype: GType<CClosure>

Methods

  • A 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 g_signal_accumulator_true_handled().

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A 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 g_signal_accumulator_true_handled().

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • 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 null marshaller.

    Parameters

    • closure: Closure
    • return_gvalue: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with handlers that take a GObject.Object and a pointer and produce a string. It is highly unlikely that your signal handler fits this description.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single boolean argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single argument which is any boxed pointer type.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single character argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with one double-precision floating point argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single argument with an enumerated type.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single argument with a flags types.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with one single-precision floating point argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single integer argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with with a single long integer argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single GObject.Object argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single argument of type GObject.ParamSpec.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A 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 g_cclosure_marshal_VOID__OBJECT() or g_cclosure_marshal_VOID__OBJECT().

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single string argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single unsigned character argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with with a single unsigned integer argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with an unsigned int and a pointer as arguments.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single unsigned long integer argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with a single GLib.Variant argument.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • A GObject.ClosureMarshal function for use with signals with no arguments.

    Parameters

    • closure: Closure
    • return_value: any

      A GObject.Value to store the return value. May be null if the callback of closure doesn't return a value.

    • n_param_values: number

      The length of the param_values array.

    • param_values: any

      An array of GValues holding the arguments on which to invoke the callback of closure.

    • Optionalinvocation_hint: any

      The invocation hint given as the last argument to g_closure_invoke().

    • Optionalmarshal_data: any

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void