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!
17 CMD_COPY = GQVIEW_EDITOR_GENERIC_SLOTS,
35 ALTER_NONE, /* do nothing */
37 ALTER_ROTATE_90_CC, /* counterclockwise */
47 LAYOUT_RIGHT = 1 << 1,
49 LAYOUT_BOTTOM = 1 << 3
55 IMAGE_STATE_IMAGE = 1 << 0,
56 IMAGE_STATE_LOADING = 1 << 1,
57 IMAGE_STATE_ERROR = 1 << 2,
58 IMAGE_STATE_COLOR_ADJ = 1 << 3,
59 IMAGE_STATE_ROTATE_AUTO = 1 << 4,
60 IMAGE_STATE_ROTATE_USER = 1 << 5,
61 IMAGE_STATE_DELAY_FLIP = 1 << 6
72 FILEDATA_CHANGE_DELETE,
74 FILEDATA_CHANGE_RENAME,
83 } MarkToSelectionMode;
89 } SelectionToMarkMode;
94 FORMAT_CLASS_RAWIMAGE,
101 SS_ERR_DISABLED, /**< secsave is disabled. */
102 SS_ERR_OUT_OF_MEM, /**< memory allocation failure */
104 /* see err field in SecureSaveInfo */
115 #define MAX_SPLIT_IMAGES 4
117 typedef struct _ImageLoader ImageLoader;
118 typedef struct _ThumbLoader ThumbLoader;
120 typedef struct _CollectInfo CollectInfo;
121 typedef struct _CollectionData CollectionData;
122 typedef struct _CollectTable CollectTable;
123 typedef struct _CollectWindow CollectWindow;
125 typedef struct _ImageWindow ImageWindow;
127 typedef struct _FileData FileData;
128 typedef struct _FileDataChangeInfo FileDataChangeInfo;
130 typedef struct _LayoutWindow LayoutWindow;
131 typedef struct _ViewDirList ViewDirList;
132 typedef struct _ViewDirTree ViewDirTree;
133 typedef struct _ViewFileList ViewFileList;
134 typedef struct _ViewFileIcon ViewFileIcon;
136 typedef struct _SlideShowData SlideShowData;
137 typedef struct _FullScreenData FullScreenData;
139 typedef struct _PixmapFolders PixmapFolders;
140 typedef struct _Histogram Histogram;
142 typedef struct _SecureSaveInfo SecureSaveInfo;
156 gint requested_width;
157 gint requested_height;
164 GdkPixbufLoader *loader;
167 void (*func_area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer);
168 void (*func_error)(ImageLoader *, gpointer);
169 void (*func_done)(ImageLoader *, gpointer);
170 void (*func_percent)(ImageLoader *, gdouble, gpointer);
172 gpointer data_area_ready;
175 gpointer data_percent;
180 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
184 gint standard_loader;
186 GdkPixbuf *pixbuf; /* contains final (scaled) image when done */
192 gdouble percent_done;
197 ThumbLoaderFunc func_done;
198 ThumbLoaderFunc func_error;
199 ThumbLoaderFunc func_progress;
213 struct _CollectionData
218 SortType sort_method;
220 ThumbLoader *thumb_loader;
221 CollectInfo *thumb_info;
223 void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer);
224 gpointer info_updated_data;
235 /* contents changed since save flag */
249 CollectInfo *prev_selection;
251 CollectInfo *click_info;
253 GtkWidget *tip_window;
255 CollectInfo *tip_info;
257 GdkWindow *marker_window;
258 CollectInfo *marker_info;
260 GtkWidget *status_label;
261 GtkWidget *extra_label;
265 CollectInfo *focus_info;
268 CollectInfo *drop_info;
277 struct _CollectWindow
281 GtkWidget *status_box;
284 GtkWidget *close_dialog;
289 typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
290 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
291 typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
292 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
296 GtkWidget *widget; /* use this to add it and show it */
302 gint64 size; /* file size (bytes) */
303 time_t mtime; /* file modified time stamp */
304 gint unknown; /* failed to load image */
310 /* top level (not necessarily parent) window */
311 gint top_window_sync; /* resize top_window when image dimensions change */
312 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */
313 gchar *title; /* window title to display left of file name */
314 gchar *title_right; /* window title to display right of file name */
315 gint title_show_zoom; /* option to include zoom in window title */
318 ImageState state; /* mask of IMAGE_STATE_* flags about current image */
320 void (*func_update)(ImageWindow *imd, gpointer data);
321 void (*func_complete)(ImageWindow *imd, gint preload, gpointer data);
322 void (*func_state)(ImageWindow *imd, ImageState state, gpointer data);
323 ImageTileRequestFunc func_tile_request;
324 ImageTileDisposeFunc func_tile_dispose;
326 gpointer data_update;
327 gpointer data_complete;
331 /* button, scroll functions */
332 void (*func_button)(ImageWindow *, gint button,
333 guint32 time, gdouble x, gdouble y, guint state, gpointer);
334 void (*func_drag)(ImageWindow *, gint button,
335 guint32 time, gdouble x, gdouble y, guint state, gdouble dx, gdouble dy,gpointer);
336 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction,
337 guint32 time, gdouble x, gdouble y, guint state, gpointer);
339 gpointer data_button;
341 gpointer data_scroll;
343 /* scroll notification (for scroll bar implementation) */
344 void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
346 gpointer data_scroll_notify;
348 /* collection info */
349 CollectionData *collection;
350 CollectInfo *collection_info;
353 gint color_profile_enable;
354 gint color_profile_input;
355 gint color_profile_screen;
356 gint color_profile_use_image;
359 AlterType delay_alter_type;
361 ImageLoader *read_ahead_il;
362 GdkPixbuf *read_ahead_pixbuf;
363 FileData *read_ahead_fd;
365 GdkPixbuf *prev_pixbuf;
369 gint auto_refresh_id;
370 gint auto_refresh_interval;
375 #define FILEDATA_MARKS_SIZE 6
377 struct _FileDataChangeInfo {
378 FileDataChangeType type;
386 gchar *original_path; /* key to file_data_pool hash table */
389 const gchar *extension;
392 gboolean marks[FILEDATA_MARKS_SIZE];
393 GList *sidecar_files;
394 FileData *parent; /* parent file if this is a sidecar file, NULL otherwise */
395 FileDataChangeInfo *change; /* for rename, move ... */
401 gulong histmap[256*4];
403 gint histogram_logmode;
417 GtkWidget *group_box;
421 /* menus, path selector */
423 GtkActionGroup *action_group;
424 GtkUIManager *ui_manager;
426 GtkWidget *path_entry;
430 LayoutLocation image_location;
434 ImageWindow *split_images[MAX_SPLIT_IMAGES];
435 ImageSplitMode split_mode;
436 gint active_split_image;
438 GtkWidget *split_image_widget;
440 gint connect_zoom, connect_scroll;
442 /* tools window (float) */
445 GtkWidget *tools_pane;
455 GtkWidget *thumb_button;
461 LayoutLocation dir_location;
471 LayoutLocation file_location;
475 GtkWidget *file_view;
478 SortType sort_method;
484 GtkWidget *info_progress_bar;
485 GtkWidget *info_sort;
486 GtkWidget *info_color;
487 GtkWidget *info_status;
488 GtkWidget *info_details;
489 GtkWidget *info_zoom;
493 SlideShowData *slideshow;
497 FullScreenData *full_screen;
505 /* directory update check */
512 GtkWidget *utility_box;
517 gint histogram_enabled;
518 Histogram *histogram;
520 gint bar_sort_enabled;
521 gint bar_exif_enabled;
522 gint bar_info_enabled;
525 gint bar_exif_advanced;
544 void (*select_func)(ViewDirList *vdl, const gchar *path, gpointer data);
545 gpointer select_data;
547 LayoutWindow *layout;
570 void (*select_func)(ViewDirTree *vdt, const gchar *path, gpointer data);
571 gpointer select_data;
573 LayoutWindow *layout;
590 SortType sort_method;
603 ThumbLoader *thumbs_loader;
604 FileData *thumbs_filedata;
607 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data);
608 gpointer data_thumb_status;
610 void (*func_status)(ViewFileList *vfl, gpointer data);
611 gpointer data_status;
614 LayoutWindow *layout;
635 struct _IconData *prev_selection;
637 GtkWidget *tip_window;
639 struct _IconData *tip_id;
641 struct _IconData *click_id;
643 struct _IconData *focus_id;
647 SortType sort_method;
659 ThumbLoader *thumbs_loader;
663 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data);
664 gpointer data_thumb_status;
666 void (*func_status)(ViewFileIcon *vfi, gpointer data);
667 gpointer data_status;
669 LayoutWindow *layout;
674 struct _SlideShowData
681 LayoutWindow *layout;
693 void (*stop_func)(SlideShowData *, gpointer);
699 struct _FullScreenData
704 GtkWidget *normal_window;
705 ImageWindow *normal_imd;
713 void (*stop_func)(FullScreenData *, gpointer);
717 struct _PixmapFolders
725 struct _SecureSaveInfo {
726 FILE *fp; /**< file stream pointer */
727 gchar *file_name; /**< final file name */
728 gchar *tmp_file_name; /**< temporary file name */
729 gint err; /**< set to non-zero value in case of error */
730 gint secure_save; /**< use secure save for this file */