summaryrefslogtreecommitdiff
path: root/windows
diff options
context:
space:
mode:
Diffstat (limited to 'windows')
-rw-r--r--windows/download.c6
-rw-r--r--windows/download.h1
-rw-r--r--windows/font.c22
-rw-r--r--windows/font.h3
-rw-r--r--windows/gui.c22
-rw-r--r--windows/gui.h5
-rw-r--r--windows/localhistory.h2
-rw-r--r--windows/main.c17
-rw-r--r--windows/plot.c7
-rw-r--r--windows/plot.h1
10 files changed, 40 insertions, 46 deletions
diff --git a/windows/download.c b/windows/download.c
index 2045864f5..8d3cc446a 100644
--- a/windows/download.c
+++ b/windows/download.c
@@ -24,14 +24,14 @@
#include <shlobj.h>
#include <windows.h>
-#include "content/fetch.h"
-#include "desktop/gui.h"
-#include "desktop/download.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/url.h"
#include "utils/nsurl.h"
#include "utils/utils.h"
+#include "content/fetch.h"
+#include "desktop/gui_download.h"
+#include "desktop/download.h"
#include "windows/download.h"
#include "windows/gui.h"
diff --git a/windows/download.h b/windows/download.h
index 974f1ecd2..72485625c 100644
--- a/windows/download.h
+++ b/windows/download.h
@@ -21,7 +21,6 @@
#include <time.h>
#include <windows.h>
-#include "desktop/gui.h"
extern struct gui_download_table *win32_download_table;
diff --git a/windows/font.c b/windows/font.c
index 5c1fee07e..bac68fbd4 100644
--- a/windows/font.c
+++ b/windows/font.c
@@ -1,7 +1,6 @@
/*
- * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
- * Copyright 2008 Vincent Sanders <vince@simtec.co.uk>
- * Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
+ * Copyright 2009 - 2014 Vincent Sanders <vince@netsurf-browser.org>
+ * Copyright 2009 - 2013 Michael Drake <tlsa@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -18,21 +17,24 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <inttypes.h>
-
-#include <assert.h>
+/**
+ * \file
+ * Windows font handling implementation.
+ */
#include "utils/config.h"
-
+#include <inttypes.h>
+#include <assert.h>
#include <windows.h>
-#include "desktop/font.h"
#include "utils/nsoption.h"
#include "utils/utf8.h"
+#include "desktop/font.h"
+#include "desktop/gui_utf8.h"
#include "windows/font.h"
-#include "windows/gui.h"
-#include "windows/plot.h"
+
+HWND font_hwnd;
nserror utf8_to_font_encoding(const struct font_desc* font,
const char *string,
diff --git a/windows/font.h b/windows/font.h
index 45428fede..263d005af 100644
--- a/windows/font.h
+++ b/windows/font.h
@@ -20,8 +20,7 @@
#ifndef _NETSURF_WINDOWS_FONT_H_
#define _NETSURF_WINDOWS_FONT_H_
-#include <windows.h>
-#include "utils/utf8.h"
+extern HWND font_hwnd;
struct font_desc {
const char *name;
diff --git a/windows/gui.c b/windows/gui.c
index 20167c690..3804b18b1 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -17,18 +17,23 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "utils/config.h"
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
-
-#include "utils/config.h"
-
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
+#include "utils/log.h"
+#include "utils/messages.h"
+#include "utils/utils.h"
+#include "utils/file.h"
+#include "utils/corestrings.h"
+#include "utils/url.h"
#include "content/urldb.h"
#include "content/fetch.h"
#include "desktop/browser_history.h"
@@ -38,12 +43,10 @@
#include "desktop/plotters.h"
#include "desktop/textinput.h"
#include "render/html.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-#include "utils/utils.h"
-#include "utils/file.h"
-#include "utils/corestrings.h"
-#include "utils/url.h"
+#include "desktop/gui_window.h"
+#include "desktop/gui_clipboard.h"
+#include "desktop/gui_misc.h"
+#include "desktop/gui_fetch.h"
#include "windows/window.h"
#include "windows/about.h"
@@ -66,7 +69,6 @@ HINSTANCE hInstance; /** win32 application instance handle. */
struct gui_window *input_window = NULL;
struct gui_window *search_current_window;
struct gui_window *window_list = NULL;
-HWND font_hwnd;
static int open_windows = 0;
diff --git a/windows/gui.h b/windows/gui.h
index 007afe7c8..7eb24e32e 100644
--- a/windows/gui.h
+++ b/windows/gui.h
@@ -20,10 +20,6 @@
#ifndef _NETSURF_WINDOWS_GUI_H_
#define _NETSURF_WINDOWS_GUI_H_
-#include <windows.h>
-#include "desktop/gui.h"
-#include "windows/localhistory.h"
-
struct gui_file_table *win32_file_table;
extern struct gui_window_table *win32_window_table;
extern struct gui_clipboard_table *win32_clipboard_table;
@@ -61,7 +57,6 @@ struct nsws_pointers {
extern struct gui_window *window_list;
extern char *options_file_location;
-extern HWND font_hwnd;
HWND gui_window_main_window(struct gui_window *);
HWND gui_window_toolbar(struct gui_window *);
diff --git a/windows/localhistory.h b/windows/localhistory.h
index 4f1920dbd..b0ad07491 100644
--- a/windows/localhistory.h
+++ b/windows/localhistory.h
@@ -25,7 +25,7 @@ void nsws_localhistory_open(struct gui_window *gw);
void nsws_localhistory_close(struct gui_window *gw);
/* creates localhistory window */
-struct nsws_localhistory * nsws_window_create_localhistory(struct gui_window *gw);
+struct nsws_localhistory *nsws_window_create_localhistory(struct gui_window *gw);
nserror nsws_create_localhistory_class(HINSTANCE hinstance);
diff --git a/windows/main.c b/windows/main.c
index 40b083f51..09198d5d0 100644
--- a/windows/main.c
+++ b/windows/main.c
@@ -16,29 +16,28 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <limits.h>
-#include <stdbool.h>
-
#include "utils/config.h"
+#include <limits.h>
+#include <stdbool.h>
#include <windows.h>
-#include "desktop/gui.h"
-#include "utils/nsoption.h"
-#include "desktop/browser.h"
-#include "desktop/netsurf.h"
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/filepath.h"
#include "utils/file.h"
#include "utils/nsurl.h"
-#include "content/fetchers/resource.h"
+#include "utils/nsoption.h"
+#include "desktop/browser.h"
+#include "desktop/gui_fetch.h"
+#include "desktop/netsurf.h"
#include "windows/findfile.h"
#include "windows/drawable.h"
-#include "windows/gui.h"
#include "windows/download.h"
+#include "windows/localhistory.h"
+#include "windows/gui.h"
static char **respaths; /** resource search path vector. */
diff --git a/windows/plot.c b/windows/plot.c
index b3c3e5892..6c3e2e0ce 100644
--- a/windows/plot.c
+++ b/windows/plot.c
@@ -17,20 +17,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "utils/config.h"
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <limits.h>
#include <math.h>
-
-#include "utils/config.h"
-
#include <windows.h>
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
-#include "desktop/gui.h"
+#include "desktop/mouse.h"
+#include "desktop/gui_window.h"
#include "desktop/plotters.h"
#include "windows/bitmap.h"
diff --git a/windows/plot.h b/windows/plot.h
index 044f4be47..d69650d2a 100644
--- a/windows/plot.h
+++ b/windows/plot.h
@@ -17,7 +17,6 @@
*/
#include <windows.h>
-#include "desktop/gui.h"
extern const struct plotter_table win_plotters;