diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-03 20:25:08 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-03 20:25:08 +0000 |
commit | 0c8f8d48b98dcb02c01acbf03eb02506c0cc2507 (patch) | |
tree | 85c35bd7bd652b58c5b2efe154ab694d6dd43262 /webkit | |
parent | 8a31875c7cc1f8ac4e788388db2496393e3d5300 (diff) | |
download | chromium_src-0c8f8d48b98dcb02c01acbf03eb02506c0cc2507.zip chromium_src-0c8f8d48b98dcb02c01acbf03eb02506c0cc2507.tar.gz chromium_src-0c8f8d48b98dcb02c01acbf03eb02506c0cc2507.tar.bz2 |
temporarily adding file to resolve issue where we can't just add port to search header list for webcore. will fix later.
Review URL: http://codereview.chromium.org/6246
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/port/platform/mac/Cursor.h | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/webkit/port/platform/mac/Cursor.h b/webkit/port/platform/mac/Cursor.h new file mode 100644 index 0000000..5bf26be --- /dev/null +++ b/webkit/port/platform/mac/Cursor.h @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2004, 2006, 2008 Apple 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: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +// TODO(pinkerton): This file is ***TEMPORARY*** because we haven't yet +// correctly ported all the things in webkit/port and as such we can't blindly +// put that path into HEADER_SEARCH_PATHS without epic fail in other files. We +// also gave up on header maps so we can't bring in this file by itself. Until +// then, we're duplicating this file and will fix it eventually. + +#ifndef Cursor_h +#define Cursor_h + +#include <wtf/Platform.h> + +#if PLATFORM(WIN) +#include "webkit/glue/webcursor.h" +typedef struct HICON__* HICON; +typedef HICON HCURSOR; +#include <wtf/PassRefPtr.h> +#include <wtf/RefCounted.h> +#include <wtf/RefPtr.h> +#elif PLATFORM(GTK) +#include <gdk/gdk.h> +#elif PLATFORM(QT) +#include <QCursor> +#endif + +#if PLATFORM(MAC) +#ifdef __OBJC__ +@class NSCursor; +#else +class NSCursor; +#endif +#endif + +#if PLATFORM(WX) +class wxCursor; +#endif + +namespace WebCore { + + class Image; + class IntPoint; + +#if PLATFORM(WIN) + typedef WebCursor PlatformCursor; +#elif PLATFORM(MAC) + typedef NSCursor* PlatformCursor; +#elif PLATFORM(GTK) + typedef GdkCursor* PlatformCursor; +#elif PLATFORM(QT) && !defined(QT_NO_CURSOR) + typedef QCursor PlatformCursor; +#elif PLATFORM(WX) + typedef wxCursor* PlatformCursor; +#else + typedef void* PlatformCursor; +#endif + + class Cursor { + public: + Cursor() + { } + + Cursor(Image*, const IntPoint& hotspot); + Cursor(const Cursor&); + ~Cursor(); + Cursor& operator=(const Cursor&); + + Cursor(PlatformCursor); + PlatformCursor impl() const { return m_impl; } + + private: + PlatformCursor m_impl; + }; + + const Cursor& pointerCursor(); + const Cursor& crossCursor(); + const Cursor& handCursor(); + const Cursor& moveCursor(); + const Cursor& iBeamCursor(); + const Cursor& waitCursor(); + const Cursor& helpCursor(); + const Cursor& eastResizeCursor(); + const Cursor& northResizeCursor(); + const Cursor& northEastResizeCursor(); + const Cursor& northWestResizeCursor(); + const Cursor& southResizeCursor(); + const Cursor& southEastResizeCursor(); + const Cursor& southWestResizeCursor(); + const Cursor& westResizeCursor(); + const Cursor& northSouthResizeCursor(); + const Cursor& eastWestResizeCursor(); + const Cursor& northEastSouthWestResizeCursor(); + const Cursor& northWestSouthEastResizeCursor(); + const Cursor& columnResizeCursor(); + const Cursor& rowResizeCursor(); + const Cursor& middlePanningCursor(); + const Cursor& eastPanningCursor(); + const Cursor& northPanningCursor(); + const Cursor& northEastPanningCursor(); + const Cursor& northWestPanningCursor(); + const Cursor& southPanningCursor(); + const Cursor& southEastPanningCursor(); + const Cursor& southWestPanningCursor(); + const Cursor& westPanningCursor(); + const Cursor& verticalTextCursor(); + const Cursor& cellCursor(); + const Cursor& contextMenuCursor(); + const Cursor& noDropCursor(); + const Cursor& notAllowedCursor(); + const Cursor& progressCursor(); + const Cursor& aliasCursor(); + const Cursor& zoomInCursor(); + const Cursor& zoomOutCursor(); + const Cursor& copyCursor(); + const Cursor& noneCursor(); + +} // namespace WebCore + +#endif // Cursor_h |