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;
86 GdkPixbufLoader *loader;
89 void (*func_area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer);
90 void (*func_error)(ImageLoader *, gpointer);
91 void (*func_done)(ImageLoader *, gpointer);
92 void (*func_percent)(ImageLoader *, gdouble, gpointer);
94 gpointer data_area_ready;
97 gpointer data_percent;
102 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
106 gint standard_loader;
108 GdkPixbuf *pixbuf; /* contains final (scaled) image when done */
114 gdouble percent_done;
119 ThumbLoaderFunc func_done;
120 ThumbLoaderFunc func_error;
121 ThumbLoaderFunc func_progress;
138 struct _CollectionData
143 SortType sort_method;
145 ThumbLoader *thumb_loader;
146 CollectInfo *thumb_info;
148 void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer);
149 gpointer info_updated_data;
160 /* contents changed since save flag */
174 CollectInfo *prev_selection;
176 CollectInfo *click_info;
178 GtkWidget *tip_window;
180 CollectInfo *tip_info;
182 GdkWindow *marker_window;
183 CollectInfo *marker_info;
185 GtkWidget *status_label;
186 GtkWidget *extra_label;
190 CollectInfo *focus_info;
193 CollectInfo *drop_info;
202 struct _CollectWindow
206 GtkWidget *status_box;
209 GtkWidget *close_dialog;
214 typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
215 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
216 typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
217 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
221 GtkWidget *widget; /* use this to add it and show it */
225 const gchar *image_name;
227 gint image_width; /* image actual dimensions (pixels) */
230 gint64 size; /* file size (bytes) */
231 time_t mtime; /* file modified time stamp */
232 gint unknown; /* failed to load image */
234 gint window_width; /* allocated size of window (drawing area) */
237 gint x_offset; /* offset of image start (non-zero when image < window) */
240 gint vis_width; /* dimensions of visible part of image */
243 gint width; /* size of scaled image (result) */
246 gint x_scroll; /* scroll offset of image (into width, height to start drawing) */
251 gdouble zoom; /* zoom we want (0 is auto) */
252 gdouble scale; /* zoom we got (should never be 0) */
256 gint tile_cols; /* count of tile columns */
257 GList *tiles; /* list of buffer tiles */
258 GList *tile_cache; /* list of pixmap/pixbuf tile allocations */
259 gint tile_cache_size; /* allocated size of pixmaps/pixbufs */
260 GList *draw_queue; /* list of areas to redraw */
262 gint source_tiles_enabled;
263 gint source_tiles_cache_size;
265 GList *source_tiles; /* list of active source tiles */
266 gint source_tile_width;
267 gint source_tile_height;
269 GList *draw_queue_2pass;/* list when 2 pass is enabled */
274 gint draw_idle_high; /* current idle_id has high priority */
282 gint top_window_sync; /* resize top_window when image dimensions change */
284 /* top level (not necessarily parent) window */
285 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */
286 gchar *title; /* window title to display left of file name */
287 gchar *title_right; /* window title to display right of file name */
288 gint title_show_zoom; /* option to include zoom in window title */
292 void (*func_update)(ImageWindow *, gpointer);
293 void (*func_complete)(ImageWindow *, gint preload, gpointer);
294 void (*func_new)(ImageWindow *, gpointer);
295 ImageTileRequestFunc func_tile_request;
296 ImageTileDisposeFunc func_tile_dispose;
298 gpointer data_update;
299 gpointer data_complete;
303 /* button, scroll functions */
304 void (*func_button)(ImageWindow *, gint button,
305 guint32 time, gdouble x, gdouble y, guint state, gpointer);
306 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction,
307 guint32 time, gdouble x, gdouble y, guint state, gpointer);
309 gpointer data_button;
310 gpointer data_scroll;
312 /* scroll notification (for scroll bar implementation) */
313 void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
315 gpointer data_scroll_notify;
317 /* collection info */
318 CollectionData *collection;
319 CollectInfo *collection_info;
321 AlterType delay_alter_type;
323 ImageLoader *read_ahead_il;
324 GdkPixbuf *read_ahead_pixbuf;
325 gchar *read_ahead_path;
327 GdkPixbuf *prev_pixbuf;
330 gint auto_refresh_id;
331 gint auto_refresh_interval;
336 gint scroller_overlay;
366 GtkWidget *group_box;
370 GtkTooltips *tooltips;
372 /* menus, path selector */
374 GtkActionGroup *action_group;
375 GtkUIManager *ui_manager;
377 GtkWidget *path_entry;
381 LayoutLocation image_location;
385 /* tools window (float) */
388 GtkWidget *tools_pane;
398 GtkWidget *thumb_button;
403 LayoutLocation dir_location;
413 LayoutLocation file_location;
417 GtkWidget *file_view;
420 SortType sort_method;
426 GtkWidget *info_progress_bar;
427 GtkWidget *info_sort;
428 GtkWidget *info_status;
429 GtkWidget *info_details;
430 GtkWidget *info_zoom;
434 SlideShowData *slideshow;
438 FullScreenData *full_screen;
439 gint full_screen_overlay_id;
440 gint full_screen_overlay_on;
448 /* directory update check */
455 GtkWidget *utility_box;
460 gint bar_sort_enabled;
461 gint bar_exif_enabled;
462 gint bar_info_enabled;
465 gint bar_exif_advanced;
484 void (*select_func)(ViewDirList *vdl, const gchar *path, gpointer data);
485 gpointer select_data;
487 LayoutWindow *layout;
510 void (*select_func)(ViewDirTree *vdt, const gchar *path, gpointer data);
511 gpointer select_data;
513 LayoutWindow *layout;
530 SortType sort_method;
541 ThumbLoader *thumbs_loader;
542 FileData *thumbs_filedata;
545 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data);
546 gpointer data_thumb_status;
548 void (*func_status)(ViewFileList *vfl, gpointer data);
549 gpointer data_status;
552 LayoutWindow *layout;
571 FileData *prev_selection;
573 GtkWidget *tip_window;
583 SortType sort_method;
595 ThumbLoader *thumbs_loader;
599 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data);
600 gpointer data_thumb_status;
602 void (*func_status)(ViewFileIcon *vfi, gpointer data);
603 gpointer data_status;
605 LayoutWindow *layout;
610 struct _SlideShowData
617 LayoutWindow *layout;
629 void (*stop_func)(SlideShowData *, gpointer);
635 struct _FullScreenData
640 GtkWidget *normal_window;
641 ImageWindow *normal_imd;
649 void (*stop_func)(FullScreenData *, gpointer);
653 struct _PixmapFolders