Compilation Units
Tagged Types
function Connect
(Self : access Glib.Cancellable.Gcancellable_Record'Class;
Callback : Gcallback;
Data : User_Data_Type) return Gulong
Convenience function to connect to the cancelled signal, handling the race with concurrent cancellation. Callback is called at most once: before Connect returns if Self is already cancelled, or when Self is cancelled in some thread. Connect_User_Data copies Data into a private closure. Its generic Destroy procedure is called exactly once when the handler is disconnected or Self is finalized, or immediately after Callback returns if Self was already cancelled. Use that generic procedure to release Ada data; the C destroy notifier is managed by GtkAda. Since GLib 2.40, the lock protecting Self is not held when Callback runs, so Callback may itself invoke Cancel. Since: gtk+ 2.22
The Gcallback to connect.
Data to pass to Callback.
The id of the signal handler or 0 if Cancellable has already been cancelled.
procedure Destroy (Data : in out User_Data_Type)
type Gcallback is access procedure (Data : User_Data_Type);
Callback invoked when the cancellable is cancelled.
type User_Data_Type (<>) is private;