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