Glib.Main.Generic_Sources

Entities

Generic formal parameters

Access Types

Subprograms

Description

Data_Type

type Data_Type (<>) is private;

Destroy_Notify

type Destroy_Notify is access  procedure (Data : in out Data_Type);

Notify is called just prior to the destruction of Data. It is also called if the idle or timeout is destroyed through a call to Remove (Id);

Parameters
Data

Free_Data

procedure Free_Data (D : System.Address)
Parameters
D

G_Source_Func

type G_Source_Func is access
  function (Data : Data_Type) return Boolean;

If the function returns FALSE it is automatically removed from the list of event sources and will not be called again.

Parameters
Data
Return Value

General_Cb

function General_Cb (D : System.Address) return Gint
Parameters
D
Return Value

Idle_Add

function Idle_Add
  (Func     : G_Source_Func;
   Data     : Data_Type;
   Priority : G_Priority := Priority_Default_Idle;
   Notify   : Destroy_Notify := null) return G_Source_Id

Adds a function to be called whenever there are no higher priority events pending.

Parameters
Func
Data
Priority
Notify
Return Value

Set_Callback

procedure Set_Callback
  (Source   : G_Source;
   Func     : G_Source_Func;
   Data     : Data_Type;
   Notify   : Destroy_Notify := null)

Sets the callback function for a source. The callback for a source is called from the source's dispatch function.

The exact type of func depends on the type of source; ie. you should not count on func being called with data as its first parameter.

Typically, you won't use this function. Instead use functions specific to the type of source you are using.

Parameters
Source
Func
Data
Notify

Timeout_Add

function Timeout_Add
  (Interval : Guint;
   Func     : G_Source_Func;
   Data     : Data_Type;
   Priority : G_Priority := Priority_Default;
   Notify   : Destroy_Notify := null) return G_Source_Id

Adds a function to be called at regular intervals (in milliseconds).

Parameters
Interval
Func
Data
Priority
Notify
Return Value