Mercurial > geeqie
annotate src/image.h @ 127:271afad04d07
implemented split windows
TODO: menus and hotkeys, connected zoom, activating on drag
author | nadvornik |
---|---|
date | Fri, 29 Jun 2007 15:16:46 +0000 |
parents | 0c2e1f0a001b |
children | 98e2632b5d3d |
rev | line source |
---|---|
1 | 1 /* |
9 | 2 * GQview |
3 * (C) 2004 John Ellis | |
1 | 4 * |
5 * Author: John Ellis | |
6 * | |
9 | 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! | |
1 | 10 */ |
11 | |
12 | |
9 | 13 #ifndef IMAGE_H |
14 #define IMAGE_H | |
3 | 15 |
16 | |
9 | 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); | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
31 void image_set_scroll_notify_func(ImageWindow *imd, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
32 void (*func)(ImageWindow *imd, gint x, gint y, gint width, gint height, gpointer data), |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
33 gpointer data); |
9 | 34 void image_set_complete_func(ImageWindow *imd, |
117
0c2e1f0a001b
Wed Nov 29 14:28:30 2006 John Ellis <johne@verizon.net>
gqview
parents:
113
diff
changeset
|
35 void (*func)(ImageWindow *imd, gint preload, gpointer data), |
9 | 36 gpointer data); |
117
0c2e1f0a001b
Wed Nov 29 14:28:30 2006 John Ellis <johne@verizon.net>
gqview
parents:
113
diff
changeset
|
37 void image_set_state_func(ImageWindow *imd, |
0c2e1f0a001b
Wed Nov 29 14:28:30 2006 John Ellis <johne@verizon.net>
gqview
parents:
113
diff
changeset
|
38 void (*func)(ImageWindow *imd, ImageState state, gpointer data), |
0c2e1f0a001b
Wed Nov 29 14:28:30 2006 John Ellis <johne@verizon.net>
gqview
parents:
113
diff
changeset
|
39 gpointer data); |
9 | 40 |
127 | 41 void image_select(ImageWindow *imd, gboolean select); |
42 | |
9 | 43 /* path, name */ |
44 const gchar *image_get_path(ImageWindow *imd); | |
45 const gchar *image_get_name(ImageWindow *imd); | |
46 | |
47 /* merely changes path string, does not change the image! */ | |
48 void image_set_path(ImageWindow *imd, const gchar *newpath); | |
49 | |
50 /* load a new image */ | |
51 void image_change_path(ImageWindow *imd, const gchar *path, gdouble zoom); | |
52 void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom); | |
53 void image_change_from_collection(ImageWindow *imd, CollectionData *cd, CollectInfo *info, gdouble zoom); | |
54 CollectionData *image_get_collection(ImageWindow *imd, CollectInfo **info); | |
55 void image_change_from_image(ImageWindow *imd, ImageWindow *source); | |
56 | |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
57 GdkPixbuf *image_get_pixbuf(ImageWindow *imd); |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
58 |
127 | 59 |
60 void image_sync_scroll_from_image_absolute(ImageWindow *imd, ImageWindow *source); | |
61 void image_sync_zoom_from_image(ImageWindow *imd, ImageWindow *source); | |
9 | 62 /* manipulation */ |
63 void image_area_changed(ImageWindow *imd, gint x, gint y, gint width, gint height); | |
64 void image_reload(ImageWindow *imd); | |
65 void image_scroll(ImageWindow *imd, gint x, gint y); | |
13
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
66 void image_scroll_to_point(ImageWindow *imd, gint x, gint y, |
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
67 gdouble x_align, gdouble y_align); |
9 | 68 void image_alter(ImageWindow *imd, AlterType type); |
69 | |
70 /* zoom */ | |
71 void image_zoom_adjust(ImageWindow *imd, gdouble increment); | |
72 void image_zoom_adjust_at_point(ImageWindow *imd, gdouble increment, gint x, gint y); | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
73 void image_zoom_set_limits(ImageWindow *imd, gdouble min, gdouble max); |
9 | 74 void image_zoom_set(ImageWindow *imd, gdouble zoom); |
75 void image_zoom_set_fill_geometry(ImageWindow *imd, gint vertical); | |
76 gdouble image_zoom_get(ImageWindow *imd); | |
77 gdouble image_zoom_get_real(ImageWindow *imd); | |
78 gchar *image_zoom_get_as_text(ImageWindow *imd); | |
79 gdouble image_zoom_get_default(ImageWindow *imd, gint mode); | |
80 | |
81 /* read ahead, pass NULL to cancel */ | |
82 void image_prebuffer_set(ImageWindow *imd, const gchar *path); | |
83 | |
84 /* auto refresh, interval is 1/1000 sec, 0 uses default, -1 disables */ | |
85 void image_auto_refresh(ImageWindow *imd, gint interval); | |
86 | |
87 /* allow top window to be resized ? */ | |
88 void image_top_window_set_sync(ImageWindow *imd, gint allow_sync); | |
89 | |
90 /* background of image */ | |
91 void image_background_set_black(ImageWindow *imd, gint black); | |
92 void image_background_set_color(ImageWindow *imd, GdkColor *color); | |
93 | |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
26
diff
changeset
|
94 /* color profiles */ |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
26
diff
changeset
|
95 void image_color_profile_set(ImageWindow *imd, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
26
diff
changeset
|
96 gint input_type, gint screen_type, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
26
diff
changeset
|
97 gint use_embedded); |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
26
diff
changeset
|
98 gint image_color_profile_get(ImageWindow *imd, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
26
diff
changeset
|
99 gint *input_type, gint *screen_type, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
26
diff
changeset
|
100 gint *use_image); |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
26
diff
changeset
|
101 void image_color_profile_set_use(ImageWindow *imd, gint enable); |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
26
diff
changeset
|
102 gint image_color_profile_get_use(ImageWindow *imd); |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
26
diff
changeset
|
103 |
9 | 104 /* set delayed page flipping */ |
105 void image_set_delay_flip(ImageWindow *imd, gint delay); | |
106 | |
107 /* wallpaper util */ | |
108 void image_to_root_window(ImageWindow *imd, gint scaled); | |
109 | |
110 /* overlays */ | |
111 gint image_overlay_add(ImageWindow *imd, GdkPixbuf *pixbuf, gint x, gint y, | |
112 gint relative, gint always); | |
113 void image_overlay_set(ImageWindow *imd, gint id, GdkPixbuf *pixbuf, gint x, gint y); | |
114 gint image_overlay_get(ImageWindow *imd, gint id, GdkPixbuf **pixbuf, gint *x, gint *y); | |
115 void image_overlay_remove(ImageWindow *imd, gint id); | |
116 | |
117 | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
118 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
119 void image_set_image_as_tiles(ImageWindow *imd, gint width, gint height, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
120 gint tile_width, gint tile_height, gint cache_size, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
121 ImageTileRequestFunc func_tile_request, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
122 ImageTileDisposeFunc func_tile_dispose, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
123 gpointer data, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
124 gdouble zoom); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
125 |
26
acd9885ebd78
Mon Mar 28 20:23:34 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
126 /* reset default options */ |
acd9885ebd78
Mon Mar 28 20:23:34 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
127 void image_options_sync(void); |
acd9885ebd78
Mon Mar 28 20:23:34 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
128 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
129 |
9 | 130 #endif |
131 | |
132 | |
133 |