Compilation Units
Tagged Types
procedure Destroy (Data : in out User_Data_Type)
type Gtk_Map_List_Model_Map_User_Func is access function
(Item : Glib.Object.GObject;
User_Data : User_Data_Type) return Glib.Object.GObject;
User function that is called to map an Item of the original model to an item expected by the map model. The returned items must conform to the item type of the model they are used with. Parameter Item has transfer-ownership='full' Parameter Item has transfer-ownership='full'
The item to map
user data
function Gtk_Map_List_Model_New_User
(Model : Glib.List_Model.Glist_Model;
Map_Func : Gtk_Map_List_Model_Map_User_Func;
User_Data : User_Data_Type)
return Gtk_Map_List_Model
Creates a new filter using the given function to filter items. If Match_Func is NULL, the filter matches all items. If the filter func changes its filtering behavior, [methodGtk.Filter.changed] needs to be called. @param Match_Func function to filter items
procedure Gtk_New_User
(Self : out Gtk_Map_List_Model;
Model : Glib.List_Model.Glist_Model;
Map_Func : Gtk_Map_List_Model_Map_User_Func;
User_Data : User_Data_Type)
procedure Initialize_User
(Self : not null access Gtk_Map_List_Model_Record'Class;
Model : Glib.List_Model.Glist_Model;
Map_Func : Gtk_Map_List_Model_Map_User_Func;
User_Data : User_Data_Type)
Creates a new filter using the given function to filter items. If Match_Func is NULL, the filter matches all items. If the filter func changes its filtering behavior, [methodGtk.Filter.changed] needs to be called. Initialize does nothing if the object was already created with another call to Initialize* or G_New. @param Match_Func function to filter items
user data to pass to Match_Func
procedure Set_Map_Func
(Self : not null access Gtk.Map_List_Model.Gtk_Map_List_Model_Record'Class;
Map_Func : Gtk_Map_List_Model_Map_User_Func;
User_Data : User_Data_Type)
Sets the function used to map items. The function will be called whenever an item needs to be mapped and must return the item to use for the given input item. Note that GtkMapListModel may call this function multiple times on the same item, because it may delete items it doesn't need anymore. GTK makes no effort to ensure that Map_Func conforms to the item type of Self. It assumes that the caller knows what they are doing and the map function returns items of the appropriate type.
map function
user data passed to Map_Func
type User_Data_Type (<>) is private;