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

Side by Side Diff: webkit/glue/webcursor.h

Issue 172032: First cut for a FreeBSD port - much still not working (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/gfx/point.h" 9 #include "base/gfx/point.h"
10 #include "base/gfx/size.h" 10 #include "base/gfx/size.h"
11 11
12 #include <vector> 12 #include <vector>
13 13
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 typedef struct HINSTANCE__* HINSTANCE; 15 typedef struct HINSTANCE__* HINSTANCE;
16 typedef struct HICON__* HICON; 16 typedef struct HICON__* HICON;
17 typedef HICON HCURSOR; 17 typedef HICON HCURSOR;
18 #elif defined(OS_LINUX) 18 #elif defined(USE_X11)
19 // GdkCursorType is an enum, which we can't forward-declare. :( 19 // GdkCursorType is an enum, which we can't forward-declare. :(
20 // If you work around this, be sure to fix webkit.gyp:glue to not put 20 // If you work around this, be sure to fix webkit.gyp:glue to not put
21 // GTK in the export_dependent_settings section! 21 // GTK in the export_dependent_settings section!
22 #include <gdk/gdkcursor.h> 22 #include <gdk/gdkcursor.h>
23 #elif defined(OS_MACOSX) 23 #elif defined(OS_MACOSX)
24 #ifdef __OBJC__ 24 #ifdef __OBJC__
25 @class NSCursor; 25 @class NSCursor;
26 #else 26 #else
27 class NSCursor; 27 class NSCursor;
28 #endif 28 #endif
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Returns a HCURSOR representing the current WebCursor instance. 70 // Returns a HCURSOR representing the current WebCursor instance.
71 // The ownership of the HCURSOR (does not apply to external cursors) remains 71 // The ownership of the HCURSOR (does not apply to external cursors) remains
72 // with the WebCursor instance. 72 // with the WebCursor instance.
73 HCURSOR GetCursor(HINSTANCE module_handle); 73 HCURSOR GetCursor(HINSTANCE module_handle);
74 74
75 // Initialize this from the given Windows cursor. The caller must ensure that 75 // Initialize this from the given Windows cursor. The caller must ensure that
76 // the HCURSOR remains valid by not invoking the DestroyCursor/DestroyIcon 76 // the HCURSOR remains valid by not invoking the DestroyCursor/DestroyIcon
77 // APIs on it. 77 // APIs on it.
78 void InitFromExternalCursor(HCURSOR handle); 78 void InitFromExternalCursor(HCURSOR handle);
79 79
80 #elif defined(OS_LINUX) 80 #elif defined(USE_X11)
81 // Return the stock GdkCursorType for this cursor, or GDK_CURSOR_IS_PIXMAP 81 // Return the stock GdkCursorType for this cursor, or GDK_CURSOR_IS_PIXMAP
82 // if it's a custom cursor. Return GDK_LAST_CURSOR to indicate that the cursor 82 // if it's a custom cursor. Return GDK_LAST_CURSOR to indicate that the cursor
83 // should be set to the system default. 83 // should be set to the system default.
84 GdkCursorType GetCursorType() const; 84 GdkCursorType GetCursorType() const;
85 85
86 // Return a new GdkCursor* for this cursor. Only valid if GetCursorType 86 // Return a new GdkCursor* for this cursor. Only valid if GetCursorType
87 // returns GDK_CURSOR_IS_PIXMAP. 87 // returns GDK_CURSOR_IS_PIXMAP.
88 GdkCursor* GetCustomCursor() const; 88 GdkCursor* GetCustomCursor() const;
89 #elif defined(OS_MACOSX) 89 #elif defined(OS_MACOSX)
90 NSCursor* GetCursor() const; 90 NSCursor* GetCursor() const;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 #if defined(OS_WIN) 130 #if defined(OS_WIN)
131 // An externally generated HCURSOR. We assume that it remains valid, i.e we 131 // An externally generated HCURSOR. We assume that it remains valid, i.e we
132 // don't attempt to copy the HCURSOR. 132 // don't attempt to copy the HCURSOR.
133 HCURSOR external_cursor_; 133 HCURSOR external_cursor_;
134 // A custom cursor created from custom bitmap data by Webkit. 134 // A custom cursor created from custom bitmap data by Webkit.
135 HCURSOR custom_cursor_; 135 HCURSOR custom_cursor_;
136 #endif // OS_WIN 136 #endif // OS_WIN
137 }; 137 };
138 138
139 #endif // WEBKIT_GLUE_WEBCURSOR_H_ 139 #endif // WEBKIT_GLUE_WEBCURSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698