4 * Copyright (C) 2008 The Geeqie Team
8 * This software is released under the GNU General Public License (GNU GPL).
9 * Please read the included file COPYING for more information.
10 * This software comes with no warranty of any kind, use at your own risk!
18 MOUSE_BUTTON_LEFT = 1,
19 MOUSE_BUTTON_MIDDLE = 2,
20 MOUSE_BUTTON_RIGHT = 3,
21 MOUSE_BUTTON_WHEEL_UP = 4,
22 MOUSE_BUTTON_WHEEL_DOWN = 5
31 CMD_COPY = GQ_EDITOR_GENERIC_SLOTS,
49 ALTER_NONE, /* do nothing */
51 ALTER_ROTATE_90_CC, /* counterclockwise */
61 LAYOUT_RIGHT = 1 << 1,
63 LAYOUT_BOTTOM = 1 << 3
69 IMAGE_STATE_IMAGE = 1 << 0,
70 IMAGE_STATE_LOADING = 1 << 1,
71 IMAGE_STATE_ERROR = 1 << 2,
72 IMAGE_STATE_COLOR_ADJ = 1 << 3,
73 IMAGE_STATE_ROTATE_AUTO = 1 << 4,
74 IMAGE_STATE_ROTATE_USER = 1 << 5,
75 IMAGE_STATE_DELAY_FLIP = 1 << 6
86 FILEDATA_CHANGE_DELETE,
88 FILEDATA_CHANGE_RENAME,
97 } MarkToSelectionMode;
103 } SelectionToMarkMode;
106 FORMAT_CLASS_UNKNOWN,
108 FORMAT_CLASS_RAWIMAGE,
115 SS_ERR_DISABLED, /**< secsave is disabled. */
116 SS_ERR_OUT_OF_MEM, /**< memory allocation failure */
118 /* see err field in SecureSaveInfo */
129 #define MAX_SPLIT_IMAGES 4
131 typedef struct _ImageLoader ImageLoader;
132 typedef struct _ThumbLoader ThumbLoader;
134 typedef struct _CollectInfo CollectInfo;
135 typedef struct _CollectionData CollectionData;
136 typedef struct _CollectTable CollectTable;
137 typedef struct _CollectWindow CollectWindow;
139 typedef struct _ImageWindow ImageWindow;
141 typedef struct _FileData FileData;
142 typedef struct _FileDataChangeInfo FileDataChangeInfo;
144 typedef struct _LayoutWindow LayoutWindow;
145 typedef struct _ViewDir ViewDir;
146 typedef struct _ViewDirInfoList ViewDirInfoList;
147 typedef struct _ViewDirInfoTree ViewDirInfoTree;
148 typedef struct _ViewFileList ViewFileList;
149 typedef struct _ViewFileIcon ViewFileIcon;
151 typedef struct _SlideShowData SlideShowData;
152 typedef struct _FullScreenData FullScreenData;
154 typedef struct _PixmapFolders PixmapFolders;
155 typedef struct _Histogram Histogram;
157 typedef struct _SecureSaveInfo SecureSaveInfo;
159 typedef struct _ConfOptions ConfOptions;
170 gint requested_width;
171 gint requested_height;
178 GdkPixbufLoader *loader;
181 void (*func_area_ready)(ImageLoader *, guint x, guint y, guint w, guint h, gpointer);
182 void (*func_error)(ImageLoader *, gpointer);
183 void (*func_done)(ImageLoader *, gpointer);
184 void (*func_percent)(ImageLoader *, gdouble, gpointer);
186 gpointer data_area_ready;
189 gpointer data_percent;
194 gint read_buffer_size;
195 gint idle_read_loop_count;
198 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
202 gint standard_loader;
204 GdkPixbuf *pixbuf; /* contains final (scaled) image when done */
210 gdouble percent_done;
215 ThumbLoaderFunc func_done;
216 ThumbLoaderFunc func_error;
217 ThumbLoaderFunc func_progress;
231 struct _CollectionData
236 SortType sort_method;
238 ThumbLoader *thumb_loader;
239 CollectInfo *thumb_info;
241 void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer);
242 gpointer info_updated_data;
253 /* contents changed since save flag */
256 GHashTable *existence;
269 CollectInfo *prev_selection;
271 CollectInfo *click_info;
273 GtkWidget *tip_window;
275 CollectInfo *tip_info;
277 GdkWindow *marker_window;
278 CollectInfo *marker_info;
280 GtkWidget *status_label;
281 GtkWidget *extra_label;
285 CollectInfo *focus_info;
288 CollectInfo *drop_info;
297 struct _CollectWindow
301 GtkWidget *status_box;
304 GtkWidget *close_dialog;
309 typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
310 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
311 typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
312 gint width, gint height, GdkPixbuf *pixbuf, gpointer);
316 GtkWidget *widget; /* use this to add it and show it */
322 gint64 size; /* file size (bytes) */
323 time_t mtime; /* file modified time stamp */
324 gint unknown; /* failed to load image */
330 /* top level (not necessarily parent) window */
331 gint top_window_sync; /* resize top_window when image dimensions change */
332 GtkWidget *top_window; /* window that gets title, and window to resize when 'fitting' */
333 gchar *title; /* window title to display left of file name */
334 gchar *title_right; /* window title to display right of file name */
335 gint title_show_zoom; /* option to include zoom in window title */
338 ImageState state; /* mask of IMAGE_STATE_* flags about current image */
340 void (*func_update)(ImageWindow *imd, gpointer data);
341 void (*func_complete)(ImageWindow *imd, gint preload, gpointer data);
342 void (*func_state)(ImageWindow *imd, ImageState state, gpointer data);
343 ImageTileRequestFunc func_tile_request;
344 ImageTileDisposeFunc func_tile_dispose;
346 gpointer data_update;
347 gpointer data_complete;
351 /* button, scroll functions */
352 void (*func_button)(ImageWindow *, gint button,
353 guint32 time, gdouble x, gdouble y, guint state, gpointer);
354 void (*func_drag)(ImageWindow *, gint button,
355 guint32 time, gdouble x, gdouble y, guint state, gdouble dx, gdouble dy,gpointer);
356 void (*func_scroll)(ImageWindow *, GdkScrollDirection direction,
357 guint32 time, gdouble x, gdouble y, guint state, gpointer);
359 gpointer data_button;
361 gpointer data_scroll;
363 /* scroll notification (for scroll bar implementation) */
364 void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
366 gpointer data_scroll_notify;
368 /* collection info */
369 CollectionData *collection;
370 CollectInfo *collection_info;
373 gint color_profile_enable;
374 gint color_profile_input;
375 gint color_profile_screen;
376 gint color_profile_use_image;
377 gint color_profile_from_image;
380 AlterType delay_alter_type;
382 ImageLoader *read_ahead_il;
383 GdkPixbuf *read_ahead_pixbuf;
384 FileData *read_ahead_fd;
386 GdkPixbuf *prev_pixbuf;
390 gint auto_refresh_id;
391 gint auto_refresh_interval;
397 gint overlay_show_zoom; /* set to true if overlay is showing zoom ratio */
400 #define FILEDATA_MARKS_SIZE 6
402 struct _FileDataChangeInfo {
403 FileDataChangeType type;
411 gchar *original_path; /* key to file_data_pool hash table */
414 const gchar *extension;
417 gboolean marks[FILEDATA_MARKS_SIZE];
418 GList *sidecar_files;
419 FileData *parent; /* parent file if this is a sidecar file, NULL otherwise */
420 FileDataChangeInfo *change; /* for rename, move ... */
423 gint user_orientation;
424 gint exif_orientation;
437 GtkWidget *group_box;
441 /* menus, path selector */
443 GtkActionGroup *action_group;
444 GtkUIManager *ui_manager;
446 GtkWidget *path_entry;
450 LayoutLocation image_location;
454 ImageWindow *split_images[MAX_SPLIT_IMAGES];
455 ImageSplitMode split_mode;
456 gint active_split_image;
458 GtkWidget *split_image_widget;
460 gint connect_zoom, connect_scroll;
462 /* tools window (float) */
465 GtkWidget *tools_pane;
475 GtkWidget *thumb_button;
481 LayoutLocation dir_location;
486 DirViewType dir_view_type;
490 LayoutLocation file_location;
494 GtkWidget *file_view;
497 SortType sort_method;
503 GtkWidget *info_progress_bar;
504 GtkWidget *info_sort;
505 GtkWidget *info_color;
506 GtkWidget *info_status;
507 GtkWidget *info_details;
508 GtkWidget *info_zoom;
512 SlideShowData *slideshow;
516 FullScreenData *full_screen;
524 /* directory update check */
531 GtkWidget *utility_box;
536 gint histogram_enabled;
537 Histogram *histogram;
539 gint bar_sort_enabled;
540 gint bar_exif_enabled;
541 gint bar_info_enabled;
544 gint bar_exif_advanced;
564 void (*select_func)(ViewDir *vd, const gchar *path, gpointer data);
565 gpointer select_data;
567 void (*dnd_drop_update_func)(ViewDir *vd);
568 void (*dnd_drop_leave_func)(ViewDir *vd);
570 LayoutWindow *layout;
577 struct _ViewDirInfoList
582 struct _ViewDirInfoTree
596 SortType sort_method;
609 ThumbLoader *thumbs_loader;
610 FileData *thumbs_filedata;
613 void (*func_thumb_status)(ViewFileList *vfl, gdouble val, const gchar *text, gpointer data);
614 gpointer data_thumb_status;
616 void (*func_status)(ViewFileList *vfl, gpointer data);
617 gpointer data_status;
620 LayoutWindow *layout;
641 struct _IconData *prev_selection;
643 GtkWidget *tip_window;
645 struct _IconData *tip_id;
647 struct _IconData *click_id;
649 struct _IconData *focus_id;
653 SortType sort_method;
665 ThumbLoader *thumbs_loader;
669 void (*func_thumb_status)(ViewFileIcon *vfi, gdouble val, const gchar *text, gpointer data);
670 gpointer data_thumb_status;
672 void (*func_status)(ViewFileIcon *vfi, gpointer data);
673 gpointer data_status;
675 LayoutWindow *layout;
680 struct _SlideShowData
687 LayoutWindow *layout;
699 void (*stop_func)(SlideShowData *, gpointer);
705 struct _FullScreenData
710 GtkWidget *normal_window;
711 ImageWindow *normal_imd;
719 void (*stop_func)(FullScreenData *, gpointer);
723 struct _PixmapFolders
731 struct _SecureSaveInfo {
732 FILE *fp; /**< file stream pointer */
733 gchar *file_name; /**< final file name */
734 gchar *tmp_file_name; /**< temporary file name */
735 gint err; /**< set to non-zero value in case of error */
736 gint secure_save; /**< use secure save for this file, internal use only */
737 gint preserve_perms; /**< whether to preserve perms, TRUE by default */
738 gint preserve_mtime; /**< whether to preserve mtime, FALSE by default */
739 gint unlink_on_error; /**< whether to remove temporary file on save failure, TRUE by default */
746 gint progressive_key_scrolling;
747 gint place_dialogs_under_mouse;
748 gint mousewheel_scrolls;
749 gint show_icon_names;
752 gint startup_path_enable;
754 gint enable_metadata_dirs;
756 gint tree_descend_subdirs;
758 gint lazy_image_sync;
759 gint update_on_time_change;
761 gint duplicates_similarity_threshold;
763 gint open_recent_list_maxsize;
768 gint enable_in_place_rename;
771 gint enable_delete_key;
772 gint safe_delete_enable;
773 gchar *safe_delete_path;
774 gint safe_delete_folder_maxsize;
779 gint exif_rotate_enable;
780 gint scroll_reset_method;
781 gint fit_window_to_image;
782 gint limit_window_size;
783 gint max_window_size;
784 gint limit_autofit_size;
785 gint max_autofit_size;
787 gint tile_cache_max; /* in megabytes */
789 gint enable_read_ahead;
793 gint zoom_to_fit_allow_expand;
795 gint zoom_increment; /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
797 gint use_custom_border_color;
798 GdkColor border_color;
800 gint read_buffer_size; /* bytes to read from file per read() */
801 gint idle_read_loop_count; /* the number of bytes to read per idle call (define x image.read_buffer_size) */
809 gint cache_into_dirs;
818 gint show_hidden_files;
819 gint show_dot_directory;
825 gint rectangular_selection;
829 gchar *editor_name[GQ_EDITOR_SLOTS];
830 gchar *editor_command[GQ_EDITOR_SLOTS];
836 gint case_sensitive; /* file sorting method (case) */
841 gint delay; /* in tenths of a second */
858 gint show_at_startup;
859 gchar *template_string;
869 DirViewType dir_view_type;
871 gint show_thumbnails;
892 gint save_window_positions;
896 gint tools_restore_state;
906 gchar *input_file[COLOR_PROFILE_INPUTS];
907 gchar *input_name[COLOR_PROFILE_INPUTS];