OLD | NEW |
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 WEBKIT_GLUE_WEBCURSOR_H_ | 5 #ifndef WEBKIT_GLUE_WEBCURSOR_H_ |
6 #define WEBKIT_GLUE_WEBCURSOR_H_ | 6 #define WEBKIT_GLUE_WEBCURSOR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
| 12 #include "webkit/glue/webkit_glue_export.h" |
12 | 13 |
13 #include <vector> | 14 #include <vector> |
14 | 15 |
15 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
16 typedef struct HINSTANCE__* HINSTANCE; | 17 typedef struct HINSTANCE__* HINSTANCE; |
17 typedef struct HICON__* HICON; | 18 typedef struct HICON__* HICON; |
18 typedef HICON HCURSOR; | 19 typedef HICON HCURSOR; |
19 #elif defined(TOOLKIT_USES_GTK) | 20 #elif defined(TOOLKIT_USES_GTK) |
20 typedef struct _GdkCursor GdkCursor; | 21 typedef struct _GdkCursor GdkCursor; |
21 #elif defined(OS_MACOSX) | 22 #elif defined(OS_MACOSX) |
(...skipping 10 matching lines...) Expand all Loading... |
32 | 33 |
33 namespace WebKit { | 34 namespace WebKit { |
34 class WebImage; | 35 class WebImage; |
35 struct WebCursorInfo; | 36 struct WebCursorInfo; |
36 } | 37 } |
37 | 38 |
38 // This class encapsulates a cross-platform description of a cursor. Platform | 39 // This class encapsulates a cross-platform description of a cursor. Platform |
39 // specific methods are provided to translate the cross-platform cursor into a | 40 // specific methods are provided to translate the cross-platform cursor into a |
40 // platform specific cursor. It is also possible to serialize / de-serialize a | 41 // platform specific cursor. It is also possible to serialize / de-serialize a |
41 // WebCursor. | 42 // WebCursor. |
42 class WebCursor { | 43 class WEBKIT_GLUE_EXPORT WebCursor { |
43 public: | 44 public: |
44 WebCursor(); | 45 WebCursor(); |
45 explicit WebCursor(const WebKit::WebCursorInfo& cursor_info); | 46 explicit WebCursor(const WebKit::WebCursorInfo& cursor_info); |
46 ~WebCursor(); | 47 ~WebCursor(); |
47 | 48 |
48 // Copy constructor/assignment operator combine. | 49 // Copy constructor/assignment operator combine. |
49 WebCursor(const WebCursor& other); | 50 WebCursor(const WebCursor& other); |
50 const WebCursor& operator=(const WebCursor& other); | 51 const WebCursor& operator=(const WebCursor& other); |
51 | 52 |
52 // Conversion from/to WebCursorInfo. | 53 // Conversion from/to WebCursorInfo. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 HCURSOR external_cursor_; | 151 HCURSOR external_cursor_; |
151 // A custom cursor created from custom bitmap data by Webkit. | 152 // A custom cursor created from custom bitmap data by Webkit. |
152 HCURSOR custom_cursor_; | 153 HCURSOR custom_cursor_; |
153 #elif defined(TOOLKIT_USES_GTK) | 154 #elif defined(TOOLKIT_USES_GTK) |
154 // A custom cursor created that should be unref'ed from the destructor. | 155 // A custom cursor created that should be unref'ed from the destructor. |
155 GdkCursor* unref_; | 156 GdkCursor* unref_; |
156 #endif | 157 #endif |
157 }; | 158 }; |
158 | 159 |
159 #endif // WEBKIT_GLUE_WEBCURSOR_H_ | 160 #endif // WEBKIT_GLUE_WEBCURSOR_H_ |
OLD | NEW |