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 = GQ_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;
144 typedef struct _ConfOptions ConfOptions;
157 gint requested_width;
158 gint requested_height;
165 GdkPixbufLoader *loader;
168 void (*func_area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer);
169 void (*func_error)(ImageLoader *, gpointer);
170 void (*func_done)(ImageLoader *, gpointer);
171 void (*func_percent)(ImageLoader *, gdouble, gpointer);
173 gpointer data_area_ready;
176 gpointer data_percent;
181 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
185 gint standard_loader;
187 GdkPixbuf *pixbuf; /* contains final (scaled) image when done */
193 gdouble percent_done;
198 ThumbLoaderFunc func_done;
199 ThumbLoaderFunc func_error;
200 ThumbLoaderFunc func_progress;
214 struct _CollectionData
219 SortType sort_method;
221 ThumbLoader *thumb_loader;
222 CollectInfo *thumb_info;
224 void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer);
225 gpointer info_updated_data;
236 /* contents changed since save flag */
239 GHashTable *existence;
252 CollectInfo *prev_selection;
254 CollectInfo *click_info;
256 GtkWidget *tip_window;
258 CollectInfo *tip_info;
260 GdkWindow *marker_window;
261 CollectInfo *marker_info;
263 GtkWidget *status_label;
264 GtkWidget *extra_label;
268 CollectInfo *focus_info;
271 CollectInfo *drop_info;
280 struct _CollectWindow
284 GtkWidget *status_box;
287 GtkWidget *close_dialog;
292 typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
293 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
294 typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
295 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
299 GtkWidget *widget; /* use this to add it and show it */
305 gint64 size; /* file size (bytes) */
306 time_t mtime; /* file modified time stamp */
307 gint unknown; /* failed to load image */
313 /* top level (not necessarily parent) window */
314 gint top_window_sync; /* resize top_window when image dimensions change */
315 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */
316 gchar *title; /* window title to display left of file name */
317 gchar *title_right; /* window title to display right of file name */
318 gint title_show_zoom; /* option to include zoom in window title */
321 ImageState state; /* mask of IMAGE_STATE_* flags about current image */
323 void (*func_update)(ImageWindow *imd, gpointer data);
324 void (*func_complete)(ImageWindow *imd, gint preload, gpointer data);
325 void (*func_state)(ImageWindow *imd, ImageState state, gpointer data);
326 ImageTileRequestFunc func_tile_request;
327 ImageTileDisposeFunc func_tile_dispose;
329 gpointer data_update;
330 gpointer data_complete;
334 /* button, scroll functions */
335 void (*func_button)(ImageWindow *, gint button,
336 guint32 time, gdouble x, gdouble y, guint state, gpointer);
337 void (*func_drag)(ImageWindow *, gint button,
338 guint32 time, gdouble x, gdouble y, guint state, gdouble dx, gdouble dy,gpointer);
339 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction,
340 guint32 time, gdouble x, gdouble y, guint state, gpointer);
342 gpointer data_button;
344 gpointer data_scroll;
346 /* scroll notification (for scroll bar implementation) */
347 void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
349 gpointer data_scroll_notify;
351 /* collection info */
352 CollectionData *collection;
353 CollectInfo *collection_info;
356 gint color_profile_enable;
357 gint color_profile_input;
358 gint color_profile_screen;
359 gint color_profile_use_image;
362 AlterType delay_alter_type;
364 ImageLoader *read_ahead_il;
365 GdkPixbuf *read_ahead_pixbuf;
366 FileData *read_ahead_fd;
368 GdkPixbuf *prev_pixbuf;
372 gint auto_refresh_id;
373 gint auto_refresh_interval;
378 #define FILEDATA_MARKS_SIZE 6
380 struct _FileDataChangeInfo {
381 FileDataChangeType type;
389 gchar *original_path; /* key to file_data_pool hash table */
392 const gchar *extension;
395 gboolean marks[FILEDATA_MARKS_SIZE];
396 GList *sidecar_files;
397 FileData *parent; /* parent file if this is a sidecar file, NULL otherwise */
398 FileDataChangeInfo *change; /* for rename, move ... */
413 GtkWidget *group_box;
417 /* menus, path selector */
419 GtkActionGroup *action_group;
420 GtkUIManager *ui_manager;
422 GtkWidget *path_entry;
426 LayoutLocation image_location;
430 ImageWindow *split_images[MAX_SPLIT_IMAGES];
431 ImageSplitMode split_mode;
432 gint active_split_image;
434 GtkWidget *split_image_widget;
436 gint connect_zoom, connect_scroll;
438 /* tools window (float) */
441 GtkWidget *tools_pane;
451 GtkWidget *thumb_button;
457 LayoutLocation dir_location;
467 LayoutLocation file_location;
471 GtkWidget *file_view;
474 SortType sort_method;
480 GtkWidget *info_progress_bar;
481 GtkWidget *info_sort;
482 GtkWidget *info_color;
483 GtkWidget *info_status;
484 GtkWidget *info_details;
485 GtkWidget *info_zoom;
489 SlideShowData *slideshow;
493 FullScreenData *full_screen;
501 /* directory update check */
508 GtkWidget *utility_box;
513 gint histogram_enabled;
514 Histogram *histogram;
516 gint bar_sort_enabled;
517 gint bar_exif_enabled;
518 gint bar_info_enabled;
521 gint bar_exif_advanced;
540 void (*select_func)(ViewDirList *vdl, const gchar *path, gpointer data);
541 gpointer select_data;
543 LayoutWindow *layout;
566 void (*select_func)(ViewDirTree *vdt, const gchar *path, gpointer data);
567 gpointer select_data;
569 LayoutWindow *layout;
586 SortType sort_method;
599 ThumbLoader *thumbs_loader;
600 FileData *thumbs_filedata;
603 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data);
604 gpointer data_thumb_status;
606 void (*func_status)(ViewFileList *vfl, gpointer data);
607 gpointer data_status;
610 LayoutWindow *layout;
631 struct _IconData *prev_selection;
633 GtkWidget *tip_window;
635 struct _IconData *tip_id;
637 struct _IconData *click_id;
639 struct _IconData *focus_id;
643 SortType sort_method;
655 ThumbLoader *thumbs_loader;
659 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data);
660 gpointer data_thumb_status;
662 void (*func_status)(ViewFileIcon *vfi, gpointer data);
663 gpointer data_status;
665 LayoutWindow *layout;
670 struct _SlideShowData
677 LayoutWindow *layout;
689 void (*stop_func)(SlideShowData *, gpointer);
695 struct _FullScreenData
700 GtkWidget *normal_window;
701 ImageWindow *normal_imd;
709 void (*stop_func)(FullScreenData *, gpointer);
713 struct _PixmapFolders
721 struct _SecureSaveInfo {
722 FILE *fp; /**< file stream pointer */
723 gchar *file_name; /**< final file name */
724 gchar *tmp_file_name; /**< temporary file name */
725 gint err; /**< set to non-zero value in case of error */
726 gint secure_save; /**< use secure save for this file, internal use only */
727 gint preserve_perms; /**< whether to preserve perms, TRUE by default */
728 gint preserve_mtime; /**< whether to preserve mtime, FALSE by default */
729 gint unlink_on_error; /**< whether to remove temporary file on save failure, TRUE by default */
738 gint main_window_maximized;
744 gint float_window_divider;
746 gint window_hdivider_pos;
747 gint window_vdivider_pos;
749 gint save_window_positions;
753 gint progressive_key_scrolling;
755 gint startup_path_enable;
758 gint enable_delete_key;
759 gint safe_delete_enable;
760 gchar *safe_delete_path;
761 gint safe_delete_size;
765 gint scroll_reset_method;
767 gint limit_window_size;
768 gint zoom_to_fit_expands;
769 gint max_window_size;
770 gint limit_autofit_size;
771 gint max_autofit_size;
772 gint thumb_max_width;
773 gint thumb_max_height;
774 gint enable_thumb_caching;
775 gint enable_thumb_dirs;
777 gint use_xvpics_thumbnails;
778 gint thumbnail_spec_standard;
779 gint enable_metadata_dirs;
781 gint file_filter_disable;
782 gchar *editor_name[GQ_EDITOR_SLOTS];
783 gchar *editor_command[GQ_EDITOR_SLOTS];
785 gint thumbnails_enabled;
786 SortType file_sort_method;
787 gint file_sort_ascending;
789 gint slideshow_delay; /* in tenths of a second */
790 gint slideshow_random;
791 gint slideshow_repeat;
793 gint mousewheel_scrolls;
794 gint enable_in_place_rename;
796 gint user_specified_window_background;
797 GdkColor window_background_color;
799 gint fullscreen_screen;
800 gint fullscreen_clean_flip;
801 gint fullscreen_disable_saver;
802 gint fullscreen_above;
803 gint show_fullscreen_info;
804 gchar *fullscreen_info;
806 gint dupe_custom_threshold;
808 gint recent_list_max;
810 gint collection_rectangular_selection;
812 gint tile_cache_max; /* in megabytes */
813 gint thumbnail_quality;
817 gint zoom_increment; /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
819 gint enable_read_ahead;
821 gint place_dialogs_under_mouse;