Gtk.Recent_Filter.Add_Custom_User_Data

Entities

Generic formal parameters

Access Types

Subprograms

Description

Add_Custom

procedure Add_Custom
   (Filter       : not null access Gtk.Recent_Filter.Gtk_Recent_Filter_Record'Class;
    Needed       : Gtk.Recent_Filter.Gtk_Recent_Filter_Flags;
    Func         : Gtk_Recent_Filter_Func;
    Data         : User_Data_Type;
    Data_Destroy : Glib.G_Destroy_Notify_Address)

Adds a rule to a filter that allows resources based on a custom callback function. The bitfield Needed which is passed in provides information about what sorts of information that the filter function needs; this allows GTK+ to avoid retrieving expensive information when it isn't needed by the filter. Since: gtk+ 2.10

Parameters
Filter
Needed

bitfield of flags indicating the information that the custom filter function needs.

Func

callback function; if the function returns True, then the file will be displayed.

Data

data to pass to Func

Data_Destroy

function to call to free Data when it is no longer needed.

Destroy

procedure Destroy (Data : in out User_Data_Type)
Parameters
Data

Gtk_Recent_Filter_Func

type Gtk_Recent_Filter_Func is access function
  (Filter_Info : Gtk.Recent_Filter.Gtk_Recent_Filter_Info;
   User_Data   : User_Data_Type) return Boolean;

The type of function that is used with custom filters, see Gtk.Recent_Filter.Add_Custom.

Parameters
Filter_Info

a Gtk.Recent_Filter.Gtk_Recent_Filter_Info that is filled according to the Needed flags passed to Gtk.Recent_Filter.Add_Custom

User_Data

user data passed to Gtk.Recent_Filter.Add_Custom

Return Value

True if the file should be displayed

User_Data_Type

type User_Data_Type (<>) is private;