1dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block/* 2dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * This file is part of the WebKit project. 3dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * 4dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * Copyright (C) 2006 Apple Computer, Inc. 5dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 6dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * Copyright (C) 2007 Holger Hans Peter Freyther 7dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * Copyright (C) 2007 Alp Toker <alp@atoker.com> 8dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia 9dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * Copyright (C) 2009-2010 ProFUSION embedded systems 10dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * Copyright (C) 2009-2010 Samsung Electronics 11dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * All rights reserved. 12dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * 13dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * This library is free software; you can redistribute it and/or 14dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * modify it under the terms of the GNU Library General Public 15dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * License as published by the Free Software Foundation; either 16dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * version 2 of the License, or (at your option) any later version. 17dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * 18dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * This library is distributed in the hope that it will be useful, 19dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * but WITHOUT ANY WARRANTY; without even the implied warranty of 20dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * Library General Public License for more details. 22dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * 23dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * You should have received a copy of the GNU Library General Public License 24dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * along with this library; see the file COPYING.LIB. If not, write to 25dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 26dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * Boston, MA 02110-1301, USA. 27dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * 28dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block */ 29dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 30dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block#ifndef RenderThemeEfl_h 31dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block#define RenderThemeEfl_h 32dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 332bde8e466a4451c7319e3a072d118917957d6554Steve Block#if ENABLE(VIDEO) 342bde8e466a4451c7319e3a072d118917957d6554Steve Block#include "MediaControlElements.h" 352bde8e466a4451c7319e3a072d118917957d6554Steve Block#endif 36dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block#include "RenderTheme.h" 37dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 38dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block#include <cairo.h> 39dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 4006ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsentypedef struct _Ecore_Evas Ecore_Evas; 4106ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsentypedef struct _Evas_Object Evas_Object; 4206ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen 43dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blocknamespace WebCore { 44dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 45dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockenum FormType { // KEEP IN SYNC WITH edjeGroupFromFormType() 46dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Button, 47dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block RadioButton, 48dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block TextField, 49dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block CheckBox, 50dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block ComboBox, 51a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#if ENABLE(PROGRESS_TAG) 52a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch ProgressBar, 53a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#endif 54dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block SearchField, 55dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block SearchFieldDecoration, 56dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block SearchFieldResultsButton, 57dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block SearchFieldResultsDecoration, 58dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block SearchFieldCancelButton, 59dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch SliderVertical, 60dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch SliderHorizontal, 612bde8e466a4451c7319e3a072d118917957d6554Steve Block#if ENABLE(VIDEO) 622daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch PlayPauseButton, 632daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch MuteUnMuteButton, 642daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch SeekForwardButton, 652daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch SeekBackwardButton, 662bde8e466a4451c7319e3a072d118917957d6554Steve Block#endif 67dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block FormTypeLast 68dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block}; 69dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 70dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockclass RenderThemeEfl : public RenderTheme { 71dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockprivate: 72dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block RenderThemeEfl(Page*); 73dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block ~RenderThemeEfl(); 74dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 75dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockpublic: 76dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block static PassRefPtr<RenderTheme> create(Page*); 77dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 78dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // A method asking if the theme's controls actually care about redrawing when hovered. 79dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual bool supportsHover(const RenderStyle*) const { return true; } 80dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 81dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // A method asking if the theme is able to draw the focus ring. 82dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual bool supportsFocusRing(const RenderStyle*) const; 83dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 84dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // A method asking if the control changes its tint when the window has focus or not. 85dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual bool controlSupportsTints(const RenderObject*) const; 86dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 87dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // A general method asking if any control tinting is supported at all. 88dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual bool supportsControlTints() const { return true; } 89dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 90dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // A method to obtain the baseline position for a "leaf" control. This will only be used if a baseline 91dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of 92dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // controls that need to do this. 93dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual int baselinePosition(const RenderObject*) const; 94dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 95dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual Color platformActiveSelectionBackgroundColor() const { return m_activeSelectionBackgroundColor; } 96dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual Color platformInactiveSelectionBackgroundColor() const { return m_inactiveSelectionBackgroundColor; } 97dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual Color platformActiveSelectionForegroundColor() const { return m_activeSelectionForegroundColor; } 98dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual Color platformInactiveSelectionForegroundColor() const { return m_inactiveSelectionForegroundColor; } 99dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual Color platformFocusRingColor() const { return m_focusRingColor; } 100dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 101dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void themeChanged(); 102dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 103dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // Set platform colors and notify they changed 104dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void setActiveSelectionColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA); 105dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void setInactiveSelectionColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA); 106dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void setFocusRingColor(int r, int g, int b, int a); 107dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 108dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void setButtonTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA); 109dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void setComboTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA); 110dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void setEntryTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA); 111dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void setSearchTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA); 112dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 11381bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void adjustSizeConstraints(RenderStyle*, FormType) const; 114dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 115dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 116dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // System fonts. 117dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void systemFont(int propId, FontDescription&) const; 118dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 119dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustCheckboxStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 120ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintCheckbox(RenderObject*, const PaintInfo&, const IntRect&); 121dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 122dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustRadioStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 123ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintRadio(RenderObject*, const PaintInfo&, const IntRect&); 124dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 125dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 126ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintButton(RenderObject*, const PaintInfo&, const IntRect&); 127dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 128dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustTextFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 129ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintTextField(RenderObject*, const PaintInfo&, const IntRect&); 130dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 131dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustTextAreaStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 132ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&); 133dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 134dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustMenuListStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 135ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&); 136dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 137dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 138ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&); 139dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 140dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustSearchFieldDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 141ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&); 142dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 143dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 144ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect&); 145dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 146dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustSearchFieldResultsButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 147ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintSearchFieldResultsButton(RenderObject*, const PaintInfo&, const IntRect&); 148dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 149dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block virtual void adjustSearchFieldCancelButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 150ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, const IntRect&); 151dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 152dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch virtual void adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 153dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect&); 154dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch 155dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch virtual void adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 156dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&); 157e8b154fd68f9b33be40a3590e58347f353835f5cSteve Block 15881bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch static void setDefaultFontSize(int fontsize); 159e8b154fd68f9b33be40a3590e58347f353835f5cSteve Block 160a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#if ENABLE(PROGRESS_TAG) 161a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch virtual void adjustProgressBarStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 162a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch virtual bool paintProgressBar(RenderObject*, const PaintInfo&, const IntRect&); 163a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#endif 164a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch 1652fc2651226baac27029e38c9d6ef883fa32084dbSteve Block#if ENABLE(VIDEO) 1662fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual String extraMediaControlsStyleSheet(); 1672fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual String formatMediaControlsCurrentTime(float currentTime, float duration) const; 1682fc2651226baac27029e38c9d6ef883fa32084dbSteve Block 1692fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaFullscreenButton(RenderObject*, const PaintInfo&, const IntRect&); 1702fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const IntRect&); 1712fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const IntRect&); 1722fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaSeekBackButton(RenderObject*, const PaintInfo&, const IntRect&); 1732fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaSeekForwardButton(RenderObject*, const PaintInfo&, const IntRect&); 1742fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const IntRect&); 1752fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const IntRect&); 1762fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaVolumeSliderContainer(RenderObject*, const PaintInfo&, const IntRect&); 1772fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, const IntRect&); 1782fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, const IntRect&); 1792fc2651226baac27029e38c9d6ef883fa32084dbSteve Block virtual bool paintMediaCurrentTime(RenderObject*, const PaintInfo&, const IntRect&); 1802fc2651226baac27029e38c9d6ef883fa32084dbSteve Block#endif 1812fc2651226baac27029e38c9d6ef883fa32084dbSteve Block 182e8b154fd68f9b33be40a3590e58347f353835f5cSteve Blockprotected: 183e8b154fd68f9b33be40a3590e58347f353835f5cSteve Block static float defaultFontSize; 184e8b154fd68f9b33be40a3590e58347f353835f5cSteve Block 185dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockprivate: 186dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void createCanvas(); 187dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void createEdje(); 188dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void applyEdjeColors(); 189dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void applyPartDescriptions(); 19081bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch const char* edjeGroupFromFormType(FormType) const; 19181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void applyEdjeStateFromForm(Evas_Object*, ControlStates); 19281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch bool paintThemePart(RenderObject*, FormType, const PaintInfo&, const IntRect&); 193dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 1942bde8e466a4451c7319e3a072d118917957d6554Steve Block#if ENABLE(VIDEO) 1952bde8e466a4451c7319e3a072d118917957d6554Steve Block bool emitMediaButtonSignal(FormType, MediaControlElementType, const IntRect&); 1962bde8e466a4451c7319e3a072d118917957d6554Steve Block#endif 1972bde8e466a4451c7319e3a072d118917957d6554Steve Block 198dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Page* m_page; 199dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_activeSelectionBackgroundColor; 200dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_activeSelectionForegroundColor; 201dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_inactiveSelectionBackgroundColor; 202dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_inactiveSelectionForegroundColor; 203dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_focusRingColor; 204dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_buttonTextBackgroundColor; 205dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_buttonTextForegroundColor; 206dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_comboTextBackgroundColor; 207dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_comboTextForegroundColor; 208dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_entryTextBackgroundColor; 209dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_entryTextForegroundColor; 210dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_searchTextBackgroundColor; 211dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Color m_searchTextForegroundColor; 212dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Ecore_Evas* m_canvas; 213dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Evas_Object* m_edje; 214dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 215dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block struct ThemePartDesc { 216dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block FormType type; 217dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block LengthSize min; 218dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block LengthSize max; 219dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block LengthBox padding; 220dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block }; 22181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void applyPartDescriptionFallback(struct ThemePartDesc*); 22281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void applyPartDescription(Evas_Object*, struct ThemePartDesc*); 223dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 224dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block struct ThemePartCacheEntry { 225dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block FormType type; 226dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block IntSize size; 227dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Ecore_Evas* ee; 228dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Evas_Object* o; 229dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block cairo_surface_t* surface; 230dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block }; 231dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 232dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block struct ThemePartDesc m_partDescs[FormTypeLast]; 233dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 234dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // this should be small and not so frequently used, 235dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // so use a vector and do linear searches 236dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block Vector<struct ThemePartCacheEntry *> m_partCache; 237dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 238dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // get (use, create or replace) entry from cache 23981bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch struct ThemePartCacheEntry* cacheThemePartGet(FormType, const IntSize&); 240dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // flush cache, deleting all entries 241dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block void cacheThemePartFlush(); 242dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 243dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block // internal, used by cacheThemePartGet() 24481bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch bool themePartCacheEntryReset(struct ThemePartCacheEntry*, FormType); 24581bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch bool themePartCacheEntrySurfaceCreate(struct ThemePartCacheEntry*); 24681bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch struct ThemePartCacheEntry* cacheThemePartNew(FormType, const IntSize&); 24781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch struct ThemePartCacheEntry* cacheThemePartReset(FormType, struct ThemePartCacheEntry*); 24881bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch struct ThemePartCacheEntry* cacheThemePartResizeAndReset(FormType, const IntSize&, struct ThemePartCacheEntry*); 249dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 250dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block}; 251dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block} 252dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 253dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block#endif // RenderThemeEfl_h 254