Class
GlyLoader
since: 2.0
Description [src]
final class Gly.Loader : GObject.Object
{
/* No available fields */
}
GlyLoader prepares loading an image.
The following example shows how to obtain a Gdk.Texture. It uses
GlyGtk4
for this.
#include <glycin-gtk4.h>
file = g_file_new_for_path ("test.png");
loader = gly_loader_new (file);
image = gly_loader_load (loader, NULL);
if (image)
{
frame = gly_image_next_frame (image, NULL);
if (frame)
{
texture = gly_gtk_frame_get_texture (frame);
g_print ("Image height: %d\n", gdk_texture_get_height (texture));
image_widget = gtk_image_new_from_paintable (GDK_PAINTABLE (texture));
}
}
Available since: 2.0
Functions
gly_loader_get_mime_types
Returns a list of MIME types currently supported for loading images.
since: 2.0
Instance methods
gly_loader_set_accepted_memory_formats
Sets which memory formats can be returned by the loader.
since: 2.0
gly_loader_set_sandbox_selector
Selects which sandbox mechanism should be used. The default without calling this function is GlySandboxSelector.AUTO.
since: 2.0
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.