<doc_ignore>
type Data_Type (<>) is private;
procedure Free_Data (Data : System.Address)
Internal procedure used to free user data in the package body
function Get
(Object : access GObject_Record'Class;
Id : Glib.GQuark) return Data_Type
Same function as Get above, but uses directly the Quark associated with the string, which speeds up the access time significantly.
function Get
(Object : access GObject_Record'Class;
Id : Glib.GQuark;
Default : Data_Type) return Data_Type
Same function as Get above, but uses directly the Quark associated with the string, which speeds up the access time significantly.
function Get
(Object : access GObject_Record'Class;
Id : String := "user_data") return Data_Type
Get the information associated with the key ID. Raise Gtkada.Types.Data_Error if there is none.
function Get
(Object : access GObject_Record'Class;
Id : String := "user_data";
Default : Data_Type) return Data_Type
Get the information associated with the key ID. Return Default instead of raising an exception if there is no such user data
function Is_Set
(Object : access GObject_Record'Class;
Id : String := "user_data") return Boolean
Whether the given user data was set on the object.
type On_Destroyed_Callback is access procedure (Data : Data_Type);
On_Destroyed is called when the data is overridden in the object, by an other object with the same ID, or when the object itself is destroyed
procedure Remove
(Object : access GObject_Record'Class; Id : Glib.GQuark)
Same function as Remove above, but uses directly the Quark associated with the string, which speeds up the access time significantly.
procedure Remove
(Object : access GObject_Record'Class; Id : String := "user_data")
Remove some data from the object
procedure Set
(Object : access GObject_Record'Class;
Data : Data_Type;
Id : Glib.GQuark;
On_Destroyed : On_Destroyed_Callback := null)
Same function as Set above, but uses directly the Quark associated with the string, which speeds up the access time significantly.
procedure Set
(Object : access GObject_Record'Class;
Data : Data_Type;
Id : String := "user_data";
On_Destroyed : On_Destroyed_Callback := null)
Associate some new user data with the object. The strings starting with "gtkada_" are reserved for GtkAda's internal use, please avoid using them.