diff options
author | James Bursa <james@netsurf-browser.org> | 2005-12-19 22:50:23 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2005-12-19 22:50:23 +0000 |
commit | 10291d72b35c7e6b10ee4047adceb08d96e4b1f3 (patch) | |
tree | 8d9911853062e96fe9b9bb826db0679032af9358 /gtk | |
parent | ad13eb98af61e53c5f476868509523110de37871 (diff) | |
download | netsurf-10291d72b35c7e6b10ee4047adceb08d96e4b1f3.tar.gz netsurf-10291d72b35c7e6b10ee4047adceb08d96e4b1f3.tar.bz2 |
[project @ 2005-12-19 22:50:23 by bursa]
Add headers and get rid of all externs in .c files.
svn path=/import/netsurf/; revision=1901
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/font_pango.c | 6 | ||||
-rw-r--r-- | gtk/font_pango.h | 20 | ||||
-rw-r--r-- | gtk/gtk_bitmap.c | 5 | ||||
-rw-r--r-- | gtk/gtk_gui.c | 3 | ||||
-rw-r--r-- | gtk/gtk_gui.h | 12 | ||||
-rw-r--r-- | gtk/gtk_plotters.c | 10 | ||||
-rw-r--r-- | gtk/gtk_plotters.h | 15 | ||||
-rw-r--r-- | gtk/gtk_window.c | 10 | ||||
-rw-r--r-- | gtk/gtk_window.h | 14 |
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; + |