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!
27 ALTER_NONE, /* do nothing */
29 ALTER_ROTATE_90_CC, /* counterclockwise */
38 LAYOUT_RIGHT = 1 << 1,
40 LAYOUT_BOTTOM = 1 << 3
44 typedef struct _ImageLoader ImageLoader;
45 typedef struct _ThumbLoader ThumbLoader;
47 typedef struct _CollectInfo CollectInfo;
48 typedef struct _CollectionData CollectionData;
49 typedef struct _CollectTable CollectTable;
50 typedef struct _CollectWindow CollectWindow;
52 typedef struct _ImageWindow ImageWindow;
54 typedef struct _FileData FileData;
56 typedef struct _LayoutWindow LayoutWindow;
57 typedef struct _ViewDirList ViewDirList;
58 typedef struct _ViewDirTree ViewDirTree;
59 typedef struct _ViewFileList ViewFileList;
60 typedef struct _ViewFileIcon ViewFileIcon;
62 typedef struct _SlideShowData SlideShowData;
63 typedef struct _FullScreenData FullScreenData;
65 typedef struct _PixmapFolders PixmapFolders;
79 gint requested_height;
85 GdkPixbufLoader *loader;
88 void (*func_area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer);
89 void (*func_error)(ImageLoader *, gpointer);
90 void (*func_done)(ImageLoader *, gpointer);
91 void (*func_percent)(ImageLoader *, gdouble, gpointer);
93 gpointer data_area_ready;
96 gpointer data_percent;
101 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
105 gint standard_loader;
107 GdkPixbuf *pixbuf; /* contains final (scaled) image when done */
113 gdouble percent_done;
118 ThumbLoaderFunc func_done;
119 ThumbLoaderFunc func_error;
120 ThumbLoaderFunc func_progress;
137 struct _CollectionData
142 SortType sort_method;
144 ThumbLoader *thumb_loader;
145 CollectInfo *thumb_info;
147 void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer);
148 gpointer info_updated_data;
159 /* contents changed since save flag */
173 CollectInfo *prev_selection;
175 CollectInfo *click_info;
177 GtkWidget *tip_window;
179 CollectInfo *tip_info;
181 GdkWindow *marker_window;
182 CollectInfo *marker_info;
184 GtkWidget *status_label;
185 GtkWidget *extra_label;
189 CollectInfo *focus_info;
192 CollectInfo *drop_info;
201 struct _CollectWindow
205 GtkWidget *status_box;
208 GtkWidget *close_dialog;
215 GtkWidget *widget; /* use this to add it and show it */
219 const gchar *image_name;
221 gint image_width; /* image actual dimensions (pixels) */
224 gint64 size; /* file size (bytes) */
225 time_t mtime; /* file modified time stamp */
226 gint unknown; /* failed to load image */
228 gint window_width; /* allocated size of window (drawing area) */
231 gint x_offset; /* offset of image start (non-zero when image < window) */
234 gint vis_width; /* dimensions of visible part of image */
237 gint width; /* size of scaled image (result) */
240 gint x_scroll; /* scroll offset of image (into width, height to start drawing) */
243 gdouble zoom; /* zoom we want (0 is auto) */
244 gdouble scale; /* zoom we got (should never be 0) */
248 gint tile_cols; /* count of tile columns */
249 GList *tiles; /* list of buffer tiles */
250 GList *tile_cache; /* list of pixmap/pixbuf tile allocations */
251 gint tile_cache_size; /* allocated size of pixmaps/pixbufs */
252 GList *draw_queue; /* list of areas to redraw */
254 GList *draw_queue_2pass;/* list when 2 pass is enabled */
259 gint draw_idle_high; /* current idle_id has high priority */
267 gint top_window_sync; /* resize top_window when image dimensions change */
269 /* top level (not necessarily parent) window */
270 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */
271 gchar *title; /* window title to display left of file name */
272 gchar *title_right; /* window title to display right of file name */
273 gint title_show_zoom; /* option to include zoom in window title */
277 void (*func_update)(ImageWindow *, gpointer);
278 void (*func_complete)(ImageWindow *, gint preload, gpointer);
279 void (*func_new)(ImageWindow *, gpointer);
281 gpointer data_update;
282 gpointer data_complete;
285 /* button, scroll functions */
286 void (*func_button)(ImageWindow *, gint button,
287 guint32 time, gdouble x, gdouble y, guint state, gpointer);
288 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction,
289 guint32 time, gdouble x, gdouble y, guint state, gpointer);
291 gpointer data_button;
292 gpointer data_scroll;
294 /* collection info */
295 CollectionData *collection;
296 CollectInfo *collection_info;
298 AlterType delay_alter_type;
300 ImageLoader *read_ahead_il;
301 GdkPixbuf *read_ahead_pixbuf;
302 gchar *read_ahead_path;
304 GdkPixbuf *prev_pixbuf;
307 gint auto_refresh_id;
308 gint auto_refresh_interval;
313 gint scroller_overlay;
343 GtkWidget *group_box;
347 GtkTooltips *tooltips;
349 /* menus, path selector */
351 GtkActionGroup *action_group;
352 GtkUIManager *ui_manager;
354 GtkWidget *path_entry;
358 LayoutLocation image_location;
362 /* tools window (float) */
365 GtkWidget *tools_pane;
375 GtkWidget *thumb_button;
380 LayoutLocation dir_location;
390 LayoutLocation file_location;
394 GtkWidget *file_view;
397 SortType sort_method;
403 GtkWidget *info_progress_bar;
404 GtkWidget *info_sort;
405 GtkWidget *info_status;
406 GtkWidget *info_details;
407 GtkWidget *info_zoom;
411 SlideShowData *slideshow;
415 FullScreenData *full_screen;
416 gint full_screen_overlay_id;
417 gint full_screen_overlay_on;
425 /* directory update check */
432 GtkWidget *utility_box;
437 gint bar_sort_enabled;
438 gint bar_exif_enabled;
439 gint bar_info_enabled;
442 gint bar_exif_advanced;
461 void (*select_func)(ViewDirList *vdl, const gchar *path, gpointer data);
462 gpointer select_data;
464 LayoutWindow *layout;
487 void (*select_func)(ViewDirTree *vdt, const gchar *path, gpointer data);
488 gpointer select_data;
490 LayoutWindow *layout;
507 SortType sort_method;
518 ThumbLoader *thumbs_loader;
519 FileData *thumbs_filedata;
522 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data);
523 gpointer data_thumb_status;
525 void (*func_status)(ViewFileList *vfl, gpointer data);
526 gpointer data_status;
529 LayoutWindow *layout;
548 FileData *prev_selection;
550 GtkWidget *tip_window;
560 SortType sort_method;
572 ThumbLoader *thumbs_loader;
576 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data);
577 gpointer data_thumb_status;
579 void (*func_status)(ViewFileIcon *vfi, gpointer data);
580 gpointer data_status;
582 LayoutWindow *layout;
587 struct _SlideShowData
594 LayoutWindow *layout;
606 void (*stop_func)(SlideShowData *, gpointer);
612 struct _FullScreenData
617 GtkWidget *normal_window;
618 ImageWindow *normal_imd;
626 void (*stop_func)(FullScreenData *, gpointer);
630 struct _PixmapFolders