Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
[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         guint keyboard_scroll_step;
31         gboolean place_dialogs_under_mouse;
32         gboolean mousewheel_scrolls;
33         gboolean image_lm_click_nav;
34         gboolean image_l_click_video;
35         gchar *image_l_click_video_editor;
36         gboolean show_icon_names;
37
38         /* various */
39         gboolean tree_descend_subdirs;
40         gboolean view_dir_list_single_click_enter;
41
42         gboolean lazy_image_sync;
43         gboolean update_on_time_change;
44
45         guint duplicates_similarity_threshold;
46         guint duplicates_match;
47         gboolean duplicates_thumbnails;
48         guint duplicates_select_type;
49         gboolean rot_invariant_sim;
50         gboolean sort_totals;
51
52         gint open_recent_list_maxsize;
53         gint dnd_icon_size;
54         gint clipboard_selection;
55
56         gboolean save_window_positions;
57         gboolean use_saved_window_positions_for_new_windows;
58         gboolean tools_restore_state;
59         gboolean save_dialog_window_positions;
60
61         gint log_window_lines;
62
63         /* info sidebar component heights */
64         struct {
65                 gint height;
66         } info_comment;
67
68         struct {
69                 gint height;
70         } info_keywords;
71
72         struct {
73                 gint height;
74         } info_title;
75
76         struct {
77                 gint height;
78         } info_rating;
79
80         /* file ops */
81         struct {
82                 gboolean enable_in_place_rename;
83
84                 gboolean confirm_delete;
85                 gboolean enable_delete_key;
86                 gboolean safe_delete_enable;
87                 gchar *safe_delete_path;
88                 gint safe_delete_folder_maxsize;
89         } file_ops;
90
91         /* image */
92         struct {
93                 gboolean exif_rotate_enable;
94                 gboolean exif_proof_rotate_enable;
95                 guint scroll_reset_method;
96                 gboolean fit_window_to_image;
97                 gboolean limit_window_size;
98                 gint max_window_size;
99                 gboolean limit_autofit_size;
100                 gint max_autofit_size;
101                 gint max_enlargement_size;
102
103                 gint tile_cache_max;    /* in megabytes */
104                 gint image_cache_max;   /* in megabytes */
105                 gboolean enable_read_ahead;
106
107                 ZoomMode zoom_mode;
108                 gboolean zoom_2pass;
109                 gboolean zoom_to_fit_allow_expand;
110                 guint zoom_quality;
111                 gint zoom_increment;    /* 100 is 1.0, 5 is 0.05, 200 is 2.0, etc. */
112                 gboolean use_clutter_renderer;
113
114                 gboolean use_custom_border_color_in_fullscreen;
115                 gboolean use_custom_border_color;
116                 GdkColor border_color;
117                 GdkColor alpha_color_1;
118                 GdkColor alpha_color_2;
119         } image;
120
121         /* thumbnails */
122         struct {
123                 gint max_width;
124                 gint max_height;
125                 gboolean enable_caching;
126                 gboolean cache_into_dirs;
127                 gboolean use_xvpics;
128                 gboolean spec_standard;
129                 guint quality;
130                 gboolean use_exif;
131                 gboolean use_ft_metadata;
132 //              gboolean use_ft_metadata_small;
133         } thumbnails;
134
135         /* file filtering */
136         struct {
137                 gboolean show_hidden_files;
138                 gboolean show_parent_directory;
139                 gboolean show_dot_directory;
140                 gboolean disable_file_extension_checks;
141                 gboolean disable;
142         } file_filter;
143
144         struct {
145                 gchar *ext;
146         } sidecar;
147
148         /* collections */
149         struct {
150                 gboolean rectangular_selection;
151         } collections;
152
153         /* shell */
154         struct {
155                 gchar *path;
156                 gchar *options;
157         } shell;
158
159         /* file sorting */
160         struct {
161                 SortType method;
162                 gboolean ascending;
163                 gboolean case_sensitive; /* file sorting method (case) */
164                 gboolean natural;
165         } file_sort;
166
167         /* slideshow */
168         struct {
169                 gint delay;     /* in tenths of a second */
170                 gboolean random;
171                 gboolean repeat;
172         } slideshow;
173
174         /* fullscreen */
175         struct {
176                 gint screen;
177                 gboolean clean_flip;
178                 gboolean disable_saver;
179                 gboolean above;
180         } fullscreen;
181
182         /* image overlay */
183         struct {
184                 gchar *template_string;
185                 gint x;
186                 gint y;
187                 guint16 text_red;
188                 guint16 text_green;
189                 guint16 text_blue;
190                 guint16 text_alpha;
191                 guint16 background_red;
192                 guint16 background_green;
193                 guint16 background_blue;
194                 guint16 background_alpha;
195                 gchar *font;
196         } image_overlay;
197
198         /* properties dialog */
199         struct {
200                 gchar *tabs_order;
201         } properties;
202
203         /* color profiles */
204         struct {
205                 gboolean enabled;
206                 gint input_type;
207                 gchar *input_file[COLOR_PROFILE_INPUTS];
208                 gchar *input_name[COLOR_PROFILE_INPUTS];
209                 gchar *screen_file;
210                 gboolean use_image;
211                 gboolean use_x11_screen_profile;
212                 gint render_intent;
213         } color_profile;
214
215         /* Helpers programs */
216         struct {
217                 struct {
218                         gchar *command_name;
219                         gchar *command_line;
220                 } html_browser;
221         } helpers;
222
223         /* Metadata */
224         struct {
225                 gboolean enable_metadata_dirs;
226
227                 gboolean save_in_image_file;
228                 gboolean save_legacy_IPTC;
229                 gboolean warn_on_write_problems;
230
231                 gboolean save_legacy_format;
232
233                 gboolean sync_grouped_files;
234
235                 gboolean confirm_write;
236                 gint confirm_timeout;
237                 gboolean confirm_after_timeout;
238                 gboolean confirm_on_image_change;
239                 gboolean confirm_on_dir_change;
240                 gboolean keywords_case_sensitive;
241                 gboolean write_orientation;
242                 gboolean sidecar_extended_name;
243         } metadata;
244
245         /* Stereo */
246         struct {
247                 gint mode;;
248                 gint fsmode;
249                 gboolean enable_fsmode;
250                 gint fixed_w, fixed_h;
251                 gint fixed_x1, fixed_y1;
252                 gint fixed_x2, fixed_y2;
253                 struct { /* options in this struct are packed to mode and fsmode entries */
254                         gboolean mirror_right;
255                         gboolean mirror_left;
256                         gboolean flip_right;
257                         gboolean flip_left;
258                         gboolean swap;
259                         gboolean temp_disable;
260                         gboolean fs_mirror_right;
261                         gboolean fs_mirror_left;
262                         gboolean fs_flip_right;
263                         gboolean fs_flip_left;
264                         gboolean fs_swap;
265                         gboolean fs_temp_disable;
266                 } tmp;
267         } stereo;
268
269         /* copy move rename */
270         struct {
271                 gint auto_start;
272                 gchar *auto_end;
273                 gint auto_padding;
274                 gint formatted_start;
275         } cp_mv_rn;
276
277         /* log window */
278         struct {
279                 gboolean paused;
280                 gboolean line_wrap;
281                 gboolean timer_data;
282         } log_window;
283 };
284
285 ConfOptions *options;
286 CommandLine *command_line;
287
288 ConfOptions *init_options(ConfOptions *options);
289 void setup_default_options(ConfOptions *options);
290 void save_options(ConfOptions *options);
291 gboolean load_options(ConfOptions *options);
292
293 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src);
294 void free_layout_options_content(LayoutOptions *dest);
295 LayoutOptions *init_layout_options(LayoutOptions *options);
296
297 #endif /* OPTIONS_H */
298 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */