summaryrefslogtreecommitdiff
path: root/include/netsurf
diff options
context:
space:
mode:
Diffstat (limited to 'include/netsurf')
-rw-r--r--include/netsurf/clipboard.h4
-rw-r--r--include/netsurf/css.h4
-rw-r--r--include/netsurf/download.h4
-rw-r--r--include/netsurf/fetch.h4
-rw-r--r--include/netsurf/layout.h4
-rw-r--r--include/netsurf/misc.h4
-rw-r--r--include/netsurf/netsurf.h53
-rw-r--r--include/netsurf/search.h4
-rw-r--r--include/netsurf/utf8.h4
-rw-r--r--include/netsurf/window.h4
10 files changed, 71 insertions, 18 deletions
diff --git a/include/netsurf/clipboard.h b/include/netsurf/clipboard.h
index 6feea2404..d90ebc4cb 100644
--- a/include/netsurf/clipboard.h
+++ b/include/netsurf/clipboard.h
@@ -22,8 +22,8 @@
* Interface to platform-specific clipboard operations.
*/
-#ifndef _NETSURF_DESKTOP_GUI_CLIPBOARD_H_
-#define _NETSURF_DESKTOP_GUI_CLIPBOARD_H_
+#ifndef _NETSURF_CLIPBOARD_H_
+#define _NETSURF_CLIPBOARD_H_
#include <stddef.h>
diff --git a/include/netsurf/css.h b/include/netsurf/css.h
index bd95eaeeb..3c7ae283c 100644
--- a/include/netsurf/css.h
+++ b/include/netsurf/css.h
@@ -21,8 +21,8 @@
* Netsurf core css API
*/
-#ifndef NETSURF_CSS_H_
-#define NETSURF_CSS_H_
+#ifndef _NETSURF_CSS_H_
+#define _NETSURF_CSS_H_
/**
* Convert a CSS color to a NetSurf colour primitive
diff --git a/include/netsurf/download.h b/include/netsurf/download.h
index 55e115d52..ae554db24 100644
--- a/include/netsurf/download.h
+++ b/include/netsurf/download.h
@@ -22,8 +22,8 @@
* Interface to platform-specific download operations.
*/
-#ifndef _NETSURF_DESKTOP_GUI_DOWNLOAD_H_
-#define _NETSURF_DESKTOP_GUI_DOWNLOAD_H_
+#ifndef _NETSURF_DOWNLOAD_H_
+#define _NETSURF_DOWNLOAD_H_
struct gui_window;
struct download_context;
diff --git a/include/netsurf/fetch.h b/include/netsurf/fetch.h
index 22c5e6a2e..6e6d653ee 100644
--- a/include/netsurf/fetch.h
+++ b/include/netsurf/fetch.h
@@ -22,8 +22,8 @@
* Interface to platform-specific fetcher operations.
*/
-#ifndef _NETSURF_DESKTOP_GUI_FETCH_H_
-#define _NETSURF_DESKTOP_GUI_FETCH_H_
+#ifndef _NETSURF_FETCH_H_
+#define _NETSURF_FETCH_H_
struct nsurl;
diff --git a/include/netsurf/layout.h b/include/netsurf/layout.h
index 1696aee91..266de4091 100644
--- a/include/netsurf/layout.h
+++ b/include/netsurf/layout.h
@@ -29,8 +29,8 @@
* is the correct approach.
*/
-#ifndef _NETSURF_DESKTOP_GUI_LAYOUT_H_
-#define _NETSURF_DESKTOP_GUI_LAYOUT_H_
+#ifndef _NETSURF_LAYOUT_H_
+#define _NETSURF_LAYOUT_H_
struct plot_font_style;
diff --git a/include/netsurf/misc.h b/include/netsurf/misc.h
index 399d93895..7b354953c 100644
--- a/include/netsurf/misc.h
+++ b/include/netsurf/misc.h
@@ -22,8 +22,8 @@
* Interface to platform-specific miscellaneous browser operation table.
*/
-#ifndef _NETSURF_DESKTOP_GUI_MISC_H_
-#define _NETSURF_DESKTOP_GUI_MISC_H_
+#ifndef _NETSURF_MISC_H_
+#define _NETSURF_MISC_H_
struct form_control;
struct gui_window;
diff --git a/include/netsurf/netsurf.h b/include/netsurf/netsurf.h
new file mode 100644
index 000000000..9c9d2b402
--- /dev/null
+++ b/include/netsurf/netsurf.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2014 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
+ *
+ * NetSurf core interface registration, construction and destruction.
+ */
+
+#ifndef _NETSURF_NETSURF_H_
+#define _NETSURF_NETSURF_H_
+
+#include "utils/errors.h"
+#include "desktop/gui_table.h"
+
+/**
+ * Register operation table.
+ *
+ * @param table NetSurf operations table.
+ * @return NSERROR_OK on success or error code on faliure. On faliure
+ * global table will not be initialised.
+ */
+nserror netsurf_register(struct netsurf_table *table);
+
+/**
+ * Initialise netsurf core.
+ *
+ * @param store_path path to persistant storage.
+ * @return NSERROR_OK on success or error code on faliure.
+ */
+nserror netsurf_init(const char *store_path);
+
+/**
+ * Finalise NetSurf core
+ */
+extern void netsurf_exit(void);
+
+#endif
diff --git a/include/netsurf/search.h b/include/netsurf/search.h
index 0b02ac8bb..1246ea984 100644
--- a/include/netsurf/search.h
+++ b/include/netsurf/search.h
@@ -22,8 +22,8 @@
* Interface to platform-specific search operations.
*/
-#ifndef _NETSURF_DESKTOP_GUI_SEARCH_H_
-#define _NETSURF_DESKTOP_GUI_SEARCH_H_
+#ifndef _NETSURF_SEARCH_H_
+#define _NETSURF_SEARCH_H_
/**
* function table for page text search.
diff --git a/include/netsurf/utf8.h b/include/netsurf/utf8.h
index c40c4c1b3..04499e504 100644
--- a/include/netsurf/utf8.h
+++ b/include/netsurf/utf8.h
@@ -22,8 +22,8 @@
* Interface to platform-specific utf8 operations.
*/
-#ifndef _NETSURF_DESKTOP_GUI_UTF8_H_
-#define _NETSURF_DESKTOP_GUI_UTF8_H_
+#ifndef _NETSURF_UTF8_H_
+#define _NETSURF_UTF8_H_
/**
* User interface utf8 characterset conversion routines.
diff --git a/include/netsurf/window.h b/include/netsurf/window.h
index 7ecd3c21d..8b3e9c4f4 100644
--- a/include/netsurf/window.h
+++ b/include/netsurf/window.h
@@ -23,8 +23,8 @@
* operations.
*/
-#ifndef _NETSURF_DESKTOP_GUI_WINDOW_H_
-#define _NETSURF_DESKTOP_GUI_WINDOW_H_
+#ifndef _NETSURF_WINDOW_H_
+#define _NETSURF_WINDOW_H_
typedef enum gui_save_type {
GUI_SAVE_SOURCE,