4 * Copyright (C) 2008 The Geeqie Team
8 * This software is released under the GNU General Public License (GNU GPL).
9 * Please read the included file COPYING for more information.
10 * This software comes with no warranty of any kind, use at your own risk!
17 #define TYPE_IMAGE_LOADER (image_loader_get_type())
19 //typedef struct _ImageLoader ImageLoader;
20 typedef struct _ImageLoaderClass ImageLoaderClass;
37 gint requested_height;
44 GdkPixbufLoader *loader;
47 GList *area_param_list;
48 GList *area_param_delayed_list;
50 gint delay_area_ready;
55 GCond *can_destroy_cond;
59 gint read_buffer_size;
60 gint idle_read_loop_count;
63 struct _ImageLoaderClass {
67 void (*area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer);
68 void (*error)(ImageLoader *, gpointer);
69 void (*done)(ImageLoader *, gpointer);
70 void (*percent)(ImageLoader *, gdouble, gpointer);
73 GType image_loader_get_type(void);
75 ImageLoader *image_loader_new(FileData *fd);
77 void image_loader_free(ImageLoader *il);
79 /* delay area_ready signals */
80 void image_loader_delay_area_ready(ImageLoader *il, gint enable);
82 /* Speed up loading when you only need at most width x height size image,
83 * only the jpeg GdkPixbuf loader benefits from it - so there is no
84 * guarantee that the image will scale down to the requested size..
86 void image_loader_set_requested_size(ImageLoader *il, gint width, gint height);
88 void image_loader_set_buffer_size(ImageLoader *il, guint size);
90 /* this only has effect if used before image_loader_start()
91 * default is G_PRIORITY_DEFAULT_IDLE
93 void image_loader_set_priority(ImageLoader *il, gint priority);
95 gint image_loader_start(ImageLoader *il);
98 GdkPixbuf *image_loader_get_pixbuf(ImageLoader *il);
99 gchar *image_loader_get_format(ImageLoader *il);
100 gdouble image_loader_get_percent(ImageLoader *il);
101 gint image_loader_get_is_done(ImageLoader *il);
102 FileData *image_loader_get_fd(ImageLoader *il);
103 gint image_loader_get_shrunk(ImageLoader *il);
105 gint image_load_dimensions(FileData *fd, gint *width, gint *height);
108 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */