Icon
Object Hierarchy:
Description:
public interface Icon :
Object
GIconIface is used to implement GIcon types for various different systems.
See ThemedIcon and
LoadableIcon for examples of how to implement this interface.
Example:
public static int main (string[] args) {
if (args.length != 2) {
stdout.printf ("%s FILE\n", args[0]);
return 0;
}
MainLoop loop = new MainLoop ();
File file = File.new_for_commandline_arg (args[1]);
file.query_info_async.begin ("standard::icon", 0, Priority.DEFAULT, null, (obj, res) => {
try {
FileInfo info = file.query_info_async.end (res);
Icon icon = info.get_icon ();
stdout.printf ("%s\n", icon.to_string ());
} catch (Error e) {
stdout.printf ("Error: %s\n", e.message);
}
loop.quit ();
});
loop.run ();
return 0;
}
valac --pkg gio-2.0 GLib.File.query_info_async.vala
All known implementing classes:
All known sub-interfaces:
Content:
Static methods:
Methods:
- public abstract bool equal (Icon? icon2)
Checks if two icons are equal.
- public virtual Icon? from_tokens (string[] tokens, int version) throws Error
- public abstract uint hash ()
Gets a hash for an icon.
- public string? to_string ()
Generates a textual representation of icon that can be used
for serialization such as when passing icon to a different process or saving it to persistent storage.
- public virtual bool to_tokens (GenericArray<string> tokens, out int out_version)
Generates a textual representation of icon that can be used
for serialization such as when passing icon to a different process or saving it to persistent storage.
Inherited Members:
All known members inherited from class GLib.Object