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 */
39 LAYOUT_RIGHT = 1 << 1,
41 LAYOUT_BOTTOM = 1 << 3
45 typedef struct _ImageLoader ImageLoader;
46 typedef struct _ThumbLoader ThumbLoader;
48 typedef struct _CollectInfo CollectInfo;
49 typedef struct _CollectionData CollectionData;
50 typedef struct _CollectTable CollectTable;
51 typedef struct _CollectWindow CollectWindow;
53 typedef struct _ImageWindow ImageWindow;
55 typedef struct _FileData FileData;
57 typedef struct _LayoutWindow LayoutWindow;
58 typedef struct _ViewDirList ViewDirList;
59 typedef struct _ViewDirTree ViewDirTree;
60 typedef struct _ViewFileList ViewFileList;
61 typedef struct _ViewFileIcon ViewFileIcon;
63 typedef struct _SlideShowData SlideShowData;
64 typedef struct _FullScreenData FullScreenData;
66 typedef struct _PixmapFolders PixmapFolders;
80 gint requested_height;
87 GdkPixbufLoader *loader;
90 void (*func_area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer);
91 void (*func_error)(ImageLoader *, gpointer);
92 void (*func_done)(ImageLoader *, gpointer);
93 void (*func_percent)(ImageLoader *, gdouble, gpointer);
95 gpointer data_area_ready;
98 gpointer data_percent;
103 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
107 gint standard_loader;
109 GdkPixbuf *pixbuf; /* contains final (scaled) image when done */
115 gdouble percent_done;
120 ThumbLoaderFunc func_done;
121 ThumbLoaderFunc func_error;
122 ThumbLoaderFunc func_progress;
139 struct _CollectionData
144 SortType sort_method;
146 ThumbLoader *thumb_loader;
147 CollectInfo *thumb_info;
149 void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer);
150 gpointer info_updated_data;
161 /* contents changed since save flag */
175 CollectInfo *prev_selection;
177 CollectInfo *click_info;
179 GtkWidget *tip_window;
181 CollectInfo *tip_info;
183 GdkWindow *marker_window;
184 CollectInfo *marker_info;
186 GtkWidget *status_label;
187 GtkWidget *extra_label;
191 CollectInfo *focus_info;
194 CollectInfo *drop_info;
203 struct _CollectWindow
207 GtkWidget *status_box;
210 GtkWidget *close_dialog;
215 typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
216 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
217 typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
218 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
222 GtkWidget *widget; /* use this to add it and show it */
227 const gchar *image_name;
229 gint64 size; /* file size (bytes) */
230 time_t mtime; /* file modified time stamp */
231 gint unknown; /* failed to load image */
237 /* top level (not necessarily parent) window */
238 gint top_window_sync; /* resize top_window when image dimensions change */
239 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */
240 gchar *title; /* window title to display left of file name */
241 gchar *title_right; /* window title to display right of file name */
242 gint title_show_zoom; /* option to include zoom in window title */
246 void (*func_update)(ImageWindow *, gpointer);
247 void (*func_complete)(ImageWindow *, gint preload, gpointer);
248 void (*func_new)(ImageWindow *, gpointer);
249 ImageTileRequestFunc func_tile_request;
250 ImageTileDisposeFunc func_tile_dispose;
252 gpointer data_update;
253 gpointer data_complete;
257 /* button, scroll functions */
258 void (*func_button)(ImageWindow *, gint button,
259 guint32 time, gdouble x, gdouble y, guint state, gpointer);
260 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction,
261 guint32 time, gdouble x, gdouble y, guint state, gpointer);
263 gpointer data_button;
264 gpointer data_scroll;
266 /* scroll notification (for scroll bar implementation) */
267 void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
269 gpointer data_scroll_notify;
271 /* collection info */
272 CollectionData *collection;
273 CollectInfo *collection_info;
275 AlterType delay_alter_type;
277 ImageLoader *read_ahead_il;
278 GdkPixbuf *read_ahead_pixbuf;
279 gchar *read_ahead_path;
281 GdkPixbuf *prev_pixbuf;
284 gint auto_refresh_id;
285 gint auto_refresh_interval;
309 GtkWidget *group_box;
313 /* menus, path selector */
315 GtkActionGroup *action_group;
316 GtkUIManager *ui_manager;
318 GtkWidget *path_entry;
322 LayoutLocation image_location;
326 /* tools window (float) */
329 GtkWidget *tools_pane;
339 GtkWidget *thumb_button;
344 LayoutLocation dir_location;
354 LayoutLocation file_location;
358 GtkWidget *file_view;
361 SortType sort_method;
367 GtkWidget *info_progress_bar;
368 GtkWidget *info_sort;
369 GtkWidget *info_status;
370 GtkWidget *info_details;
371 GtkWidget *info_zoom;
375 SlideShowData *slideshow;
379 FullScreenData *full_screen;
380 gint full_screen_overlay_id;
381 gint full_screen_overlay_on;
389 /* directory update check */
396 GtkWidget *utility_box;
401 gint bar_sort_enabled;
402 gint bar_exif_enabled;
403 gint bar_info_enabled;
406 gint bar_exif_advanced;
425 void (*select_func)(ViewDirList *vdl, const gchar *path, gpointer data);
426 gpointer select_data;
428 LayoutWindow *layout;
451 void (*select_func)(ViewDirTree *vdt, const gchar *path, gpointer data);
452 gpointer select_data;
454 LayoutWindow *layout;
471 SortType sort_method;
482 ThumbLoader *thumbs_loader;
483 FileData *thumbs_filedata;
486 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data);
487 gpointer data_thumb_status;
489 void (*func_status)(ViewFileList *vfl, gpointer data);
490 gpointer data_status;
493 LayoutWindow *layout;
512 FileData *prev_selection;
514 GtkWidget *tip_window;
524 SortType sort_method;
536 ThumbLoader *thumbs_loader;
540 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data);
541 gpointer data_thumb_status;
543 void (*func_status)(ViewFileIcon *vfi, gpointer data);
544 gpointer data_status;
546 LayoutWindow *layout;
551 struct _SlideShowData
558 LayoutWindow *layout;
570 void (*stop_func)(SlideShowData *, gpointer);
576 struct _FullScreenData
581 GtkWidget *normal_window;
582 ImageWindow *normal_imd;
590 void (*stop_func)(FullScreenData *, gpointer);
594 struct _PixmapFolders