Gtk.Entry_Completion.Set_Match_Func_User_Data

Entities

Generic formal parameters

Access Types

Subprograms

Description

Destroy

procedure Destroy (Data : in out User_Data_Type)
Parameters
Data

Gtk_Entry_Completion_Match_Func

type Gtk_Entry_Completion_Match_Func is access function
  (Completion : not null access Gtk.Entry_Completion.Gtk_Entry_Completion_Record'Class;
   Key        : UTF8_String;
   Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
   User_Data  : User_Data_Type) return Boolean;

A function which decides whether the row indicated by Iter matches a given Key, and should be displayed as a possible completion for Key. Note that Key is normalized and case-folded (see g_utf8_normalize and g_utf8_casefold). If this is not appropriate, match functions have access to the unmodified key via gtk_entry_get_text (GTK_ENTRY (gtk_entry_completion_get_entry ())).

Parameters
Completion

the Gtk.Entry_Completion.Gtk_Entry_Completion

Key

the string to match, normalized and case-folded

Iter

a Gtk.Tree_Model.Gtk_Tree_Iter indicating the row to match

User_Data

user data given to Gtk.Entry_Completion.Set_Match_Func

Return Value

True if Iter should be displayed as a possible completion for Key

Set_Match_Func

procedure Set_Match_Func
   (Completion : not null access Gtk.Entry_Completion.Gtk_Entry_Completion_Record'Class;
    Func       : Gtk_Entry_Completion_Match_Func;
    Func_Data  : User_Data_Type)

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. Since: gtk+ 2.4

Parameters
Completion
Func

the Gtk_Entry_Completion_Match_Func to use

Func_Data

user data for Func

User_Data_Type

type User_Data_Type (<>) is private;