2003-06-30 12:44:03 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
|
2004-02-13 16:09:12 +00:00
|
|
|
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
|
2007-08-08 16:16:03 +00:00
|
|
|
*
|
|
|
|
* 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/>.
|
2003-06-06 02:14:28 +00:00
|
|
|
*/
|
|
|
|
|
2004-02-13 16:09:12 +00:00
|
|
|
/** \file
|
|
|
|
* Option reading and saving (interface).
|
|
|
|
*
|
|
|
|
* Non-platform specific options can be added by editing this file and
|
|
|
|
* netsurf/desktop/options.c
|
|
|
|
*
|
|
|
|
* Platform specific options should be added in the platform options.h.
|
|
|
|
*
|
|
|
|
* The following types of options are supported:
|
|
|
|
* - bool (OPTION_BOOL)
|
|
|
|
* - int (OPTION_INTEGER)
|
|
|
|
* - char* (OPTION_STRING) (must be allocated on heap, may be 0, free before
|
|
|
|
* assigning a new value)
|
|
|
|
*/
|
2003-06-01 23:02:56 +00:00
|
|
|
|
|
|
|
#ifndef _NETSURF_DESKTOP_OPTIONS_H_
|
|
|
|
#define _NETSURF_DESKTOP_OPTIONS_H_
|
|
|
|
|
2006-07-13 21:52:35 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2006-07-13 12:46:02 +00:00
|
|
|
struct tree;
|
2004-12-09 10:30:44 +00:00
|
|
|
|
2004-07-27 15:49:28 +00:00
|
|
|
enum { OPTION_HTTP_PROXY_AUTH_NONE = 0, OPTION_HTTP_PROXY_AUTH_BASIC = 1,
|
|
|
|
OPTION_HTTP_PROXY_AUTH_NTLM = 2 };
|
|
|
|
|
2004-02-13 16:09:12 +00:00
|
|
|
extern bool option_http_proxy;
|
|
|
|
extern char *option_http_proxy_host;
|
|
|
|
extern int option_http_proxy_port;
|
2004-07-27 15:49:28 +00:00
|
|
|
extern int option_http_proxy_auth;
|
|
|
|
extern char *option_http_proxy_auth_user;
|
|
|
|
extern char *option_http_proxy_auth_pass;
|
2004-02-13 23:07:42 +00:00
|
|
|
extern int option_font_size;
|
|
|
|
extern int option_font_min_size;
|
2004-03-08 00:03:58 +00:00
|
|
|
extern char *option_accept_language;
|
2006-12-28 00:42:14 +00:00
|
|
|
extern char *option_accept_charset;
|
2004-06-21 15:09:59 +00:00
|
|
|
extern int option_memory_cache_size;
|
2006-01-07 00:39:14 +00:00
|
|
|
extern int option_disc_cache_age;
|
2004-07-30 23:40:01 +00:00
|
|
|
extern bool option_block_ads;
|
2004-10-04 23:54:42 +00:00
|
|
|
extern int option_minimum_gif_delay;
|
2004-10-01 21:31:55 +00:00
|
|
|
extern bool option_send_referer;
|
2004-12-09 10:30:44 +00:00
|
|
|
extern bool option_animate_images;
|
2005-12-29 23:18:17 +00:00
|
|
|
extern int option_expire_url;
|
2006-01-02 23:31:29 +00:00
|
|
|
extern int option_font_default; /* a css_font_family */
|
2006-03-31 10:41:21 +00:00
|
|
|
extern char *option_font_sans;
|
|
|
|
extern char *option_font_serif;
|
|
|
|
extern char *option_font_mono;
|
|
|
|
extern char *option_font_cursive;
|
|
|
|
extern char *option_font_fantasy;
|
2006-01-08 01:51:33 +00:00
|
|
|
extern char *option_ca_bundle;
|
2007-06-27 15:39:56 +00:00
|
|
|
extern char *option_ca_path;
|
2006-01-08 01:51:33 +00:00
|
|
|
extern char *option_cookie_file;
|
|
|
|
extern char *option_cookie_jar;
|
2006-03-29 15:26:54 +00:00
|
|
|
extern char *option_homepage_url;
|
2006-09-02 15:52:41 +00:00
|
|
|
extern bool option_target_blank;
|
2006-07-28 15:52:37 +00:00
|
|
|
extern bool option_url_suggestion;
|
2006-08-29 00:17:35 +00:00
|
|
|
extern int option_window_x;
|
|
|
|
extern int option_window_y;
|
|
|
|
extern int option_window_width;
|
|
|
|
extern int option_window_height;
|
|
|
|
extern int option_window_screen_width;
|
|
|
|
extern int option_window_screen_height;
|
|
|
|
extern int option_toolbar_status_width;
|
2007-08-07 03:55:18 +00:00
|
|
|
extern int option_scale;
|
2008-02-29 23:03:26 +00:00
|
|
|
extern bool option_incremental_reflow;
|
2008-03-11 00:14:39 +00:00
|
|
|
extern unsigned int option_min_reflow_period;
|
2003-06-06 02:14:28 +00:00
|
|
|
|
2006-03-14 14:21:01 +00:00
|
|
|
/* Fetcher configuration. */
|
|
|
|
extern int option_max_fetchers;
|
|
|
|
extern int option_max_fetchers_per_host;
|
|
|
|
extern int option_max_cached_fetch_handles;
|
2007-06-27 16:27:52 +00:00
|
|
|
extern bool option_suppress_curl_debug;
|
2006-03-14 14:21:01 +00:00
|
|
|
|
|
|
|
|
2004-02-13 16:09:12 +00:00
|
|
|
void options_read(const char *path);
|
|
|
|
void options_write(const char *path);
|
2006-01-01 18:52:30 +00:00
|
|
|
void options_dump(void);
|
2003-06-01 23:02:56 +00:00
|
|
|
|
2005-02-07 14:28:43 +00:00
|
|
|
struct tree *options_load_tree(const char *filename);
|
|
|
|
bool options_save_tree(struct tree *tree, const char *filename,
|
|
|
|
const char *page_title);
|
2004-12-09 10:30:44 +00:00
|
|
|
|
2003-06-01 23:02:56 +00:00
|
|
|
#endif
|