From fcf771ab0f57c0b5cc2c308279c11aa998f3eeab Mon Sep 17 00:00:00 2001
From: Martin Robinson <martin.james.robinson@gmail.com>
Date: Sun, 20 Dec 2009 17:18:26 +0100
Subject: [PATCH] Remove most GTK+ and GLib includes from WebCore headers.
---
WebCore/ChangeLog | 15 +++++++++++++++
.../cairo/GraphicsContextPlatformPrivateCairo.h | 2 +-
WebCore/platform/gtk/PasteboardHelper.h | 3 ++-
WebCore/platform/gtk/RenderThemeGtk.cpp | 1 +
WebCore/platform/gtk/RenderThemeGtk.h | 7 ++++++-
WebCore/platform/gtk/ScrollbarGtk.cpp | 1 -
WebCore/platform/gtk/ScrollbarThemeGtk.h | 5 +++++
WebCore/platform/gtk/gtk2drawing.c | 4 ++--
WebCore/platform/gtk/gtkdrawing.h | 3 +--
9 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e04f638..378ac76 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-20 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ Remove most GTK+ and GLib includes from WebCore headers.
+
+ * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
+ * platform/gtk/PasteboardHelper.h:
+ * platform/gtk/RenderThemeGtk.cpp:
+ * platform/gtk/RenderThemeGtk.h:
+ * platform/gtk/ScrollbarGtk.cpp:
+ * platform/gtk/ScrollbarThemeGtk.h:
+ * platform/gtk/gtk2drawing.c:
+ * platform/gtk/gtkdrawing.h:
+
2009-12-20 Andrei Popescu <andreip@google.com>
Reviewed by Adam Barth.
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h b/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
index 54e1217..cedc684 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
+++ b/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
@@ -33,8 +33,8 @@
#include <wtf/MathExtras.h>
#if PLATFORM(GTK)
-#include <gdk/gdk.h>
#include <pango/pango.h>
+typedef struct _GdkExposeEvent GdkExposeEvent;
#elif PLATFORM(WIN)
#include <cairo-win32.h>
#endif
diff --git a/WebCore/platform/gtk/PasteboardHelper.h b/WebCore/platform/gtk/PasteboardHelper.h
index e589f24..fff9a9b 100644
--- a/WebCore/platform/gtk/PasteboardHelper.h
+++ b/WebCore/platform/gtk/PasteboardHelper.h
@@ -30,7 +30,8 @@
#include "Frame.h"
-#include <gtk/gtk.h>
+typedef struct _GtkClipboard GtkClipboard;
+typedef struct _GtkTargetList GtkTargetList;
namespace WebCore {
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index 3cc14f8..809aa2f 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -36,6 +36,7 @@
#include "UserAgentStyleSheets.h"
#include "gtkdrawing.h"
+#include <gtk/gtk.h>
#include <gdk/gdk.h>
namespace WebCore {
diff --git a/WebCore/platform/gtk/RenderThemeGtk.h b/WebCore/platform/gtk/RenderThemeGtk.h
index 6a154ad..1054b96 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.h
+++ b/WebCore/platform/gtk/RenderThemeGtk.h
@@ -30,7 +30,12 @@
#include "RenderTheme.h"
-#include <gtk/gtk.h>
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkStyle GtkStyle;
+typedef struct _GtkContainer GtkContainer;
+typedef struct _GdkRectangle GdkRectangle;
+typedef struct _GdkDrawable GdkDrawable;
+typedef struct _GtkBorder GtkBorder;
namespace WebCore {
diff --git a/WebCore/platform/gtk/ScrollbarGtk.cpp b/WebCore/platform/gtk/ScrollbarGtk.cpp
index d7f6d26..00c6ea0 100644
--- a/WebCore/platform/gtk/ScrollbarGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarGtk.cpp
@@ -23,7 +23,6 @@
#include "GraphicsContext.h"
#include "FrameView.h"
#include "ScrollbarTheme.h"
-#include "gtkdrawing.h"
#include <gtk/gtk.h>
diff --git a/WebCore/platform/gtk/ScrollbarThemeGtk.h b/WebCore/platform/gtk/ScrollbarThemeGtk.h
index 21ccb43..618da35 100644
--- a/WebCore/platform/gtk/ScrollbarThemeGtk.h
+++ b/WebCore/platform/gtk/ScrollbarThemeGtk.h
@@ -28,6 +28,11 @@
#include "ScrollbarTheme.h"
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkStyle GtkStyle;
+typedef struct _GtkContainer GtkContainer;
+typedef struct _GtkBorder GtkBorder;
+
namespace WebCore {
class ScrollbarThemeGtk : public ScrollbarTheme {
diff --git a/WebCore/platform/gtk/gtk2drawing.c b/WebCore/platform/gtk/gtk2drawing.c
index 1f62c96..8d6496d 100644
--- a/WebCore/platform/gtk/gtk2drawing.c
+++ b/WebCore/platform/gtk/gtk2drawing.c
@@ -44,14 +44,14 @@
* Adapted from the gtkdrawing.c, and gtk+2.0 source.
*/
-#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
-#include <string.h>
+#include <gtk/gtk.h>
#include "gtkdrawing.h"
#include "Assertions.h"
#include <math.h>
+#include <string.h>
#define XTHICKNESS(style) (style->xthickness)
#define YTHICKNESS(style) (style->ythickness)
diff --git a/WebCore/platform/gtk/gtkdrawing.h b/WebCore/platform/gtk/gtkdrawing.h
index 1a33bfb..b418705 100644
--- a/WebCore/platform/gtk/gtkdrawing.h
+++ b/WebCore/platform/gtk/gtkdrawing.h
@@ -48,8 +48,7 @@
#ifndef _GTK_DRAWING_H_
#define _GTK_DRAWING_H_
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
+#include <gtk/gtkenums.h>
#ifdef __cplusplus
extern "C" {
--
1.6.0.4
From ccc1c014501a1634559dcd8a61849a43453815a1 Mon Sep 17 00:00:00 2001
From: Martin Robinson <martin.james.robinson@gmail.com>
Date: Sun, 20 Dec 2009 17:18:26 +0100
Subject: [PATCH] Remove most GTK+ and GLib includes from WebCore headers.
---
WebCore/ChangeLog | 15 +++++++++++++++
.../cairo/GraphicsContextPlatformPrivateCairo.h | 2 +-
WebCore/platform/gtk/PasteboardHelper.h | 3 ++-
WebCore/platform/gtk/RenderThemeGtk.cpp | 1 +
WebCore/platform/gtk/RenderThemeGtk.h | 7 ++++++-
WebCore/platform/gtk/ScrollbarGtk.cpp | 1 -
WebCore/platform/gtk/ScrollbarThemeGtk.h | 5 +++++
WebCore/platform/gtk/gtk2drawing.c | 3 +--
WebCore/platform/gtk/gtkdrawing.h | 1 -
9 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e04f638..378ac76 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-20 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ Remove most GTK+ and GLib includes from WebCore headers.
+
+ * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
+ * platform/gtk/PasteboardHelper.h:
+ * platform/gtk/RenderThemeGtk.cpp:
+ * platform/gtk/RenderThemeGtk.h:
+ * platform/gtk/ScrollbarGtk.cpp:
+ * platform/gtk/ScrollbarThemeGtk.h:
+ * platform/gtk/gtk2drawing.c:
+ * platform/gtk/gtkdrawing.h:
+
2009-12-20 Andrei Popescu <andreip@google.com>
Reviewed by Adam Barth.
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h b/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
index 54e1217..cedc684 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
+++ b/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
@@ -33,8 +33,8 @@
#include <wtf/MathExtras.h>
#if PLATFORM(GTK)
-#include <gdk/gdk.h>
#include <pango/pango.h>
+typedef struct _GdkExposeEvent GdkExposeEvent;
#elif PLATFORM(WIN)
#include <cairo-win32.h>
#endif
diff --git a/WebCore/platform/gtk/PasteboardHelper.h b/WebCore/platform/gtk/PasteboardHelper.h
index e589f24..fff9a9b 100644
--- a/WebCore/platform/gtk/PasteboardHelper.h
+++ b/WebCore/platform/gtk/PasteboardHelper.h
@@ -30,7 +30,8 @@
#include "Frame.h"
-#include <gtk/gtk.h>
+typedef struct _GtkClipboard GtkClipboard;
+typedef struct _GtkTargetList GtkTargetList;
namespace WebCore {
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index 3cc14f8..809aa2f 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -36,6 +36,7 @@
#include "UserAgentStyleSheets.h"
#include "gtkdrawing.h"
+#include <gtk/gtk.h>
#include <gdk/gdk.h>
namespace WebCore {
diff --git a/WebCore/platform/gtk/RenderThemeGtk.h b/WebCore/platform/gtk/RenderThemeGtk.h
index 6a154ad..1054b96 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.h
+++ b/WebCore/platform/gtk/RenderThemeGtk.h
@@ -30,7 +30,12 @@
#include "RenderTheme.h"
-#include <gtk/gtk.h>
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkStyle GtkStyle;
+typedef struct _GtkContainer GtkContainer;
+typedef struct _GdkRectangle GdkRectangle;
+typedef struct _GdkDrawable GdkDrawable;
+typedef struct _GtkBorder GtkBorder;
namespace WebCore {
diff --git a/WebCore/platform/gtk/ScrollbarGtk.cpp b/WebCore/platform/gtk/ScrollbarGtk.cpp
index d7f6d26..00c6ea0 100644
--- a/WebCore/platform/gtk/ScrollbarGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarGtk.cpp
@@ -23,7 +23,6 @@
#include "GraphicsContext.h"
#include "FrameView.h"
#include "ScrollbarTheme.h"
-#include "gtkdrawing.h"
#include <gtk/gtk.h>
diff --git a/WebCore/platform/gtk/ScrollbarThemeGtk.h b/WebCore/platform/gtk/ScrollbarThemeGtk.h
index 21ccb43..618da35 100644
--- a/WebCore/platform/gtk/ScrollbarThemeGtk.h
+++ b/WebCore/platform/gtk/ScrollbarThemeGtk.h
@@ -28,6 +28,11 @@
#include "ScrollbarTheme.h"
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkStyle GtkStyle;
+typedef struct _GtkContainer GtkContainer;
+typedef struct _GtkBorder GtkBorder;
+
namespace WebCore {
class ScrollbarThemeGtk : public ScrollbarTheme {
diff --git a/WebCore/platform/gtk/gtk2drawing.c b/WebCore/platform/gtk/gtk2drawing.c
index 1f62c96..4ba4d4c 100644
--- a/WebCore/platform/gtk/gtk2drawing.c
+++ b/WebCore/platform/gtk/gtk2drawing.c
@@ -44,14 +44,13 @@
* Adapted from the gtkdrawing.c, and gtk+2.0 source.
*/
-#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
-#include <string.h>
#include "gtkdrawing.h"
#include "Assertions.h"
#include <math.h>
+#include <string.h>
#define XTHICKNESS(style) (style->xthickness)
#define YTHICKNESS(style) (style->ythickness)
diff --git a/WebCore/platform/gtk/gtkdrawing.h b/WebCore/platform/gtk/gtkdrawing.h
index 1a33bfb..c1bec62 100644
--- a/WebCore/platform/gtk/gtkdrawing.h
+++ b/WebCore/platform/gtk/gtkdrawing.h
@@ -48,7 +48,6 @@
#ifndef _GTK_DRAWING_H_
#define _GTK_DRAWING_H_
-#include <gdk/gdk.h>
#include <gtk/gtk.h>
#ifdef __cplusplus
--
1.6.0.4