SignalListItemFactory
open class SignalListItemFactory : ListItemFactory, SignalListItemFactoryProtocol
GtkSignalListItemFactory
is a GtkListItemFactory
that emits signals
to to manage listitems.
Signals are emitted for every listitem in the same order:
[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.[signal
Gtk.SignalListItemFactory::bind
] is emitted to bind the item passed via [propertyGtk.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.[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.[signal
Gtk.SignalListItemFactory::bind
] and [signalGtk.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 use.- [signal
Gtk.SignalListItemFactory::teardown
] is emitted to allow undoing the effects of [signalGtk.SignalListItemFactory::setup
]. After this signal was emitted on a listitem, the listitem will be destroyed and not be used again.
- [signal
Note that during the signal emissions, changing properties on the
GtkListItem
s passed will not trigger notify signals as the listitem’s
notifications are frozen. See g_object_freeze_notify()
for details.
For tracking changes in other properties in the GtkListItem
, the
notify
signal is recommended. The signal can be connected in the
[signalGtk.SignalListItemFactory::setup
] signal and removed again during
[signalGtk.SignalListItemFactory::teardown
].
The SignalListItemFactory
type acts as a reference-counted owner of an underlying GtkSignalListItemFactory
instance.
It provides the methods that can operate on this data type through SignalListItemFactoryProtocol
conformance.
Use SignalListItemFactory
as a strong reference or owner of a GtkSignalListItemFactory
instance.
-
Designated initialiser from the underlying `C` data type.
This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the
SignalListItemFactory
instance.Declaration
Swift
@inlinable public init(_ op: UnsafeMutablePointer<GtkSignalListItemFactory>)
Parameters
op
pointer to the underlying object
-
Designated initialiser from a constant pointer to the underlying
C
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theSignalListItemFactory
instance.Declaration
Swift
@inlinable public init(_ op: UnsafePointer<GtkSignalListItemFactory>)
Parameters
op
pointer to the underlying object
-
Optional initialiser from a non-mutating
gpointer
to the underlyingC
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theSignalListItemFactory
instance.Declaration
Swift
@inlinable override public init!(gpointer op: gpointer?)
Parameters
op
gpointer to the underlying object
-
Optional initialiser from a non-mutating
gconstpointer
to the underlyingC
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theSignalListItemFactory
instance.Declaration
Swift
@inlinable override public init!(gconstpointer op: gconstpointer?)
Parameters
op
pointer to the underlying object
-
Optional initialiser from a constant pointer to the underlying
C
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theSignalListItemFactory
instance.Declaration
Swift
@inlinable public init!(_ op: UnsafePointer<GtkSignalListItemFactory>?)
Parameters
op
pointer to the underlying object
-
Optional initialiser from the underlying
C
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theSignalListItemFactory
instance.Declaration
Swift
@inlinable public init!(_ op: UnsafeMutablePointer<GtkSignalListItemFactory>?)
Parameters
op
pointer to the underlying object
-
Designated initialiser from the underlying
C
data type. Will retainGtkSignalListItemFactory
. i.e., ownership is transferred to theSignalListItemFactory
instance.Declaration
Swift
@inlinable public init(retaining op: UnsafeMutablePointer<GtkSignalListItemFactory>)
Parameters
op
pointer to the underlying object
-
Reference intialiser for a related type that implements
SignalListItemFactoryProtocol
Will retainGtkSignalListItemFactory
.Declaration
Swift
@inlinable public init<T>(signalListItemFactory other: T) where T : SignalListItemFactoryProtocol
Parameters
other
an instance of a related type that implements
SignalListItemFactoryProtocol
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SignalListItemFactoryProtocol
.Declaration
Swift
@inlinable override public init<T>(cPointer p: UnsafeMutablePointer<T>)
Parameters
cPointer
pointer to the underlying object
-
Unsafe typed, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SignalListItemFactoryProtocol
.Declaration
Swift
@inlinable override public init<T>(retainingCPointer cPointer: UnsafeMutablePointer<T>)
Parameters
cPointer
pointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SignalListItemFactoryProtocol
.Declaration
Swift
@inlinable override public init(raw p: UnsafeRawPointer)
Parameters
p
raw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SignalListItemFactoryProtocol
.Declaration
Swift
@inlinable override public init(retainingRaw raw: UnsafeRawPointer)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SignalListItemFactoryProtocol
.Declaration
Swift
@inlinable public required init(raw p: UnsafeMutableRawPointer)
Parameters
p
mutable raw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SignalListItemFactoryProtocol
.Declaration
Swift
@inlinable required public init(retainingRaw raw: UnsafeMutableRawPointer)
Parameters
raw
mutable raw pointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SignalListItemFactoryProtocol
.Declaration
Swift
@inlinable override public init(opaquePointer p: OpaquePointer)
Parameters
p
opaque pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SignalListItemFactoryProtocol
.Declaration
Swift
@inlinable override public init(retainingOpaquePointer p: OpaquePointer)
Parameters
p
opaque pointer to the underlying object
-
Creates a new
GtkSignalListItemFactory
.You need to connect signal handlers before you use it.
Declaration
Swift
@inlinable public init()