Effectively drop empty newlines at end of files (missing from rev 535)
[geeqie.git] / src / image-load.h
1 /*
2  * Geeqie
3  * (C) 2004 John Ellis
4  *
5  * Author: John Ellis
6  *
7  * This software is released under the GNU General Public License (GNU GPL).
8  * Please read the included file COPYING for more information.
9  * This software comes with no warranty of any kind, use at your own risk!
10  */
11
12
13 #ifndef IMAGE_LOAD_H
14 #define IMAGE_LOAD_H
15
16
17 ImageLoader *image_loader_new(FileData *fd);
18
19 /* we don't want full FileData for thumbnails */
20 ImageLoader *image_loader_new_from_path(const gchar *path);
21 void image_loader_free(ImageLoader *il);
22
23 void image_loader_set_area_ready_func(ImageLoader *il,
24                                       void (*func_area_ready)(ImageLoader *, guint, guint, guint, guint, gpointer),
25                                       gpointer data_area_ready);
26 void image_loader_set_error_func(ImageLoader *il,
27                                  void (*func_error)(ImageLoader *, gpointer),
28                                  gpointer data_error);
29 void image_loader_set_percent_func(ImageLoader *il,
30                                    void (*func_percent)(ImageLoader *, gdouble, gpointer),
31                                    gpointer data_percent);
32
33 /* Speed up loading when you only need at most width x height size image,
34  * only the jpeg GdkPixbuf loader benefits from it - so there is no
35  * guarantee that the image will scale down to the requested size..
36  */
37 void image_loader_set_requested_size(ImageLoader *il, gint width, gint height);
38
39 void image_loader_set_buffer_size(ImageLoader *il, guint size);
40
41 /* this only has effect if used before image_loader_start()
42  * default is G_PRIORITY_DEFAULT_IDLE
43  */
44 void image_loader_set_priority(ImageLoader *il, gint priority);
45
46 gint image_loader_start(ImageLoader *il, void (*func_done)(ImageLoader *, gpointer), gpointer data_done);
47
48
49 GdkPixbuf *image_loader_get_pixbuf(ImageLoader *il);
50 gchar *image_loader_get_format(ImageLoader *il);
51 gdouble image_loader_get_percent(ImageLoader *il);
52 gint image_loader_get_is_done(ImageLoader *il);
53
54 gint image_load_dimensions(FileData *fd, gint *width, gint *height);
55
56 #endif