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 MOUSE_BUTTON_LEFT = 1,
18 MOUSE_BUTTON_MIDDLE = 2,
19 MOUSE_BUTTON_RIGHT = 3,
20 MOUSE_BUTTON_WHEEL_UP = 4,
21 MOUSE_BUTTON_WHEEL_DOWN = 5
30 CMD_COPY = GQ_EDITOR_GENERIC_SLOTS,
48 ALTER_NONE, /* do nothing */
50 ALTER_ROTATE_90_CC, /* counterclockwise */
60 LAYOUT_RIGHT = 1 << 1,
62 LAYOUT_BOTTOM = 1 << 3
68 IMAGE_STATE_IMAGE = 1 << 0,
69 IMAGE_STATE_LOADING = 1 << 1,
70 IMAGE_STATE_ERROR = 1 << 2,
71 IMAGE_STATE_COLOR_ADJ = 1 << 3,
72 IMAGE_STATE_ROTATE_AUTO = 1 << 4,
73 IMAGE_STATE_ROTATE_USER = 1 << 5,
74 IMAGE_STATE_DELAY_FLIP = 1 << 6
85 FILEDATA_CHANGE_DELETE,
87 FILEDATA_CHANGE_RENAME,
96 } MarkToSelectionMode;
102 } SelectionToMarkMode;
105 FORMAT_CLASS_UNKNOWN,
107 FORMAT_CLASS_RAWIMAGE,
114 SS_ERR_DISABLED, /**< secsave is disabled. */
115 SS_ERR_OUT_OF_MEM, /**< memory allocation failure */
117 /* see err field in SecureSaveInfo */
128 #define MAX_SPLIT_IMAGES 4
130 typedef struct _ImageLoader ImageLoader;
131 typedef struct _ThumbLoader ThumbLoader;
133 typedef struct _CollectInfo CollectInfo;
134 typedef struct _CollectionData CollectionData;
135 typedef struct _CollectTable CollectTable;
136 typedef struct _CollectWindow CollectWindow;
138 typedef struct _ImageWindow ImageWindow;
140 typedef struct _FileData FileData;
141 typedef struct _FileDataChangeInfo FileDataChangeInfo;
143 typedef struct _LayoutWindow LayoutWindow;
144 typedef struct _ViewDir ViewDir;
145 typedef struct _ViewDirInfoList ViewDirInfoList;
146 typedef struct _ViewDirInfoTree ViewDirInfoTree;
147 typedef struct _ViewFileList ViewFileList;
148 typedef struct _ViewFileIcon ViewFileIcon;
150 typedef struct _SlideShowData SlideShowData;
151 typedef struct _FullScreenData FullScreenData;
153 typedef struct _PixmapFolders PixmapFolders;
154 typedef struct _Histogram Histogram;
156 typedef struct _SecureSaveInfo SecureSaveInfo;
158 typedef struct _ConfOptions ConfOptions;
169 gint requested_width;
170 gint requested_height;
177 GdkPixbufLoader *loader;
180 void (*func_area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer);
181 void (*func_error)(ImageLoader *, gpointer);
182 void (*func_done)(ImageLoader *, gpointer);
183 void (*func_percent)(ImageLoader *, gdouble, gpointer);
185 gpointer data_area_ready;
188 gpointer data_percent;
193 gint read_buffer_size;
194 gint idle_read_loop_count;
197 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
201 gint standard_loader;
203 GdkPixbuf *pixbuf; /* contains final (scaled) image when done */
209 gdouble percent_done;
214 ThumbLoaderFunc func_done;
215 ThumbLoaderFunc func_error;
216 ThumbLoaderFunc func_progress;
230 struct _CollectionData
235 SortType sort_method;
237 ThumbLoader *thumb_loader;
238 CollectInfo *thumb_info;
240 void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer);
241 gpointer info_updated_data;
252 /* contents changed since save flag */
255 GHashTable *existence;
268 CollectInfo *prev_selection;
270 CollectInfo *click_info;
272 GtkWidget *tip_window;
274 CollectInfo *tip_info;
276 GdkWindow *marker_window;
277 CollectInfo *marker_info;
279 GtkWidget *status_label;
280 GtkWidget *extra_label;
284 CollectInfo *focus_info;
287 CollectInfo *drop_info;
296 struct _CollectWindow
300 GtkWidget *status_box;
303 GtkWidget *close_dialog;
308 typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
309 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
310 typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
311 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
315 GtkWidget *widget; /* use this to add it and show it */
321 gint64 size; /* file size (bytes) */
322 time_t mtime; /* file modified time stamp */
323 gint unknown; /* failed to load image */
329 /* top level (not necessarily parent) window */
330 gint top_window_sync; /* resize top_window when image dimensions change */
331 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */
332 gchar *title; /* window title to display left of file name */
333 gchar *title_right; /* window title to display right of file name */
334 gint title_show_zoom; /* option to include zoom in window title */
337 ImageState state; /* mask of IMAGE_STATE_* flags about current image */
339 void (*func_update)(ImageWindow *imd, gpointer data);
340 void (*func_complete)(ImageWindow *imd, gint preload, gpointer data);
341 void (*func_state)(ImageWindow *imd, ImageState state, gpointer data);
342 ImageTileRequestFunc func_tile_request;
343 ImageTileDisposeFunc func_tile_dispose;
345 gpointer data_update;
346 gpointer data_complete;
350 /* button, scroll functions */
351 void (*func_button)(ImageWindow *, gint button,
352 guint32 time, gdouble x, gdouble y, guint state, gpointer);
353 void (*func_drag)(ImageWindow *, gint button,
354 guint32 time, gdouble x, gdouble y, guint state, gdouble dx, gdouble dy,gpointer);
355 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction,
356 guint32 time, gdouble x, gdouble y, guint state, gpointer);
358 gpointer data_button;
360 gpointer data_scroll;
362 /* scroll notification (for scroll bar implementation) */
363 void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
365 gpointer data_scroll_notify;
367 /* collection info */
368 CollectionData *collection;
369 CollectInfo *collection_info;
372 gint color_profile_enable;
373 gint color_profile_input;
374 gint color_profile_screen;
375 gint color_profile_use_image;
376 gint color_profile_from_image;
379 AlterType delay_alter_type;
381 ImageLoader *read_ahead_il;
382 GdkPixbuf *read_ahead_pixbuf;
383 FileData *read_ahead_fd;
385 GdkPixbuf *prev_pixbuf;
389 gint auto_refresh_id;
390 gint auto_refresh_interval;
396 gint overlay_show_zoom; /* set to true if overlay is showing zoom ratio */
399 #define FILEDATA_MARKS_SIZE 6
401 struct _FileDataChangeInfo {
402 FileDataChangeType type;
410 gchar *original_path; /* key to file_data_pool hash table */
413 const gchar *extension;
416 gboolean marks[FILEDATA_MARKS_SIZE];
417 GList *sidecar_files;
418 FileData *parent; /* parent file if this is a sidecar file, NULL otherwise */
419 FileDataChangeInfo *change; /* for rename, move ... */
422 gint user_orientation;
423 gint exif_orientation;
436 GtkWidget *group_box;
440 /* menus, path selector */
442 GtkActionGroup *action_group;
443 GtkUIManager *ui_manager;
445 GtkWidget *path_entry;
449 LayoutLocation image_location;
453 ImageWindow *split_images[MAX_SPLIT_IMAGES];
454 ImageSplitMode split_mode;
455 gint active_split_image;
457 GtkWidget *split_image_widget;
459 gint connect_zoom, connect_scroll;
461 /* tools window (float) */
464 GtkWidget *tools_pane;
474 GtkWidget *thumb_button;
480 LayoutLocation dir_location;
485 DirViewType dir_view_type;
489 LayoutLocation file_location;
493 GtkWidget *file_view;
496 SortType sort_method;
502 GtkWidget *info_progress_bar;
503 GtkWidget *info_sort;
504 GtkWidget *info_color;
505 GtkWidget *info_status;
506 GtkWidget *info_details;
507 GtkWidget *info_zoom;
511 SlideShowData *slideshow;
515 FullScreenData *full_screen;
523 /* directory update check */
530 GtkWidget *utility_box;
535 gint histogram_enabled;
536 Histogram *histogram;
538 gint bar_sort_enabled;
539 gint bar_exif_enabled;
540 gint bar_info_enabled;
543 gint bar_exif_advanced;
563 void (*select_func)(ViewDir *vd, const gchar *path, gpointer data);
564 gpointer select_data;
566 void (*dnd_drop_update_func)(ViewDir *vd);
567 void (*dnd_drop_leave_func)(ViewDir *vd);
569 LayoutWindow *layout;
576 struct _ViewDirInfoList
581 struct _ViewDirInfoTree
595 SortType sort_method;
608 ThumbLoader *thumbs_loader;
609 FileData *thumbs_filedata;
612 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data);
613 gpointer data_thumb_status;
615 void (*func_status)(ViewFileList *vfl, gpointer data);
616 gpointer data_status;
619 LayoutWindow *layout;
640 struct _IconData *prev_selection;
642 GtkWidget *tip_window;
644 struct _IconData *tip_id;
646 struct _IconData *click_id;
648 struct _IconData *focus_id;
652 SortType sort_method;
664 ThumbLoader *thumbs_loader;
668 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data);
669 gpointer data_thumb_status;
671 void (*func_status)(ViewFileIcon *vfi, gpointer data);
672 gpointer data_status;
674 LayoutWindow *layout;
679 struct _SlideShowData
686 LayoutWindow *layout;
698 void (*stop_func)(SlideShowData *, gpointer);
704 struct _FullScreenData
709 GtkWidget *normal_window;
710 ImageWindow *normal_imd;
718 void (*stop_func)(FullScreenData *, gpointer);
722 struct _PixmapFolders
730 struct _SecureSaveInfo {
731 FILE *fp; /**< file stream pointer */
732 gchar *file_name; /**< final file name */
733 gchar *tmp_file_name; /**< temporary file name */
734 gint err; /**< set to non-zero value in case of error */
735 gint secure_save; /**< use secure save for this file, internal use only */
736 gint preserve_perms; /**< whether to preserve perms, TRUE by default */
737 gint preserve_mtime; /**< whether to preserve mtime, FALSE by default */
738 gint unlink_on_error; /**< whether to remove temporary file on save failure, TRUE by default */
745 gint progressive_key_scrolling;
746 gint place_dialogs_under_mouse;
747 gint mousewheel_scrolls;
748 gint show_icon_names;
751 gint startup_path_enable;
753 gint enable_metadata_dirs;
755 gint tree_descend_subdirs;
757 gint lazy_image_sync;
758 gint update_on_time_change;
760 gint duplicates_similarity_threshold;
762 gint open_recent_list_maxsize;
767 gint enable_in_place_rename;
770 gint enable_delete_key;
771 gint safe_delete_enable;
772 gchar *safe_delete_path;
773 gint safe_delete_folder_maxsize;
778 gint exif_rotate_enable;
779 gint scroll_reset_method;
780 gint fit_window_to_image;
781 gint limit_window_size;
782 gint max_window_size;
783 gint limit_autofit_size;
784 gint max_autofit_size;
786 gint tile_cache_max; /* in megabytes */
788 gint enable_read_ahead;
792 gint zoom_to_fit_allow_expand;
794 gint zoom_increment; /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
796 gint use_custom_border_color;
797 GdkColor border_color;
799 gint read_buffer_size; /* bytes to read from file per read() */
800 gint idle_read_loop_count; /* the number of bytes to read per idle call (define x image.read_buffer_size) */
808 gint cache_into_dirs;
817 gint show_hidden_files;
818 gint show_dot_directory;
824 gint rectangular_selection;
828 gchar *editor_name[GQ_EDITOR_SLOTS];
829 gchar *editor_command[GQ_EDITOR_SLOTS];
835 gint case_sensitive; /* file sorting method (case) */
840 gint delay; /* in tenths of a second */
857 gint show_at_startup;
858 gchar *template_string;
868 DirViewType dir_view_type;
870 gint show_thumbnails;
891 gint save_window_positions;
895 gint tools_restore_state;
905 gchar *input_file[COLOR_PROFILE_INPUTS];
906 gchar *input_name[COLOR_PROFILE_INPUTS];