2 * This file is part of the WebKit project.
4 * Copyright (C) 2006 Apple Computer, Inc.
5 * Copyright (C) 2008, 2009 Google, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
24 #ifndef RenderThemeChromiumWin_h
25 #define RenderThemeChromiumWin_h
27 #include "core/rendering/RenderThemeChromiumSkia.h"
31 typedef struct HINSTANCE__* HINSTANCE;
32 typedef HINSTANCE HMODULE;
38 ThemeData() : m_part(0), m_state(0), m_classicState(0) { }
42 unsigned m_classicState;
45 class RenderThemeChromiumWin : public RenderThemeChromiumSkia {
47 static PassRefPtr<RenderTheme> create();
49 // A method asking if the theme is able to draw the focus ring.
50 virtual bool supportsFocusRing(const RenderStyle*) const OVERRIDE;
52 // The platform selection color.
53 virtual Color platformActiveSelectionBackgroundColor() const OVERRIDE;
54 virtual Color platformInactiveSelectionBackgroundColor() const OVERRIDE;
55 virtual Color platformActiveSelectionForegroundColor() const OVERRIDE;
56 virtual Color platformInactiveSelectionForegroundColor() const OVERRIDE;
57 virtual Color platformActiveTextSearchHighlightColor() const OVERRIDE;
58 virtual Color platformInactiveTextSearchHighlightColor() const OVERRIDE;
60 virtual Color systemColor(CSSValueID) const OVERRIDE;
62 virtual IntSize sliderTickSize() const OVERRIDE;
63 virtual int sliderTickOffsetFromTrackCenter() const OVERRIDE;
64 virtual void adjustSliderThumbSize(RenderStyle*, Element*) const OVERRIDE;
66 // Various paint functions.
67 virtual bool paintCheckbox(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
68 virtual bool paintRadio(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
69 virtual bool paintButton(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
70 virtual bool paintTextField(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
71 virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
72 virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
74 // MenuList refers to an unstyled menulist (meaning a menulist without
75 // background-color or border set) and MenuListButton refers to a styled
76 // menulist (a menulist with background-color or border set).
77 virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
78 virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
80 virtual void adjustInnerSpinButtonStyle(RenderStyle*, Element*) const OVERRIDE;
81 virtual bool paintInnerSpinButton(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
83 virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const OVERRIDE;
84 virtual double animationDurationForProgressBar(RenderProgress*) const OVERRIDE;
85 virtual bool paintProgressBar(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
87 virtual bool shouldOpenPickerWithF4Key() const OVERRIDE;
90 virtual double caretBlinkIntervalInternal() const OVERRIDE;
91 virtual bool shouldUseFallbackTheme(RenderStyle*) const OVERRIDE;
100 RenderThemeChromiumWin() { }
101 virtual ~RenderThemeChromiumWin() { }
103 unsigned determineState(RenderObject*, ControlSubPart = None);
104 unsigned determineSliderThumbState(RenderObject*);
105 unsigned determineClassicState(RenderObject*, ControlSubPart = None);
107 ThemeData getThemeData(RenderObject*, ControlSubPart = None);
109 bool paintTextFieldInternal(RenderObject*, const PaintInfo&, const IntRect&, bool);
112 } // namespace WebCore