Picture.for_file


Description:

[ CCode ( has_construct_function = false , type = "GtkWidget*" ) ]
public Picture.for_file (File? file)

Creates a new `GtkPicture` displaying the given file.

If the file isn’t found or can’t be loaded, the resulting `GtkPicture` is empty.

If you need to detect failures to load the file, use [[email protected]_from_file] to load the file yourself, then create the `GtkPicture` from the texture.

Parameters:

file

a `GFile`

Returns:

a new `GtkPicture`




2022 vala-language.org