summaryrefslogtreecommitdiff
path: root/desktop/options.h
blob: 2f368875035ced7697459dae2d04eea6020952cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
/*
 * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
 *
 * This file is part of NetSurf, http://www.netsurf-browser.org/
 *
 * NetSurf is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * NetSurf is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/** \file
 * Option available on all platforms
 *
 * Non-platform specific options can be added by editing this file 
 *
 * Platform specific options should be added in the platform options.h.
 *
 * This header is specificaly intented to be included multiple times
 *   with different macro definitions so there is no guard
 */

#ifndef _NETSURF_DESKTOP_OPTIONS_H_
#define _NETSURF_DESKTOP_OPTIONS_H_

#include "desktop/plot_style.h"

/* defines for system colour table */
#define NSOPTION_SYS_COLOUR_START NSOPTION_sys_colour_ActiveBorder
#define NSOPTION_SYS_COLOUR_END NSOPTION_sys_colour_WindowText

#endif

/** An HTTP proxy should be used. */
NSOPTION_BOOL(http_proxy, false) 

/** Hostname of proxy. */
NSOPTION_STRING(http_proxy_host, NULL) 

/** Proxy port. */
NSOPTION_INTEGER(http_proxy_port, 8080) 

/** Proxy authentication method. */
NSOPTION_INTEGER(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE) 

/** Proxy authentication user name */
NSOPTION_STRING(http_proxy_auth_user, NULL)

/** Proxy authentication password */
NSOPTION_STRING(http_proxy_auth_pass, NULL)

/** Proxy omission list */
NSOPTION_STRING(http_proxy_noproxy, "localhost")

/** Default font size / 0.1pt. */
NSOPTION_INTEGER(font_size, 128)

/** Minimum font size. */
NSOPTION_INTEGER(font_min_size, 85)

/** Default sans serif font */
NSOPTION_STRING(font_sans, NULL)
/** Default serif font */
NSOPTION_STRING(font_serif, NULL)

/** Default monospace font */
NSOPTION_STRING(font_mono, NULL)

/** Default cursive font */
NSOPTION_STRING(font_cursive, NULL)

/** Default fantasy font */
NSOPTION_STRING(font_fantasy, NULL)

/** Accept-Language header. */
NSOPTION_STRING(accept_language, NULL)

/** Accept-Charset header. */
NSOPTION_STRING(accept_charset, NULL)

/** Preferred maximum size of memory cache / bytes. */
NSOPTION_INTEGER(memory_cache_size, 12 * 1024 * 1024)

/** Preferred expiry size of disc cache / bytes. */
NSOPTION_UINT(disc_cache_size, 1024 * 1024 * 1024)

/** Preferred expiry age of disc cache / days. */
NSOPTION_INTEGER(disc_cache_age, 28)

/** Whether to block advertisements */
NSOPTION_BOOL(block_advertisements, false)

/** Disable website tracking, see	                
 * http://www.w3.org/Submission/2011/SUBM-web-tracking-protection-20110224/#dnt-uas */
NSOPTION_BOOL(do_not_track, false)

/** Minimum GIF animation delay */
NSOPTION_INTEGER(minimum_gif_delay, 10)

/** Whether to send the referer HTTP header */
NSOPTION_BOOL(send_referer, true)

/** Whether to fetch foreground images */
NSOPTION_BOOL(foreground_images, true)

/** Whether to fetch background images */
NSOPTION_BOOL(background_images, true)

/** Whether to animate images */
NSOPTION_BOOL(animate_images, true)

/** Whether to execute javascript */
NSOPTION_BOOL(enable_javascript, false)

/** Maximum time (in seconds) to wait for a script to run */
NSOPTION_INTEGER(script_timeout, 10)

/** How many days to retain URL data for */
NSOPTION_INTEGER(expire_url, 28)

/** Default font family */
NSOPTION_INTEGER(font_default, PLOT_FONT_FAMILY_SANS_SERIF)

/** ca-bundle location */
NSOPTION_STRING(ca_bundle, NULL)

/** ca-path location */
NSOPTION_STRING(ca_path, NULL)

/** Cookie file location */
NSOPTION_STRING(cookie_file, NULL)

/** Cookie jar location */
NSOPTION_STRING(cookie_jar, NULL)

/** Home page location */
NSOPTION_STRING(homepage_url, NULL)

/** search web from url bar */
NSOPTION_BOOL(search_url_bar, false)

/** default web search provider */
NSOPTION_INTEGER(search_provider, 0)

/** URL completion in url bar */
NSOPTION_BOOL(url_suggestion, true)

/** default x position of new windows */
NSOPTION_INTEGER(window_x, 0)

/** default y position of new windows */
NSOPTION_INTEGER(window_y, 0)

/** default width of new windows */
NSOPTION_INTEGER(window_width, 0)

/** default height of new windows */
NSOPTION_INTEGER(window_height, 0)

/** width of screen when above options were saved */
NSOPTION_INTEGER(window_screen_width, 0)

/** height of screen when above options were saved */
NSOPTION_INTEGER(window_screen_height, 0)

/** default size of status bar vs. h scroll bar */
NSOPTION_INTEGER(toolbar_status_size, 6667)

/** default window scale */
NSOPTION_INTEGER(scale, 100)

/* Whether to reflow web pages while objects are fetching */
NSOPTION_BOOL(incremental_reflow, true)

/* Minimum time (in cs) between HTML reflows while objects are fetching */
NSOPTION_UINT(min_reflow_period, DEFAULT_REFLOW_PERIOD)

/* use core selection menu */
NSOPTION_BOOL(core_select_menu, false)

/* display decoded international domain names */
NSOPTION_BOOL(display_decoded_idn, false)

/******** Fetcher options ********/

/** Maximum simultaneous active fetchers */
NSOPTION_INTEGER(max_fetchers, 24)

/** Maximum simultaneous active fetchers per host.
 * (<=option_max_fetchers else it makes no sense) Note that rfc2616
 * section 8.1.4 says that there should be no more than two keepalive
 * connections per host. None of the main browsers follow this as it
 * slows page fetches down considerably.  See
 * https://bugzilla.mozilla.org/show_bug.cgi?id=423377#c4
 */
NSOPTION_INTEGER(max_fetchers_per_host, 5)

/** Maximum number of inactive fetchers cached.  The total number of
 * handles netsurf will therefore have open is this plus
 * option_max_fetchers.
 */
NSOPTION_INTEGER(max_cached_fetch_handles, 6)

/** Number of times to retry timed-out fetches before giving up. */
NSOPTION_UINT(max_retried_fetches, 1)

/** Number of seconds to allow for a DNS-resolution+connect() before timing out
 * the cURL socket.
 */
NSOPTION_UINT(curl_fetch_timeout, 30)

/** Suppress debug output from cURL. */
NSOPTION_BOOL(suppress_curl_debug, true)

/** Whether to allow target="_blank" */
NSOPTION_BOOL(target_blank, true)

/** Whether second mouse button opens in new tab */
NSOPTION_BOOL(button_2_tab, true)

/******** PDF / Print options ********/

/** top margin of exported page */
NSOPTION_INTEGER(margin_top, DEFAULT_MARGIN_TOP_MM)

/** bottom margin of exported page */
NSOPTION_INTEGER(margin_bottom, DEFAULT_MARGIN_BOTTOM_MM)

/** left margin of exported page */
NSOPTION_INTEGER(margin_left, DEFAULT_MARGIN_LEFT_MM)

/** right margin of exported page */
NSOPTION_INTEGER(margin_right, DEFAULT_MARGIN_RIGHT_MM)

/** scale of exported content */
NSOPTION_INTEGER(export_scale, DEFAULT_EXPORT_SCALE * 100)

/** suppressing images in printed content */
NSOPTION_BOOL(suppress_images, false)

/** turning off all backgrounds for printed content */
NSOPTION_BOOL(remove_backgrounds, false)

/** turning on content loosening for printed content */
NSOPTION_BOOL(enable_loosening, true)

/** compression of PDF documents */
NSOPTION_BOOL(enable_PDF_compression, true)

/** setting a password and encoding PDF documents */
NSOPTION_BOOL(enable_PDF_password, false)

/******** System colours ********/
NSOPTION_COLOUR(sys_colour_ActiveBorder, 0x00d3d3d3)
NSOPTION_COLOUR(sys_colour_ActiveCaption, 0x00f1f1f1)
NSOPTION_COLOUR(sys_colour_AppWorkspace, 0x00f1f1f1)
NSOPTION_COLOUR(sys_colour_Background, 0x006e6e6e)
NSOPTION_COLOUR(sys_colour_ButtonFace, 0x00f9f9f9)
NSOPTION_COLOUR(sys_colour_ButtonHighlight, 0x00ffffff)
NSOPTION_COLOUR(sys_colour_ButtonShadow, 0x00aeaeae)
NSOPTION_COLOUR(sys_colour_ButtonText, 0x004c4c4c)
NSOPTION_COLOUR(sys_colour_CaptionText, 0x004c4c4c)
NSOPTION_COLOUR(sys_colour_GrayText, 0x00505050)
NSOPTION_COLOUR(sys_colour_Highlight, 0x00c00800)
NSOPTION_COLOUR(sys_colour_HighlightText, 0x00ffffff)
NSOPTION_COLOUR(sys_colour_InactiveBorder, 0x00f1f1f1)
NSOPTION_COLOUR(sys_colour_InactiveCaption, 0x00e6e6e6)
NSOPTION_COLOUR(sys_colour_InactiveCaptionText, 0x00a6a6a6)
NSOPTION_COLOUR(sys_colour_InfoBackground, 0x008fdfef)
NSOPTION_COLOUR(sys_colour_InfoText, 0x00000000)
NSOPTION_COLOUR(sys_colour_Menu, 0x00f1f1f1)
NSOPTION_COLOUR(sys_colour_MenuText, 0x004e4e4e)
NSOPTION_COLOUR(sys_colour_Scrollbar, 0x00cccccc)
NSOPTION_COLOUR(sys_colour_ThreeDDarkShadow, 0x00aeaeae)
NSOPTION_COLOUR(sys_colour_ThreeDFace, 0x00f9f9f9)
NSOPTION_COLOUR(sys_colour_ThreeDHighlight, 0x00ffffff)
NSOPTION_COLOUR(sys_colour_ThreeDLightShadow, 0x00ffffff)
NSOPTION_COLOUR(sys_colour_ThreeDShadow, 0x00d5d5d5)
NSOPTION_COLOUR(sys_colour_Window, 0x00f1f1f1)
NSOPTION_COLOUR(sys_colour_WindowFrame, 0x004e4e4e)
NSOPTION_COLOUR(sys_colour_WindowText, 0x00000000)