netsurf/desktop/options.h

278 lines
8.5 KiB
C
Raw Normal View History

/*
* 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)
Second merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'. Merged revisions 4195-4211,4216,4219-4220,4222-4234,4236-4250,4252-4262,4264-4266,4268-4326,4329-4335,4338-4342,4344-4411,4413-4420,4422-4436,4438-4491,4494-4506,4508-4514,4516,4518-4552,4554,4556-4564,4567-4568,4570-4574,4576-4686,4689-4692,4694,4698-4709,4715-4723,4725-4755,4757-4769,4771-4919,4921-4996,4998-5110,5112-5117 via svnmerge from svn://svn.netsurf-browser.org/branches/adamblokus/netsurf ........ r4736 | adamblokus | 2008-07-26 13:46:54 +0200 (Sat, 26 Jul 2008) | 2 lines Sorting out some problems with svn. ........ r4737 | adamblokus | 2008-07-26 13:54:36 +0200 (Sat, 26 Jul 2008) | 4 lines Added export tab to the options dialog. Added the possibility of changing some print options. ........ r4897 | adamblokus | 2008-08-04 17:59:05 +0200 (Mon, 04 Aug 2008) | 5 lines Added checking of horizontal clipping. Added better table loosening. Changed some minor bugs. Applied changes in the Export options tab according to the review from tlsa. ........ r4905 | adamblokus | 2008-08-05 01:53:34 +0200 (Tue, 05 Aug 2008) | 2 lines Fixed bug which made it impossible to export pdf's. ........ r4919 | adamblokus | 2008-08-05 16:39:33 +0200 (Tue, 05 Aug 2008) | 2 lines Fixed some memory leaks which caused Netsurf to break. ........ r4927 | adamblokus | 2008-08-06 02:26:30 +0200 (Wed, 06 Aug 2008) | 4 lines Fixed bug with filenames which crashed Netsurf. Turned anti aliasing off for printing. Fixed some scaling issues. ........ r4928 | adamblokus | 2008-08-06 17:52:44 +0200 (Wed, 06 Aug 2008) | 5 lines Added new export/print options: - suppressing images - turning off backgrounds - toggled loosening ........ r4950 | adamblokus | 2008-08-07 21:15:21 +0200 (Thu, 07 Aug 2008) | 5 lines Added new options to PDF export: - document compression - document encryption Added PDF password dialog ........ r4954 | adamblokus | 2008-08-07 22:11:31 +0200 (Thu, 07 Aug 2008) | 2 lines Added saving print settings. ........ r4956 | adamblokus | 2008-08-07 22:44:48 +0200 (Thu, 07 Aug 2008) | 2 lines Fixes to PDF encryption ........ r4970 | adamblokus | 2008-08-09 15:26:24 +0200 (Sat, 09 Aug 2008) | 3 lines Fixed bug in plotting tiled bitmaps. Fixed bug with too long text decorations. ........ r4977 | adamblokus | 2008-08-09 19:18:56 +0200 (Sat, 09 Aug 2008) | 2 lines Fixed JPG embedding bug. ........ r4988 | adamblokus | 2008-08-10 16:59:51 +0200 (Sun, 10 Aug 2008) | 3 lines Added clip checking to pdf plotters. No more "blank" clips. Made PDF compression a default setting. ........ r4995 | adamblokus | 2008-08-10 20:03:00 +0200 (Sun, 10 Aug 2008) | 2 lines Fixed Haru crash on font-size==0. ........ r4996 | adamblokus | 2008-08-10 21:04:43 +0200 (Sun, 10 Aug 2008) | 2 lines Added changing text mode only if necessary. ........ r5045 | adamblokus | 2008-08-11 21:26:26 +0200 (Mon, 11 Aug 2008) | 3 lines Removing gtk stuff from core code. Little fix in options. ........ r5048 | adamblokus | 2008-08-11 21:57:45 +0200 (Mon, 11 Aug 2008) | 2 lines Better font size checking in PDF export. ........ r5050 | adamblokus | 2008-08-11 22:19:56 +0200 (Mon, 11 Aug 2008) | 2 lines Fixed riscos text scale bug. ........ r5073 | adamblokus | 2008-08-12 17:40:57 +0200 (Tue, 12 Aug 2008) | 2 lines Added missing tooltips ........ r5092 | adamblokus | 2008-08-13 17:09:25 +0200 (Wed, 13 Aug 2008) | 2 lines Moved /pdf folder to desktop/save_pdf ........ r5110 | adamblokus | 2008-08-13 22:44:50 +0200 (Wed, 13 Aug 2008) | 2 lines Added comments. ........ r5113 | adamblokus | 2008-08-13 23:07:35 +0200 (Wed, 13 Aug 2008) | 2 lines Cosmetic changes ........ r5116 | adamblokus | 2008-08-14 16:10:18 +0200 (Thu, 14 Aug 2008) | 2 lines Fixed bug with BOX_INLINE_END in tree duplication. ........ r5117 | joty | 2008-08-14 21:47:46 +0200 (Thu, 14 Aug 2008) | 1 line Improvement for r5116: use local vars when possible; rename global last to box_duplicate_last; check on box_duplicate_main_tree failure. ........ svn path=/trunk/netsurf/; revision=5118
2008-08-15 00:32:10 +04:00
/** Proxy authentication password */
NSOPTION_STRING(http_proxy_auth_pass, NULL)
2013-06-04 21:11:15 +04:00
/** 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)
/******** 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)
/** 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 ********/
2013-05-29 16:33:43 +04:00
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)
2013-05-29 16:33:43 +04:00
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)