/*
* Geeqie
* (C) 2006 John Ellis
- * Copyright (C) 2008 - 2009 The Geeqie Team
+ * Copyright (C) 2008 - 2012 The Geeqie Team
*
* Author: John Ellis
*
SORT_SIZE,
SORT_TIME,
SORT_PATH,
- SORT_NUMBER
+ SORT_NUMBER,
+ SORT_EXIFTIME
} SortType;
typedef enum {
ALTER_ROTATE_180,
ALTER_MIRROR,
ALTER_FLIP,
- ALTER_DESATURATE
} AlterType;
typedef enum {
NOTIFY_PRIORITY_MEDIUM,
NOTIFY_PRIORITY_LOW
} NotifyPriority;
-
+
typedef enum {
NOTIFY_MARKS = 1 << 1, /* changed marks */
NOTIFY_PIXBUF = 1 << 2, /* image was read into fd->pixbuf */
CHANGE_WARN_NO_WRITE_PERM = 1 << 1,
CHANGE_WARN_SAME = 1 << 2,
CHANGE_WARN_CHANGED_EXT = 1 << 3,
- CHANGE_ERROR_MASK = (~0) << 4, /* the values below are fatal errors */
- CHANGE_NO_READ_PERM = 1 << 4,
- CHANGE_NO_WRITE_PERM_DIR = 1 << 5,
- CHANGE_NO_DEST_DIR = 1 << 6,
- CHANGE_NO_WRITE_PERM_DEST_DIR = 1 << 7,
- CHANGE_NO_WRITE_PERM_DEST = 1 << 8,
- CHANGE_DEST_EXISTS = 1 << 9,
- CHANGE_NO_SRC = 1 << 10,
+ CHANGE_WARN_UNSAVED_META = 1 << 4,
+ CHANGE_WARN_NO_WRITE_PERM_DEST_DIR = 1 << 5,
+ CHANGE_ERROR_MASK = (~0) << 8, /* the values below are fatal errors */
+ CHANGE_NO_READ_PERM = 1 << 8,
+ CHANGE_NO_WRITE_PERM_DIR = 1 << 9,
+ CHANGE_NO_DEST_DIR = 1 << 10,
+ CHANGE_NO_WRITE_PERM_DEST = 1 << 12,
+ CHANGE_DEST_EXISTS = 1 << 13,
+ CHANGE_NO_SRC = 1 << 14,
CHANGE_GENERIC_ERROR = 1 << 16
} ChangeError;
METADATA_FORMATTED = 1 /* for display only */
} MetadataFormat;
+typedef enum {
+ STARTUP_PATH_CURRENT = 0,
+ STARTUP_PATH_LAST,
+ STARTUP_PATH_HOME,
+} StartUpPath;
+
+typedef enum {
+ TOOLBAR_MAIN,
+ TOOLBAR_STATUS,
+ TOOLBAR_COUNT
+} ToolbarType;
+
+typedef enum {
+ PR_STEREO_NONE = 0, /* do nothing */
+ PR_STEREO_DUAL = 1 << 0, /* independent stereo buffers, for example nvidia opengl */
+ PR_STEREO_FIXED = 1 << 1, /* custom position */
+ PR_STEREO_HORIZ = 1 << 2, /* side by side */
+ PR_STEREO_VERT = 1 << 3, /* above below */
+ PR_STEREO_RIGHT = 1 << 4, /* render right buffer */
+ PR_STEREO_ANAGLYPH_RC = 1 << 5, /* anaglyph red-cyan */
+ PR_STEREO_ANAGLYPH_GRAY = 1 << 6, /* anaglyph gray red-cyan*/
+ PR_STEREO_ANAGLYPH_DB = 1 << 7, /* anaglyph dubois*/
+ PR_STEREO_ANAGLYPH = PR_STEREO_ANAGLYPH_RC | PR_STEREO_ANAGLYPH_GRAY | PR_STEREO_ANAGLYPH_DB, /* anaglyph mask */
+
+ PR_STEREO_MIRROR_LEFT = 1 << 8, /* mirror */
+ PR_STEREO_FLIP_LEFT = 1 << 9, /* flip */
+
+ PR_STEREO_MIRROR_RIGHT = 1 << 10, /* mirror */
+ PR_STEREO_FLIP_RIGHT = 1 << 11, /* flip */
+
+ PR_STEREO_MIRROR = PR_STEREO_MIRROR_LEFT | PR_STEREO_MIRROR_RIGHT, /* mirror mask*/
+ PR_STEREO_FLIP = PR_STEREO_FLIP_LEFT | PR_STEREO_FLIP_RIGHT, /* flip mask*/
+ PR_STEREO_SWAP = 1 << 12, /* swap left and right buffers */
+ PR_STEREO_TEMP_DISABLE = 1 << 13, /* temporarily disable stereo mode if source image is not stereo */
+ PR_STEREO_HALF = 1 << 14
+} PixbufRendererStereoMode;
+
+typedef enum {
+ STEREO_PIXBUF_DEFAULT = 0,
+ STEREO_PIXBUF_SBS = 1,
+ STEREO_PIXBUF_CROSS = 2,
+ STEREO_PIXBUF_NONE = 3
+} StereoPixbufData;
#define MAX_SPLIT_IMAGES 4
gpointer data;
- gint idle_done_id;
+ guint idle_done_id; /* event source id */
};
struct _CollectInfo
CollectInfo *click_info;
GtkWidget *tip_window;
- gint tip_delay_id;
+ guint tip_delay_id; /* event source id */
CollectInfo *tip_info;
GdkWindow *marker_window;
CollectInfo *drop_info;
GList *drop_list;
- gint sync_idle_id;
- gint drop_idle_id;
+ guint sync_idle_id; /* event source id */
+ guint drop_idle_id; /* event source id */
gboolean show_text;
void (*func_button)(ImageWindow *, GdkEventButton *event, gpointer);
void (*func_drag)(ImageWindow *, GdkEventButton *event, gdouble dx, gdouble dy, gpointer);
void (*func_scroll)(ImageWindow *, GdkEventScroll *event, gpointer);
+ void (*func_focus_in)(ImageWindow *, gpointer);
gpointer data_button;
gpointer data_drag;
gpointer data_scroll;
+ gpointer data_focus_in;
/* scroll notification (for scroll bar implementation) */
void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
/* color profiles */
gboolean color_profile_enable;
gint color_profile_input;
- gint color_profile_screen;
gboolean color_profile_use_image;
gint color_profile_from_image;
gpointer cm;
gboolean delay_flip;
gint orientation;
gboolean desaturate;
-
- gboolean overlay_show_zoom; /* set to true if overlay is showing zoom ratio */
+ gint user_stereo;
};
#define FILEDATA_MARKS_SIZE 6
gchar *source;
gchar *dest;
gint error;
+ gboolean regroup_when_finished;
};
struct _FileData {
- gint magick;
+ guint magick;
gint type;
gchar *original_path; /* key to file_data_pool hash table */
gchar *path;
gint64 size;
time_t date;
mode_t mode; /* this is needed at least for notification in view_dir because it is preserved after the file/directory is deleted */
-
+ gint sidecar_priority;
+
guint marks; /* each bit represents one mark */
guint valid_marks; /* zero bit means that the corresponding mark needs to be reread */
GdkPixbuf *pixbuf; /* full-size image, only complete images, NULL during loading
all FileData with non-NULL pixbuf are referenced by image_cache */
-
+
HistMap *histmap;
gint ref;
gint user_orientation;
gint exif_orientation;
-
+
ExifData *exif;
+ time_t exifdate;
GHashTable *modified_xmp; // hash table which contains unwritten xmp metadata in format: key->list of string values
+ GList *cached_metadata;
};
struct _LayoutOptions
gboolean show_thumbnails;
gboolean show_marks;
gboolean show_directory_date;
+ gboolean show_info_pixel;
struct {
gint w;
gboolean tools_float;
gboolean tools_hidden;
gboolean toolbar_hidden;
- gboolean info_pixel_hidden;
gchar *home_path;
+ gchar *last_path;
+
+ StartUpPath startup_path;
+
+ gboolean exit_on_close;
};
struct _LayoutWindow
GtkActionGroup *action_group_editors;
guint ui_editors_id;
GtkUIManager *ui_manager;
- guint toolbar_merge_id;
- GList *toolbar_actions;
+ guint toolbar_merge_id[TOOLBAR_COUNT];
+ GList *toolbar_actions[TOOLBAR_COUNT];
GtkWidget *path_entry;
GtkWidget *menu_bar; /* referenced by lw, exist during whole lw lifetime */
/* toolbar */
- GtkWidget *toolbar; /* referenced by lw, exist during whole lw lifetime */
+ GtkWidget *toolbar[TOOLBAR_COUNT]; /* referenced by lw, exist during whole lw lifetime */
// gint toolbar_hidden;
// GtkWidget *thumb_button;
GtkWidget *info_box;
GtkWidget *info_progress_bar;
GtkWidget *info_sort;
- GtkWidget *info_color;
GtkWidget *info_status;
GtkWidget *info_details;
GtkWidget *info_zoom;
- GtkWidget *info_write;
GtkWidget *info_pixel;
-
+
/* slide show */
SlideShowData *slideshow;
// gint bar_width;
GtkWidget *exif_window;
-
- /* file list for edit menu */
- GList *editmenu_fd_list;
};
struct _ViewDir
FileData *drop_fd;
GList *drop_list;
- gint drop_scroll_id;
+ guint drop_scroll_id; /* event source id */
/* func list */
- void (*select_func)(ViewDir *vd, const gchar *path, gpointer data);
+ void (*select_func)(ViewDir *vd, FileData *fd, gpointer data);
gpointer select_data;
void (*dnd_drop_update_func)(ViewDir *vd);
struct _ViewDirInfoTree
{
- gint drop_expand_id;
+ guint drop_expand_id; /* event source id */
gint busy_ref;
};
gboolean marks_enabled;
gint active_mark;
gint clicked_mark;
-
+
/* refresh */
- gint refresh_idle_id;
+ guint refresh_idle_id; /* event source id */
+ time_t time_refresh_set; /* time when refresh_idle_id was set */
/* file list for edit menu */
GList *editmenu_fd_list;
gboolean thumbs_enabled;
- gint select_idle_id;
+ guint select_idle_id; /* event source id */
};
struct _IconData;
struct _IconData *prev_selection;
GtkWidget *tip_window;
- gint tip_delay_id;
+ guint tip_delay_id; /* event source id */
struct _IconData *tip_id;
struct _IconData *click_id;
struct _SlideShowData
{
- ImageWindow *imd;
+ LayoutWindow *lw; /* use this window to display the slideshow */
+ ImageWindow *imd; /* use this window only if lw is not available,
+ FIXME: it is probably required only by img-view.c and should be dropped with it */
GList *filelist;
CollectionData *cd;
FileData *dir_fd;
- LayoutWindow *layout;
GList *list;
GList *list_done;
FileData *slide_fd;
guint slide_count;
- gint timeout_id;
+ guint timeout_id; /* event source id */
gboolean from_selection;
GtkWidget *normal_window;
ImageWindow *normal_imd;
- gint hide_mouse_id;
- gint busy_mouse_id;
+ guint hide_mouse_id; /* event source id */
+ guint busy_mouse_id; /* event source id */
+
gint cursor_state;
- gint saver_block_id;
+ guint saver_block_id; /* event source id */
void (*stop_func)(FullScreenData *, gpointer);
gpointer stop_data;
+
+ gboolean same_region; /* the returned region will overlap the current location of widget. */
};
struct _PixmapFolders