GLib::LoadableIcon
module GLib::LoadableIcon
Extends the GLib::Icon interface and adds the ability to load icons from streams.
Instance Methods
load(size, cancellable = nil)
-
Loads a loadable icon. For the asynchronous version of this function, see
GLib::LoadableIcon#load_async.
- size: An integer
- cancellable: Optional GLib::Cancellable object, nil to ignore
- Returns: An Array containing a GLib::InputStream to read the icon from and a String containing the type of the loaded icon
load_async(size, cancellable = nil){ |result| … }
-
Loads an icon asynchronously. To finish this function, see
GLib::LoadableIcon#load_finish. For the synchronous, blocking version of
this function, see GLib::LoadableIcon#load.
- size: An integer
- cancellable: Optional GLib::Cancellable object, nil to ignore
- result: A GLib::AsyncResult
- Returns: self
load_finish(icon, res, *type)
-
Finishes an asynchronous icon load started in GLib::LoadableIcon#load_async.
- result: A GLib::AsyncResult
- Returns: An Array containing a GLib::InputStream to read the icon from and a String containing the type of the loaded icon
Keyword(s):
References:[index-ruby-gio2] [GLib::FileIcon] [index-ruby-glib2] [Ruby/GIO] [GLib::LoadableIcon] [GLib::Icon]