SearchEntryRef
public struct SearchEntryRef : SearchEntryProtocol, GWeakCapturing
GtkSearchEntry
is a subclass of GtkEntry
that has been
tailored for use as a search entry.
It will show an inactive symbolic “find” icon when the search entry is empty, and a symbolic “clear” icon when there is text. Clicking on the “clear” icon will empty the search entry.
Note that the search/clear icon is shown using a secondary icon, and thus does not work if you are using the secondary icon position for some other purpose.
To make filtering appear more reactive, it is a good idea to
not react to every change in the entry text immediately, but
only after a short delay. To support this, GtkSearchEntry
emits the GtkSearchEntry::search-changed
signal which can
be used instead of the GtkEditable::changed
signal.
The GtkSearchEntry::previous-match
, GtkSearchEntry::next-match
and GtkSearchEntry::stop-search
signals can be used to implement
moving between search results and ending the search.
Often, GtkSearchEntry will be fed events by means of being
placed inside a GtkSearchBar
. If that is not the case,
you can use gtk_search_entry_handle_event()
to pass events.
The SearchEntryRef
type acts as a lightweight Swift reference to an underlying GtkSearchEntry
instance.
It exposes methods that can operate on this data type through SearchEntryProtocol
conformance.
Use SearchEntryRef
only as an unowned
reference to an existing GtkSearchEntry
instance.
-
Untyped pointer to the underlying `GtkSearchEntry` instance.
For type-safe access, use the generated, typed pointer
search_entry_ptr
property instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkSearchEntry>)
-
Designated initialiser from a constant pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkSearchEntry>)
-
Conditional initialiser from an optional pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkSearchEntry>?)
-
Conditional initialiser from an optional, non-mutable pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkSearchEntry>?)
-
Conditional initialiser from an optional
gpointer
Declaration
Swift
@inlinable init!(gpointer g: gpointer?)
-
Conditional initialiser from an optional, non-mutable
gconstpointer
Declaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?)
-
Reference intialiser for a related type that implements
SearchEntryProtocol
Declaration
Swift
@inlinable init<T>(_ other: T) where T : SearchEntryProtocol
-
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>
Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> SearchEntryRef where T : SearchEntryProtocol
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SearchEntryProtocol
.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
SearchEntryProtocol
.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
SearchEntryProtocol
.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
SearchEntryProtocol
.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
SearchEntryProtocol
.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer)
-
Creates a `GtkSearchEntry`, with a find icon when the search field is
empty, and a clear icon when it isn’t.
Declaration
Swift
@inlinable init()