summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/font_pango.c6
-rw-r--r--gtk/font_pango.h20
-rw-r--r--gtk/gtk_bitmap.c5
-rw-r--r--gtk/gtk_gui.c3
-rw-r--r--gtk/gtk_gui.h12
-rw-r--r--gtk/gtk_plotters.c10
-rw-r--r--gtk/gtk_plotters.h15
-rw-r--r--gtk/gtk_window.c10
-rw-r--r--gtk/gtk_window.h14
9 files changed, 74 insertions, 21 deletions
diff --git a/gtk/font_pango.c b/gtk/font_pango.c
index c07ed145b..5daf0da7a 100644
--- a/gtk/font_pango.c
+++ b/gtk/font_pango.c
@@ -16,15 +16,13 @@
#include <stdio.h>
#include <gtk/gtk.h>
#include "netsurf/css/css.h"
+#include "netsurf/gtk/font_pango.h"
+#include "netsurf/gtk/gtk_window.h"
#include "netsurf/render/font.h"
#include "netsurf/utils/utils.h"
#include "netsurf/utils/log.h"
-extern GdkDrawable *current_drawable;
-extern GdkGC *current_gc;
-
-
static PangoFontDescription *nsfont_style_to_description(
const struct css_style *style);
diff --git a/gtk/font_pango.h b/gtk/font_pango.h
new file mode 100644
index 000000000..758b8273b
--- /dev/null
+++ b/gtk/font_pango.h
@@ -0,0 +1,20 @@
+/*
+ * This file is part of NetSurf, http://netsurf.sourceforge.net/
+ * Licensed under the GNU General Public License,
+ * http://www.opensource.org/licenses/gpl-license
+ * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
+ */
+
+/** \file
+ * Font handling (GTK interface).
+ */
+
+#include <stdbool.h>
+
+
+struct css_style;
+
+bool nsfont_paint(const struct css_style *style,
+ const char *string, size_t length,
+ int x, int y, colour c);
+
diff --git a/gtk/gtk_bitmap.c b/gtk/gtk_bitmap.c
index 788d9c6cf..da37ec7b2 100644
--- a/gtk/gtk_bitmap.c
+++ b/gtk/gtk_bitmap.c
@@ -17,13 +17,10 @@
#include <gdk/gdk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "netsurf/content/content.h"
+#include "netsurf/gtk/gtk_window.h"
#include "netsurf/image/bitmap.h"
-extern GdkDrawable *current_drawable;
-extern GdkGC *current_gc;
-
-
struct bitmap;
diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c
index 533fc7c15..3c512fddc 100644
--- a/gtk/gtk_gui.c
+++ b/gtk/gtk_gui.c
@@ -2,7 +2,7 @@
* This file is part of NetSurf, http://netsurf.sourceforge.net/
* Licensed under the GNU General Public License,
* http://www.opensource.org/licenses/gpl-license
- * Copyright 2004 James Bursa <bursa@users.sourceforge.net>
+ * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
*/
#define _GNU_SOURCE /* for strndup */
@@ -21,6 +21,7 @@
#include "netsurf/desktop/gui.h"
#include "netsurf/desktop/netsurf.h"
#include "netsurf/desktop/options.h"
+#include "netsurf/gtk/gtk_gui.h"
#include "netsurf/render/box.h"
#include "netsurf/render/form.h"
#include "netsurf/render/html.h"
diff --git a/gtk/gtk_gui.h b/gtk/gtk_gui.h
new file mode 100644
index 000000000..2059b02bc
--- /dev/null
+++ b/gtk/gtk_gui.h
@@ -0,0 +1,12 @@
+/*
+ * This file is part of NetSurf, http://netsurf.sourceforge.net/
+ * Licensed under the GNU General Public License,
+ * http://www.opensource.org/licenses/gpl-license
+ * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
+ */
+
+#include <stdbool.h>
+
+
+extern bool gui_in_multitask;
+
diff --git a/gtk/gtk_plotters.c b/gtk/gtk_plotters.c
index eab937ead..6c40bb387 100644
--- a/gtk/gtk_plotters.c
+++ b/gtk/gtk_plotters.c
@@ -2,7 +2,7 @@
* This file is part of NetSurf, http://netsurf.sourceforge.net/
* Licensed under the GNU General Public License,
* http://www.opensource.org/licenses/gpl-license
- * Copyright 2004 James Bursa <bursa@users.sourceforge.net>
+ * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
*/
/** \file
@@ -12,15 +12,13 @@
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include "netsurf/desktop/plotters.h"
+#include "netsurf/gtk/font_pango.h"
+#include "netsurf/gtk/gtk_plotters.h"
+#include "netsurf/gtk/gtk_window.h"
#include "netsurf/render/font.h"
#include "netsurf/utils/log.h"
-extern GtkWidget *current_widget;
-extern GdkDrawable *current_drawable;
-extern GdkGC *current_gc;
-
-
static bool nsgtk_plot_clg(colour c);
static bool nsgtk_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed);
diff --git a/gtk/gtk_plotters.h b/gtk/gtk_plotters.h
new file mode 100644
index 000000000..5eb45ddc7
--- /dev/null
+++ b/gtk/gtk_plotters.h
@@ -0,0 +1,15 @@
+/*
+ * This file is part of NetSurf, http://netsurf.sourceforge.net/
+ * Licensed under the GNU General Public License,
+ * http://www.opensource.org/licenses/gpl-license
+ * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
+ */
+
+/** \file
+ * Target independent plotting (GDK / GTK+ interface).
+ */
+
+struct plotter_table;
+
+const struct plotter_table nsgtk_plotters;
+
diff --git a/gtk/gtk_window.c b/gtk/gtk_window.c
index 940411fa0..6c34a73a9 100644
--- a/gtk/gtk_window.c
+++ b/gtk/gtk_window.c
@@ -2,7 +2,7 @@
* This file is part of NetSurf, http://netsurf.sourceforge.net/
* Licensed under the GNU General Public License,
* http://www.opensource.org/licenses/gpl-license
- * Copyright 2004 James Bursa <bursa@users.sourceforge.net>
+ * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
*/
#include <stdbool.h>
@@ -16,6 +16,9 @@
#include "netsurf/desktop/gui.h"
#include "netsurf/desktop/netsurf.h"
#include "netsurf/desktop/plotters.h"
+#include "netsurf/gtk/gtk_gui.h"
+#include "netsurf/gtk/gtk_plotters.h"
+#include "netsurf/gtk/gtk_window.h"
#include "netsurf/render/box.h"
#include "netsurf/render/font.h"
#include "netsurf/render/form.h"
@@ -23,9 +26,6 @@
#include "netsurf/utils/utils.h"
-extern bool gui_in_multitask;
-
-
struct gui_window {
GtkWidget *window;
GtkWidget *url_bar;
@@ -163,8 +163,6 @@ void gui_window_destroy_event(GtkWidget *widget, gpointer data)
}
-extern const struct plotter_table nsgtk_plotters;
-
gboolean gui_window_expose_event(GtkWidget *widget,
GdkEventExpose *event, gpointer data)
{
diff --git a/gtk/gtk_window.h b/gtk/gtk_window.h
new file mode 100644
index 000000000..8f717e85a
--- /dev/null
+++ b/gtk/gtk_window.h
@@ -0,0 +1,14 @@
+/*
+ * This file is part of NetSurf, http://netsurf.sourceforge.net/
+ * Licensed under the GNU General Public License,
+ * http://www.opensource.org/licenses/gpl-license
+ * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
+ */
+
+#include <gtk/gtk.h>
+
+
+extern GtkWidget *current_widget;
+extern GdkDrawable *current_drawable;
+extern GdkGC *current_gc;
+