Image.from_resource
Description:
[ CCode ( has_construct_function = false , type = "GtkWidget*" ) ]
public Image.from_resource (string resource_path)
public Image.from_resource (string resource_path)
Creates a new `GtkImage` displaying the resource file resource_path
.
If the file isn’t found or can’t be loaded, the resulting `GtkImage` will display a “broken image” icon. This function never returns null, it always returns a valid `GtkImage` widget.
If you need to detect failures to load the file, use [ctor@GdkPixbuf.Pixbuf.new_from_file] to load the file yourself, then create the `GtkImage` from the pixbuf.
The storage type (see [method@Gtk.Image.get_storage_type]) of the returned image is not defined, it will be whatever is appropriate for displaying the file.
Parameters:
resource_path |
a resource path |
Returns:
a new `GtkImage` |