| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 BUTTON, | 36 BUTTON, |
| 37 LIST, | 37 LIST, |
| 38 MENU, | 38 MENU, |
| 39 MENULIST, | 39 MENULIST, |
| 40 SCROLLBAR, | 40 SCROLLBAR, |
| 41 STATUS, | 41 STATUS, |
| 42 TAB, | 42 TAB, |
| 43 TEXTFIELD, | 43 TEXTFIELD, |
| 44 TRACKBAR, | 44 TRACKBAR, |
| 45 WINDOW, | 45 WINDOW, |
| 46 PROGRESS, |
| 46 LAST | 47 LAST |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 // This enumeration is used within PaintMenuArrow in order to indicate the | 50 // This enumeration is used within PaintMenuArrow in order to indicate the |
| 50 // direction the menu arrow should point to. | 51 // direction the menu arrow should point to. |
| 51 enum MenuArrowDirection { | 52 enum MenuArrowDirection { |
| 52 LEFT_POINTING_ARROW, | 53 LEFT_POINTING_ARROW, |
| 53 RIGHT_POINTING_ARROW | 54 RIGHT_POINTING_ARROW |
| 54 }; | 55 }; |
| 55 | 56 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 bool fill_content_area, | 201 bool fill_content_area, |
| 201 bool draw_edges) const; | 202 bool draw_edges) const; |
| 202 | 203 |
| 203 HRESULT PaintTrackbar(HDC hdc, | 204 HRESULT PaintTrackbar(HDC hdc, |
| 204 int part_id, | 205 int part_id, |
| 205 int state_id, | 206 int state_id, |
| 206 int classic_state, | 207 int classic_state, |
| 207 RECT* rect, | 208 RECT* rect, |
| 208 skia::PlatformCanvas* canvas) const; | 209 skia::PlatformCanvas* canvas) const; |
| 209 | 210 |
| 211 HRESULT PaintProgressBar(HDC hdc, |
| 212 RECT* bar_rect, |
| 213 int value_part_id, |
| 214 RECT* value_rect, |
| 215 skia::PlatformCanvas* canvas) const; |
| 216 |
| 210 bool IsThemingActive() const; | 217 bool IsThemingActive() const; |
| 211 | 218 |
| 212 HRESULT GetThemePartSize(ThemeName themeName, | 219 HRESULT GetThemePartSize(ThemeName themeName, |
| 213 HDC hdc, | 220 HDC hdc, |
| 214 int part_id, | 221 int part_id, |
| 215 int state_id, | 222 int state_id, |
| 216 RECT* rect, | 223 RECT* rect, |
| 217 int ts, | 224 int ts, |
| 218 SIZE* size) const; | 225 SIZE* size) const; |
| 219 | 226 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 ~NativeTheme(); | 269 ~NativeTheme(); |
| 263 | 270 |
| 264 HRESULT PaintFrameControl(HDC hdc, | 271 HRESULT PaintFrameControl(HDC hdc, |
| 265 RECT* rect, | 272 RECT* rect, |
| 266 UINT type, | 273 UINT type, |
| 267 UINT state, | 274 UINT state, |
| 268 bool is_highlighted) const; | 275 bool is_highlighted) const; |
| 269 | 276 |
| 270 // Returns a handle to the theme data. | 277 // Returns a handle to the theme data. |
| 271 HANDLE GetThemeHandle(ThemeName theme_name) const; | 278 HANDLE GetThemeHandle(ThemeName theme_name) const; |
| 279 HRGN GetClipHandle() const; |
| 272 | 280 |
| 273 // Function pointers into uxtheme.dll. | 281 // Function pointers into uxtheme.dll. |
| 274 DrawThemeBackgroundPtr draw_theme_; | 282 DrawThemeBackgroundPtr draw_theme_; |
| 275 DrawThemeBackgroundExPtr draw_theme_ex_; | 283 DrawThemeBackgroundExPtr draw_theme_ex_; |
| 276 GetThemeColorPtr get_theme_color_; | 284 GetThemeColorPtr get_theme_color_; |
| 277 GetThemeContentRectPtr get_theme_content_rect_; | 285 GetThemeContentRectPtr get_theme_content_rect_; |
| 278 GetThemePartSizePtr get_theme_part_size_; | 286 GetThemePartSizePtr get_theme_part_size_; |
| 279 OpenThemeDataPtr open_theme_; | 287 OpenThemeDataPtr open_theme_; |
| 280 CloseThemeDataPtr close_theme_; | 288 CloseThemeDataPtr close_theme_; |
| 281 SetThemeAppPropertiesPtr set_theme_properties_; | 289 SetThemeAppPropertiesPtr set_theme_properties_; |
| 282 IsThemeActivePtr is_theme_active_; | 290 IsThemeActivePtr is_theme_active_; |
| 283 GetThemeIntPtr get_theme_int_; | 291 GetThemeIntPtr get_theme_int_; |
| 284 | 292 |
| 285 // Handle to uxtheme.dll. | 293 // Handle to uxtheme.dll. |
| 286 HMODULE theme_dll_; | 294 HMODULE theme_dll_; |
| 287 | 295 // A cache of original clipping handle |
| 296 mutable HRGN clip_; |
| 288 // A cache of open theme handles. | 297 // A cache of open theme handles. |
| 289 mutable HANDLE theme_handles_[LAST]; | 298 mutable HANDLE theme_handles_[LAST]; |
| 290 | 299 |
| 291 DISALLOW_COPY_AND_ASSIGN(NativeTheme); | 300 DISALLOW_COPY_AND_ASSIGN(NativeTheme); |
| 292 }; | 301 }; |
| 293 | 302 |
| 294 } // namespace gfx | 303 } // namespace gfx |
| 295 | 304 |
| 296 #endif // APP_GFX_NATIVE_THEME_WIN_H_ | 305 #endif // APP_GFX_NATIVE_THEME_WIN_H_ |
| OLD | NEW |