2 * Copyright (C) 2010 Igalia S.L.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
22 #ifndef WidgetRenderingContext_h
23 #define WidgetRenderingContext_h
25 #ifdef GTK_API_VERSION_2
29 // Usually this is too expensive to have in headers, but GtkStateType GtkShadowType are
30 // enums and cannot be forward declared. WidgetRenderingContext.h is currently only
31 // included in RenderThemeGtk2.cpp and ScrollbarThemeGtk2.cpp.
36 class GraphicsContext;
39 class WidgetRenderingContext {
41 WidgetRenderingContext(GraphicsContext*, const IntRect&);
42 ~WidgetRenderingContext();
44 void gtkPaintBox(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, const gchar*);
45 void gtkPaintFlatBox(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, const gchar*);
46 void gtkPaintFocus(const IntRect&, GtkWidget*, GtkStateType, const gchar*);
47 void gtkPaintSlider(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, const gchar*, GtkOrientation);
48 void gtkPaintCheck(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, const gchar*);
49 void gtkPaintOption(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, const gchar*);
50 void gtkPaintShadow(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, const gchar*);
51 void gtkPaintArrow(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, int arrowDirection, const gchar*);
52 void gtkPaintVLine(const IntRect&, GtkWidget*, GtkStateType, const gchar*);
55 void calculateClipRect(const IntRect&, GdkRectangle*);
57 GraphicsContext* m_graphicsContext;
59 IntSize m_paintOffset;
61 GdkDrawable* m_target;
67 #endif // GTK_API_VERSION_2
68 #endif // WidgetRenderingContext_h