Home | History | Annotate | Download | only in rendering
      1 /*
      2  * This file is part of the WebKit project.
      3  *
      4  * Copyright (C) 2006 Apple Computer, Inc.
      5  * Copyright (C) 2006 Michael Emmel mike.emmel (at) gmail.com
      6  * Copyright (C) 2007 Holger Hans Peter Freyther
      7  * Copyright (C) 2007 Alp Toker <alp (at) atoker.com>
      8  * Copyright (C) 2008, 2009 Google, Inc.
      9  * All rights reserved.
     10  * Copyright (C) 2009 Kenneth Rohde Christiansen
     11  *
     12  * This library is free software; you can redistribute it and/or
     13  * modify it under the terms of the GNU Library General Public
     14  * License as published by the Free Software Foundation; either
     15  * version 2 of the License, or (at your option) any later version.
     16  *
     17  * This library is distributed in the hope that it will be useful,
     18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20  * Library General Public License for more details.
     21  *
     22  * You should have received a copy of the GNU Library General Public License
     23  * along with this library; see the file COPYING.LIB.  If not, write to
     24  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     25  * Boston, MA 02110-1301, USA.
     26  *
     27  */
     28 
     29 #ifndef RenderThemeChromiumLinux_h
     30 #define RenderThemeChromiumLinux_h
     31 
     32 #include "RenderThemeChromiumSkia.h"
     33 
     34 namespace WebCore {
     35 
     36     class RenderThemeChromiumLinux : public RenderThemeChromiumSkia {
     37     public:
     38         static PassRefPtr<RenderTheme> create();
     39         virtual String extraDefaultStyleSheet();
     40 
     41         virtual Color systemColor(int cssValidId) const;
     42 
     43         // A method asking if the control changes its tint when the window has focus or not.
     44         virtual bool controlSupportsTints(const RenderObject*) const;
     45 
     46         // List Box selection color
     47         virtual Color activeListBoxSelectionBackgroundColor() const;
     48         virtual Color activeListBoxSelectionForegroundColor() const;
     49         virtual Color inactiveListBoxSelectionBackgroundColor() const;
     50         virtual Color inactiveListBoxSelectionForegroundColor() const;
     51 
     52         virtual Color platformActiveSelectionBackgroundColor() const;
     53         virtual Color platformInactiveSelectionBackgroundColor() const;
     54         virtual Color platformActiveSelectionForegroundColor() const;
     55         virtual Color platformInactiveSelectionForegroundColor() const;
     56 
     57         virtual void adjustSliderThumbSize(RenderObject*) const;
     58 
     59         static void setCaretBlinkInterval(double interval);
     60         virtual double caretBlinkIntervalInternal() const;
     61 
     62         static void setSelectionColors(unsigned activeBackgroundColor,
     63                                        unsigned activeForegroundColor,
     64                                        unsigned inactiveBackgroundColor,
     65                                        unsigned inactiveForegroundColor);
     66 
     67         static void setScrollbarColors(unsigned inactive_color,
     68                                        unsigned active_color,
     69                                        unsigned track_color);
     70         static unsigned thumbInactiveColor() { return m_thumbInactiveColor; }
     71         static unsigned thumbActiveColor() { return m_thumbActiveColor; }
     72         static unsigned trackColor() { return m_trackColor; }
     73 
     74     private:
     75         RenderThemeChromiumLinux();
     76         virtual ~RenderThemeChromiumLinux();
     77 
     78         // A general method asking if any control tinting is supported at all.
     79         virtual bool supportsControlTints() const;
     80 
     81         static double m_caretBlinkInterval;
     82 
     83         static unsigned m_activeSelectionBackgroundColor;
     84         static unsigned m_activeSelectionForegroundColor;
     85         static unsigned m_inactiveSelectionBackgroundColor;
     86         static unsigned m_inactiveSelectionForegroundColor;
     87 
     88         static unsigned m_thumbInactiveColor;
     89         static unsigned m_thumbActiveColor;
     90         static unsigned m_trackColor;
     91     };
     92 
     93 } // namespace WebCore
     94 
     95 #endif // RenderThemeChromiumLinux_h
     96