Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SignalGroup

[26:7] extends: object

GSignalGroup manages a collection of signals on a GObject. GSignalGroup simplifies the process of connecting many signals to a GObject as a group. As such there is no API to disconnect a signal from the group. In particular, this allows you to: - Change the target instance, which automatically causes disconnection of the signals from the old instance and connecting to the new instance. - Block and unblock signals as a group - Ensuring that blocked state transfers across target instances. One place you might want to use such a structure is with GtkTextView and GtkTextBuffer. Often times, you'll need to connect to many signals on GtkTextBuffer from a GtkTextView subclass. This allows you to create a signal group during instance construction, simply bind the GtkTextView:buffer property to GSignalGroup:target and connect all the signals you need. When the GtkTextView:buffer property changes all of the signals will be transitioned correctly.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • SignalGroup (Handle = null)

    Creates a new SignalGroup by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnBind (callback Fn, UserData = null)

    This signal is emitted when #GSignalGroup:target is set to a new value other than %NULL. It is similar to #GObject::notify on target except it will not emit when #GSignalGroup:target is %NULL and also allows for receiving the #GObject without a data-race.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (SignalGroup Self, Object Instance).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • setOnUnbind (callback Fn, UserData = null)

    This signal is emitted when the target instance of @self is set to a new #GObject. This signal will only be emitted if the previous target of

    • @self is non-%NULL.
    • @p Fn is the Aussom callback.
    • @p Fn is called with (SignalGroup Self).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setTarget (object Value)

    The target instance used when connecting signals.

    • @p Value is the new property value.
    • @r None.
  • block ()

    Blocks all signal handlers managed by @self so they will not be called during any signal emissions. Must be unblocked exactly the same number of times it has been blocked to become active again. This blocked state will be kept across changes of the target instance.

    • @r None.
  • connect_closure (string detailed_signal, object closure, bool after)

    Connects @closure to the signal @detailed_signal on #GSignalGroup:target. You cannot connect a signal handler after #GSignalGroup:target has been set.

    • @p detailed_signal is a string of the form signal-name with optional ::signal-detail.
    • @p closure is the closure to connect..
    • @p after is whether the handler should be called before or after the default handler of the signal..
    • @r None.
  • dup_target ()

    Gets the target instance used when connecting signals.

  • set_target (object target)

    Sets the target instance used when connecting signals. Any signal that has been registered with g_signal_group_connect_object() or similar functions will be connected to this object. If the target instance was previously set, signals will be disconnected from that object prior to connecting to @target.

    • @p target is The target instance used when connecting signals..
    • @r None.
  • unblock ()

    Unblocks all signal handlers managed by @self so they will be called again during any signal emissions unless it is blocked again. Must be unblocked exactly the same number of times it has been blocked to become active again.

    • @r None.

class: SignalGroupBindCallback

[284:7] extends: object

Generated low-level callback wrapper for GIR callback bind.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SignalGroupBindCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, instance, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: SignalGroupUnbindCallback

[355:7] extends: object

Generated low-level callback wrapper for GIR callback unbind.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SignalGroupUnbindCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: SignalGroupMeta

[425:14] static extends: object

Generated metadata helpers for SignalGroup class surfaces.

Methods

  • properties ()

    Returns property metadata for SignalGroup.

    • @r A list.
  • signals ()

    Returns signal metadata for SignalGroup.

    • @r A list.