annotate src/dupe.h @ 618:b1a922a32d9c

Save full OSD state to rc file and restore it on startup. It allows to restore OSD with or without histogram depending on previous state.
author zas_
date Sat, 10 May 2008 09:00:14 +0000
parents 48c8e49b571c
children 03614b7883ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 138
diff changeset
2 * Geeqie
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 John Ellis
475
48c8e49b571c updated copyright in source files
nadvornik
parents: 446
diff changeset
4 * Copyright (C) 2008 The Geeqie Team
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #ifndef DUPE_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15 #define DUPE_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
16
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
17 #include "similar.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 /* match methods */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 typedef enum
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22 DUPE_MATCH_NONE = 0,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23 DUPE_MATCH_NAME = 1 << 0,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24 DUPE_MATCH_SIZE = 1 << 1,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25 DUPE_MATCH_DATE = 1 << 2,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26 DUPE_MATCH_DIM = 1 << 3, /* image dimensions */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 DUPE_MATCH_SUM = 1 << 4, /* simple checksum */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28 DUPE_MATCH_PATH = 1 << 5,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29 DUPE_MATCH_SIM_HIGH = 1 << 6, /* similarity */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30 DUPE_MATCH_SIM_MED = 1 << 7,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31 DUPE_MATCH_SIM_LOW = 1 << 8,
264
1015282898fe Add the possibility to match duplicates on the name but ignoring the case.
zas_
parents: 196
diff changeset
32 DUPE_MATCH_SIM_CUSTOM = 1 << 9,
1015282898fe Add the possibility to match duplicates on the name but ignoring the case.
zas_
parents: 196
diff changeset
33 DUPE_MATCH_NAME_CI = 1 << 10 /* same as name, but case insensitive */
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 } DupeMatchType;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
36 typedef struct _DupeItem DupeItem;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37 struct _DupeItem
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39 CollectionData *collection; /* NULL if from DupeWindow->files */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40 CollectInfo *info;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
42 FileData *fd;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44 long checksum;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45 gchar *md5sum;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46 gint width;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47 gint height;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 ImageSimilarityData *simd;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 /* thumb */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 GdkPixbuf *pixbuf;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 GList *group; /* List of match data */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 gdouble group_rank;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57 gint second;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60 typedef struct _DupeMatch DupeMatch;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 struct _DupeMatch
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63 DupeItem *di;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
64 gdouble rank;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 typedef struct _DupeWindow DupeWindow;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 struct _DupeWindow
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70 GList *list; /* dropped files (DupeItem) */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
71 GList *dupes; /* list of dupes (DupeItem, grouping the DupeMatches) */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72 DupeMatchType match_mask; /* mask of things to check for match */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74 GtkWidget *window;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75 GtkWidget *table;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76 GtkWidget *listview;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
77 GtkWidget *combo;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
78 GtkWidget *status_label;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79 GtkWidget *extra_label;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
80 GtkWidget *button_thumbs;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
82 gint show_thumbs;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
83
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
84 gint idle_id;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
85 GList *working;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
86 gint setup_done;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
87 gint setup_count;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
88 gint setup_n; /* these are merely for speed optimization */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
89 GList *setup_point; /* ditto */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
90 DupeMatchType setup_mask; /* ditto */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
91 guint64 setup_time;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
92 guint64 setup_time_count;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
93
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
94 DupeItem *click_item; /* for popup menu */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
95
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
96 ThumbLoader *thumb_loader;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
97 DupeItem *thumb_item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
98
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
99 ImageLoader *img_loader;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
100
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
101 /* second set comparison stuff */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
102
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
103 gint second_set; /* second set enabled ? */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
104 GList *second_list; /* second set dropped files */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
105 gint second_drop; /* drop is on second set */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
106
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
107 GtkWidget *second_vbox; /* box of second widgets */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
108 GtkWidget *second_listview;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
109 GtkWidget *second_status_label;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
110
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
111 gint color_frozen;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
112 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
113
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
114
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
115 DupeWindow *dupe_window_new(DupeMatchType match_mask);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
116
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
117 void dupe_window_clear(DupeWindow *dw);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
118 void dupe_window_close(DupeWindow *dw);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
119
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
120 void dupe_window_add_collection(DupeWindow *dw, CollectionData *collection);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
121 void dupe_window_add_files(DupeWindow *dw, GList *list, gint recurse);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
122
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
123 void dupe_maint_removed(FileData *fd);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
124 void dupe_maint_renamed(FileData *fd);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
125
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
126
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
127 /* cell max with/height hack utility */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
128 void cell_renderer_height_override(GtkCellRenderer *renderer);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
129
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
130
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
131 #endif