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
47 IMAGE_STATE_IMAGE = 1 << 0,
48 IMAGE_STATE_LOADING = 1 << 1,
49 IMAGE_STATE_ERROR = 1 << 2,
50 IMAGE_STATE_COLOR_ADJ = 1 << 3,
51 IMAGE_STATE_ROTATE_AUTO = 1 << 4,
52 IMAGE_STATE_ROTATE_USER = 1 << 5,
53 IMAGE_STATE_DELAY_FLIP = 1 << 6
56 typedef struct _ImageLoader ImageLoader;
57 typedef struct _ThumbLoader ThumbLoader;
59 typedef struct _CollectInfo CollectInfo;
60 typedef struct _CollectionData CollectionData;
61 typedef struct _CollectTable CollectTable;
62 typedef struct _CollectWindow CollectWindow;
64 typedef struct _ImageWindow ImageWindow;
66 typedef struct _FileData FileData;
68 typedef struct _LayoutWindow LayoutWindow;
69 typedef struct _ViewDirList ViewDirList;
70 typedef struct _ViewDirTree ViewDirTree;
71 typedef struct _ViewFileList ViewFileList;
72 typedef struct _ViewFileIcon ViewFileIcon;
74 typedef struct _SlideShowData SlideShowData;
75 typedef struct _FullScreenData FullScreenData;
77 typedef struct _PixmapFolders PixmapFolders;
91 gint requested_height;
98 GdkPixbufLoader *loader;
101 void (*func_area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer);
102 void (*func_error)(ImageLoader *, gpointer);
103 void (*func_done)(ImageLoader *, gpointer);
104 void (*func_percent)(ImageLoader *, gdouble, gpointer);
106 gpointer data_area_ready;
109 gpointer data_percent;
114 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
118 gint standard_loader;
120 GdkPixbuf *pixbuf; /* contains final (scaled) image when done */
126 gdouble percent_done;
131 ThumbLoaderFunc func_done;
132 ThumbLoaderFunc func_error;
133 ThumbLoaderFunc func_progress;
150 struct _CollectionData
155 SortType sort_method;
157 ThumbLoader *thumb_loader;
158 CollectInfo *thumb_info;
160 void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer);
161 gpointer info_updated_data;
172 /* contents changed since save flag */
186 CollectInfo *prev_selection;
188 CollectInfo *click_info;
190 GtkWidget *tip_window;
192 CollectInfo *tip_info;
194 GdkWindow *marker_window;
195 CollectInfo *marker_info;
197 GtkWidget *status_label;
198 GtkWidget *extra_label;
202 CollectInfo *focus_info;
205 CollectInfo *drop_info;
214 struct _CollectWindow
218 GtkWidget *status_box;
221 GtkWidget *close_dialog;
226 typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
227 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
228 typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
229 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
233 GtkWidget *widget; /* use this to add it and show it */
238 const gchar *image_name;
240 gint64 size; /* file size (bytes) */
241 time_t mtime; /* file modified time stamp */
242 gint unknown; /* failed to load image */
248 /* top level (not necessarily parent) window */
249 gint top_window_sync; /* resize top_window when image dimensions change */
250 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */
251 gchar *title; /* window title to display left of file name */
252 gchar *title_right; /* window title to display right of file name */
253 gint title_show_zoom; /* option to include zoom in window title */
256 ImageState state; /* mask of IMAGE_STATE_* flags about current image */
258 void (*func_update)(ImageWindow *imd, gpointer data);
259 void (*func_complete)(ImageWindow *imd, gint preload, gpointer data);
260 void (*func_state)(ImageWindow *imd, ImageState state, gpointer data);
261 ImageTileRequestFunc func_tile_request;
262 ImageTileDisposeFunc func_tile_dispose;
264 gpointer data_update;
265 gpointer data_complete;
269 /* button, scroll functions */
270 void (*func_button)(ImageWindow *, gint button,
271 guint32 time, gdouble x, gdouble y, guint state, gpointer);
272 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction,
273 guint32 time, gdouble x, gdouble y, guint state, gpointer);
275 gpointer data_button;
276 gpointer data_scroll;
278 /* scroll notification (for scroll bar implementation) */
279 void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
281 gpointer data_scroll_notify;
283 /* collection info */
284 CollectionData *collection;
285 CollectInfo *collection_info;
288 gint color_profile_enable;
289 gint color_profile_input;
290 gint color_profile_screen;
291 gint color_profile_use_image;
294 AlterType delay_alter_type;
296 ImageLoader *read_ahead_il;
297 GdkPixbuf *read_ahead_pixbuf;
298 gchar *read_ahead_path;
300 GdkPixbuf *prev_pixbuf;
304 gint auto_refresh_id;
305 gint auto_refresh_interval;
329 GtkWidget *group_box;
333 /* menus, path selector */
335 GtkActionGroup *action_group;
336 GtkUIManager *ui_manager;
338 GtkWidget *path_entry;
342 LayoutLocation image_location;
346 /* tools window (float) */
349 GtkWidget *tools_pane;
359 GtkWidget *thumb_button;
364 LayoutLocation dir_location;
374 LayoutLocation file_location;
378 GtkWidget *file_view;
381 SortType sort_method;
387 GtkWidget *info_progress_bar;
388 GtkWidget *info_sort;
389 GtkWidget *info_color;
390 GtkWidget *info_status;
391 GtkWidget *info_details;
392 GtkWidget *info_zoom;
396 SlideShowData *slideshow;
400 FullScreenData *full_screen;
401 gint full_screen_overlay_on;
409 /* directory update check */
416 GtkWidget *utility_box;
421 gint bar_sort_enabled;
422 gint bar_exif_enabled;
423 gint bar_info_enabled;
426 gint bar_exif_advanced;
445 void (*select_func)(ViewDirList *vdl, const gchar *path, gpointer data);
446 gpointer select_data;
448 LayoutWindow *layout;
471 void (*select_func)(ViewDirTree *vdt, const gchar *path, gpointer data);
472 gpointer select_data;
474 LayoutWindow *layout;
491 SortType sort_method;
502 ThumbLoader *thumbs_loader;
503 FileData *thumbs_filedata;
506 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data);
507 gpointer data_thumb_status;
509 void (*func_status)(ViewFileList *vfl, gpointer data);
510 gpointer data_status;
513 LayoutWindow *layout;
532 FileData *prev_selection;
534 GtkWidget *tip_window;
544 SortType sort_method;
556 ThumbLoader *thumbs_loader;
560 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data);
561 gpointer data_thumb_status;
563 void (*func_status)(ViewFileIcon *vfi, gpointer data);
564 gpointer data_status;
566 LayoutWindow *layout;
571 struct _SlideShowData
578 LayoutWindow *layout;
590 void (*stop_func)(SlideShowData *, gpointer);
596 struct _FullScreenData
601 GtkWidget *normal_window;
602 ImageWindow *normal_imd;
610 void (*stop_func)(FullScreenData *, gpointer);
614 struct _PixmapFolders