Image overlay configurable items GTK2
[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;    /* 100 is 1.0, 5 is 0.05, 200 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                 guint16 text_red;
142                 guint16 text_green;
143                 guint16 text_blue;
144                 guint16 text_alpha;
145                 guint16 background_red;
146                 guint16 background_green;
147                 guint16 background_blue;
148                 guint16 background_alpha;
149                 gchar *font;
150         } image_overlay;
151
152         /* properties dialog */
153         struct {
154                 gchar *tabs_order;
155         } properties;
156
157         /* color profiles */
158         struct {
159                 gboolean enabled;
160                 gint input_type;
161                 gchar *input_file[COLOR_PROFILE_INPUTS];
162                 gchar *input_name[COLOR_PROFILE_INPUTS];
163                 gchar *screen_file;
164                 gboolean use_image;
165                 gboolean use_x11_screen_profile;
166
167         } color_profile;
168
169         /* Helpers programs */
170         struct {
171                 struct {
172                         gchar *command_name;
173                         gchar *command_line;
174                 } html_browser;
175         } helpers;
176
177         /* Metadata */
178         struct {
179                 gboolean enable_metadata_dirs;
180
181                 gboolean save_in_image_file;
182                 gboolean save_legacy_IPTC;
183                 gboolean warn_on_write_problems;
184
185                 gboolean save_legacy_format;
186
187                 gboolean sync_grouped_files;
188
189                 gboolean confirm_write;
190                 gint confirm_timeout;
191                 gboolean confirm_after_timeout;
192                 gboolean confirm_on_image_change;
193                 gboolean confirm_on_dir_change;
194                 gboolean keywords_case_sensitive;
195                 gboolean write_orientation;
196         } metadata;
197
198         /* Stereo */
199         struct {
200                 gint mode;;
201                 gint fsmode;
202                 gboolean enable_fsmode;
203                 gint fixed_w, fixed_h;
204                 gint fixed_x1, fixed_y1;
205                 gint fixed_x2, fixed_y2;
206                 struct { /* options in this struct are packed to mode and fsmode entries */
207                         gboolean mirror_right;
208                         gboolean mirror_left;
209                         gboolean flip_right;
210                         gboolean flip_left;
211                         gboolean swap;
212                         gboolean temp_disable;
213                         gboolean fs_mirror_right;
214                         gboolean fs_mirror_left;
215                         gboolean fs_flip_right;
216                         gboolean fs_flip_left;
217                         gboolean fs_swap;
218                         gboolean fs_temp_disable;
219                 } tmp;
220         } stereo;
221 };
222
223 ConfOptions *options;
224 CommandLine *command_line;
225
226 ConfOptions *init_options(ConfOptions *options);
227 void setup_default_options(ConfOptions *options);
228 void save_options(ConfOptions *options);
229 gboolean load_options(ConfOptions *options);
230
231 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src);
232 void free_layout_options_content(LayoutOptions *dest);
233 LayoutOptions *init_layout_options(LayoutOptions *options);
234
235 #endif /* OPTIONS_H */
236 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */