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

Side by Side Diff: ui/gfx/icon_util.h

Issue 7569005: Rename UI_API to UI_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months 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 | « ui/gfx/gtk_util.h ('k') | ui/gfx/image/image.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef UI_GFX_ICON_UTIL_H_ 5 #ifndef UI_GFX_ICON_UTIL_H_
6 #define UI_GFX_ICON_UTIL_H_ 6 #define UI_GFX_ICON_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <windows.h> 9 #include <windows.h>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "ui/ui_api.h" 14 #include "ui/base/ui_export.h"
15 15
16 namespace gfx { 16 namespace gfx {
17 class Size; 17 class Size;
18 } 18 }
19 class FilePath; 19 class FilePath;
20 class SkBitmap; 20 class SkBitmap;
21 21
22 /////////////////////////////////////////////////////////////////////////////// 22 ///////////////////////////////////////////////////////////////////////////////
23 // 23 //
24 // The IconUtil class contains helper functions for manipulating Windows icons. 24 // The IconUtil class contains helper functions for manipulating Windows icons.
(...skipping 18 matching lines...) Expand all
43 // } 43 // }
44 // 44 //
45 // // Use the icon with a WM_SETICON message 45 // // Use the icon with a WM_SETICON message
46 // ::SendMessage(hwnd, WM_SETICON, static_cast<WPARAM>(ICON_BIG), 46 // ::SendMessage(hwnd, WM_SETICON, static_cast<WPARAM>(ICON_BIG),
47 // reinterpret_cast<LPARAM>(icon)); 47 // reinterpret_cast<LPARAM>(icon));
48 // 48 //
49 // // Destroy the icon when we are done 49 // // Destroy the icon when we are done
50 // ::DestroyIcon(icon); 50 // ::DestroyIcon(icon);
51 // 51 //
52 /////////////////////////////////////////////////////////////////////////////// 52 ///////////////////////////////////////////////////////////////////////////////
53 class UI_API IconUtil { 53 class UI_EXPORT IconUtil {
54 public: 54 public:
55 // Given an SkBitmap object, the function converts the bitmap to a Windows 55 // Given an SkBitmap object, the function converts the bitmap to a Windows
56 // icon and returns the corresponding HICON handle. If the function cannot 56 // icon and returns the corresponding HICON handle. If the function cannot
57 // convert the bitmap, NULL is returned. 57 // convert the bitmap, NULL is returned.
58 // 58 //
59 // The client is responsible for destroying the icon when it is no longer 59 // The client is responsible for destroying the icon when it is no longer
60 // needed by calling ::DestroyIcon(). 60 // needed by calling ::DestroyIcon().
61 static HICON CreateHICONFromSkBitmap(const SkBitmap& bitmap); 61 static HICON CreateHICONFromSkBitmap(const SkBitmap& bitmap);
62 62
63 // Given a valid HICON handle representing an icon, this function converts 63 // Given a valid HICON handle representing an icon, this function converts
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 static void ComputeBitmapSizeComponents(const SkBitmap& bitmap, 187 static void ComputeBitmapSizeComponents(const SkBitmap& bitmap,
188 size_t* xor_mask_size, 188 size_t* xor_mask_size,
189 size_t* bytes_in_resource); 189 size_t* bytes_in_resource);
190 190
191 // Prevent clients from instantiating objects of that class by declaring the 191 // Prevent clients from instantiating objects of that class by declaring the
192 // ctor/dtor as private. 192 // ctor/dtor as private.
193 DISALLOW_IMPLICIT_CONSTRUCTORS(IconUtil); 193 DISALLOW_IMPLICIT_CONSTRUCTORS(IconUtil);
194 }; 194 };
195 195
196 #endif // UI_GFX_ICON_UTIL_H_ 196 #endif // UI_GFX_ICON_UTIL_H_
OLDNEW
« no previous file with comments | « ui/gfx/gtk_util.h ('k') | ui/gfx/image/image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698