Extends the Glib.G_Icon.G_Icon interface and adds the ability to load icons from streams.
function "+" (W : Gloadable_Icon) return Gloadable_Icon
type Gasync_Ready_Callback is access procedure
(Source_Object : access Glib.Object.GObject_Record'Class;
Res : Glib.G_Async_Result);
Type definition for a function that will be called back when an asynchronous operation within GIO has been completed. Gasync_Ready_Callback callbacks from Gtask.Gtask are guaranteed to be invoked in a later iteration of the thread-default main context (see [methodGlib.MainContext.push_thread_default]) where the Gtask.Gtask was created. All other users of Gasync_Ready_Callback must likewise call it asynchronously in a later iteration of the main context. The asynchronous operation is guaranteed to have held a reference to Source_Object from the time when the *_async function was called, until after this callback returns.
the object the asynchronous operation was started with.
a Glib.G_Async_Result.
function Get_Type return Glib.GType
type Gloadable_Icon is new Glib.Types.GType_Interface;
function Load
(Self : Gloadable_Icon;
Size : Glib.Gint;
The_Type : access UTF8_String := null;
Cancellable : access Glib.Cancellable.Gcancellable_Record'Class;
Error : out Glib.Error.GError)
return Glib.Input_Stream.Ginput_Stream
Loads a loadable icon. For the asynchronous version of this function, see Glib.Loadable_Icon.Load_Async.
an integer.
a location to store the type of the loaded icon, null to ignore.
optional Glib.Cancellable.Gcancellable object, null to ignore.
the return location for a recoverable error
a Glib.Input_Stream.Ginput_Stream to read the icon from. Has transfer-ownership='full'.
procedure Load_Async
(Self : Gloadable_Icon;
Size : Glib.Gint;
Cancellable : access Glib.Cancellable.Gcancellable_Record'Class;
Callback : Gasync_Ready_Callback)
Loads an icon asynchronously. To finish this function, see Glib.Loadable_Icon.Load_Finish. For the synchronous, blocking version of this function, see Glib.Loadable_Icon.Load.
an integer.
optional Glib.Cancellable.Gcancellable object, null to ignore.
a Gasync_Ready_Callback to call when the request is satisfied
function Load_Finish
(Self : Gloadable_Icon;
Res : Glib.G_Async_Result;
The_Type : access UTF8_String := null;
Error : out Glib.Error.GError)
return Glib.Input_Stream.Ginput_Stream
Finishes an asynchronous icon load started in Glib.Loadable_Icon.Load_Async.
a Glib.G_Async_Result.
a location to store the type of the loaded icon, null to ignore.
the return location for a recoverable error
a Glib.Input_Stream.Ginput_Stream to read the icon from. Has transfer-ownership='full'.
subtype Loadable_Icon_Interface_Descr is Glib.Object.Interface_Description;
Null_Gloadable_Icon : constant Gloadable_Icon;
procedure Set_Load
(Self : Loadable_Icon_Interface_Descr;
Handler : Virtual_Load)
procedure Set_Load_Async
(Self : Loadable_Icon_Interface_Descr;
Handler : Virtual_Load_Async)
procedure Set_Load_Finish
(Self : Loadable_Icon_Interface_Descr;
Handler : Virtual_Load_Finish)
See Glib.Object.Add_Interface
type Virtual_Load is access function
(Self : Gloadable_Icon;
Size : Glib.Gint;
The_Type : access Gtkada.Types.Chars_Ptr;
Cancellable : System.Address;
Error : out Glib.Error.GError) return System.Address;
Loads a loadable icon. For the asynchronous version of this function, see Glib.Loadable_Icon.Load_Async.
an integer.
a location to store the type of the loaded icon, null to ignore.
optional Glib.Cancellable.Gcancellable object, null to ignore.
the return location for a recoverable error
a Glib.Input_Stream.Ginput_Stream to read the icon from. Has transfer-ownership='full'.
type Virtual_Load_Async is access procedure
(Self : Gloadable_Icon;
Size : Glib.Gint;
Cancellable : System.Address;
Callback : System.Address;
User_Data : System.Address);
Loads an icon asynchronously. To finish this function, see Glib.Loadable_Icon.Load_Finish. For the synchronous, blocking version of this function, see Glib.Loadable_Icon.Load.
an integer.
optional Glib.Cancellable.Gcancellable object, null to ignore.
a Gasync_Ready_Callback to call when the request is satisfied
the data to pass to callback function
type Virtual_Load_Finish is access function
(Self : Gloadable_Icon;
Res : Glib.G_Async_Result;
The_Type : access Gtkada.Types.Chars_Ptr;
Error : out Glib.Error.GError) return System.Address;
Finishes an asynchronous icon load started in Glib.Loadable_Icon.Load_Async.
a Glib.G_Async_Result.
a location to store the type of the loaded icon, null to ignore.
the return location for a recoverable error
a Glib.Input_Stream.Ginput_Stream to read the icon from. Has transfer-ownership='full'.