Glib.Object.User_Data_Closure

Entities

Generic formal parameters

Record Types

Access Types

Subprograms

Generic Instantiations

Description

This package is meant for internal use in GtkAda application. It provides a convenient wrapper around user-provided data, to be passed to callbacks.

Build

function Build
   (Func : System.Address; Data : User_Data_Type)
   return System.Address

Allocate a new user data. It returns an access to Internal_Data_Access, but in a form easier to pass to a C function.

Parameters
Func
Data
Return Value

Convert

function Convert is new Ada.Unchecked_Conversion
   (System.Address, Internal_Data_Access);

Data_Access

type Data_Access is access all User_Data_Type;

Destroy

procedure Destroy (Data : in out User_Data_Type)

This package is meant for internal use in GtkAda application. It provides a convenient wrapper around user-provided data, to be passed to callbacks.

Parameters
Data

Free_Data

procedure Free_Data (Data : System.Address)

Callback suitable for calling from C, to free user data

Parameters
Data

Internal_Data

type Internal_Data is record
   Func       : System.Address;
   Data       : Data_Access;
end record;
Record fields
Func

The actual user callback

Data

Internal_Data_Access

type Internal_Data_Access is access all Internal_Data;

User_Data_Type

type User_Data_Type (<>) is private;