Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SearchEntryStopsearchCallback

[869:7] extends: object

Generated low-level callback wrapper for GIR callback stop-search.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SearchEntryStopsearchCallback (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: SearchEntryMeta

[939:14] static extends: object

Generated metadata helpers for SearchEntry class surfaces.

Methods

  • properties ()

    Returns property metadata for SearchEntry.

    • @r A list.
  • signals ()

    Returns signal metadata for SearchEntry.

    • @r A list.

class: SearchEntrySearchchangedCallback

[729:7] extends: object

Generated low-level callback wrapper for GIR callback search-changed.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SearchEntrySearchchangedCallback (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: SearchEntryActivateCallback

[519:7] extends: object

Generated low-level callback wrapper for GIR callback activate.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SearchEntryActivateCallback (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: SearchEntryNextmatchCallback

[589:7] extends: object

Generated low-level callback wrapper for GIR callback next-match.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SearchEntryNextmatchCallback (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: SearchEntry

[39:7] extends: object

A single-line text entry widget for use as a search entry. The main API for interacting with a GtkSearchEntry as entry is the GtkEditable interface. An example GtkSearchEntry 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. 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 [signal@Gtk.SearchEntry::search-changed] signal which can be used instead of the [signal@Gtk.Editable::changed] signal. The [signal@Gtk.SearchEntry::previous-match], [signal@Gtk.SearchEntry::next-match] and [signal@Gtk.SearchEntry::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 [class@Gtk.SearchBar]. If that is not the case, you can use [method@Gtk.SearchEntry.set_key_capture_widget] to let it capture key input from another widget. GtkSearchEntry provides only minimal API and should be used with the [iface@Gtk.Editable] API. ## Shortcuts and Gestures The following signals have default keybindings: - [signal@Gtk.SearchEntry::activate] - [signal@Gtk.SearchEntry::next-match] - [signal@Gtk.SearchEntry::previous-match] - [signal@Gtk.SearchEntry::stop-search] ## CSS Nodes entry.search ╰── text GtkSearchEntry has a single CSS node with name entry that carries a .search style class, and the text node is a child of that. ## Accessibility GtkSearchEntry uses the [enum@Gtk.AccessibleRole.search_box] role.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • SearchEntry ()

    Creates a GtkSearchEntry.

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

    Wraps this handle as Widget.

    • @r A Widget object.
  • asAccessible ()

    Wraps this handle as Accessible.

    • @r A Accessible object.
  • asBuildable ()

    Wraps this handle as Buildable.

    • @r A Buildable object.
  • asConstraintTarget ()

    Wraps this handle as ConstraintTarget.

    • @r A ConstraintTarget object.
  • asEditable ()

    Wraps this handle as Editable.

    • @r A Editable 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.
  • setOnActivate (callback Fn, UserData = null)

    Emitted when the entry is activated. The keybindings for this signal are all forms of the Enter key.

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

    Emitted when the user initiates a move to the next match for the current search string. This is a keybinding signal. Applications should connect to it, to implement moving between matches. The default bindings for this signal is Ctrl+g.

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

    Emitted when the user initiates a move to the previous match for the current search string. This is a keybinding signal. Applications should connect to it, to implement moving between matches. The default bindings for this signal is Ctrl+Shift+g.

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

    Emitted with a delay. The length of the delay can be changed with the [property@Gtk.SearchEntry:search-delay] property.

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

    Emitted when the user initiated a search on the entry.

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

    Emitted when the user stops a search via keyboard input. This is a keybinding signal. Applications should connect to it, to implement hiding the search entry in this case. The default bindings for this signal is Escape.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (SearchEntry 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.

  • setActivatesdefault (bool Value)

    Whether to activate the default widget when Enter is pressed.

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

    The hints about input for the GtkSearchEntry used to alter the behaviour of input methods.

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

    The purpose for the GtkSearchEntry input used to alter the behaviour of input methods.

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

    The widget that the entry will use to capture key events. Key events are consumed by the search entry to start or continue a search.

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

    The text that will be displayed in the GtkSearchEntry when it is empty and unfocused.

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

    The delay in milliseconds from last keypress to the search changed signal.

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

    Gets the input purpose for @entry.

  • get_input_purpose ()

    Gets the input purpose of @entry.

  • get_key_capture_widget ()

    Gets the widget that @entry is capturing key events from.

  • get_placeholder_text ()

    Gets the placeholder text associated with @entry.

  • get_search_delay ()

    Get the delay to be used between the last keypress and the [signal@Gtk.SearchEntry::search-changed] signal being emitted.

  • set_input_hints (string hints)

    Sets the input hints for @entry.

    • @p hints is the new input hints.
    • @r None.
  • set_input_purpose (string purpose)

    Sets the input purpose of @entry.

    • @p purpose is the new input purpose.
    • @r None.
  • set_key_capture_widget (object widget)

    Sets @widget as the widget that @entry will capture key events from. Key events are consumed by the search entry to start or continue a search. If the entry is part of a GtkSearchBar, it is preferable to call [method@Gtk.SearchBar.set_key_capture_widget] instead, which will reveal the entry in addition to triggering the search entry. Note that despite the name of this function, the events are only 'captured' in the bubble phase, which means that editable child widgets of @widget will receive text input before it gets captured. If that is not desired, you can capture and forward the events yourself with [method@Gtk.EventControllerKey.forward].

    • @p widget is a GtkWidget.
    • @r None.
  • set_placeholder_text (string text)

    Sets the placeholder text associated with @entry.

    • @p text is the text to set as a placeholder.
    • @r None.
  • set_search_delay (int delay)

    Set the delay to be used between the last keypress and the [signal@Gtk.SearchEntry::search-changed] signal being emitted.

    • @p delay is a delay in milliseconds.
    • @r None.

class: SearchEntrySearchstartedCallback

[799:7] extends: object

Generated low-level callback wrapper for GIR callback search-started.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SearchEntrySearchstartedCallback (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: SearchEntryPreviousmatchCallback

[659:7] extends: object

Generated low-level callback wrapper for GIR callback previous-match.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • SearchEntryPreviousmatchCallback (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.