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!
22 CMD_COPY = GQ_EDITOR_GENERIC_SLOTS,
40 ALTER_NONE, /* do nothing */
42 ALTER_ROTATE_90_CC, /* counterclockwise */
52 LAYOUT_RIGHT = 1 << 1,
54 LAYOUT_BOTTOM = 1 << 3
60 IMAGE_STATE_IMAGE = 1 << 0,
61 IMAGE_STATE_LOADING = 1 << 1,
62 IMAGE_STATE_ERROR = 1 << 2,
63 IMAGE_STATE_COLOR_ADJ = 1 << 3,
64 IMAGE_STATE_ROTATE_AUTO = 1 << 4,
65 IMAGE_STATE_ROTATE_USER = 1 << 5,
66 IMAGE_STATE_DELAY_FLIP = 1 << 6
77 FILEDATA_CHANGE_DELETE,
79 FILEDATA_CHANGE_RENAME,
88 } MarkToSelectionMode;
94 } SelectionToMarkMode;
99 FORMAT_CLASS_RAWIMAGE,
106 SS_ERR_DISABLED, /**< secsave is disabled. */
107 SS_ERR_OUT_OF_MEM, /**< memory allocation failure */
109 /* see err field in SecureSaveInfo */
120 #define MAX_SPLIT_IMAGES 4
122 typedef struct _ImageLoader ImageLoader;
123 typedef struct _ThumbLoader ThumbLoader;
125 typedef struct _CollectInfo CollectInfo;
126 typedef struct _CollectionData CollectionData;
127 typedef struct _CollectTable CollectTable;
128 typedef struct _CollectWindow CollectWindow;
130 typedef struct _ImageWindow ImageWindow;
132 typedef struct _FileData FileData;
133 typedef struct _FileDataChangeInfo FileDataChangeInfo;
135 typedef struct _LayoutWindow LayoutWindow;
136 typedef struct _ViewDir ViewDir;
137 typedef struct _ViewDirInfoList ViewDirInfoList;
138 typedef struct _ViewDirInfoTree ViewDirInfoTree;
139 typedef struct _ViewFileList ViewFileList;
140 typedef struct _ViewFileIcon ViewFileIcon;
142 typedef struct _SlideShowData SlideShowData;
143 typedef struct _FullScreenData FullScreenData;
145 typedef struct _PixmapFolders PixmapFolders;
146 typedef struct _Histogram Histogram;
148 typedef struct _SecureSaveInfo SecureSaveInfo;
150 typedef struct _ConfOptions ConfOptions;
161 gint requested_width;
162 gint requested_height;
169 GdkPixbufLoader *loader;
172 void (*func_area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer);
173 void (*func_error)(ImageLoader *, gpointer);
174 void (*func_done)(ImageLoader *, gpointer);
175 void (*func_percent)(ImageLoader *, gdouble, gpointer);
177 gpointer data_area_ready;
180 gpointer data_percent;
185 gint read_buffer_size;
186 gint idle_read_loop_count;
189 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
193 gint standard_loader;
195 GdkPixbuf *pixbuf; /* contains final (scaled) image when done */
201 gdouble percent_done;
206 ThumbLoaderFunc func_done;
207 ThumbLoaderFunc func_error;
208 ThumbLoaderFunc func_progress;
222 struct _CollectionData
227 SortType sort_method;
229 ThumbLoader *thumb_loader;
230 CollectInfo *thumb_info;
232 void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer);
233 gpointer info_updated_data;
244 /* contents changed since save flag */
247 GHashTable *existence;
260 CollectInfo *prev_selection;
262 CollectInfo *click_info;
264 GtkWidget *tip_window;
266 CollectInfo *tip_info;
268 GdkWindow *marker_window;
269 CollectInfo *marker_info;
271 GtkWidget *status_label;
272 GtkWidget *extra_label;
276 CollectInfo *focus_info;
279 CollectInfo *drop_info;
288 struct _CollectWindow
292 GtkWidget *status_box;
295 GtkWidget *close_dialog;
300 typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
301 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
302 typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
303 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
307 GtkWidget *widget; /* use this to add it and show it */
313 gint64 size; /* file size (bytes) */
314 time_t mtime; /* file modified time stamp */
315 gint unknown; /* failed to load image */
321 /* top level (not necessarily parent) window */
322 gint top_window_sync; /* resize top_window when image dimensions change */
323 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */
324 gchar *title; /* window title to display left of file name */
325 gchar *title_right; /* window title to display right of file name */
326 gint title_show_zoom; /* option to include zoom in window title */
329 ImageState state; /* mask of IMAGE_STATE_* flags about current image */
331 void (*func_update)(ImageWindow *imd, gpointer data);
332 void (*func_complete)(ImageWindow *imd, gint preload, gpointer data);
333 void (*func_state)(ImageWindow *imd, ImageState state, gpointer data);
334 ImageTileRequestFunc func_tile_request;
335 ImageTileDisposeFunc func_tile_dispose;
337 gpointer data_update;
338 gpointer data_complete;
342 /* button, scroll functions */
343 void (*func_button)(ImageWindow *, gint button,
344 guint32 time, gdouble x, gdouble y, guint state, gpointer);
345 void (*func_drag)(ImageWindow *, gint button,
346 guint32 time, gdouble x, gdouble y, guint state, gdouble dx, gdouble dy,gpointer);
347 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction,
348 guint32 time, gdouble x, gdouble y, guint state, gpointer);
350 gpointer data_button;
352 gpointer data_scroll;
354 /* scroll notification (for scroll bar implementation) */
355 void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
357 gpointer data_scroll_notify;
359 /* collection info */
360 CollectionData *collection;
361 CollectInfo *collection_info;
364 gint color_profile_enable;
365 gint color_profile_input;
366 gint color_profile_screen;
367 gint color_profile_use_image;
368 gint color_profile_from_image;
371 AlterType delay_alter_type;
373 ImageLoader *read_ahead_il;
374 GdkPixbuf *read_ahead_pixbuf;
375 FileData *read_ahead_fd;
377 GdkPixbuf *prev_pixbuf;
381 gint auto_refresh_id;
382 gint auto_refresh_interval;
388 gint overlay_show_zoom; /* set to true if overlay is showing zoom ratio */
391 #define FILEDATA_MARKS_SIZE 6
393 struct _FileDataChangeInfo {
394 FileDataChangeType type;
402 gchar *original_path; /* key to file_data_pool hash table */
405 const gchar *extension;
408 gboolean marks[FILEDATA_MARKS_SIZE];
409 GList *sidecar_files;
410 FileData *parent; /* parent file if this is a sidecar file, NULL otherwise */
411 FileDataChangeInfo *change; /* for rename, move ... */
414 gint user_orientation;
415 gint exif_orientation;
428 GtkWidget *group_box;
432 /* menus, path selector */
434 GtkActionGroup *action_group;
435 GtkUIManager *ui_manager;
437 GtkWidget *path_entry;
441 LayoutLocation image_location;
445 ImageWindow *split_images[MAX_SPLIT_IMAGES];
446 ImageSplitMode split_mode;
447 gint active_split_image;
449 GtkWidget *split_image_widget;
451 gint connect_zoom, connect_scroll;
453 /* tools window (float) */
456 GtkWidget *tools_pane;
466 GtkWidget *thumb_button;
472 LayoutLocation dir_location;
477 DirViewType dir_view_type;
481 LayoutLocation file_location;
485 GtkWidget *file_view;
488 SortType sort_method;
494 GtkWidget *info_progress_bar;
495 GtkWidget *info_sort;
496 GtkWidget *info_color;
497 GtkWidget *info_status;
498 GtkWidget *info_details;
499 GtkWidget *info_zoom;
503 SlideShowData *slideshow;
507 FullScreenData *full_screen;
515 /* directory update check */
522 GtkWidget *utility_box;
527 gint histogram_enabled;
528 Histogram *histogram;
530 gint bar_sort_enabled;
531 gint bar_exif_enabled;
532 gint bar_info_enabled;
535 gint bar_exif_advanced;
555 void (*select_func)(ViewDir *vd, const gchar *path, gpointer data);
556 gpointer select_data;
558 void (*dnd_drop_update_func)(ViewDir *vd);
559 void (*dnd_drop_leave_func)(ViewDir *vd);
561 LayoutWindow *layout;
568 struct _ViewDirInfoList
573 struct _ViewDirInfoTree
587 SortType sort_method;
600 ThumbLoader *thumbs_loader;
601 FileData *thumbs_filedata;
604 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data);
605 gpointer data_thumb_status;
607 void (*func_status)(ViewFileList *vfl, gpointer data);
608 gpointer data_status;
611 LayoutWindow *layout;
632 struct _IconData *prev_selection;
634 GtkWidget *tip_window;
636 struct _IconData *tip_id;
638 struct _IconData *click_id;
640 struct _IconData *focus_id;
644 SortType sort_method;
656 ThumbLoader *thumbs_loader;
660 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data);
661 gpointer data_thumb_status;
663 void (*func_status)(ViewFileIcon *vfi, gpointer data);
664 gpointer data_status;
666 LayoutWindow *layout;
671 struct _SlideShowData
678 LayoutWindow *layout;
690 void (*stop_func)(SlideShowData *, gpointer);
696 struct _FullScreenData
701 GtkWidget *normal_window;
702 ImageWindow *normal_imd;
710 void (*stop_func)(FullScreenData *, gpointer);
714 struct _PixmapFolders
722 struct _SecureSaveInfo {
723 FILE *fp; /**< file stream pointer */
724 gchar *file_name; /**< final file name */
725 gchar *tmp_file_name; /**< temporary file name */
726 gint err; /**< set to non-zero value in case of error */
727 gint secure_save; /**< use secure save for this file, internal use only */
728 gint preserve_perms; /**< whether to preserve perms, TRUE by default */
729 gint preserve_mtime; /**< whether to preserve mtime, FALSE by default */
730 gint unlink_on_error; /**< whether to remove temporary file on save failure, TRUE by default */
737 gint progressive_key_scrolling;
738 gint place_dialogs_under_mouse;
739 gint mousewheel_scrolls;
740 gint show_icon_names;
743 gint startup_path_enable;
745 gint enable_metadata_dirs;
747 gint tree_descend_subdirs;
749 gint lazy_image_sync;
750 gint update_on_time_change;
752 gint duplicates_similarity_threshold;
754 gint open_recent_list_maxsize;
758 gint enable_in_place_rename;
761 gint enable_delete_key;
762 gint safe_delete_enable;
763 gchar *safe_delete_path;
764 gint safe_delete_folder_maxsize;
769 gint exif_rotate_enable;
770 gint scroll_reset_method;
771 gint fit_window_to_image;
772 gint limit_window_size;
773 gint max_window_size;
774 gint limit_autofit_size;
775 gint max_autofit_size;
777 gint tile_cache_max; /* in megabytes */
779 gint enable_read_ahead;
783 gint zoom_to_fit_allow_expand;
785 gint zoom_increment; /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
787 gint use_custom_border_color;
788 GdkColor border_color;
790 gint read_buffer_size; /* bytes to read from file per read() */
791 gint idle_read_loop_count; /* the number of bytes to read per idle call (define x image.read_buffer_size) */
799 gint cache_into_dirs;
808 gint show_hidden_files;
809 gint show_dot_directory;
815 gint rectangular_selection;
819 gchar *editor_name[GQ_EDITOR_SLOTS];
820 gchar *editor_command[GQ_EDITOR_SLOTS];
826 gint case_sensitive; /* file sorting method (case) */
831 gint delay; /* in tenths of a second */
852 DirViewType dir_view_type;
854 gint show_thumbnails;
875 gint save_window_positions;
879 gint tools_restore_state;
889 gchar *input_file[COLOR_PROFILE_INPUTS];
890 gchar *input_name[COLOR_PROFILE_INPUTS];