Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: base/gfx/native_theme.h

Issue 14110: Move the "platform" wrappers in skia/ext to the skia namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/gfx/native_theme.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // A wrapper class for working with custom XP/Vista themes provided in 5 // A wrapper class for working with custom XP/Vista themes provided in
6 // uxtheme.dll. This is a singleton class that can be grabbed using 6 // uxtheme.dll. This is a singleton class that can be grabbed using
7 // NativeTheme::instance(). 7 // NativeTheme::instance().
8 // For more information on visual style parts and states, see: 8 // For more information on visual style parts and states, see:
9 // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/plat form/commctls/userex/topics/partsandstates.asp 9 // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/plat form/commctls/userex/topics/partsandstates.asp
10 10
11 #ifndef BASE_GFX_NATIVE_THEME_H__ 11 #ifndef BASE_GFX_NATIVE_THEME_H__
12 #define BASE_GFX_NATIVE_THEME_H__ 12 #define BASE_GFX_NATIVE_THEME_H__
13 13
14 #include <windows.h> 14 #include <windows.h>
15 #include <uxtheme.h> 15 #include <uxtheme.h>
16 #include "base/basictypes.h" 16 #include "base/basictypes.h"
17 #include "base/gfx/size.h" 17 #include "base/gfx/size.h"
18 #include "skia/include/SkColor.h" 18 #include "skia/include/SkColor.h"
19 19
20 namespace skia {
21 class PlatformCanvasWin;
22 } // namespace skia
23
20 namespace gfx { 24 namespace gfx {
21 class PlatformCanvasWin;
22 25
23 // TODO: Define class member enums to replace part_id and state_id parameters 26 // TODO: Define class member enums to replace part_id and state_id parameters
24 // that are currently defined in <vssym32.h>. Afterward, classic_state should 27 // that are currently defined in <vssym32.h>. Afterward, classic_state should
25 // be removed and class users wouldn't need to include <vssym32.h> anymore. 28 // be removed and class users wouldn't need to include <vssym32.h> anymore.
26 // This would enable HOT state on non-themed UI (like when RDP'ing) and would 29 // This would enable HOT state on non-themed UI (like when RDP'ing) and would
27 // simplify usage. 30 // simplify usage.
28 // TODO: This class should probably be changed to be platform independent at 31 // TODO: This class should probably be changed to be platform independent at
29 // the same time. 32 // the same time.
30 class NativeTheme { 33 class NativeTheme {
31 public: 34 public:
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 124
122 // Paints a scrollbar track section. |align_rect| is only used in classic 125 // Paints a scrollbar track section. |align_rect| is only used in classic
123 // mode, and makes sure the checkerboard pattern in |target_rect| is aligned 126 // mode, and makes sure the checkerboard pattern in |target_rect| is aligned
124 // with one presumed to be in |align_rect|. 127 // with one presumed to be in |align_rect|.
125 HRESULT PaintScrollbarTrack(HDC hdc, 128 HRESULT PaintScrollbarTrack(HDC hdc,
126 int part_id, 129 int part_id,
127 int state_id, 130 int state_id,
128 int classic_state, 131 int classic_state,
129 RECT* target_rect, 132 RECT* target_rect,
130 RECT* align_rect, 133 RECT* align_rect,
131 PlatformCanvasWin* canvas) const; 134 skia::PlatformCanvasWin* canvas) const;
132 135
133 // |arrow_direction| determines whether the arrow is pointing to the left or 136 // |arrow_direction| determines whether the arrow is pointing to the left or
134 // to the right. In RTL locales, sub-menus open from right to left and 137 // to the right. In RTL locales, sub-menus open from right to left and
135 // therefore the menu arrow should point to the left and not to the right. 138 // therefore the menu arrow should point to the left and not to the right.
136 HRESULT PaintMenuArrow(ThemeName theme, 139 HRESULT PaintMenuArrow(ThemeName theme,
137 HDC hdc, 140 HDC hdc,
138 int part_id, 141 int part_id,
139 int state_id, 142 int state_id,
140 RECT* rect, 143 RECT* rect,
141 MenuArrowDirection arrow_direction, 144 MenuArrowDirection arrow_direction,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // A cache of open theme handles. 280 // A cache of open theme handles.
278 mutable HANDLE theme_handles_[LAST]; 281 mutable HANDLE theme_handles_[LAST];
279 282
280 DISALLOW_EVIL_CONSTRUCTORS(NativeTheme); 283 DISALLOW_EVIL_CONSTRUCTORS(NativeTheme);
281 }; 284 };
282 285
283 } // namespace gfx 286 } // namespace gfx
284 287
285 #endif // BASE_GFX_NATIVE_THEME_H__ 288 #endif // BASE_GFX_NATIVE_THEME_H__
286 289
OLDNEW
« no previous file with comments | « no previous file | base/gfx/native_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698