## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Generic_Sources (generic)

- Goto spec source

# Description

    generic
          type Data_Type (<>) is private;
       package Generic_Sources is

# Types

### Data_Type

- Goto declaration in source

    type Data_Type (<>) is private;

### G_Source_Func

- Goto declaration in source

    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.

### Destroy_Notify

- Goto declaration in source

    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);

# Subprograms & Entries

### Idle_Add

- Goto spec in source

    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.

### Timeout_Add

- Goto spec in source

    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).

### Set_Callback

- Goto spec in source

    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.