1635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project/* 221939df44de1705786c545cd1bf519d47250322dBen Murdoch * Copyright (C) 2010 Google Inc. All rights reserved. 38f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian * 4635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * Redistribution and use in source and binary forms, with or without 5635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * modification, are permitted provided that the following conditions are 6635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * met: 78f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian * 8635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * * Redistributions of source code must retain the above copyright 9635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * notice, this list of conditions and the following disclaimer. 10635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * * Redistributions in binary form must reproduce the above 11635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * copyright notice, this list of conditions and the following disclaimer 12635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * in the documentation and/or other materials provided with the 13635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * distribution. 14635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * * Neither the name of Google Inc. nor the names of its 15635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * contributors may be used to endorse or promote products derived from 16635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * this software without specific prior written permission. 178f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian * 18635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project */ 30635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 31643ca7872b450ea4efacab6188849e5aac2ba161Steve Block#ifndef WebThemeEngine_h 32643ca7872b450ea4efacab6188849e5aac2ba161Steve Block#define WebThemeEngine_h 33635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 34a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#include "../WebCanvas.h" 35a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#include "../WebColor.h" 36a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#include "../WebSize.h" 37635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 38643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocknamespace WebKit { 39635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 40643ca7872b450ea4efacab6188849e5aac2ba161Steve Blockstruct WebRect; 4121939df44de1705786c545cd1bf519d47250322dBen Murdochstruct WebSize; 428f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian 4321939df44de1705786c545cd1bf519d47250322dBen Murdochclass WebThemeEngine { 4421939df44de1705786c545cd1bf519d47250322dBen Murdochpublic: 45643ca7872b450ea4efacab6188849e5aac2ba161Steve Block// The part and state parameters correspond to values defined by the 46643ca7872b450ea4efacab6188849e5aac2ba161Steve Block// Windows Theme API (see 47643ca7872b450ea4efacab6188849e5aac2ba161Steve Block// http://msdn.microsoft.com/en-us/library/bb773187(VS.85).aspx ). 48643ca7872b450ea4efacab6188849e5aac2ba161Steve Block// The classicState parameter corresponds to the uState 49643ca7872b450ea4efacab6188849e5aac2ba161Steve Block// parameter of the Windows DrawFrameControl() function. 50643ca7872b450ea4efacab6188849e5aac2ba161Steve Block// See the definitions in <vsstyle.h> and <winuser.h>. 51643ca7872b450ea4efacab6188849e5aac2ba161Steve Block virtual void paintButton( 52643ca7872b450ea4efacab6188849e5aac2ba161Steve Block WebCanvas*, int part, int state, int classicState, 53643ca7872b450ea4efacab6188849e5aac2ba161Steve Block const WebRect&) = 0; 54635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 55643ca7872b450ea4efacab6188849e5aac2ba161Steve Block virtual void paintMenuList( 56643ca7872b450ea4efacab6188849e5aac2ba161Steve Block WebCanvas*, int part, int state, int classicState, 57643ca7872b450ea4efacab6188849e5aac2ba161Steve Block const WebRect&) = 0; 58643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 59643ca7872b450ea4efacab6188849e5aac2ba161Steve Block virtual void paintScrollbarArrow( 60643ca7872b450ea4efacab6188849e5aac2ba161Steve Block WebCanvas*, int state, int classicState, 61643ca7872b450ea4efacab6188849e5aac2ba161Steve Block const WebRect&) = 0; 62643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 63643ca7872b450ea4efacab6188849e5aac2ba161Steve Block virtual void paintScrollbarThumb( 64643ca7872b450ea4efacab6188849e5aac2ba161Steve Block WebCanvas*, int part, int state, int classicState, 65643ca7872b450ea4efacab6188849e5aac2ba161Steve Block const WebRect&) = 0; 668f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian 67643ca7872b450ea4efacab6188849e5aac2ba161Steve Block virtual void paintScrollbarTrack( 68643ca7872b450ea4efacab6188849e5aac2ba161Steve Block WebCanvas*, int part, int state, int classicState, 69643ca7872b450ea4efacab6188849e5aac2ba161Steve Block const WebRect&, const WebRect& alignRect) = 0; 70635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 71967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch virtual void paintSpinButton( 72967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch WebCanvas*, int part, int state, int classicState, 73967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch const WebRect&) {} 74967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch 75643ca7872b450ea4efacab6188849e5aac2ba161Steve Block virtual void paintTextField( 76643ca7872b450ea4efacab6188849e5aac2ba161Steve Block WebCanvas*, int part, int state, int classicState, 77643ca7872b450ea4efacab6188849e5aac2ba161Steve Block const WebRect&, WebColor, bool fillContentArea, bool drawEdges) = 0; 78643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 79643ca7872b450ea4efacab6188849e5aac2ba161Steve Block virtual void paintTrackbar( 80643ca7872b450ea4efacab6188849e5aac2ba161Steve Block WebCanvas*, int part, int state, int classicState, 81643ca7872b450ea4efacab6188849e5aac2ba161Steve Block const WebRect&) = 0; 8221939df44de1705786c545cd1bf519d47250322dBen Murdoch 836c2af9490927c3c5959b5cb07461b646f8b32f6cKristian Monsen virtual void paintProgressBar( 84e78cbe89e6f337f2f1fe40315be88f742b547151Steve Block WebCanvas*, const WebRect& barRect, const WebRect& valueRect, 85e78cbe89e6f337f2f1fe40315be88f742b547151Steve Block bool determinate, double animatedSeconds) {} 86643ca7872b450ea4efacab6188849e5aac2ba161Steve Block}; 87643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 88643ca7872b450ea4efacab6188849e5aac2ba161Steve Block} // namespace WebKit 89643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 90643ca7872b450ea4efacab6188849e5aac2ba161Steve Block#endif 91