EntryCompletionProtocol

public protocol EntryCompletionProtocol : ObjectProtocol, BuildableProtocol, CellLayoutProtocol

GtkEntryCompletion is an auxiliary object to provide completion functionality for GtkEntry.

It implements the [ifaceGtk.CellLayout] interface, to allow the user to add extra cells to the GtkTreeView with completion matches.

“Completion functionality” means that when the user modifies the text in the entry, GtkEntryCompletion checks which rows in the model match the current content of the entry, and displays a list of matches. By default, the matching is done by comparing the entry text case-insensitively against the text column of the model (see [methodGtk.EntryCompletion.set_text_column]), but this can be overridden with a custom match function (see [methodGtk.EntryCompletion.set_match_func]).

When the user selects a completion, the content of the entry is updated. By default, the content of the entry is replaced by the text column of the model, but this can be overridden by connecting to the [signalGtk.EntryCompletion::match-selected] signal and updating the entry in the signal handler. Note that you should return true from the signal handler to suppress the default behaviour.

To add completion functionality to an entry, use [methodGtk.Entry.set_completion].

GtkEntryCompletion uses a [classGtk.TreeModelFilter] model to represent the subset of the entire model that is currently matching. While the GtkEntryCompletion signals [signalGtk.EntryCompletion::match-selected] and [signalGtk.EntryCompletion::cursor-on-match] take the original model and an iter pointing to that model as arguments, other callbacks and signals (such as GtkCellLayoutDataFunc or [signalGtk.CellArea::apply-attributes)] will generally take the filter model as argument. As long as you are only calling [methodGtk.TreeModel.get], this will make no difference to you. If for some reason, you need the original model, use [methodGtk.TreeModelFilter.get_model]. Don’t forget to use [methodGtk.TreeModelFilter.convert_iter_to_child_iter] to obtain a matching iter.

The EntryCompletionProtocol protocol exposes the methods and properties of an underlying GtkEntryCompletion instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see EntryCompletion. Alternatively, use EntryCompletionRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkEntryCompletion instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • entry_completion_ptr Default implementation

    Typed pointer to the underlying GtkEntryCompletion instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkEntryCompletion instance.

    Declaration

    Swift

    var entry_completion_ptr: UnsafeMutablePointer<GtkEntryCompletion>! { get }
  • Required Initialiser for types conforming to EntryCompletionProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

EntryCompletion Class

  • Bind a EntryCompletionPropertyName source property to a given target object.

    Declaration

    Swift

    @discardableResult
    @inlinable
    func bind<Q, T>(property source_property: EntryCompletionPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol

    Parameters

    source_property

    the source property to bind

    target

    the target object to bind to

    target_property

    the target property to bind to

    flags

    the flags to pass to the Binding

    transform_from

    ValueTransformer to use for forward transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return Value

    binding reference or nil in case of an error

  • get(property:) Extension method

    Get the value of a EntryCompletion property

    Declaration

    Swift

    @inlinable
    func get(property: EntryCompletionPropertyName) -> GLibObject.Value

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

  • set(property:value:) Extension method

    Set the value of a EntryCompletion property. Note that this will only have an effect on properties that are writable and not construct-only!

    Declaration

    Swift

    @inlinable
    func set(property: EntryCompletionPropertyName, value v: GLibObject.Value)

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

EntryCompletion signals

  • Connect a Swift signal handler to the given, typed EntryCompletionSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: EntryCompletionSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    handler

    The Swift signal handler (function or callback) to invoke on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • Connect a C signal handler to the given, typed EntryCompletionSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: EntryCompletionSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    signalHandler

    The C function to be called on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • Emitted when a match from the cursor is on a match of the list.

    The default behaviour is to replace the contents of the entry with the contents of the text column in the row pointed to by iter.

    Note that model is the model that was passed to [methodGtk.EntryCompletion.set_model].

    Note

    This represents the underlying cursor-on-match signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onCursorOnMatch(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ model: TreeModelRef, _ iter: TreeIterRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    model

    the GtkTreeModel containing the matches

    iter

    a GtkTreeIter positioned at the selected match

    handler

    true if the signal has been handled Run the given callback whenever the cursorOnMatch signal is emitted

  • cursorOnMatchSignal Extension method

    Typed cursor-on-match signal for using the connect(signal:) methods

    Declaration

    Swift

    static var cursorOnMatchSignal: EntryCompletionSignalName { get }
  • Emitted when the inline autocompletion is triggered.

    The default behaviour is to make the entry display the whole prefix and select the newly inserted part.

    Applications may connect to this signal in order to insert only a smaller part of the prefix into the entry - e.g. the entry used in the GtkFileChooser inserts only the part of the prefix up to the next ‘/’.

    Note

    This represents the underlying insert-prefix signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onInsertPrefix(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ prefix: String) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    true if the signal has been handled Run the given callback whenever the insertPrefix signal is emitted

  • insertPrefixSignal Extension method

    Typed insert-prefix signal for using the connect(signal:) methods

    Declaration

    Swift

    static var insertPrefixSignal: EntryCompletionSignalName { get }
  • Emitted when a match from the list is selected.

    The default behaviour is to replace the contents of the entry with the contents of the text column in the row pointed to by iter.

    Note that model is the model that was passed to [methodGtk.EntryCompletion.set_model].

    Note

    This represents the underlying match-selected signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onMatchSelected(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ model: TreeModelRef, _ iter: TreeIterRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    model

    the GtkTreeModel containing the matches

    iter

    a GtkTreeIter positioned at the selected match

    handler

    true if the signal has been handled Run the given callback whenever the matchSelected signal is emitted

  • matchSelectedSignal Extension method

    Typed match-selected signal for using the connect(signal:) methods

    Declaration

    Swift

    static var matchSelectedSignal: EntryCompletionSignalName { get }
  • onNoMatches(flags:handler:) Extension method

    Emitted when the filter model has zero number of rows in completion_complete method.

    In other words when GtkEntryCompletion is out of suggestions.

    Note

    This represents the underlying no-matches signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNoMatches(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the noMatches signal is emitted

  • noMatchesSignal Extension method

    Typed no-matches signal for using the connect(signal:) methods

    Declaration

    Swift

    static var noMatchesSignal: EntryCompletionSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::cell-area signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyCellArea(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyCellArea signal is emitted

  • notifyCellAreaSignal Extension method

    Typed notify::cell-area signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyCellAreaSignal: EntryCompletionSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::inline-completion signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyInlineCompletion(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyInlineCompletion signal is emitted

  • notifyInlineCompletionSignal Extension method

    Typed notify::inline-completion signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyInlineCompletionSignal: EntryCompletionSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::inline-selection signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyInlineSelection(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyInlineSelection signal is emitted

  • notifyInlineSelectionSignal Extension method

    Typed notify::inline-selection signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyInlineSelectionSignal: EntryCompletionSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::minimum-key-length signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyMinimumKeyLength(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyMinimumKeyLength signal is emitted

  • notifyMinimumKeyLengthSignal Extension method

    Typed notify::minimum-key-length signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyMinimumKeyLengthSignal: EntryCompletionSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::model signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyModel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyModel signal is emitted

  • notifyModelSignal Extension method

    Typed notify::model signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyModelSignal: EntryCompletionSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::popup-completion signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyPopupCompletion(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyPopupCompletion signal is emitted

  • notifyPopupCompletionSignal Extension method

    Typed notify::popup-completion signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyPopupCompletionSignal: EntryCompletionSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::popup-set-width signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyPopupSetWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyPopupSetWidth signal is emitted

  • notifyPopupSetWidthSignal Extension method

    Typed notify::popup-set-width signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyPopupSetWidthSignal: EntryCompletionSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::popup-single-match signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyPopupSingleMatch(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyPopupSingleMatch signal is emitted

  • notifyPopupSingleMatchSignal Extension method

    Typed notify::popup-single-match signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyPopupSingleMatchSignal: EntryCompletionSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::text-column signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyTextColumn(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyTextColumn signal is emitted

  • notifyTextColumnSignal Extension method

    Typed notify::text-column signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyTextColumnSignal: EntryCompletionSignalName { get }

EntryCompletion Class: EntryCompletionProtocol extension (methods and fields)

  • complete() Extension method

    Requests a completion operation, or in other words a refiltering of the current list with completions, using the current key.

    The completion list view will be updated accordingly.

    Declaration

    Swift

    @inlinable
    func complete()
  • computePrefix(key:) Extension method

    Computes the common prefix that is shared by all rows in completion that start with key.

    If no row matches key, nil will be returned. Note that a text column must have been set for this function to work, see [methodGtk.EntryCompletion.set_text_column] for details.

    Declaration

    Swift

    @inlinable
    func computePrefix(key: UnsafePointer<CChar>!) -> String!
  • getCompletionPrefix() Extension method

    Get the original text entered by the user that triggered the completion or nil if there’s no completion ongoing.

    Declaration

    Swift

    @inlinable
    func getCompletionPrefix() -> String!
  • getEntry() Extension method

    Gets the entry completion has been attached to.

    Declaration

    Swift

    @inlinable
    func getEntry() -> WidgetRef!
  • getInlineCompletion() Extension method

    Returns whether the common prefix of the possible completions should be automatically inserted in the entry.

    Declaration

    Swift

    @inlinable
    func getInlineCompletion() -> Bool
  • getInlineSelection() Extension method

    Returns true if inline-selection mode is turned on.

    Declaration

    Swift

    @inlinable
    func getInlineSelection() -> Bool
  • getMinimumKeyLength() Extension method

    Returns the minimum key length as set for completion.

    Declaration

    Swift

    @inlinable
    func getMinimumKeyLength() -> Int
  • getModel() Extension method

    Returns the model the GtkEntryCompletion is using as data source.

    Returns nil if the model is unset.

    Declaration

    Swift

    @inlinable
    func getModel() -> TreeModelRef!
  • getPopupCompletion() Extension method

    Returns whether the completions should be presented in a popup window.

    Declaration

    Swift

    @inlinable
    func getPopupCompletion() -> Bool
  • getPopupSetWidth() Extension method

    Returns whether the completion popup window will be resized to the width of the entry.

    Declaration

    Swift

    @inlinable
    func getPopupSetWidth() -> Bool
  • getPopupSingleMatch() Extension method

    Returns whether the completion popup window will appear even if there is only a single match.

    Declaration

    Swift

    @inlinable
    func getPopupSingleMatch() -> Bool
  • getTextColumn() Extension method

    Returns the column in the model of completion to get strings from.

    Declaration

    Swift

    @inlinable
    func getTextColumn() -> Int
  • insertPrefix() Extension method

    Requests a prefix insertion.

    Declaration

    Swift

    @inlinable
    func insertPrefix()
  • set(inlineCompletion:) Extension method

    Sets whether the common prefix of the possible completions should be automatically inserted in the entry.

    Declaration

    Swift

    @inlinable
    func set(inlineCompletion: Bool)
  • set(inlineSelection:) Extension method

    Sets whether it is possible to cycle through the possible completions inside the entry.

    Declaration

    Swift

    @inlinable
    func set(inlineSelection: Bool)
  • Sets the match function for completion to be func.

    The match function is used to determine if a row should or should not be in the completion list.

    Declaration

    Swift

    @inlinable
    func setMatchFunc(func: GtkEntryCompletionMatchFunc?, funcData: gpointer! = nil, funcNotify: GDestroyNotify?)
  • setMinimumKey(length:) Extension method

    Requires the length of the search key for completion to be at least length.

    This is useful for long lists, where completing using a small key takes a lot of time and will come up with meaningless results anyway (ie, a too large dataset).

    Declaration

    Swift

    @inlinable
    func setMinimumKey(length: Int)
  • set(model:) Extension method

    Sets the model for a GtkEntryCompletion.

    If completion already has a model set, it will remove it before setting the new model. If model is nil, then it will unset the model.

    Declaration

    Swift

    @inlinable
    func set(model: TreeModelRef? = nil)
  • set(model:) Extension method

    Sets the model for a GtkEntryCompletion.

    If completion already has a model set, it will remove it before setting the new model. If model is nil, then it will unset the model.

    Declaration

    Swift

    @inlinable
    func set<TreeModelT>(model: TreeModelT?) where TreeModelT : TreeModelProtocol
  • set(popupCompletion:) Extension method

    Sets whether the completions should be presented in a popup window.

    Declaration

    Swift

    @inlinable
    func set(popupCompletion: Bool)
  • set(popupSetWidth:) Extension method

    Sets whether the completion popup window will be resized to be the same width as the entry.

    Declaration

    Swift

    @inlinable
    func set(popupSetWidth: Bool)
  • set(popupSingleMatch:) Extension method

    Sets whether the completion popup window will appear even if there is only a single match.

    You may want to set this to false if you are using [propertyGtk.EntryCompletion:inline-completion].

    Declaration

    Swift

    @inlinable
    func set(popupSingleMatch: Bool)
  • setText(column:) Extension method

    Convenience function for setting up the most used case of this code: a completion list with just strings.

    This function will set up completion to have a list displaying all (and just) strings in the completion list, and to get those strings from column in the model of completion.

    This functions creates and adds a GtkCellRendererText for the selected column. If you need to set the text column, but don’t want the cell renderer, use g_object_set() to set the [propertyGtk.EntryCompletion:text-column] property directly.

    Declaration

    Swift

    @inlinable
    func setText(column: Int)
  • completionPrefix Extension method

    Get the original text entered by the user that triggered the completion or nil if there’s no completion ongoing.

    Declaration

    Swift

    @inlinable
    var completionPrefix: String! { get }
  • entry Extension method

    Gets the entry completion has been attached to.

    Declaration

    Swift

    @inlinable
    var entry: WidgetRef! { get }
  • inlineCompletion Extension method

    Returns whether the common prefix of the possible completions should be automatically inserted in the entry.

    Declaration

    Swift

    @inlinable
    var inlineCompletion: Bool { get nonmutating set }
  • inlineSelection Extension method

    Returns true if inline-selection mode is turned on.

    Declaration

    Swift

    @inlinable
    var inlineSelection: Bool { get nonmutating set }
  • minimumKeyLength Extension method

    Returns the minimum key length as set for completion.

    Declaration

    Swift

    @inlinable
    var minimumKeyLength: Int { get nonmutating set }
  • model Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var model: TreeModelRef! { get nonmutating set }
  • popupCompletion Extension method

    Returns whether the completions should be presented in a popup window.

    Declaration

    Swift

    @inlinable
    var popupCompletion: Bool { get nonmutating set }
  • popupSetWidth Extension method

    Returns whether the completion popup window will be resized to the width of the entry.

    Declaration

    Swift

    @inlinable
    var popupSetWidth: Bool { get nonmutating set }
  • popupSingleMatch Extension method

    Returns whether the completion popup window will appear even if there is only a single match.

    Declaration

    Swift

    @inlinable
    var popupSingleMatch: Bool { get nonmutating set }
  • textColumn Extension method

    Returns the column in the model of completion to get strings from.

    Declaration

    Swift

    @inlinable
    var textColumn: Int { get nonmutating set }