Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SignalListItemFactory

[40:7] extends: object

Emits signals to manage listitems. Signals are emitted for every listitem in the same order: 1. [signal@Gtk.SignalListItemFactory::setup] is emitted to set up permanent things on the listitem. This usually means constructing the widgets used in the row and adding them to the listitem. 2. [signal@Gtk.SignalListItemFactory::bind] is emitted to bind the item passed via [property@Gtk.ListItem:item] to the widgets that have been created in step 1 or to add item-specific widgets. Signals are connected to listen to changes - both to changes in the item to update the widgets or to changes in the widgets to update the item. After this signal has been called, the listitem may be shown in a list widget. 3. [signal@Gtk.SignalListItemFactory::unbind] is emitted to undo everything done in step 2. Usually this means disconnecting signal handlers. Once this signal has been called, the listitem will no longer be used in a list widget. 4. [signal@Gtk.SignalListItemFactory::bind] and [signal@Gtk.SignalListItemFactory::unbind] may be emitted multiple times again to bind the listitem for use with new items. By reusing listitems, potentially costly setup can be avoided. However, it means code needs to make sure to properly clean up the listitem in step 3 so that no information from the previous use leaks into the next one. 5. [signal@Gtk.SignalListItemFactory::teardown] is emitted to allow undoing the effects of [signal@Gtk.SignalListItemFactory::setup]. After this signal was emitted on a listitem, the listitem will be destroyed and not be used again. Note that during the signal emissions, changing properties on the listitems passed will not trigger notify signals as the listitem's notifications are frozen. See [method@GObject.Object.freeze_notify] for details. For tracking changes in other properties in the listitem, the ::notify signal is recommended. The signal can be connected in the [signal@Gtk.SignalListItemFactory::setup] signal and removed again during [signal@Gtk.SignalListItemFactory::teardown].

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • SignalListItemFactory ()

    Creates a new GtkSignalListItemFactory. You need to connect signal handlers before you use it.

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

    Wraps this handle as ListItemFactory.

    • @r A ListItemFactory 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)

    Emitted when an object has been bound to an item. The handler for this signal must set to populate the listitem with widgets. After this signal was emitted, the object might be shown in a [class@Gtk.ListView] or other widget. The [signal@Gtk.SignalListItemFactory::unbind] signal is the opposite of this signal and can be used to undo everything done in this signal.

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

    Emitted when a newly created listitem needs to be prepared for use. It is the first signal emitted for every listitem. The handler for this signal must call [method@Gtk.ListItem.set_child] to populate the listitem with widgets. The [signal@Gtk.SignalListItemFactory::teardown] signal is the opposite of this signal and can be used to undo everything done in this signal.

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

    Emitted when an object is about to be destroyed. It is the last signal ever emitted for this @object. This signal is the opposite of the [signal@Gtk.SignalListItemFactory::setup] signal and should be used to undo everything done in that signal.

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

    Emitted when an object has been unbound from its item. This happens for example when a listitem was removed from use in a list widget and its [property@Gtk.ListItem:item] is about to be unset. This signal is the opposite of the [signal@Gtk.SignalListItemFactory::bind] signal and should be used to undo everything done in that signal.

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

class: SignalListItemFactoryMeta

[534:14] static extends: object

Generated metadata helpers for SignalListItemFactory class surfaces.

Methods

  • signals ()

    Returns signal metadata for SignalListItemFactory.

    • @r A list.

class: SignalListItemFactoryBindCallback

[250:7] extends: object

Generated low-level callback wrapper for GIR callback bind.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SignalListItemFactoryBindCallback (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, object, 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: SignalListItemFactoryTeardownCallback

[392:7] extends: object

Generated low-level callback wrapper for GIR callback teardown.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SignalListItemFactoryTeardownCallback (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, object, 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: SignalListItemFactoryUnbindCallback

[463:7] extends: object

Generated low-level callback wrapper for GIR callback unbind.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SignalListItemFactoryUnbindCallback (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, object, 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: SignalListItemFactorySetupCallback

[321:7] extends: object

Generated low-level callback wrapper for GIR callback setup.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SignalListItemFactorySetupCallback (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, object, 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.