| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Return the stock GdkCursorType for this cursor, or GDK_CURSOR_IS_PIXMAP | 85 // Return the stock GdkCursorType for this cursor, or GDK_CURSOR_IS_PIXMAP |
| 86 // if it's a custom cursor. Return GDK_LAST_CURSOR to indicate that the cursor | 86 // if it's a custom cursor. Return GDK_LAST_CURSOR to indicate that the cursor |
| 87 // should be set to the system default. | 87 // should be set to the system default. |
| 88 // Returns an int so we don't need to include GDK headers in this header file. | 88 // Returns an int so we don't need to include GDK headers in this header file. |
| 89 int GetCursorType() const; | 89 int GetCursorType() const; |
| 90 | 90 |
| 91 // Return a new GdkCursor* for this cursor. Only valid if GetCursorType | 91 // Return a new GdkCursor* for this cursor. Only valid if GetCursorType |
| 92 // returns GDK_CURSOR_IS_PIXMAP. | 92 // returns GDK_CURSOR_IS_PIXMAP. |
| 93 GdkCursor* GetCustomCursor(); | 93 GdkCursor* GetCustomCursor(); |
| 94 #elif defined(OS_MACOSX) | 94 #elif defined(OS_MACOSX) |
| 95 // Gets an NSCursor* for this cursor. | |
| 96 NSCursor* GetCursor() const; | |
| 97 | |
| 98 // Initialize this from the given Carbon ThemeCursor. | 95 // Initialize this from the given Carbon ThemeCursor. |
| 99 void InitFromThemeCursor(ThemeCursor cursor); | 96 void InitFromThemeCursor(ThemeCursor cursor); |
| 100 | 97 |
| 101 // Initialize this from the given Carbon Cursor. | 98 // Initialize this from the given Carbon Cursor. |
| 102 void InitFromCursor(const Cursor* cursor); | 99 void InitFromCursor(const Cursor* cursor); |
| 103 | 100 |
| 104 // Initialize this from the given Cocoa NSCursor. | 101 // Initialize this from the given Cocoa NSCursor. |
| 105 void InitFromNSCursor(NSCursor* cursor); | 102 void InitFromNSCursor(NSCursor* cursor); |
| 106 #endif | 103 #endif |
| 107 | 104 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 HCURSOR external_cursor_; | 148 HCURSOR external_cursor_; |
| 152 // A custom cursor created from custom bitmap data by Webkit. | 149 // A custom cursor created from custom bitmap data by Webkit. |
| 153 HCURSOR custom_cursor_; | 150 HCURSOR custom_cursor_; |
| 154 #elif defined(TOOLKIT_USES_GTK) | 151 #elif defined(TOOLKIT_USES_GTK) |
| 155 // A custom cursor created that should be unref'ed from the destructor. | 152 // A custom cursor created that should be unref'ed from the destructor. |
| 156 GdkCursor* unref_; | 153 GdkCursor* unref_; |
| 157 #endif | 154 #endif |
| 158 }; | 155 }; |
| 159 | 156 |
| 160 #endif // WEBKIT_GLUE_WEBCURSOR_H_ | 157 #endif // WEBKIT_GLUE_WEBCURSOR_H_ |
| OLD | NEW |