Class

GlyLoader

since: 1.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 GdkTexture. 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);
    printf ("Image height: %d\n", gdk_texture_get_height (texture));
    image_widget = gtk_image_new_from_paintable (GDK_PAINTABLE (texture));
  }
}

Available since: 1.0

Ancestors

Constructors

gly_loader_new

Creates a new GlyLoader.

since: 1.0

Instance methods

gly_loader_load

Synchronously loads an image and returns an GlyImage when successful.

since: 1.0

gly_loader_load_async

Asynchronous version of gly_loader_load().

since: 1.0

gly_loader_load_finish

Finishes the gly_image_next_frame_async() call.

since: 1.0

gly_loader_set_sandbox_selector

Selects which sandbox mechanism should be used. The default without calling this function is GlySandboxSelector.AUTO.

since: 1.0

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Gly.Loader:cancellable
No description available.

Gly.Loader:file
No description available.

Gly.Loader:sandbox-selector
No description available.

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.

Class structure

struct GlyLoaderClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.