Allow to configure rotation invariance
[geeqie.git] / src / options.h
1 /*
2  * Geeqie
3  * Copyright (C) 2008 - 2012 The Geeqie Team
4  *
5  * Authors: Vladimir Nadvornik, Laurent Monin
6  *
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!
10  */
11
12 #ifndef OPTIONS_H
13 #define OPTIONS_H
14
15 typedef struct _ConfOptions ConfOptions;
16
17 struct _ConfOptions
18 {
19         /* ui */
20         gboolean progressive_key_scrolling;
21         gboolean place_dialogs_under_mouse;
22         gboolean mousewheel_scrolls;
23         gboolean show_icon_names;
24
25         /* various */
26         gboolean tree_descend_subdirs;
27
28         gboolean lazy_image_sync;
29         gboolean update_on_time_change;
30
31         guint duplicates_similarity_threshold;
32         gboolean rot_invariant_sim;
33
34         gint open_recent_list_maxsize;
35         gint dnd_icon_size;
36
37         gboolean save_window_positions;
38         gboolean tools_restore_state;
39
40         /* file ops */
41         struct {
42                 gboolean enable_in_place_rename;
43
44                 gboolean confirm_delete;
45                 gboolean enable_delete_key;
46                 gboolean safe_delete_enable;
47                 gchar *safe_delete_path;
48                 gint safe_delete_folder_maxsize;
49         } file_ops;
50
51         /* image */
52         struct {
53                 gboolean exif_rotate_enable;
54                 gboolean exif_proof_rotate_enable;
55                 guint scroll_reset_method;
56                 gboolean fit_window_to_image;
57                 gboolean limit_window_size;
58                 gint max_window_size;
59                 gboolean limit_autofit_size;
60                 gint max_autofit_size;
61
62                 gint tile_cache_max;    /* in megabytes */
63                 gint image_cache_max;   /* in megabytes */
64                 gboolean enable_read_ahead;
65
66                 ZoomMode zoom_mode;
67                 gboolean zoom_2pass;
68                 gboolean zoom_to_fit_allow_expand;
69                 guint zoom_quality;
70                 gint zoom_increment;    /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
71                 gboolean use_clutter_renderer;
72
73                 gboolean use_custom_border_color_in_fullscreen;
74                 gboolean use_custom_border_color;
75                 GdkColor border_color;
76         } image;
77
78         /* thumbnails */
79         struct {
80                 gint max_width;
81                 gint max_height;
82                 gboolean enable_caching;
83                 gboolean cache_into_dirs;
84                 gboolean use_xvpics;
85                 gboolean spec_standard;
86                 guint quality;
87                 gboolean use_exif;
88         } thumbnails;
89
90         /* file filtering */
91         struct {
92                 gboolean show_hidden_files;
93                 gboolean show_parent_directory;
94                 gboolean show_dot_directory;
95                 gboolean disable_file_extension_checks;
96                 gboolean disable;
97         } file_filter;
98
99         struct {
100                 gchar *ext;
101         } sidecar;
102
103         /* collections */
104         struct {
105                 gboolean rectangular_selection;
106         } collections;
107
108         /* shell */
109         struct {
110                 gchar *path;
111                 gchar *options;
112         } shell;
113
114         /* file sorting */
115         struct {
116                 SortType method;
117                 gboolean ascending;
118                 gboolean case_sensitive; /* file sorting method (case) */
119         } file_sort;
120
121         /* slideshow */
122         struct {
123                 gint delay;     /* in tenths of a second */
124                 gboolean random;
125                 gboolean repeat;
126         } slideshow;
127
128         /* fullscreen */
129         struct {
130                 gint screen;
131                 gboolean clean_flip;
132                 gboolean disable_saver;
133                 gboolean above;
134         } fullscreen;
135
136         /* image overlay */
137         struct {
138                 gchar *template_string;
139                 gint x;
140                 gint y;
141         } image_overlay;
142
143         /* properties dialog */
144         struct {
145                 gchar *tabs_order;
146         } properties;
147
148         /* color profiles */
149         struct {
150                 gboolean enabled;
151                 gint input_type;
152                 gchar *input_file[COLOR_PROFILE_INPUTS];
153                 gchar *input_name[COLOR_PROFILE_INPUTS];
154                 gchar *screen_file;
155                 gboolean use_image;
156                 gboolean use_x11_screen_profile;
157
158         } color_profile;
159
160         /* Helpers programs */
161         struct {
162                 struct {
163                         gchar *command_name;
164                         gchar *command_line;
165                 } html_browser;
166         } helpers;
167
168         /* Metadata */
169         struct {
170                 gboolean enable_metadata_dirs;
171
172                 gboolean save_in_image_file;
173                 gboolean save_legacy_IPTC;
174                 gboolean warn_on_write_problems;
175
176                 gboolean save_legacy_format;
177
178                 gboolean sync_grouped_files;
179
180                 gboolean confirm_write;
181                 gint confirm_timeout;
182                 gboolean confirm_after_timeout;
183                 gboolean confirm_on_image_change;
184                 gboolean confirm_on_dir_change;
185                 gboolean keywords_case_sensitive;
186                 gboolean write_orientation;
187         } metadata;
188
189         /* Stereo */
190         struct {
191                 gint mode;;
192                 gint fsmode;
193                 gboolean enable_fsmode;
194                 gint fixed_w, fixed_h;
195                 gint fixed_x1, fixed_y1;
196                 gint fixed_x2, fixed_y2;
197                 struct { /* options in this struct are packed to mode and fsmode entries */
198                         gboolean mirror_right;
199                         gboolean mirror_left;
200                         gboolean flip_right;
201                         gboolean flip_left;
202                         gboolean swap;
203                         gboolean temp_disable;
204                         gboolean fs_mirror_right;
205                         gboolean fs_mirror_left;
206                         gboolean fs_flip_right;
207                         gboolean fs_flip_left;
208                         gboolean fs_swap;
209                         gboolean fs_temp_disable;
210                 } tmp;
211         } stereo;
212 };
213
214 ConfOptions *options;
215 CommandLine *command_line;
216
217 ConfOptions *init_options(ConfOptions *options);
218 void setup_default_options(ConfOptions *options);
219 void save_options(ConfOptions *options);
220 gboolean load_options(ConfOptions *options);
221
222 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src);
223 void free_layout_options_content(LayoutOptions *dest);
224 LayoutOptions *init_layout_options(LayoutOptions *options);
225
226 #endif /* OPTIONS_H */
227 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */