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;
213 typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
214 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
215 typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
216 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
220 GtkWidget *widget; /* use this to add it and show it */
224 const gchar *image_name;
226 gint image_width; /* image actual dimensions (pixels) */
229 gint64 size; /* file size (bytes) */
230 time_t mtime; /* file modified time stamp */
231 gint unknown; /* failed to load image */
233 gint window_width; /* allocated size of window (drawing area) */
236 gint x_offset; /* offset of image start (non-zero when image < window) */
239 gint vis_width; /* dimensions of visible part of image */
242 gint width; /* size of scaled image (result) */
245 gint x_scroll; /* scroll offset of image (into width, height to start drawing) */
250 gdouble zoom; /* zoom we want (0 is auto) */
251 gdouble scale; /* zoom we got (should never be 0) */
255 gint tile_cols; /* count of tile columns */
256 GList *tiles; /* list of buffer tiles */
257 GList *tile_cache; /* list of pixmap/pixbuf tile allocations */
258 gint tile_cache_size; /* allocated size of pixmaps/pixbufs */
259 GList *draw_queue; /* list of areas to redraw */
261 gint source_tiles_enabled;
262 gint source_tiles_cache_size;
264 GList *source_tiles; /* list of active source tiles */
265 gint source_tile_width;
266 gint source_tile_height;
268 GList *draw_queue_2pass;/* list when 2 pass is enabled */
273 gint draw_idle_high; /* current idle_id has high priority */
281 gint top_window_sync; /* resize top_window when image dimensions change */
283 /* top level (not necessarily parent) window */
284 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */
285 gchar *title; /* window title to display left of file name */
286 gchar *title_right; /* window title to display right of file name */
287 gint title_show_zoom; /* option to include zoom in window title */
291 void (*func_update)(ImageWindow *, gpointer);
292 void (*func_complete)(ImageWindow *, gint preload, gpointer);
293 void (*func_new)(ImageWindow *, gpointer);
294 ImageTileRequestFunc func_tile_request;
295 ImageTileDisposeFunc func_tile_dispose;
297 gpointer data_update;
298 gpointer data_complete;
302 /* button, scroll functions */
303 void (*func_button)(ImageWindow *, gint button,
304 guint32 time, gdouble x, gdouble y, guint state, gpointer);
305 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction,
306 guint32 time, gdouble x, gdouble y, guint state, gpointer);
308 gpointer data_button;
309 gpointer data_scroll;
311 /* scroll notification (for scroll bar implementation) */
312 void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
314 gpointer data_scroll_notify;
316 /* collection info */
317 CollectionData *collection;
318 CollectInfo *collection_info;
320 AlterType delay_alter_type;
322 ImageLoader *read_ahead_il;
323 GdkPixbuf *read_ahead_pixbuf;
324 gchar *read_ahead_path;
326 GdkPixbuf *prev_pixbuf;
329 gint auto_refresh_id;
330 gint auto_refresh_interval;
335 gint scroller_overlay;
365 GtkWidget *group_box;
369 GtkTooltips *tooltips;
371 /* menus, path selector */
373 GtkActionGroup *action_group;
374 GtkUIManager *ui_manager;
376 GtkWidget *path_entry;
380 LayoutLocation image_location;
384 /* tools window (float) */
387 GtkWidget *tools_pane;
397 GtkWidget *thumb_button;
402 LayoutLocation dir_location;
412 LayoutLocation file_location;
416 GtkWidget *file_view;
419 SortType sort_method;
425 GtkWidget *info_progress_bar;
426 GtkWidget *info_sort;
427 GtkWidget *info_status;
428 GtkWidget *info_details;
429 GtkWidget *info_zoom;
433 SlideShowData *slideshow;
437 FullScreenData *full_screen;
438 gint full_screen_overlay_id;
439 gint full_screen_overlay_on;
447 /* directory update check */
454 GtkWidget *utility_box;
459 gint bar_sort_enabled;
460 gint bar_exif_enabled;
461 gint bar_info_enabled;
464 gint bar_exif_advanced;
483 void (*select_func)(ViewDirList *vdl, const gchar *path, gpointer data);
484 gpointer select_data;
486 LayoutWindow *layout;
509 void (*select_func)(ViewDirTree *vdt, const gchar *path, gpointer data);
510 gpointer select_data;
512 LayoutWindow *layout;
529 SortType sort_method;
540 ThumbLoader *thumbs_loader;
541 FileData *thumbs_filedata;
544 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data);
545 gpointer data_thumb_status;
547 void (*func_status)(ViewFileList *vfl, gpointer data);
548 gpointer data_status;
551 LayoutWindow *layout;
570 FileData *prev_selection;
572 GtkWidget *tip_window;
582 SortType sort_method;
594 ThumbLoader *thumbs_loader;
598 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data);
599 gpointer data_thumb_status;
601 void (*func_status)(ViewFileIcon *vfi, gpointer data);
602 gpointer data_status;
604 LayoutWindow *layout;
609 struct _SlideShowData
616 LayoutWindow *layout;
628 void (*stop_func)(SlideShowData *, gpointer);
634 struct _FullScreenData
639 GtkWidget *normal_window;
640 ImageWindow *normal_imd;
648 void (*stop_func)(FullScreenData *, gpointer);
652 struct _PixmapFolders