cb87f465be868576e9a22c22a022bb39ebc646d7
[geeqie.git] / src / image.h
1 /*
2  * GQview
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_H
14 #define IMAGE_H
15
16
17 ImageWindow *image_new(gint frame);
18
19 /* additional setup */
20 void image_attach_window(ImageWindow *imd, GtkWidget *window,
21                          const gchar *title, const gchar *title_right, gint show_zoom);
22 void image_set_update_func(ImageWindow *imd,
23                            void (*func)(ImageWindow *imd, gpointer data),
24                            gpointer data);
25 void image_set_button_func(ImageWindow *imd,
26         void (*func)(ImageWindow *, gint button, guint32 time, gdouble x, gdouble y, guint state, gpointer),
27         gpointer data);
28 void image_set_scroll_func(ImageWindow *imd,
29         void (*func)(ImageWindow *, GdkScrollDirection direction, guint32 time, gdouble x, gdouble y, guint state, gpointer),
30         gpointer data);
31 void image_set_complete_func(ImageWindow *imd,
32                              void (*func)(ImageWindow *, gint preload, gpointer),
33                              gpointer data);
34 void image_set_new_func(ImageWindow *imd,
35                         void (*func)(ImageWindow *, gpointer),
36                         gpointer data);
37
38 /* path, name */
39 const gchar *image_get_path(ImageWindow *imd);
40 const gchar *image_get_name(ImageWindow *imd);
41
42 /* merely changes path string, does not change the image! */
43 void image_set_path(ImageWindow *imd, const gchar *newpath);
44
45 /* load a new image */
46 void image_change_path(ImageWindow *imd, const gchar *path, gdouble zoom);
47 void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom);
48 void image_change_from_collection(ImageWindow *imd, CollectionData *cd, CollectInfo *info, gdouble zoom);
49 CollectionData *image_get_collection(ImageWindow *imd, CollectInfo **info);
50 void image_change_from_image(ImageWindow *imd, ImageWindow *source);
51
52 /* manipulation */
53 void image_area_changed(ImageWindow *imd, gint x, gint y, gint width, gint height);
54 void image_reload(ImageWindow *imd);
55 void image_scroll(ImageWindow *imd, gint x, gint y);
56 void image_alter(ImageWindow *imd, AlterType type);
57
58 /* zoom */
59 void image_zoom_adjust(ImageWindow *imd, gdouble increment);
60 void image_zoom_adjust_at_point(ImageWindow *imd, gdouble increment, gint x, gint y);
61 void image_zoom_set(ImageWindow *imd, gdouble zoom);
62 void image_zoom_set_fill_geometry(ImageWindow *imd, gint vertical);
63 gdouble image_zoom_get(ImageWindow *imd);
64 gdouble image_zoom_get_real(ImageWindow *imd);
65 gchar *image_zoom_get_as_text(ImageWindow *imd);
66 gdouble image_zoom_get_default(ImageWindow *imd, gint mode);
67
68 /* read ahead, pass NULL to cancel */
69 void image_prebuffer_set(ImageWindow *imd, const gchar *path);
70
71 /* auto refresh, interval is 1/1000 sec, 0 uses default, -1 disables */
72 void image_auto_refresh(ImageWindow *imd, gint interval);
73
74 /* allow top window to be resized ? */
75 void image_top_window_set_sync(ImageWindow *imd, gint allow_sync);
76
77 /* background of image */
78 void image_background_set_black(ImageWindow *imd, gint black);
79 void image_background_set_color(ImageWindow *imd, GdkColor *color);
80
81 /* set delayed page flipping */
82 void image_set_delay_flip(ImageWindow *imd, gint delay);
83
84 /* wallpaper util */
85 void image_to_root_window(ImageWindow *imd, gint scaled);
86
87 /* overlays */
88 gint image_overlay_add(ImageWindow *imd, GdkPixbuf *pixbuf, gint x, gint y,
89                        gint relative, gint always);
90 void image_overlay_set(ImageWindow *imd, gint id, GdkPixbuf *pixbuf, gint x, gint y);
91 gint image_overlay_get(ImageWindow *imd, gint id, GdkPixbuf **pixbuf, gint *x, gint *y);
92 void image_overlay_remove(ImageWindow *imd, gint id);
93
94
95 #endif
96
97
98