9
|
1 /*
|
196
|
2 * Geeqie
|
9
|
3 * (C) 2004 John Ellis
|
475
|
4 * Copyright (C) 2008 The Geeqie Team
|
9
|
5 *
|
|
6 * Author: John Ellis
|
|
7 *
|
|
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!
|
|
11 */
|
|
12
|
|
13
|
|
14 #ifndef IMAGE_LOAD_H
|
|
15 #define IMAGE_LOAD_H
|
|
16
|
|
17
|
138
|
18 ImageLoader *image_loader_new(FileData *fd);
|
|
19
|
|
20 /* we don't want full FileData for thumbnails */
|
|
21 ImageLoader *image_loader_new_from_path(const gchar *path);
|
9
|
22 void image_loader_free(ImageLoader *il);
|
|
23
|
|
24 void image_loader_set_area_ready_func(ImageLoader *il,
|
|
25 void (*func_area_ready)(ImageLoader *, guint, guint, guint, guint, gpointer),
|
|
26 gpointer data_area_ready);
|
|
27 void image_loader_set_error_func(ImageLoader *il,
|
|
28 void (*func_error)(ImageLoader *, gpointer),
|
|
29 gpointer data_error);
|
890
|
30 void image_loader_set_done_func(ImageLoader *il,
|
|
31 void (*func_done)(ImageLoader *, gpointer),
|
|
32 gpointer data_done);
|
9
|
33 void image_loader_set_percent_func(ImageLoader *il,
|
|
34 void (*func_percent)(ImageLoader *, gdouble, gpointer),
|
|
35 gpointer data_percent);
|
|
36
|
|
37 /* Speed up loading when you only need at most width x height size image,
|
|
38 * only the jpeg GdkPixbuf loader benefits from it - so there is no
|
|
39 * guarantee that the image will scale down to the requested size..
|
|
40 */
|
|
41 void image_loader_set_requested_size(ImageLoader *il, gint width, gint height);
|
|
42
|
|
43 void image_loader_set_buffer_size(ImageLoader *il, guint size);
|
|
44
|
|
45 /* this only has effect if used before image_loader_start()
|
|
46 * default is G_PRIORITY_DEFAULT_IDLE
|
|
47 */
|
|
48 void image_loader_set_priority(ImageLoader *il, gint priority);
|
|
49
|
|
50 gint image_loader_start(ImageLoader *il, void (*func_done)(ImageLoader *, gpointer), gpointer data_done);
|
|
51
|
|
52
|
|
53 GdkPixbuf *image_loader_get_pixbuf(ImageLoader *il);
|
|
54 gchar *image_loader_get_format(ImageLoader *il);
|
|
55 gdouble image_loader_get_percent(ImageLoader *il);
|
|
56 gint image_loader_get_is_done(ImageLoader *il);
|
|
57
|
138
|
58 gint image_load_dimensions(FileData *fd, gint *width, gint *height);
|
9
|
59
|
|
60 #endif
|