Update copyright in all files
[geeqie.git] / src / options.h
1 /*
2  * Copyright (C) 2008 - 2016 The Geeqie Team
3  *
4  * Authors: Vladimir Nadvornik, Laurent Monin
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20
21 #ifndef OPTIONS_H
22 #define OPTIONS_H
23
24 typedef struct _ConfOptions ConfOptions;
25
26 struct _ConfOptions
27 {
28         /* ui */
29         gboolean progressive_key_scrolling;
30         gboolean place_dialogs_under_mouse;
31         gboolean mousewheel_scrolls;
32         gboolean show_icon_names;
33
34         /* various */
35         gboolean tree_descend_subdirs;
36
37         gboolean lazy_image_sync;
38         gboolean update_on_time_change;
39
40         guint duplicates_similarity_threshold;
41         gboolean rot_invariant_sim;
42
43         gint open_recent_list_maxsize;
44         gint dnd_icon_size;
45
46         gboolean save_window_positions;
47         gboolean tools_restore_state;
48
49         /* file ops */
50         struct {
51                 gboolean enable_in_place_rename;
52
53                 gboolean confirm_delete;
54                 gboolean enable_delete_key;
55                 gboolean safe_delete_enable;
56                 gchar *safe_delete_path;
57                 gint safe_delete_folder_maxsize;
58         } file_ops;
59
60         /* image */
61         struct {
62                 gboolean exif_rotate_enable;
63                 gboolean exif_proof_rotate_enable;
64                 guint scroll_reset_method;
65                 gboolean fit_window_to_image;
66                 gboolean limit_window_size;
67                 gint max_window_size;
68                 gboolean limit_autofit_size;
69                 gint max_autofit_size;
70
71                 gint tile_cache_max;    /* in megabytes */
72                 gint image_cache_max;   /* in megabytes */
73                 gboolean enable_read_ahead;
74
75                 ZoomMode zoom_mode;
76                 gboolean zoom_2pass;
77                 gboolean zoom_to_fit_allow_expand;
78                 guint zoom_quality;
79                 gint zoom_increment;    /* 100 is 1.0, 5 is 0.05, 200 is 2.0, etc. */
80                 gboolean use_clutter_renderer;
81
82                 gboolean use_custom_border_color_in_fullscreen;
83                 gboolean use_custom_border_color;
84                 GdkColor border_color;
85         } image;
86
87         /* thumbnails */
88         struct {
89                 gint max_width;
90                 gint max_height;
91                 gboolean enable_caching;
92                 gboolean cache_into_dirs;
93                 gboolean use_xvpics;
94                 gboolean spec_standard;
95                 guint quality;
96                 gboolean use_exif;
97         } thumbnails;
98
99         /* file filtering */
100         struct {
101                 gboolean show_hidden_files;
102                 gboolean show_parent_directory;
103                 gboolean show_dot_directory;
104                 gboolean disable_file_extension_checks;
105                 gboolean disable;
106         } file_filter;
107
108         struct {
109                 gchar *ext;
110         } sidecar;
111
112         /* collections */
113         struct {
114                 gboolean rectangular_selection;
115         } collections;
116
117         /* shell */
118         struct {
119                 gchar *path;
120                 gchar *options;
121         } shell;
122
123         /* file sorting */
124         struct {
125                 SortType method;
126                 gboolean ascending;
127                 gboolean case_sensitive; /* file sorting method (case) */
128         } file_sort;
129
130         /* slideshow */
131         struct {
132                 gint delay;     /* in tenths of a second */
133                 gboolean random;
134                 gboolean repeat;
135         } slideshow;
136
137         /* fullscreen */
138         struct {
139                 gint screen;
140                 gboolean clean_flip;
141                 gboolean disable_saver;
142                 gboolean above;
143         } fullscreen;
144
145         /* image overlay */
146         struct {
147                 gchar *template_string;
148                 gint x;
149                 gint y;
150                 guint16 text_red;
151                 guint16 text_green;
152                 guint16 text_blue;
153                 guint16 text_alpha;
154                 guint16 background_red;
155                 guint16 background_green;
156                 guint16 background_blue;
157                 guint16 background_alpha;
158                 gchar *font;
159         } image_overlay;
160
161         /* properties dialog */
162         struct {
163                 gchar *tabs_order;
164         } properties;
165
166         /* color profiles */
167         struct {
168                 gboolean enabled;
169                 gint input_type;
170                 gchar *input_file[COLOR_PROFILE_INPUTS];
171                 gchar *input_name[COLOR_PROFILE_INPUTS];
172                 gchar *screen_file;
173                 gboolean use_image;
174                 gboolean use_x11_screen_profile;
175
176         } color_profile;
177
178         /* Helpers programs */
179         struct {
180                 struct {
181                         gchar *command_name;
182                         gchar *command_line;
183                 } html_browser;
184         } helpers;
185
186         /* Metadata */
187         struct {
188                 gboolean enable_metadata_dirs;
189
190                 gboolean save_in_image_file;
191                 gboolean save_legacy_IPTC;
192                 gboolean warn_on_write_problems;
193
194                 gboolean save_legacy_format;
195
196                 gboolean sync_grouped_files;
197
198                 gboolean confirm_write;
199                 gint confirm_timeout;
200                 gboolean confirm_after_timeout;
201                 gboolean confirm_on_image_change;
202                 gboolean confirm_on_dir_change;
203                 gboolean keywords_case_sensitive;
204                 gboolean write_orientation;
205         } metadata;
206
207         /* Stereo */
208         struct {
209                 gint mode;;
210                 gint fsmode;
211                 gboolean enable_fsmode;
212                 gint fixed_w, fixed_h;
213                 gint fixed_x1, fixed_y1;
214                 gint fixed_x2, fixed_y2;
215                 struct { /* options in this struct are packed to mode and fsmode entries */
216                         gboolean mirror_right;
217                         gboolean mirror_left;
218                         gboolean flip_right;
219                         gboolean flip_left;
220                         gboolean swap;
221                         gboolean temp_disable;
222                         gboolean fs_mirror_right;
223                         gboolean fs_mirror_left;
224                         gboolean fs_flip_right;
225                         gboolean fs_flip_left;
226                         gboolean fs_swap;
227                         gboolean fs_temp_disable;
228                 } tmp;
229         } stereo;
230 };
231
232 ConfOptions *options;
233 CommandLine *command_line;
234
235 ConfOptions *init_options(ConfOptions *options);
236 void setup_default_options(ConfOptions *options);
237 void save_options(ConfOptions *options);
238 gboolean load_options(ConfOptions *options);
239
240 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src);
241 void free_layout_options_content(LayoutOptions *dest);
242 LayoutOptions *init_layout_options(LayoutOptions *options);
243
244 #endif /* OPTIONS_H */
245 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */