Mercurial > geeqie
annotate src/typedefs.h @ 311:8a6650589829
Preserve permissions of the destination file when using secure save.
author | zas_ |
---|---|
date | Fri, 11 Apr 2008 16:02:33 +0000 |
parents | 6ff0bc50ac46 |
children | a955b7fd626b |
rev | line source |
---|---|
9 | 1 /* |
196 | 2 * Geeqie |
115
53b2bfdcff69
Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents:
113
diff
changeset
|
3 * (C) 2006 John Ellis |
9 | 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 TYPEDEFS_H | |
14 #define TYPEDEFS_H | |
15 | |
134
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
132
diff
changeset
|
16 typedef enum { |
283 | 17 CMD_COPY = GQ_EDITOR_GENERIC_SLOTS, |
134
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
132
diff
changeset
|
18 CMD_MOVE, |
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
132
diff
changeset
|
19 CMD_RENAME, |
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
132
diff
changeset
|
20 CMD_DELETE, |
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
132
diff
changeset
|
21 CMD_FOLDER, |
283 | 22 GQ_EDITOR_SLOTS |
134
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
132
diff
changeset
|
23 } SpecialEditor; |
9 | 24 |
25 typedef enum { | |
26 SORT_NONE, | |
27 SORT_NAME, | |
28 SORT_SIZE, | |
29 SORT_TIME, | |
30 SORT_PATH, | |
31 SORT_NUMBER | |
32 } SortType; | |
33 | |
34 typedef enum { | |
35 ALTER_NONE, /* do nothing */ | |
36 ALTER_ROTATE_90, | |
37 ALTER_ROTATE_90_CC, /* counterclockwise */ | |
38 ALTER_ROTATE_180, | |
39 ALTER_MIRROR, | |
82
a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents:
41
diff
changeset
|
40 ALTER_FLIP, |
a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents:
41
diff
changeset
|
41 ALTER_DESATURATE |
9 | 42 } AlterType; |
43 | |
44 typedef enum { | |
45 LAYOUT_HIDE = 0, | |
46 LAYOUT_LEFT = 1 << 0, | |
47 LAYOUT_RIGHT = 1 << 1, | |
48 LAYOUT_TOP = 1 << 2, | |
49 LAYOUT_BOTTOM = 1 << 3 | |
50 } LayoutLocation; | |
51 | |
52 | |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
53 typedef enum { |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
54 IMAGE_STATE_NONE = 0, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
55 IMAGE_STATE_IMAGE = 1 << 0, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
56 IMAGE_STATE_LOADING = 1 << 1, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
57 IMAGE_STATE_ERROR = 1 << 2, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
58 IMAGE_STATE_COLOR_ADJ = 1 << 3, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
59 IMAGE_STATE_ROTATE_AUTO = 1 << 4, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
60 IMAGE_STATE_ROTATE_USER = 1 << 5, |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
61 IMAGE_STATE_DELAY_FLIP = 1 << 6 |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
62 } ImageState; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
63 |
127 | 64 typedef enum { |
65 SPLIT_NONE = 0, | |
66 SPLIT_VERT, | |
67 SPLIT_HOR, | |
68 SPLIT_QUAD, | |
69 } ImageSplitMode; | |
70 | |
143
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
141
diff
changeset
|
71 typedef enum { |
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
141
diff
changeset
|
72 FILEDATA_CHANGE_DELETE, |
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
141
diff
changeset
|
73 FILEDATA_CHANGE_MOVE, |
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
141
diff
changeset
|
74 FILEDATA_CHANGE_RENAME, |
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
141
diff
changeset
|
75 FILEDATA_CHANGE_COPY |
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
141
diff
changeset
|
76 } FileDataChangeType; |
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
141
diff
changeset
|
77 |
161 | 78 typedef enum { |
79 MTS_MODE_MINUS, | |
80 MTS_MODE_SET, | |
81 MTS_MODE_OR, | |
82 MTS_MODE_AND | |
83 } MarkToSelectionMode; | |
84 | |
85 typedef enum { | |
86 STM_MODE_RESET, | |
87 STM_MODE_SET, | |
88 STM_MODE_TOGGLE | |
89 } SelectionToMarkMode; | |
90 | |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
196
diff
changeset
|
91 typedef enum { |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
196
diff
changeset
|
92 FORMAT_CLASS_UNKNOWN, |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
196
diff
changeset
|
93 FORMAT_CLASS_IMAGE, |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
196
diff
changeset
|
94 FORMAT_CLASS_RAWIMAGE, |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
196
diff
changeset
|
95 FORMAT_CLASS_META, |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
196
diff
changeset
|
96 FILE_FORMAT_CLASSES |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
196
diff
changeset
|
97 } FileFormatClass; |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
196
diff
changeset
|
98 |
276 | 99 typedef enum { |
100 SS_ERR_NONE = 0, | |
101 SS_ERR_DISABLED, /**< secsave is disabled. */ | |
102 SS_ERR_OUT_OF_MEM, /**< memory allocation failure */ | |
103 | |
104 /* see err field in SecureSaveInfo */ | |
105 SS_ERR_OPEN_READ, | |
106 SS_ERR_OPEN_WRITE, | |
107 SS_ERR_STAT, | |
108 SS_ERR_ACCESS, | |
109 SS_ERR_MKSTEMP, | |
110 SS_ERR_RENAME, | |
111 SS_ERR_OTHER, | |
112 } SecureSaveErrno; | |
113 | |
143
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
141
diff
changeset
|
114 |
127 | 115 #define MAX_SPLIT_IMAGES 4 |
116 | |
9 | 117 typedef struct _ImageLoader ImageLoader; |
118 typedef struct _ThumbLoader ThumbLoader; | |
119 | |
120 typedef struct _CollectInfo CollectInfo; | |
121 typedef struct _CollectionData CollectionData; | |
122 typedef struct _CollectTable CollectTable; | |
123 typedef struct _CollectWindow CollectWindow; | |
124 | |
125 typedef struct _ImageWindow ImageWindow; | |
126 | |
127 typedef struct _FileData FileData; | |
138 | 128 typedef struct _FileDataChangeInfo FileDataChangeInfo; |
9 | 129 |
130 typedef struct _LayoutWindow LayoutWindow; | |
131 typedef struct _ViewDirList ViewDirList; | |
132 typedef struct _ViewDirTree ViewDirTree; | |
133 typedef struct _ViewFileList ViewFileList; | |
134 typedef struct _ViewFileIcon ViewFileIcon; | |
135 | |
136 typedef struct _SlideShowData SlideShowData; | |
137 typedef struct _FullScreenData FullScreenData; | |
138 | |
139 typedef struct _PixmapFolders PixmapFolders; | |
273
e0e2c2b72c5a
reworked the histogram patch by Uwe Ohse, most of the code is in
nadvornik
parents:
212
diff
changeset
|
140 typedef struct _Histogram Histogram; |
e0e2c2b72c5a
reworked the histogram patch by Uwe Ohse, most of the code is in
nadvornik
parents:
212
diff
changeset
|
141 |
276 | 142 typedef struct _SecureSaveInfo SecureSaveInfo; |
9 | 143 |
144 | |
145 struct _ImageLoader | |
146 { | |
147 GdkPixbuf *pixbuf; | |
138 | 148 FileData *fd; |
9 | 149 gchar *path; |
150 | |
151 gint bytes_read; | |
152 gint bytes_total; | |
153 | |
154 guint buffer_size; | |
155 | |
156 gint requested_width; | |
157 gint requested_height; | |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
158 gint shrunk; |
9 | 159 |
160 gint done; | |
161 gint idle_id; | |
162 gint idle_priority; | |
163 | |
164 GdkPixbufLoader *loader; | |
165 gint load_fd; | |
166 | |
167 void (*func_area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer); | |
168 void (*func_error)(ImageLoader *, gpointer); | |
169 void (*func_done)(ImageLoader *, gpointer); | |
170 void (*func_percent)(ImageLoader *, gdouble, gpointer); | |
171 | |
172 gpointer data_area_ready; | |
173 gpointer data_error; | |
174 gpointer data_done; | |
175 gpointer data_percent; | |
176 | |
177 gint idle_done_id; | |
178 }; | |
179 | |
180 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data); | |
181 | |
182 struct _ThumbLoader | |
183 { | |
184 gint standard_loader; | |
185 | |
186 GdkPixbuf *pixbuf; /* contains final (scaled) image when done */ | |
187 ImageLoader *il; | |
188 gchar *path; | |
189 | |
190 gint cache_enable; | |
191 gint cache_hit; | |
192 gdouble percent_done; | |
193 | |
194 gint max_w; | |
195 gint max_h; | |
196 | |
197 ThumbLoaderFunc func_done; | |
198 ThumbLoaderFunc func_error; | |
199 ThumbLoaderFunc func_progress; | |
200 | |
201 gpointer data; | |
202 | |
203 gint idle_done_id; | |
204 }; | |
205 | |
206 struct _CollectInfo | |
207 { | |
138 | 208 FileData *fd; |
9 | 209 GdkPixbuf *pixbuf; |
210 gint flag_mask; | |
211 }; | |
212 | |
213 struct _CollectionData | |
214 { | |
215 gchar *path; | |
216 gchar *name; | |
217 GList *list; | |
218 SortType sort_method; | |
219 | |
220 ThumbLoader *thumb_loader; | |
221 CollectInfo *thumb_info; | |
222 | |
223 void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer); | |
224 gpointer info_updated_data; | |
225 | |
226 gint ref; | |
227 | |
228 /* geometry */ | |
229 gint window_read; | |
230 gint window_x; | |
231 gint window_y; | |
232 gint window_w; | |
233 gint window_h; | |
234 | |
235 /* contents changed since save flag */ | |
236 gint changed; | |
303
6ff0bc50ac46
Prevent multiple insertion of the same file in a collection.
zas_
parents:
290
diff
changeset
|
237 |
6ff0bc50ac46
Prevent multiple insertion of the same file in a collection.
zas_
parents:
290
diff
changeset
|
238 GHashTable *existence; |
9 | 239 }; |
240 | |
241 struct _CollectTable | |
242 { | |
243 GtkWidget *scrolled; | |
244 GtkWidget *listview; | |
245 gint columns; | |
246 gint rows; | |
247 | |
248 CollectionData *cd; | |
249 | |
250 GList *selection; | |
251 CollectInfo *prev_selection; | |
252 | |
253 CollectInfo *click_info; | |
254 | |
255 GtkWidget *tip_window; | |
256 gint tip_delay_id; | |
257 CollectInfo *tip_info; | |
258 | |
259 GdkWindow *marker_window; | |
260 CollectInfo *marker_info; | |
261 | |
262 GtkWidget *status_label; | |
263 GtkWidget *extra_label; | |
264 | |
265 gint focus_row; | |
266 gint focus_column; | |
267 CollectInfo *focus_info; | |
268 | |
269 GtkWidget *popup; | |
270 CollectInfo *drop_info; | |
271 GList *drop_list; | |
272 | |
273 gint sync_idle_id; | |
274 gint drop_idle_id; | |
275 | |
276 gint show_text; | |
277 }; | |
278 | |
279 struct _CollectWindow | |
280 { | |
281 GtkWidget *window; | |
282 CollectTable *table; | |
283 GtkWidget *status_box; | |
284 GList *list; | |
285 | |
286 GtkWidget *close_dialog; | |
287 | |
288 CollectionData *cd; | |
289 }; | |
290 | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
291 typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
292 gint width, gint height, GdkPixbuf *pixbuf, gpointer); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
293 typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
294 gint width, gint height, GdkPixbuf *pixbuf, gpointer); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
295 |
9 | 296 struct _ImageWindow |
297 { | |
298 GtkWidget *widget; /* use this to add it and show it */ | |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
299 GtkWidget *pr; |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
300 GtkWidget *frame; |
9 | 301 |
138 | 302 FileData *image_fd; |
9 | 303 |
304 gint64 size; /* file size (bytes) */ | |
305 time_t mtime; /* file modified time stamp */ | |
306 gint unknown; /* failed to load image */ | |
307 | |
308 ImageLoader *il; | |
309 | |
310 gint has_frame; | |
311 | |
312 /* top level (not necessarily parent) window */ | |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
313 gint top_window_sync; /* resize top_window when image dimensions change */ |
9 | 314 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */ |
315 gchar *title; /* window title to display left of file name */ | |
316 gchar *title_right; /* window title to display right of file name */ | |
317 gint title_show_zoom; /* option to include zoom in window title */ | |
318 | |
319 gint completed; | |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
320 ImageState state; /* mask of IMAGE_STATE_* flags about current image */ |
9 | 321 |
117
0c2e1f0a001b
Wed Nov 29 14:28:30 2006 John Ellis <johne@verizon.net>
gqview
parents:
115
diff
changeset
|
322 void (*func_update)(ImageWindow *imd, gpointer data); |
0c2e1f0a001b
Wed Nov 29 14:28:30 2006 John Ellis <johne@verizon.net>
gqview
parents:
115
diff
changeset
|
323 void (*func_complete)(ImageWindow *imd, gint preload, gpointer data); |
0c2e1f0a001b
Wed Nov 29 14:28:30 2006 John Ellis <johne@verizon.net>
gqview
parents:
115
diff
changeset
|
324 void (*func_state)(ImageWindow *imd, ImageState state, gpointer data); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
325 ImageTileRequestFunc func_tile_request; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
326 ImageTileDisposeFunc func_tile_dispose; |
9 | 327 |
328 gpointer data_update; | |
329 gpointer data_complete; | |
117
0c2e1f0a001b
Wed Nov 29 14:28:30 2006 John Ellis <johne@verizon.net>
gqview
parents:
115
diff
changeset
|
330 gpointer data_state; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
331 gpointer data_tile; |
9 | 332 |
333 /* button, scroll functions */ | |
334 void (*func_button)(ImageWindow *, gint button, | |
335 guint32 time, gdouble x, gdouble y, guint state, gpointer); | |
128
98e2632b5d3d
improved connected scroll and active image switching
nadvornik
parents:
127
diff
changeset
|
336 void (*func_drag)(ImageWindow *, gint button, |
98e2632b5d3d
improved connected scroll and active image switching
nadvornik
parents:
127
diff
changeset
|
337 guint32 time, gdouble x, gdouble y, guint state, gdouble dx, gdouble dy,gpointer); |
9 | 338 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction, |
339 guint32 time, gdouble x, gdouble y, guint state, gpointer); | |
340 | |
341 gpointer data_button; | |
128
98e2632b5d3d
improved connected scroll and active image switching
nadvornik
parents:
127
diff
changeset
|
342 gpointer data_drag; |
9 | 343 gpointer data_scroll; |
344 | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
345 /* scroll notification (for scroll bar implementation) */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
346 void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
347 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
348 gpointer data_scroll_notify; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
349 |
9 | 350 /* collection info */ |
351 CollectionData *collection; | |
352 CollectInfo *collection_info; | |
353 | |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
354 /* color profiles */ |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
355 gint color_profile_enable; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
356 gint color_profile_input; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
357 gint color_profile_screen; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
358 gint color_profile_use_image; |
115
53b2bfdcff69
Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents:
113
diff
changeset
|
359 gpointer cm; |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
360 |
9 | 361 AlterType delay_alter_type; |
362 | |
363 ImageLoader *read_ahead_il; | |
364 GdkPixbuf *read_ahead_pixbuf; | |
138 | 365 FileData *read_ahead_fd; |
9 | 366 |
367 GdkPixbuf *prev_pixbuf; | |
138 | 368 FileData *prev_fd; |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
369 gint prev_color_row; |
9 | 370 |
371 gint auto_refresh_id; | |
372 gint auto_refresh_interval; | |
373 | |
374 gint delay_flip; | |
375 }; | |
376 | |
149 | 377 #define FILEDATA_MARKS_SIZE 6 |
132 | 378 |
138 | 379 struct _FileDataChangeInfo { |
143
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
141
diff
changeset
|
380 FileDataChangeType type; |
138 | 381 gchar *source; |
382 gchar *dest; | |
383 }; | |
137
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
384 |
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
385 struct _FileData { |
138 | 386 gint magick; |
137
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
387 gint type; |
138 | 388 gchar *original_path; /* key to file_data_pool hash table */ |
137
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
389 gchar *path; |
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
390 const gchar *name; |
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
391 const gchar *extension; |
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
392 gint64 size; |
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
393 time_t date; |
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
394 gboolean marks[FILEDATA_MARKS_SIZE]; |
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
395 GList *sidecar_files; |
141 | 396 FileData *parent; /* parent file if this is a sidecar file, NULL otherwise */ |
138 | 397 FileDataChangeInfo *change; /* for rename, move ... */ |
9 | 398 GdkPixbuf *pixbuf; |
138 | 399 gint ref; |
9 | 400 }; |
401 | |
402 struct _LayoutWindow | |
403 { | |
404 gchar *path; | |
405 | |
406 /* base */ | |
407 | |
408 GtkWidget *window; | |
409 | |
410 GtkWidget *main_box; | |
411 | |
412 GtkWidget *group_box; | |
413 GtkWidget *h_pane; | |
414 GtkWidget *v_pane; | |
415 | |
416 /* menus, path selector */ | |
417 | |
418 GtkActionGroup *action_group; | |
419 GtkUIManager *ui_manager; | |
420 | |
421 GtkWidget *path_entry; | |
422 | |
423 /* image */ | |
424 | |
425 LayoutLocation image_location; | |
426 | |
427 ImageWindow *image; | |
428 | |
127 | 429 ImageWindow *split_images[MAX_SPLIT_IMAGES]; |
430 ImageSplitMode split_mode; | |
431 gint active_split_image; | |
432 | |
433 GtkWidget *split_image_widget; | |
434 | |
435 gint connect_zoom, connect_scroll; | |
436 | |
9 | 437 /* tools window (float) */ |
438 | |
439 GtkWidget *tools; | |
440 GtkWidget *tools_pane; | |
441 | |
442 gint tools_float; | |
443 gint tools_hidden; | |
444 | |
445 /* toolbar */ | |
446 | |
447 GtkWidget *toolbar; | |
448 gint toolbar_hidden; | |
449 | |
450 GtkWidget *thumb_button; | |
451 gint thumbs_enabled; | |
137
be3328a58875
started support for sidecar files like xmp, raw+jpeg etc.
nadvornik
parents:
134
diff
changeset
|
452 gint marks_enabled; |
132 | 453 |
9 | 454 /* dir view */ |
455 | |
456 LayoutLocation dir_location; | |
457 | |
458 ViewDirList *vdl; | |
459 ViewDirTree *vdt; | |
460 GtkWidget *dir_view; | |
461 | |
462 gint tree_view; | |
463 | |
464 /* file view */ | |
465 | |
466 LayoutLocation file_location; | |
467 | |
468 ViewFileList *vfl; | |
469 ViewFileIcon *vfi; | |
470 GtkWidget *file_view; | |
471 | |
472 gint icon_view; | |
473 SortType sort_method; | |
474 gint sort_ascend; | |
475 | |
476 /* status bar */ | |
477 | |
478 GtkWidget *info_box; | |
479 GtkWidget *info_progress_bar; | |
480 GtkWidget *info_sort; | |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
481 GtkWidget *info_color; |
9 | 482 GtkWidget *info_status; |
483 GtkWidget *info_details; | |
484 GtkWidget *info_zoom; | |
485 | |
486 /* slide show */ | |
487 | |
488 SlideShowData *slideshow; | |
489 | |
490 /* full screen */ | |
491 | |
492 FullScreenData *full_screen; | |
493 | |
494 /* dividers */ | |
495 | |
496 gint div_h; | |
497 gint div_v; | |
498 gint div_float; | |
499 | |
500 /* directory update check */ | |
501 | |
502 gint last_time_id; | |
503 time_t last_time; | |
504 | |
505 /* misc */ | |
506 | |
507 GtkWidget *utility_box; | |
508 GtkWidget *bar_sort; | |
509 GtkWidget *bar_exif; | |
510 GtkWidget *bar_info; | |
511 | |
273
e0e2c2b72c5a
reworked the histogram patch by Uwe Ohse, most of the code is in
nadvornik
parents:
212
diff
changeset
|
512 gint histogram_enabled; |
e0e2c2b72c5a
reworked the histogram patch by Uwe Ohse, most of the code is in
nadvornik
parents:
212
diff
changeset
|
513 Histogram *histogram; |
e0e2c2b72c5a
reworked the histogram patch by Uwe Ohse, most of the code is in
nadvornik
parents:
212
diff
changeset
|
514 |
9 | 515 gint bar_sort_enabled; |
516 gint bar_exif_enabled; | |
517 gint bar_info_enabled; | |
518 | |
519 gint bar_exif_size; | |
520 gint bar_exif_advanced; | |
521 }; | |
522 | |
523 struct _ViewDirList | |
524 { | |
525 GtkWidget *widget; | |
526 GtkWidget *listview; | |
527 | |
528 gchar *path; | |
529 GList *list; | |
530 | |
531 FileData *click_fd; | |
532 | |
533 FileData *drop_fd; | |
534 GList *drop_list; | |
535 | |
536 gint drop_scroll_id; | |
537 | |
538 /* func list */ | |
539 void (*select_func)(ViewDirList *vdl, const gchar *path, gpointer data); | |
540 gpointer select_data; | |
541 | |
542 LayoutWindow *layout; | |
543 | |
544 GtkWidget *popup; | |
545 | |
546 PixmapFolders *pf; | |
547 }; | |
548 | |
549 struct _ViewDirTree | |
550 { | |
551 GtkWidget *widget; | |
552 GtkWidget *treeview; | |
553 | |
554 gchar *path; | |
555 | |
556 FileData *click_fd; | |
557 | |
558 FileData *drop_fd; | |
559 GList *drop_list; | |
560 | |
561 gint drop_scroll_id; | |
562 gint drop_expand_id; | |
563 | |
564 /* func list */ | |
565 void (*select_func)(ViewDirTree *vdt, const gchar *path, gpointer data); | |
566 gpointer select_data; | |
567 | |
568 LayoutWindow *layout; | |
569 | |
570 GtkWidget *popup; | |
571 | |
572 PixmapFolders *pf; | |
573 | |
574 gint busy_ref; | |
575 }; | |
576 | |
577 struct _ViewFileList | |
578 { | |
579 GtkWidget *widget; | |
580 GtkWidget *listview; | |
581 | |
582 gchar *path; | |
583 GList *list; | |
584 | |
585 SortType sort_method; | |
586 gint sort_ascend; | |
587 | |
588 FileData *click_fd; | |
589 FileData *select_fd; | |
590 | |
591 gint thumbs_enabled; | |
138 | 592 gint marks_enabled; |
150 | 593 gint active_mark; |
132 | 594 |
9 | 595 /* thumb updates */ |
596 gint thumbs_running; | |
597 gint thumbs_count; | |
598 ThumbLoader *thumbs_loader; | |
599 FileData *thumbs_filedata; | |
600 | |
601 /* func list */ | |
602 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data); | |
603 gpointer data_thumb_status; | |
604 | |
605 void (*func_status)(ViewFileList *vfl, gpointer data); | |
606 gpointer data_status; | |
607 | |
608 gint select_idle_id; | |
609 LayoutWindow *layout; | |
610 | |
611 GtkWidget *popup; | |
612 }; | |
613 | |
138 | 614 struct _IconData; |
615 | |
9 | 616 struct _ViewFileIcon |
617 { | |
618 GtkWidget *widget; | |
619 GtkWidget *listview; | |
620 | |
621 gchar *path; | |
622 GList *list; | |
623 | |
624 /* table stuff */ | |
625 | |
626 gint columns; | |
627 gint rows; | |
628 | |
629 GList *selection; | |
138 | 630 struct _IconData *prev_selection; |
9 | 631 |
632 GtkWidget *tip_window; | |
633 gint tip_delay_id; | |
138 | 634 struct _IconData *tip_id; |
9 | 635 |
138 | 636 struct _IconData *click_id; |
9 | 637 |
138 | 638 struct _IconData *focus_id; |
9 | 639 gint focus_row; |
640 gint focus_column; | |
641 | |
642 SortType sort_method; | |
643 gint sort_ascend; | |
644 | |
645 gint show_text; | |
646 | |
647 gint sync_idle_id; | |
648 | |
649 /* thumbs */ | |
650 | |
651 gint thumbs_running; | |
652 GList *thumbs_list; | |
653 gint thumbs_count; | |
654 ThumbLoader *thumbs_loader; | |
655 FileData *thumbs_fd; | |
656 | |
657 /* func list */ | |
658 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data); | |
659 gpointer data_thumb_status; | |
660 | |
661 void (*func_status)(ViewFileIcon *vfi, gpointer data); | |
662 gpointer data_status; | |
663 | |
664 LayoutWindow *layout; | |
665 | |
666 GtkWidget *popup; | |
667 }; | |
668 | |
669 struct _SlideShowData | |
670 { | |
671 ImageWindow *imd; | |
672 | |
138 | 673 GList *filelist; |
9 | 674 CollectionData *cd; |
675 gchar *layout_path; | |
676 LayoutWindow *layout; | |
677 | |
678 GList *list; | |
679 GList *list_done; | |
680 | |
138 | 681 FileData *slide_fd; |
9 | 682 |
683 gint slide_count; | |
684 gint timeout_id; | |
685 | |
686 gint from_selection; | |
687 | |
688 void (*stop_func)(SlideShowData *, gpointer); | |
689 gpointer stop_data; | |
690 | |
691 gint paused; | |
692 }; | |
693 | |
694 struct _FullScreenData | |
695 { | |
696 GtkWidget *window; | |
697 ImageWindow *imd; | |
698 | |
699 GtkWidget *normal_window; | |
700 ImageWindow *normal_imd; | |
701 | |
702 gint hide_mouse_id; | |
703 gint busy_mouse_id; | |
704 gint cursor_state; | |
705 | |
706 gint saver_block_id; | |
707 | |
708 void (*stop_func)(FullScreenData *, gpointer); | |
709 gpointer stop_data; | |
710 }; | |
711 | |
712 struct _PixmapFolders | |
713 { | |
714 GdkPixbuf *close; | |
715 GdkPixbuf *open; | |
716 GdkPixbuf *deny; | |
717 GdkPixbuf *parent; | |
718 }; | |
719 | |
276 | 720 struct _SecureSaveInfo { |
721 FILE *fp; /**< file stream pointer */ | |
722 gchar *file_name; /**< final file name */ | |
723 gchar *tmp_file_name; /**< temporary file name */ | |
724 gint err; /**< set to non-zero value in case of error */ | |
725 gint secure_save; /**< use secure save for this file */ | |
311
8a6650589829
Preserve permissions of the destination file when using secure save.
zas_
parents:
303
diff
changeset
|
726 gint preserve_perms; /**< whether to preserve perms */ |
8a6650589829
Preserve permissions of the destination file when using secure save.
zas_
parents:
303
diff
changeset
|
727 gint preserve_mtime; /**< whether to preserve mtime */ |
276 | 728 }; |
729 | |
9 | 730 |
731 #endif | |
732 | |
733 |