EntryCompletionProtocol
public protocol EntryCompletionProtocol : ObjectProtocol, BuildableProtocol, CellLayoutProtocol
GtkEntryCompletion is an auxiliary object to be used in conjunction with
GtkEntry to provide the completion functionality. It implements the
GtkCellLayout 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
gtk_entry_completion_set_text_column()), but this can be overridden
with a custom match function (see gtk_entry_completion_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 GtkEntryCompletion::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 gtk_entry_set_completion().
In addition to regular completion matches, which will be inserted into the
entry when they are selected, GtkEntryCompletion also allows to display
“actions” in the popup window. Their appearance is similar to menuitems,
to differentiate them clearly from completion strings. When an action is
selected, the GtkEntryCompletion::action-activated signal is emitted.
GtkEntryCompletion uses a GtkTreeModelFilter model to represent the
subset of the entire model that is currently matching. While the
GtkEntryCompletion signals GtkEntryCompletion::match-selected and
GtkEntryCompletion::cursor-on-match take the original model and an
iter pointing to that model as arguments, other callbacks and signals
(such as GtkCellLayoutDataFuncs or GtkCellArea::apply-attributes)
will generally take the filter model as argument. As long as you are
only calling gtk_tree_model_get(), this will make no difference to
you. If for some reason, you need the original model, use
gtk_tree_model_filter_get_model(). Don’t forget to use
gtk_tree_model_filter_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.
-
Untyped pointer to the underlying
GtkEntryCompletioninstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
entry_completion_ptrDefault implementationTyped pointer to the underlying
GtkEntryCompletioninstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkEntryCompletioninstance.Declaration
Swift
var entry_completion_ptr: UnsafeMutablePointer<GtkEntryCompletion>! { get } -
Required Initialiser for types conforming to
EntryCompletionProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
EntryCompletionPropertyNamesource 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 : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a EntryCompletion property
Declaration
Swift
@inlinable func get(property: EntryCompletionPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) 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
propertythe property to get the value for
Return Value
the value of the named property
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
EntryCompletionSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: EntryCompletionSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe 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(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
EntryCompletionSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: EntryCompletionSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onActionActivated(flags:Extension methodhandler: ) Gets emitted when an action is activated.
Note
This represents the underlyingaction-activatedsignalDeclaration
Swift
@discardableResult @inlinable func onActionActivated(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ index: Int) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
indexthe index of the activated action
handlerThe signal handler to call Run the given callback whenever the
actionActivatedsignal is emitted -
actionActivatedSignalExtension methodTyped
action-activatedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var actionActivatedSignal: EntryCompletionSignalName { get } -
onCursorOnMatch(flags:Extension methodhandler: ) Gets 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
modelis the model that was passed togtk_entry_completion_set_model().Note
This represents the underlyingcursor-on-matchsignalDeclaration
Swift
@discardableResult @inlinable func onCursorOnMatch(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ model: TreeModelRef, _ iter: TreeIterRef) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
modelthe
GtkTreeModelcontaining the matchesitera
GtkTreeIterpositioned at the selected matchhandlertrueif the signal has been handled Run the given callback whenever thecursorOnMatchsignal is emitted -
cursorOnMatchSignalExtension methodTyped
cursor-on-matchsignal for using theconnect(signal:)methodsDeclaration
Swift
static var cursorOnMatchSignal: EntryCompletionSignalName { get } -
onInsertPrefix(flags:Extension methodhandler: ) Gets 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
prefixinto the entry - e.g. the entry used in theGtkFileChooserinserts only the part of the prefix up to the next ‘/’.Note
This represents the underlyinginsert-prefixsignalDeclaration
Swift
@discardableResult @inlinable func onInsertPrefix(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ prefix: String) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlertrueif the signal has been handled Run the given callback whenever theinsertPrefixsignal is emitted -
insertPrefixSignalExtension methodTyped
insert-prefixsignal for using theconnect(signal:)methodsDeclaration
Swift
static var insertPrefixSignal: EntryCompletionSignalName { get } -
onMatchSelected(flags:Extension methodhandler: ) Gets 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
modelis the model that was passed togtk_entry_completion_set_model().Note
This represents the underlyingmatch-selectedsignalDeclaration
Swift
@discardableResult @inlinable func onMatchSelected(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ model: TreeModelRef, _ iter: TreeIterRef) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
modelthe
GtkTreeModelcontaining the matchesitera
GtkTreeIterpositioned at the selected matchhandlertrueif the signal has been handled Run the given callback whenever thematchSelectedsignal is emitted -
matchSelectedSignalExtension methodTyped
match-selectedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var matchSelectedSignal: EntryCompletionSignalName { get } -
onNoMatches(flags:Extension methodhandler: ) Gets 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 underlyingno-matchessignalDeclaration
Swift
@discardableResult @inlinable func onNoMatches(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
noMatchessignal is emitted -
noMatchesSignalExtension methodTyped
no-matchessignal for using theconnect(signal:)methodsDeclaration
Swift
static var noMatchesSignal: EntryCompletionSignalName { get } -
onNotifyCellArea(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::cell-areasignalDeclaration
Swift
@discardableResult @inlinable func onNotifyCellArea(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyCellAreasignal is emitted -
notifyCellAreaSignalExtension methodTyped
notify::cell-areasignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyCellAreaSignal: EntryCompletionSignalName { get } -
onNotifyInlineCompletion(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::inline-completionsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyInlineCompletion(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyInlineCompletionsignal is emitted -
notifyInlineCompletionSignalExtension methodTyped
notify::inline-completionsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyInlineCompletionSignal: EntryCompletionSignalName { get } -
onNotifyInlineSelection(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::inline-selectionsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyInlineSelection(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyInlineSelectionsignal is emitted -
notifyInlineSelectionSignalExtension methodTyped
notify::inline-selectionsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyInlineSelectionSignal: EntryCompletionSignalName { get } -
onNotifyMinimumKeyLength(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::minimum-key-lengthsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMinimumKeyLength(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyMinimumKeyLengthsignal is emitted -
notifyMinimumKeyLengthSignalExtension methodTyped
notify::minimum-key-lengthsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyMinimumKeyLengthSignal: EntryCompletionSignalName { get } -
onNotifyModel(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::modelsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyModel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyModelsignal is emitted -
notifyModelSignalExtension methodTyped
notify::modelsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyModelSignal: EntryCompletionSignalName { get } -
onNotifyPopupCompletion(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::popup-completionsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPopupCompletion(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPopupCompletionsignal is emitted -
notifyPopupCompletionSignalExtension methodTyped
notify::popup-completionsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPopupCompletionSignal: EntryCompletionSignalName { get } -
onNotifyPopupSetWidth(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::popup-set-widthsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPopupSetWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPopupSetWidthsignal is emitted -
notifyPopupSetWidthSignalExtension methodTyped
notify::popup-set-widthsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPopupSetWidthSignal: EntryCompletionSignalName { get } -
onNotifyPopupSingleMatch(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::popup-single-matchsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPopupSingleMatch(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPopupSingleMatchsignal is emitted -
notifyPopupSingleMatchSignalExtension methodTyped
notify::popup-single-matchsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPopupSingleMatchSignal: EntryCompletionSignalName { get } -
onNotifyTextColumn(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::text-columnsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyTextColumn(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyTextColumnsignal is emitted -
notifyTextColumnSignalExtension methodTyped
notify::text-columnsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyTextColumnSignal: EntryCompletionSignalName { get }
-
complete()Extension methodRequests 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
completionthat start withkey. If no row matcheskey,nilwill be returned. Note that a text column must have been set for this function to work, seegtk_entry_completion_set_text_column()for details.Declaration
Swift
@inlinable func computePrefix(key: UnsafePointer<CChar>!) -> String! -
deleteAction(index:Extension method) Deletes the action at
index_fromcompletion’s action list.Note that
index_is a relative position and the position of an action may have changed since it was inserted.Declaration
Swift
@inlinable func deleteAction(index: Int) -
getCompletionPrefix()Extension methodGet the original text entered by the user that triggered the completion or
nilif there’s no completion ongoing.Declaration
Swift
@inlinable func getCompletionPrefix() -> String! -
getEntry()Extension methodGets the entry
completionhas been attached to.Declaration
Swift
@inlinable func getEntry() -> WidgetRef! -
getInlineCompletion()Extension methodReturns whether the common prefix of the possible completions should be automatically inserted in the entry.
Declaration
Swift
@inlinable func getInlineCompletion() -> Bool -
getInlineSelection()Extension methodReturns
trueif inline-selection mode is turned on.Declaration
Swift
@inlinable func getInlineSelection() -> Bool -
getMinimumKeyLength()Extension methodReturns the minimum key length as set for
completion.Declaration
Swift
@inlinable func getMinimumKeyLength() -> Int -
getModel()Extension methodReturns the model the
GtkEntryCompletionis using as data source. Returnsnilif the model is unset.Declaration
Swift
@inlinable func getModel() -> TreeModelRef! -
getPopupCompletion()Extension methodReturns whether the completions should be presented in a popup window.
Declaration
Swift
@inlinable func getPopupCompletion() -> Bool -
getPopupSetWidth()Extension methodReturns whether the completion popup window will be resized to the width of the entry.
Declaration
Swift
@inlinable func getPopupSetWidth() -> Bool -
getPopupSingleMatch()Extension methodReturns whether the completion popup window will appear even if there is only a single match.
Declaration
Swift
@inlinable func getPopupSingleMatch() -> Bool -
getTextColumn()Extension methodReturns the column in the model of
completionto get strings from.Declaration
Swift
@inlinable func getTextColumn() -> Int -
insertActionMarkup(index:Extension methodmarkup: ) Inserts an action in
completion’s action item list at positionindex_with markupmarkup.Declaration
Swift
@inlinable func insertActionMarkup(index: Int, markup: UnsafePointer<gchar>!) -
insertActionText(index:Extension methodtext: ) Inserts an action in
completion’s action item list at positionindex_with texttext. If you want the action item to have markup, usegtk_entry_completion_insert_action_markup().Note that
index_is a relative position in the list of actions and the position of an action can change when deleting a different action.Declaration
Swift
@inlinable func insertActionText(index: Int, text: UnsafePointer<gchar>!) -
insertPrefix()Extension methodRequests 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) -
setMatchFunc(func:Extension methodfuncData: funcNotify: ) Sets the match function for
completionto befunc. 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
completionto be at leastlength. 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. Ifcompletionalready has a model set, it will remove it before setting the new model. If model isnil, then it will unset the model.Declaration
Swift
@inlinable func set(model: TreeModelRef? = nil) -
set(model:Extension method) Sets the model for a
GtkEntryCompletion. Ifcompletionalready has a model set, it will remove it before setting the new model. If model isnil, 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
falseif you are using 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
completionto have a list displaying all (and just) strings in the completion list, and to get those strings fromcolumnin the model ofcompletion.This functions creates and adds a
GtkCellRendererTextfor the selected column. If you need to set the text column, but don’t want the cell renderer, useg_object_set()to set theGtkEntryCompletion:text-columnproperty directly.Declaration
Swift
@inlinable func setText(column: Int) -
completionPrefixExtension methodGet the original text entered by the user that triggered the completion or
nilif there’s no completion ongoing.Declaration
Swift
@inlinable var completionPrefix: String! { get } -
entryExtension methodGets the entry
completionhas been attached to.Declaration
Swift
@inlinable var entry: WidgetRef! { get } -
inlineCompletionExtension methodReturns whether the common prefix of the possible completions should be automatically inserted in the entry.
Declaration
Swift
@inlinable var inlineCompletion: Bool { get nonmutating set } -
inlineSelectionExtension methodReturns
trueif inline-selection mode is turned on.Declaration
Swift
@inlinable var inlineSelection: Bool { get nonmutating set } -
minimumKeyLengthExtension methodReturns the minimum key length as set for
completion.Declaration
Swift
@inlinable var minimumKeyLength: Int { get nonmutating set } -
modelExtension methodUndocumented
Declaration
Swift
@inlinable var model: TreeModelRef! { get nonmutating set } -
popupCompletionExtension methodReturns whether the completions should be presented in a popup window.
Declaration
Swift
@inlinable var popupCompletion: Bool { get nonmutating set } -
popupSetWidthExtension methodReturns whether the completion popup window will be resized to the width of the entry.
Declaration
Swift
@inlinable var popupSetWidth: Bool { get nonmutating set } -
popupSingleMatchExtension methodReturns whether the completion popup window will appear even if there is only a single match.
Declaration
Swift
@inlinable var popupSingleMatch: Bool { get nonmutating set } -
textColumnExtension methodReturns the column in the model of
completionto get strings from.Declaration
Swift
@inlinable var textColumn: Int { get nonmutating set } -
parentInstanceExtension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GObject { get }
View on GitHub
Install in Dash
EntryCompletionProtocol Protocol Reference