summaryrefslogtreecommitdiff
path: root/monkey/options.h
diff options
context:
space:
mode:
Diffstat (limited to 'monkey/options.h')
-rw-r--r--monkey/options.h110
1 files changed, 57 insertions, 53 deletions
diff --git a/monkey/options.h b/monkey/options.h
index ac14259d8..88fb7e11b 100644
--- a/monkey/options.h
+++ b/monkey/options.h
@@ -16,62 +16,66 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_GTK_OPTIONS_H_
-#define _NETSURF_GTK_OPTIONS_H_
+#ifndef _NETSURF_DESKTOP_OPTIONS_INCLUDING_
+#error "Frontend options header cannot be included directly"
+#endif
+
+#ifndef _NETSURF_MONKEY_OPTIONS_H_
+#define _NETSURF_MONKEY_OPTIONS_H_
-#include "desktop/options.h"
+#define NSOPTION_EXTRA_DEFINE \
+ bool render_resample; \
+ bool downloads_clear; \
+ bool request_overwrite; \
+ char *downloads_directory; \
+ char *url_file; \
+ bool show_single_tab; \
+ int button_type; \
+ bool disable_popups; \
+ bool disable_plugins; \
+ int history_age; \
+ bool hover_urls; \
+ bool focus_new; \
+ bool new_blank; \
+ char *hotlist_path; \
+ bool source_tab; \
+ int current_theme
-extern bool option_render_resample;
-extern bool option_downloads_clear;
-extern bool option_request_overwrite;
-extern char *option_downloads_directory;
-extern char *option_url_file;
-extern bool option_show_single_tab;
-extern int option_button_type;
-extern bool option_disable_popups;
-extern bool option_disable_plugins;
-extern int option_history_age;
-extern bool option_hover_urls;
-extern bool option_focus_new;
-extern bool option_new_blank;
-extern char *option_hotlist_path;
-extern bool option_source_tab;
-extern int option_current_theme;
+#define NSOPTION_EXTRA_DEFAULTS \
+ .render_resample = true, \
+ .downloads_clear = false, \
+ .request_overwrite = true, \
+ .downloads_directory = NULL, \
+ .url_file = NULL, \
+ .show_single_tab = false, \
+ .button_type = 0, \
+ .disable_popups = false, \
+ .disable_plugins = false, \
+ .history_age = 0, \
+ .hover_urls = false, \
+ .focus_new = false, \
+ .new_blank = false, \
+ .hotlist_path = NULL, \
+ .source_tab = false, \
+ .current_theme = 0
-#define EXTRA_OPTION_DEFINE \
-bool option_render_resample = true; \
-bool option_downloads_clear = false; \
-bool option_request_overwrite = true; \
-char *option_downloads_directory = 0; \
-char *option_url_file = 0; \
-bool option_show_single_tab = false; \
-int option_button_type = 0; \
-bool option_disable_popups = false; \
-bool option_disable_plugins = false; \
-int option_history_age = 0; \
-bool option_hover_urls = false; \
-bool option_focus_new = false; \
-bool option_new_blank = false; \
-char *option_hotlist_path = NULL; \
-bool option_source_tab = false;\
-int option_current_theme = 0;
+#define NSOPTION_EXTRA_TABLE \
+{ "render_resample", OPTION_BOOL, &nsoptions.render_resample }, \
+{ "downloads_clear", OPTION_BOOL, &nsoptions.downloads_clear }, \
+{ "request_overwrite", OPTION_BOOL, &nsoptions.request_overwrite }, \
+{ "downloads_directory",OPTION_STRING, &nsoptions.downloads_directory }, \
+{ "url_file", OPTION_STRING, &nsoptions.url_file }, \
+{ "show_single_tab", OPTION_BOOL, &nsoptions.show_single_tab }, \
+{ "button_type", OPTION_INTEGER, &nsoptions.button_type}, \
+{ "disable_popups", OPTION_BOOL, &nsoptions.disable_popups}, \
+{ "disable_plugins", OPTION_BOOL, &nsoptions.disable_plugins}, \
+{ "history_age", OPTION_INTEGER, &nsoptions.history_age}, \
+{ "hover_urls", OPTION_BOOL, &nsoptions.hover_urls}, \
+{ "focus_new", OPTION_BOOL, &nsoptions.focus_new}, \
+{ "new_blank", OPTION_BOOL, &nsoptions.new_blank}, \
+{ "hotlist_path", OPTION_STRING, &nsoptions.hotlist_path}, \
+{ "source_tab", OPTION_BOOL, &nsoptions.source_tab},\
+{ "current_theme", OPTION_INTEGER, &nsoptions.current_theme}
-#define EXTRA_OPTION_TABLE \
-{ "render_resample", OPTION_BOOL, &option_render_resample }, \
-{ "downloads_clear", OPTION_BOOL, &option_downloads_clear }, \
-{ "request_overwrite", OPTION_BOOL, &option_request_overwrite }, \
-{ "downloads_directory",OPTION_STRING, &option_downloads_directory }, \
-{ "url_file", OPTION_STRING, &option_url_file }, \
-{ "show_single_tab", OPTION_BOOL, &option_show_single_tab }, \
-{ "button_type", OPTION_INTEGER, &option_button_type}, \
-{ "disable_popups", OPTION_BOOL, &option_disable_popups}, \
-{ "disable_plugins", OPTION_BOOL, &option_disable_plugins}, \
-{ "history_age", OPTION_INTEGER, &option_history_age}, \
-{ "hover_urls", OPTION_BOOL, &option_hover_urls}, \
-{ "focus_new", OPTION_BOOL, &option_focus_new}, \
-{ "new_blank", OPTION_BOOL, &option_new_blank}, \
-{ "hotlist_path", OPTION_STRING, &option_hotlist_path}, \
-{ "source_tab", OPTION_BOOL, &option_source_tab},\
-{ "current_theme", OPTION_INTEGER, &option_current_theme}
#endif