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

Side by Side Diff: Source/platform/Cursor.h

Issue 108383002: Move Cursor to platform/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add missing export macros Created 7 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 | « Source/core/testing/Internals.cpp ('k') | Source/platform/Cursor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef Cursor_h 26 #ifndef Cursor_h
27 #define Cursor_h 27 #define Cursor_h
28 28
29 #include "platform/PlatformExport.h"
29 #include "platform/geometry/IntPoint.h" 30 #include "platform/geometry/IntPoint.h"
30 #include "platform/graphics/Image.h" 31 #include "platform/graphics/Image.h"
31 #include "wtf/Assertions.h" 32 #include "wtf/Assertions.h"
32 #include "wtf/RefPtr.h" 33 #include "wtf/RefPtr.h"
33 34
34 namespace WebCore { 35 namespace WebCore {
35 36
36 class Cursor { 37 class PLATFORM_EXPORT Cursor {
37 WTF_MAKE_FAST_ALLOCATED; 38 WTF_MAKE_FAST_ALLOCATED;
38 public: 39 public:
39 enum Type { 40 enum Type {
40 Pointer = 0, 41 Pointer = 0,
41 Cross, 42 Cross,
42 Hand, 43 Hand,
43 IBeam, 44 IBeam,
44 Wait, 45 Wait,
45 Help, 46 Help,
46 EastResize, 47 EastResize,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Image scale in image pixels per logical (UI) pixel. 112 // Image scale in image pixels per logical (UI) pixel.
112 float imageScaleFactor() const { return m_imageScaleFactor; } 113 float imageScaleFactor() const { return m_imageScaleFactor; }
113 114
114 private: 115 private:
115 Type m_type; 116 Type m_type;
116 RefPtr<Image> m_image; 117 RefPtr<Image> m_image;
117 IntPoint m_hotSpot; 118 IntPoint m_hotSpot;
118 float m_imageScaleFactor; 119 float m_imageScaleFactor;
119 }; 120 };
120 121
121 IntPoint determineHotSpot(Image*, const IntPoint& specifiedHotSpot); 122 PLATFORM_EXPORT IntPoint determineHotSpot(Image*, const IntPoint& specifiedHotSp ot);
122 123
123 const Cursor& pointerCursor(); 124 PLATFORM_EXPORT const Cursor& pointerCursor();
124 const Cursor& crossCursor(); 125 PLATFORM_EXPORT const Cursor& crossCursor();
125 const Cursor& handCursor(); 126 PLATFORM_EXPORT const Cursor& handCursor();
126 const Cursor& moveCursor(); 127 PLATFORM_EXPORT const Cursor& moveCursor();
127 const Cursor& iBeamCursor(); 128 PLATFORM_EXPORT const Cursor& iBeamCursor();
128 const Cursor& waitCursor(); 129 PLATFORM_EXPORT const Cursor& waitCursor();
129 const Cursor& helpCursor(); 130 PLATFORM_EXPORT const Cursor& helpCursor();
130 const Cursor& eastResizeCursor(); 131 PLATFORM_EXPORT const Cursor& eastResizeCursor();
131 const Cursor& northResizeCursor(); 132 PLATFORM_EXPORT const Cursor& northResizeCursor();
132 const Cursor& northEastResizeCursor(); 133 PLATFORM_EXPORT const Cursor& northEastResizeCursor();
133 const Cursor& northWestResizeCursor(); 134 PLATFORM_EXPORT const Cursor& northWestResizeCursor();
134 const Cursor& southResizeCursor(); 135 PLATFORM_EXPORT const Cursor& southResizeCursor();
135 const Cursor& southEastResizeCursor(); 136 PLATFORM_EXPORT const Cursor& southEastResizeCursor();
136 const Cursor& southWestResizeCursor(); 137 PLATFORM_EXPORT const Cursor& southWestResizeCursor();
137 const Cursor& westResizeCursor(); 138 PLATFORM_EXPORT const Cursor& westResizeCursor();
138 const Cursor& northSouthResizeCursor(); 139 PLATFORM_EXPORT const Cursor& northSouthResizeCursor();
139 const Cursor& eastWestResizeCursor(); 140 PLATFORM_EXPORT const Cursor& eastWestResizeCursor();
140 const Cursor& northEastSouthWestResizeCursor(); 141 PLATFORM_EXPORT const Cursor& northEastSouthWestResizeCursor();
141 const Cursor& northWestSouthEastResizeCursor(); 142 PLATFORM_EXPORT const Cursor& northWestSouthEastResizeCursor();
142 const Cursor& columnResizeCursor(); 143 PLATFORM_EXPORT const Cursor& columnResizeCursor();
143 const Cursor& rowResizeCursor(); 144 PLATFORM_EXPORT const Cursor& rowResizeCursor();
144 const Cursor& middlePanningCursor(); 145 PLATFORM_EXPORT const Cursor& middlePanningCursor();
145 const Cursor& eastPanningCursor(); 146 PLATFORM_EXPORT const Cursor& eastPanningCursor();
146 const Cursor& northPanningCursor(); 147 PLATFORM_EXPORT const Cursor& northPanningCursor();
147 const Cursor& northEastPanningCursor(); 148 PLATFORM_EXPORT const Cursor& northEastPanningCursor();
148 const Cursor& northWestPanningCursor(); 149 PLATFORM_EXPORT const Cursor& northWestPanningCursor();
149 const Cursor& southPanningCursor(); 150 PLATFORM_EXPORT const Cursor& southPanningCursor();
150 const Cursor& southEastPanningCursor(); 151 PLATFORM_EXPORT const Cursor& southEastPanningCursor();
151 const Cursor& southWestPanningCursor(); 152 PLATFORM_EXPORT const Cursor& southWestPanningCursor();
152 const Cursor& westPanningCursor(); 153 PLATFORM_EXPORT const Cursor& westPanningCursor();
153 const Cursor& verticalTextCursor(); 154 PLATFORM_EXPORT const Cursor& verticalTextCursor();
154 const Cursor& cellCursor(); 155 PLATFORM_EXPORT const Cursor& cellCursor();
155 const Cursor& contextMenuCursor(); 156 PLATFORM_EXPORT const Cursor& contextMenuCursor();
156 const Cursor& noDropCursor(); 157 PLATFORM_EXPORT const Cursor& noDropCursor();
157 const Cursor& notAllowedCursor(); 158 PLATFORM_EXPORT const Cursor& notAllowedCursor();
158 const Cursor& progressCursor(); 159 PLATFORM_EXPORT const Cursor& progressCursor();
159 const Cursor& aliasCursor(); 160 PLATFORM_EXPORT const Cursor& aliasCursor();
160 const Cursor& zoomInCursor(); 161 PLATFORM_EXPORT const Cursor& zoomInCursor();
161 const Cursor& zoomOutCursor(); 162 PLATFORM_EXPORT const Cursor& zoomOutCursor();
162 const Cursor& copyCursor(); 163 PLATFORM_EXPORT const Cursor& copyCursor();
163 const Cursor& noneCursor(); 164 PLATFORM_EXPORT const Cursor& noneCursor();
164 const Cursor& grabCursor(); 165 PLATFORM_EXPORT const Cursor& grabCursor();
165 const Cursor& grabbingCursor(); 166 PLATFORM_EXPORT const Cursor& grabbingCursor();
166 167
167 } // namespace WebCore 168 } // namespace WebCore
168 169
169 #endif // Cursor_h 170 #endif // Cursor_h
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Source/platform/Cursor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698