Issue #332 Rename function can delete files
[geeqie.git] / src / typedefs.h
index dba1c12..ca34ef6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Geeqie
  * (C) 2006 John Ellis
- * Copyright (C) 2008 - 2010 The Geeqie Team
+ * Copyright (C) 2008 - 2012 The Geeqie Team
  *
  * Author: John Ellis
  *
@@ -49,8 +49,10 @@ typedef enum {
        SORT_NAME,
        SORT_SIZE,
        SORT_TIME,
+       SORT_CTIME,
        SORT_PATH,
-       SORT_NUMBER
+       SORT_NUMBER,
+       SORT_EXIFTIME
 } SortType;
 
 typedef enum {
@@ -139,7 +141,7 @@ 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 */
@@ -158,11 +160,12 @@ typedef enum {
        CHANGE_WARN_SAME               = 1 << 2,
        CHANGE_WARN_CHANGED_EXT        = 1 << 3,
        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_DIR  = 1 << 11,
+       CHANGE_DUPLICATE_DEST          = 1 << 11,
        CHANGE_NO_WRITE_PERM_DEST      = 1 << 12,
        CHANGE_DEST_EXISTS             = 1 << 13,
        CHANGE_NO_SRC                  = 1 << 14,
@@ -187,28 +190,42 @@ typedef enum {
 } 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
+       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_GM      = 1 << 6,  /* anaglyph green-magenta */
+       PR_STEREO_ANAGLYPH_YB      = 1 << 7,  /* anaglyph yellow-blue */
+       PR_STEREO_ANAGLYPH_GRAY_RC = 1 << 8,  /* anaglyph gray red-cyan*/
+       PR_STEREO_ANAGLYPH_GRAY_GM = 1 << 9,  /* anaglyph gray green-magenta */
+       PR_STEREO_ANAGLYPH_GRAY_YB = 1 << 10, /* anaglyph gray yellow-blue */
+       PR_STEREO_ANAGLYPH_DB_RC   = 1 << 11, /* anaglyph dubois red-cyan */
+       PR_STEREO_ANAGLYPH_DB_GM   = 1 << 12, /* anaglyph dubois green-magenta */
+       PR_STEREO_ANAGLYPH_DB_YB   = 1 << 13, /* anaglyph dubois yellow-blue */
+       PR_STEREO_ANAGLYPH         = PR_STEREO_ANAGLYPH_RC |
+                                    PR_STEREO_ANAGLYPH_GM |
+                                    PR_STEREO_ANAGLYPH_YB |
+                                    PR_STEREO_ANAGLYPH_GRAY_RC |
+                                    PR_STEREO_ANAGLYPH_GRAY_GM |
+                                    PR_STEREO_ANAGLYPH_GRAY_YB |
+                                    PR_STEREO_ANAGLYPH_DB_RC |
+                                    PR_STEREO_ANAGLYPH_DB_GM |
+                                    PR_STEREO_ANAGLYPH_DB_YB, /* anaglyph mask */
+
+       PR_STEREO_MIRROR_LEFT      = 1 << 14, /* mirror */
+       PR_STEREO_FLIP_LEFT        = 1 << 15, /* flip */
+
+       PR_STEREO_MIRROR_RIGHT     = 1 << 16, /* mirror */
+       PR_STEREO_FLIP_RIGHT       = 1 << 17, /* 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 << 18,  /* swap left and right buffers */
+       PR_STEREO_TEMP_DISABLE     = 1 << 19,  /* temporarily disable stereo mode if source image is not stereo */
+       PR_STEREO_HALF             = 1 << 20
 } PixbufRendererStereoMode;
 
 typedef enum {
@@ -486,7 +503,7 @@ struct _FileDataChangeInfo {
 };
 
 struct _FileData {
-       gint magick;
+       guint magick;
        gint type;
        gchar *original_path; /* key to file_data_pool hash table */
        gchar *path;
@@ -496,8 +513,10 @@ struct _FileData {
        gchar *collate_key_name_nocase;
        gint64 size;
        time_t date;
+       time_t cdate;
        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 */
 
@@ -509,17 +528,19 @@ struct _FileData {
 
        GdkPixbuf *pixbuf; /* full-size image, only complete images, NULL during loading
                              all FileData with non-NULL pixbuf are referenced by image_cache */
-                             
+
        HistMap *histmap;
 
+       gboolean locked;
        gint ref;
        gint version; /* increased when any field in this structure is changed */
        gboolean disable_grouping;
 
        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;
 };
@@ -670,7 +691,7 @@ struct _LayoutWindow
        GtkWidget *info_details;
        GtkWidget *info_zoom;
        GtkWidget *info_pixel;
-       
+
        /* slide show */
 
        SlideShowData *slideshow;
@@ -779,7 +800,7 @@ struct _ViewFile
        gboolean marks_enabled;
        gint active_mark;
        gint clicked_mark;
-       
+
        /* refresh */
        guint refresh_idle_id; /* event source id */
        time_t time_refresh_set; /* time when refresh_idle_id was set */
@@ -865,6 +886,8 @@ struct _FullScreenData
 
        void (*stop_func)(FullScreenData *, gpointer);
        gpointer stop_data;
+
+       gboolean same_region; /* the returned region will overlap the current location of widget. */
 };
 
 struct _PixmapFolders