annotate src/pixbuf-renderer.h @ 1791:9a20074dbd8f

Fix osd zoom level refreshing (it was broken since some times).
author zas_
date Sun, 17 Jan 2010 13:34:48 +0000
parents 24a12aa0cb54
children 956aab097ea7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 131
diff changeset
2 * Geeqie
104
8d358a53146e Wed Nov 8 16:59:14 2006 John Ellis <johne@verizon.net>
gqview
parents: 77
diff changeset
3 * (C) 2006 John Ellis
1284
8b89e3ff286b Add year 2009 to copyright info everywhere.
zas_
parents: 1055
diff changeset
4 * Copyright (C) 2008 - 2009 The Geeqie Team
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
5 *
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
6 * Author: John Ellis
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
7 *
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
11 */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
12
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
13 #ifndef PIXBUF_RENDERER_H
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
14 #define PIXBUF_RENDERER_H
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
15
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
16 #include <gtk/gtkeventbox.h>
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
17 #include <gtk/gtkwindow.h>
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
18
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
19
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
20 #define TYPE_PIXBUF_RENDERER (pixbuf_renderer_get_type())
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
21 #define PIXBUF_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_PIXBUF_RENDERER, PixbufRenderer))
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
22 #define PIXBUF_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_PIXBUF_RENDERER, PixbufRendererClass))
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
23 #define IS_PIXBUF_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_PIXBUF_RENDERER))
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
24 #define IS_PIXBUF_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_PIXBUF_RENDERER))
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
25 #define PIXBUF_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_PIXBUF_RENDERER, PixbufRendererClass))
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
26
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
27
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
28 typedef struct _PixbufRenderer PixbufRenderer;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
29 typedef struct _PixbufRendererClass PixbufRendererClass;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
30
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
31
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
32 typedef gint (* PixbufRendererTileRequestFunc)(PixbufRenderer *pr, gint x, gint y,
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
33 gint width, gint height, GdkPixbuf *pixbuf, gpointer user_data);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
34 typedef void (* PixbufRendererTileDisposeFunc)(PixbufRenderer *pr, gint x, gint y,
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
35 gint width, gint height, GdkPixbuf *pixbuf, gpointer user_data);
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
36
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
37 typedef void (* PixbufRendererPostProcessFunc)(PixbufRenderer *pr, GdkPixbuf **pixbuf, gint x, gint y,
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
38 gint width, gint height, gpointer user_data);
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
39
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
40 typedef enum {
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
41 PR_SCROLL_RESET_TOPLEFT = 0,
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
42 PR_SCROLL_RESET_CENTER,
858
171dd6e53656 Use stricter types for image options.
zas_
parents: 857
diff changeset
43 PR_SCROLL_RESET_NOCHANGE,
171dd6e53656 Use stricter types for image options.
zas_
parents: 857
diff changeset
44 PR_SCROLL_RESET_COUNT,
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
45 } PixbufRendererScrollResetType;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
46
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
47 struct _PixbufRenderer
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
48 {
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
49 GtkEventBox eventbox;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
50
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
51 gint image_width; /* image actual dimensions (pixels) */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
52 gint image_height;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
53
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
54 GdkPixbuf *pixbuf;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
55
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
56 gint window_width; /* allocated size of window (drawing area) */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
57 gint window_height;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
58
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
59 gint x_offset; /* offset of image start (non-zero when image < window) */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
60 gint y_offset;
1375
df58e511d90e Display pixel coordinates and rgb - patch by Ruben Stein
nadvornik
parents: 1346
diff changeset
61
df58e511d90e Display pixel coordinates and rgb - patch by Ruben Stein
nadvornik
parents: 1346
diff changeset
62 gint x_mouse; /* coordinates of the mouse taken from GtkEvent */
df58e511d90e Display pixel coordinates and rgb - patch by Ruben Stein
nadvornik
parents: 1346
diff changeset
63 gint y_mouse;
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
64
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
65 gint vis_width; /* dimensions of visible part of image */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
66 gint vis_height;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
67
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
68 gint width; /* size of scaled image (result) */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
69 gint height;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
70
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
71 gint x_scroll; /* scroll offset of image (into width, height to start drawing) */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
72 gint y_scroll;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
73
1037
86148ec8a299 fixed various problems with preserving viewport on image change,
nadvornik
parents: 1030
diff changeset
74 gdouble norm_center_x; /* coordinates of viewport center in the image, in range 0.0 - 1.0 */
86148ec8a299 fixed various problems with preserving viewport on image change,
nadvornik
parents: 1030
diff changeset
75 gdouble norm_center_y; /* these coordinates are used for PR_SCROLL_RESET_NOCHANGE and should be preserved over periods with NULL pixbuf */
86148ec8a299 fixed various problems with preserving viewport on image change,
nadvornik
parents: 1030
diff changeset
76
131
b1acdfc7271b relative scroll is working; some cleanup
nadvornik
parents: 128
diff changeset
77 gdouble subpixel_x_scroll; /* subpixel scroll alignment, used to prevent acumulation of rounding errors */
b1acdfc7271b relative scroll is working; some cleanup
nadvornik
parents: 128
diff changeset
78 gdouble subpixel_y_scroll;
b1acdfc7271b relative scroll is working; some cleanup
nadvornik
parents: 128
diff changeset
79
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
80 gdouble zoom_min;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
81 gdouble zoom_max;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
82 gdouble zoom; /* zoom we want (0 is auto) */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
83 gdouble scale; /* zoom we got (should never be 0) */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
84
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
85 GdkInterpType zoom_quality;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
86 gboolean zoom_2pass;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
87 gboolean zoom_expand;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
88
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
89 GdkRgbDither dither_quality;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
90
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
91 PixbufRendererScrollResetType scroll_reset;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
92
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
93 gboolean has_frame;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
94
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
95 GtkWidget *parent_window; /* resize parent_window when image dimensions change */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
96
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
97 gboolean window_fit;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
98 gboolean window_limit;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
99 gint window_limit_size;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
100
209
ad78ad18523a configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
nadvornik
parents: 208
diff changeset
101 gboolean autofit_limit;
ad78ad18523a configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
nadvornik
parents: 208
diff changeset
102 gint autofit_limit_size;
ad78ad18523a configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
nadvornik
parents: 208
diff changeset
103
ad78ad18523a configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
nadvornik
parents: 208
diff changeset
104
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
105 gint tile_cache_max; /* max mb to use for offscreen buffer */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
106
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
107 /*< private >*/
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
108
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
109 gint tile_width;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
110 gint tile_height;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
111 gint tile_cols; /* count of tile columns */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
112 GList *tiles; /* list of buffer tiles */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
113 gint tile_cache_size; /* allocated size of pixmaps/pixbufs */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
114 GList *draw_queue; /* list of areas to redraw */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
115 GList *draw_queue_2pass;/* list when 2 pass is enabled */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
116
1523
24a12aa0cb54 Fix up event source ids type: gint -> guint.
zas_
parents: 1435
diff changeset
117 guint draw_idle_id; /* event source id */
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
118
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
119 gboolean in_drag;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
120 gint drag_last_x;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
121 gint drag_last_y;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
122 gint drag_moved;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
123
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
124 gboolean source_tiles_enabled;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
125 gint source_tiles_cache_size;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
126
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
127 GList *source_tiles; /* list of active source tiles */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
128 gint source_tile_width;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
129 gint source_tile_height;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
130
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
131 PixbufRendererTileRequestFunc func_tile_request;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
132 PixbufRendererTileDisposeFunc func_tile_dispose;
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 398
diff changeset
133
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
134 gpointer func_tile_data;
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
135
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
136 PixbufRendererPostProcessFunc func_post_process;
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
137 gpointer post_process_user_data;
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
138 gint post_process_slow;
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
139
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
140 gboolean delay_flip;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
141 gboolean loading;
25
0c3b353b666e Fri Mar 25 22:39:30 2005 John Ellis <johne@verizon.net>
gqview
parents: 24
diff changeset
142 gboolean complete;
386
0226daf8c30b in debug mode print time information on selected events
nadvornik
parents: 209
diff changeset
143 gboolean debug_updated; /* debug only */
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
144
1523
24a12aa0cb54 Fix up event source ids type: gint -> guint.
zas_
parents: 1435
diff changeset
145 guint scroller_id; /* event source id */
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
146 gint scroller_overlay;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
147 gint scroller_x;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
148 gint scroller_y;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
149 gint scroller_xpos;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
150 gint scroller_ypos;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
151 gint scroller_xinc;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
152 gint scroller_yinc;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
153
104
8d358a53146e Wed Nov 8 16:59:14 2006 John Ellis <johne@verizon.net>
gqview
parents: 77
diff changeset
154 GList *overlay_list;
8d358a53146e Wed Nov 8 16:59:14 2006 John Ellis <johne@verizon.net>
gqview
parents: 77
diff changeset
155 GdkPixmap *overlay_buffer;
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
156
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
157 GdkPixbuf *spare_tile;
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 398
diff changeset
158
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
159 gint orientation;
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
160 };
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
161
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
162 struct _PixbufRendererClass
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
163 {
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
164 GtkEventBoxClass parent_class;
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
165
512
f9bf33be53ff Remove whitespace between function name and first parenthesis for the sake of consistency.
zas_
parents: 475
diff changeset
166 void (*zoom)(PixbufRenderer *pr, gdouble zoom);
f9bf33be53ff Remove whitespace between function name and first parenthesis for the sake of consistency.
zas_
parents: 475
diff changeset
167 void (*clicked)(PixbufRenderer *pr, GdkEventButton *event);
f9bf33be53ff Remove whitespace between function name and first parenthesis for the sake of consistency.
zas_
parents: 475
diff changeset
168 void (*scroll_notify)(PixbufRenderer *pr);
1375
df58e511d90e Display pixel coordinates and rgb - patch by Ruben Stein
nadvornik
parents: 1346
diff changeset
169 void (*update_pixel)(PixbufRenderer *pr);
25
0c3b353b666e Fri Mar 25 22:39:30 2005 John Ellis <johne@verizon.net>
gqview
parents: 24
diff changeset
170
512
f9bf33be53ff Remove whitespace between function name and first parenthesis for the sake of consistency.
zas_
parents: 475
diff changeset
171 void (*render_complete)(PixbufRenderer *pr);
f9bf33be53ff Remove whitespace between function name and first parenthesis for the sake of consistency.
zas_
parents: 475
diff changeset
172 void (*drag)(PixbufRenderer *pr, GdkEventButton *event);
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
173 };
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
174
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
175
1346
c9949c19a6d0 No space between function name and first parenthesis, it eases greping (see CODING).
zas_
parents: 1284
diff changeset
176 GType pixbuf_renderer_get_type(void);
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
177
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
178 PixbufRenderer *pixbuf_renderer_new(void);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
179
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
180 void pixbuf_renderer_set_parent(PixbufRenderer *pr, GtkWindow *window);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
181 GtkWindow *pixbuf_renderer_get_parent(PixbufRenderer *pr);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
182
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
183 /* display a pixbuf */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
184
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
185 void pixbuf_renderer_set_pixbuf(PixbufRenderer *pr, GdkPixbuf *pixbuf, gdouble zoom);
1045
0ab0deb0cfcc added possibility to redraw only the parts of image that are already
nadvornik
parents: 1037
diff changeset
186
0ab0deb0cfcc added possibility to redraw only the parts of image that are already
nadvornik
parents: 1037
diff changeset
187 /* same as pixbuf_renderer_set_pixbuf but waits with redrawing for pixbuf_renderer_area_changed */
0ab0deb0cfcc added possibility to redraw only the parts of image that are already
nadvornik
parents: 1037
diff changeset
188 void pixbuf_renderer_set_pixbuf_lazy(PixbufRenderer *pr, GdkPixbuf *pixbuf, gdouble zoom, gint orientation);
0ab0deb0cfcc added possibility to redraw only the parts of image that are already
nadvornik
parents: 1037
diff changeset
189
0ab0deb0cfcc added possibility to redraw only the parts of image that are already
nadvornik
parents: 1037
diff changeset
190
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
191 GdkPixbuf *pixbuf_renderer_get_pixbuf(PixbufRenderer *pr);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
192
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
193 void pixbuf_renderer_set_orientation(PixbufRenderer *pr, gint orientation);
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
194 gint pixbuf_renderer_get_orientation(PixbufRenderer *pr);
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
195
1435
8355da717c68 gint -> gboolean.
zas_
parents: 1431
diff changeset
196 void pixbuf_renderer_set_post_process_func(PixbufRenderer *pr, PixbufRendererPostProcessFunc func, gpointer user_data, gboolean slow);
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 386
diff changeset
197
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
198 /* display an on-request array of pixbuf tiles */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
199
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
200 void pixbuf_renderer_set_tiles(PixbufRenderer *pr, gint width, gint height,
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
201 gint tile_width, gint tile_height, gint cache_size,
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
202 PixbufRendererTileRequestFunc func_request,
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
203 PixbufRendererTileDisposeFunc func_dispose,
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
204 gpointer user_data,
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
205 gdouble zoom);
77
44f2223541d1 Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents: 25
diff changeset
206 void pixbuf_renderer_set_tiles_size(PixbufRenderer *pr, gint width, gint height);
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
207 gint pixbuf_renderer_get_tiles(PixbufRenderer *pr);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
208
24
104e34f9ab1f Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents: 23
diff changeset
209 /* move image data from source to pr, source is then set to NULL image */
104e34f9ab1f Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents: 23
diff changeset
210
104e34f9ab1f Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents: 23
diff changeset
211 void pixbuf_renderer_move(PixbufRenderer *pr, PixbufRenderer *source);
104e34f9ab1f Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents: 23
diff changeset
212
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
213 /* update region of existing image */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
214
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
215 void pixbuf_renderer_area_changed(PixbufRenderer *pr, gint x, gint y, gint width, gint height);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
216
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
217 /* scrolling */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
218
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
219 void pixbuf_renderer_scroll(PixbufRenderer *pr, gint x, gint y);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
220 void pixbuf_renderer_scroll_to_point(PixbufRenderer *pr, gint x, gint y,
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
221 gdouble x_align, gdouble y_align);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
222
131
b1acdfc7271b relative scroll is working; some cleanup
nadvornik
parents: 128
diff changeset
223 void pixbuf_renderer_get_scroll_center(PixbufRenderer *pr, gdouble *x, gdouble *y);
b1acdfc7271b relative scroll is working; some cleanup
nadvornik
parents: 128
diff changeset
224 void pixbuf_renderer_set_scroll_center(PixbufRenderer *pr, gdouble x, gdouble y);
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
225 /* zoom */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
226
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
227 void pixbuf_renderer_zoom_adjust(PixbufRenderer *pr, gdouble increment);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
228 void pixbuf_renderer_zoom_adjust_at_point(PixbufRenderer *pr, gdouble increment, gint x, gint y);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
229
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
230 void pixbuf_renderer_zoom_set(PixbufRenderer *pr, gdouble zoom);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
231 gdouble pixbuf_renderer_zoom_get(PixbufRenderer *pr);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
232 gdouble pixbuf_renderer_zoom_get_scale(PixbufRenderer *pr);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
233
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
234 void pixbuf_renderer_zoom_set_limits(PixbufRenderer *pr, gdouble min, gdouble max);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
235
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
236 /* sizes */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
237
1431
7e180091e0b7 More gboolean and tidy up.
zas_
parents: 1375
diff changeset
238 gboolean pixbuf_renderer_get_image_size(PixbufRenderer *pr, gint *width, gint *height);
1435
8355da717c68 gint -> gboolean.
zas_
parents: 1431
diff changeset
239 gboolean pixbuf_renderer_get_scaled_size(PixbufRenderer *pr, gint *width, gint *height);
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
240
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
241 /* region of image in pixel coordinates */
1435
8355da717c68 gint -> gboolean.
zas_
parents: 1431
diff changeset
242 gboolean pixbuf_renderer_get_visible_rect(PixbufRenderer *pr, GdkRectangle *rect);
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
243
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
244 /* actual size of the PixbufRenderer window minus borders,
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
245 * x and y are the scroll offset and include zoom factor.
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
246 */
1435
8355da717c68 gint -> gboolean.
zas_
parents: 1431
diff changeset
247 gboolean pixbuf_renderer_get_virtual_rect(PixbufRenderer *pr, GdkRectangle *rect);
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
248
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
249 /* background color */
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
250 void pixbuf_renderer_set_color(PixbufRenderer *pr, GdkColor *color);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
251
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
252 /* overlay */
857
7d387a25b1ec Use flags instead of int parameters for pixbuf_renderer_overlay_add().
zas_
parents: 512
diff changeset
253 typedef enum {
995
6ca2c5fd7b13 Whitespaces cleanup.
zas_
parents: 858
diff changeset
254 OVL_NORMAL = 0,
857
7d387a25b1ec Use flags instead of int parameters for pixbuf_renderer_overlay_add().
zas_
parents: 512
diff changeset
255 OVL_RELATIVE = 1 << 0, /* x,y coordinates are relative, negative values start bottom right */
7d387a25b1ec Use flags instead of int parameters for pixbuf_renderer_overlay_add().
zas_
parents: 512
diff changeset
256 /* OVL_HIDE_ON_SCROLL = 1 << 1*/ /* hide temporarily when scrolling (not yet implemented) */
7d387a25b1ec Use flags instead of int parameters for pixbuf_renderer_overlay_add().
zas_
parents: 512
diff changeset
257 } OverlayRendererFlags;
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
258
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
259 gint pixbuf_renderer_overlay_add(PixbufRenderer *pr, GdkPixbuf *pixbuf, gint x, gint y,
857
7d387a25b1ec Use flags instead of int parameters for pixbuf_renderer_overlay_add().
zas_
parents: 512
diff changeset
260 OverlayRendererFlags flags);
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
261 void pixbuf_renderer_overlay_set(PixbufRenderer *pr, gint id, GdkPixbuf *pixbuf, gint x, gint y);
1435
8355da717c68 gint -> gboolean.
zas_
parents: 1431
diff changeset
262 gboolean pixbuf_renderer_overlay_get(PixbufRenderer *pr, gint id, GdkPixbuf **pixbuf, gint *x, gint *y);
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
263 void pixbuf_renderer_overlay_remove(PixbufRenderer *pr, gint id);
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
264
1435
8355da717c68 gint -> gboolean.
zas_
parents: 1431
diff changeset
265 gboolean pixbuf_renderer_get_mouse_position(PixbufRenderer *pr, gint *x_pixel, gint *y_pixel);
1375
df58e511d90e Display pixel coordinates and rgb - patch by Ruben Stein
nadvornik
parents: 1346
diff changeset
266 /* x_pixel and y_pixel are the pixel coordinates \see pixbuf_renderer_get_mouse_position */
1435
8355da717c68 gint -> gboolean.
zas_
parents: 1431
diff changeset
267 gboolean pixbuf_renderer_get_pixel_colors(PixbufRenderer *pr, gint x_pixel, gint y_pixel,
1375
df58e511d90e Display pixel coordinates and rgb - patch by Ruben Stein
nadvornik
parents: 1346
diff changeset
268 gint *r_mouse, gint *g_mouse, gint *b_mouse);
23
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
269
17acca639a86 ##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff changeset
270 #endif
1055
1646720364cf Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents: 1045
diff changeset
271 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */