diff options
author | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 21:49:30 +0000 |
---|---|---|
committer | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 21:49:30 +0000 |
commit | 7c51b0ee951bf8ed70d0ed6506567991c611d070 (patch) | |
tree | 0d559aad012f55a540a990143bd1d9264e240319 /webkit/api/public/WebCursorInfo.h | |
parent | 03ce3cd72a2bb330c774f47cea4ad346d5c26cad (diff) | |
download | chromium_src-7c51b0ee951bf8ed70d0ed6506567991c611d070.zip chromium_src-7c51b0ee951bf8ed70d0ed6506567991c611d070.tar.gz chromium_src-7c51b0ee951bf8ed70d0ed6506567991c611d070.tar.bz2 |
Start using WebCursorInfo from the WebKit API. WebCursorInfo is a
lightweight struct containing a description of a cursor that the
embedder should render.
WebCursor still exists. Instead of WebCursor initializing from a
PlatformCursor, it now initializes from a WebCursorInfo.
TEST=none
BUG=10039
R=jam
Review URL: http://codereview.chromium.org/155172
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20194 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/api/public/WebCursorInfo.h')
-rw-r--r-- | webkit/api/public/WebCursorInfo.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/webkit/api/public/WebCursorInfo.h b/webkit/api/public/WebCursorInfo.h index c1930de..194e33b 100644 --- a/webkit/api/public/WebCursorInfo.h +++ b/webkit/api/public/WebCursorInfo.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -31,11 +31,13 @@ #ifndef WebCursorInfo_h #define WebCursorInfo_h -#error "This header file is still a work in progress; do not include!" - #include "WebImage.h" #include "WebPoint.h" +#if WEBKIT_IMPLEMENTATION +namespace WebCore { class Cursor; } +#endif + #ifdef WIN32 typedef struct HICON__* HICON; typedef HICON HCURSOR; @@ -91,7 +93,7 @@ namespace WebKit { Type type; WebPoint hotSpot; - WebImage customData; + WebImage customImage; #ifdef WIN32 // On Windows, TypeCustom may alternatively reference an externally @@ -100,6 +102,18 @@ namespace WebKit { // responsible for managing the lifetime of this cursor handle. HCURSOR externalHandle; #endif + + explicit WebCursorInfo(Type type = TypePointer) + : type(type) + { +#ifdef WIN32 + externalHandle = 0; +#endif + } + +#if WEBKIT_IMPLEMENTATION + explicit WebCursorInfo(const WebCore::Cursor&); +#endif }; } // namespace WebKit |