Image
Creates a new empty GtkImage widget.
Return
a newly created GtkImage widget.
Creates a new GtkImage displaying the file @filename.
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@Gdk.Texture.new_from_file to load the file yourself, then create the GtkImage from the texture.
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.
Return
a new GtkImage
Parameters
a filename
Creates a GtkImage displaying an icon from the current icon theme.
If the icon name isn’t known, a “broken image” icon will be displayed instead. If the current icon theme is changed, the icon will be updated appropriately.
Return
a new GtkImage displaying the themed icon
Parameters
an icon
Creates a GtkImage displaying an icon from the current icon theme.
If the icon name isn’t known, a “broken image” icon will be displayed instead. If the current icon theme is changed, the icon will be updated appropriately.
Return
a new GtkImage displaying the themed icon
Parameters
an icon name
Creates a new GtkImage displaying @paintable.
The GtkImage does not assume a reference to the paintable; you still need to unref it if you own references. GtkImage will add its own reference rather than adopting yours.
The GtkImage will track changes to the @paintable and update its size and contents in response to it.
Return
a new GtkImage
Parameters
a GdkPaintable
⚠️ Deprecated ⚠️
This is deprecated since version 4.12.
Use ctor@Gtk.Image.new_from_paintable and ctor@Gdk.Texture.new_for_pixbuf instead
Creates a new GtkImage displaying @pixbuf.
The GtkImage does not assume a reference to the pixbuf; you still need to unref it if you own references. GtkImage will add its own reference rather than adopting yours.
This is a helper for ctor@Gtk.Image.new_from_paintable, and you can't get back the exact pixbuf once this is called, only a texture.
Note that this function just creates an GtkImage from the pixbuf. The GtkImage created will not react to state changes. Should you want that, you should use ctor@Gtk.Image.new_from_icon_name.
Return
a new GtkImage
Parameters
a GdkPixbuf