FilterRef
public struct FilterRef : FilterProtocol, GWeakCapturing
A GtkFilter object describes the filtering to be performed by a
GtkFilterListModel.
The model will use the filter to determine if it should include items
or not by calling [methodGtk.Filter.match] for each item and only
keeping the ones that the function returns true for.
Filters may change what items they match through their lifetime. In that
case, they will emit the [signalGtk.Filter::changed] signal to notify
that previous filter results are no longer valid and that items should
be checked again via [methodGtk.Filter.match].
GTK provides various pre-made filter implementations for common filtering operations. These filters often include properties that can be linked to various widgets to easily allow searches.
However, in particular for large lists or complex search methods, it is
also possible to subclass GtkFilter and provide one’s own filter.
The FilterRef type acts as a lightweight Swift reference to an underlying GtkFilter instance.
It exposes methods that can operate on this data type through FilterProtocol conformance.
Use FilterRef only as an unowned reference to an existing GtkFilter instance.
-
Untyped pointer to the underlying `GtkFilter` instance.For type-safe access, use the generated, typed pointer
filter_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkFilter>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkFilter>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkFilter>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkFilter>?) -
Conditional initialiser from an optional
gpointerDeclaration
Swift
@inlinable init!(gpointer g: gpointer?) -
Conditional initialiser from an optional, non-mutable
gconstpointerDeclaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?) -
Reference intialiser for a related type that implements
FilterProtocolDeclaration
Swift
@inlinable init<T>(_ other: T) where T : FilterProtocol -
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> FilterRef where T : FilterProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FilterProtocol.Declaration
Swift
@inlinable init<T>(cPointer: UnsafeMutablePointer<T>) -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FilterProtocol.Declaration
Swift
@inlinable init<T>(constPointer: UnsafePointer<T>) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FilterProtocol.Declaration
Swift
@inlinable init(mutating raw: UnsafeRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FilterProtocol.Declaration
Swift
@inlinable init(raw: UnsafeMutableRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
FilterProtocol.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer)
View on GitHub
Install in Dash
FilterRef Structure Reference