Preserve last histogram modes.
[geeqie.git] / src / options.h
1 /*
2  * Geeqie
3  * Copyright (C) 2008 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
20         /* ui */
21         gint progressive_key_scrolling;
22         gint place_dialogs_under_mouse;
23         gint mousewheel_scrolls;
24         gint show_icon_names;
25         gint show_copy_path;
26
27         /* various */
28         gint startup_path_enable;
29         gchar *startup_path;
30         gint enable_metadata_dirs;
31
32         gint tree_descend_subdirs;
33
34         gint lazy_image_sync;
35         gint update_on_time_change;
36
37         gint duplicates_similarity_threshold;
38
39         gint open_recent_list_maxsize;
40         gint dnd_icon_size;
41
42         gint save_metadata_in_image_file;
43
44         /* file ops */
45         struct {
46                 gint enable_in_place_rename;
47
48                 gint confirm_delete;
49                 gint enable_delete_key;
50                 gint safe_delete_enable;
51                 gchar *safe_delete_path;
52                 gint safe_delete_folder_maxsize;
53         } file_ops;
54
55         /* image */
56         struct {
57                 gint exif_rotate_enable;
58                 gint scroll_reset_method;
59                 gint fit_window_to_image;
60                 gint limit_window_size;
61                 gint max_window_size;
62                 gint limit_autofit_size;
63                 gint max_autofit_size;
64
65                 gint tile_cache_max;    /* in megabytes */
66                 gint dither_quality;
67                 gint enable_read_ahead;
68
69                 gint zoom_mode;
70                 gint zoom_2pass;
71                 gint zoom_to_fit_allow_expand;
72                 gint zoom_quality;
73                 gint zoom_increment;    /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
74
75                 gint use_custom_border_color;
76                 GdkColor border_color;
77
78                 gint read_buffer_size; /* bytes to read from file per read() */
79                 gint idle_read_loop_count; /* the number of bytes to read per idle call (define x image.read_buffer_size) */
80         } image;
81
82         /* thumbnails */
83         struct {
84                 gint max_width;
85                 gint max_height;
86                 gint enable_caching;
87                 gint cache_into_dirs;
88                 gint fast;
89                 gint use_xvpics;
90                 gint spec_standard;
91                 gint quality;
92         } thumbnails;
93
94         /* file filtering */
95         struct {
96                 gint show_hidden_files;
97                 gint show_dot_directory;
98                 gint disable;
99         } file_filter;
100
101         /* collections */
102         struct {
103                 gint rectangular_selection;
104         } collections;
105
106         /* editors */
107         gchar *editor_name[GQ_EDITOR_SLOTS];
108         gchar *editor_command[GQ_EDITOR_SLOTS];
109
110         /* file sorting */
111         struct {
112                 SortType method;
113                 gint ascending;
114                 gint case_sensitive; /* file sorting method (case) */
115         } file_sort;
116
117         /* slideshow */
118         struct {
119                 gint delay;     /* in tenths of a second */
120                 gint random;
121                 gint repeat;
122         } slideshow;
123
124         /* fullscreen */
125         struct {
126                 gint screen;
127                 gint clean_flip;
128                 gint disable_saver;
129                 gint above;
130         } fullscreen;
131
132         /* histogram */
133         struct {
134                 guint last_channel_mode;
135                 guint last_log_mode;
136         } histogram;
137         
138         /* image overlay */
139         struct {
140                 struct {
141                         gint enabled;
142                         gint show_at_startup;
143                         gchar *template_string;
144                 } common;
145         } image_overlay;
146
147         /* layout */
148         struct {
149                 gchar *order;
150                 gint style;
151
152                 DirViewType dir_view_type;
153                 FileViewType file_view_type;
154
155                 gint show_thumbnails;
156                 gint show_marks;
157
158                 struct {
159                         gint w;
160                         gint h;
161                         gint x;
162                         gint y;
163                         gint maximized;
164                         gint hdivider_pos;
165                         gint vdivider_pos;
166                 } main_window;
167
168                 struct {
169                         gint w;
170                         gint h;
171                         gint x;
172                         gint y;
173                         gint vdivider_pos;
174                 } float_window;
175
176                 gint save_window_positions;
177
178                 gint tools_float;
179                 gint tools_hidden;
180                 gint tools_restore_state;
181
182                 gint toolbar_hidden;
183
184         } layout;
185
186         /* panels */
187         struct {
188                 struct {
189                         gint enabled;
190                         gint width;
191                 } info;
192
193                 struct {
194                         gint enabled;
195                         gint width;
196                 } exif;
197
198                 struct {
199                         gint enabled;
200                         gint mode_state;
201                         gint action_state;
202                         gint selection_state;
203                 } sort;
204         } panels;
205
206
207         /* color profiles */
208         struct {
209                 gint enabled;
210                 gint input_type;
211                 gchar *input_file[COLOR_PROFILE_INPUTS];
212                 gchar *input_name[COLOR_PROFILE_INPUTS];
213                 gint screen_type;
214                 gchar *screen_file;
215                 gint use_image;
216
217         } color_profile;
218
219 };
220
221 ConfOptions *options;
222
223 ConfOptions *init_options(ConfOptions *options);
224
225 #endif /* OPTIONS_H */