1/* 2 * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> 3 * 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 16 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28#include "config.h" 29#include "Cursor.h" 30 31#include "NotImplemented.h" 32 33#include <app/AppDefs.h> 34 35 36namespace WebCore { 37 38Cursor::Cursor(PlatformCursor cursor) 39 : m_impl(cursor) 40{ 41} 42 43Cursor::Cursor(const Cursor& other) 44 : m_impl(other.m_impl) 45{ 46} 47 48Cursor::~Cursor() 49{ 50} 51 52Cursor::Cursor(Image*, const IntPoint&) 53{ 54 notImplemented(); 55} 56 57Cursor& Cursor::operator=(const Cursor& other) 58{ 59 m_impl = other.m_impl; 60 return *this; 61} 62 63static Cursor globalCursor = const_cast<BCursor*>(B_CURSOR_SYSTEM_DEFAULT); 64static Cursor ibeamCursor = const_cast<BCursor*>(B_CURSOR_I_BEAM); 65 66const Cursor& pointerCursor() 67{ 68 return globalCursor; 69} 70 71const Cursor& moveCursor() 72{ 73 return globalCursor; 74} 75 76const Cursor& crossCursor() 77{ 78 return globalCursor; 79} 80 81const Cursor& handCursor() 82{ 83 return globalCursor; 84} 85 86const Cursor& iBeamCursor() 87{ 88 return ibeamCursor; 89} 90 91const Cursor& waitCursor() 92{ 93 return globalCursor; 94} 95 96const Cursor& helpCursor() 97{ 98 return globalCursor; 99} 100 101const Cursor& eastResizeCursor() 102{ 103 return globalCursor; 104} 105 106const Cursor& northResizeCursor() 107{ 108 return globalCursor; 109} 110 111const Cursor& northEastResizeCursor() 112{ 113 return globalCursor; 114} 115 116const Cursor& northWestResizeCursor() 117{ 118 return globalCursor; 119} 120 121const Cursor& southResizeCursor() 122{ 123 return globalCursor; 124} 125 126const Cursor& southEastResizeCursor() 127{ 128 return globalCursor; 129} 130 131const Cursor& southWestResizeCursor() 132{ 133 return globalCursor; 134} 135 136const Cursor& westResizeCursor() 137{ 138 return globalCursor; 139} 140 141const Cursor& northSouthResizeCursor() 142{ 143 return globalCursor; 144} 145 146const Cursor& eastWestResizeCursor() 147{ 148 return globalCursor; 149} 150 151const Cursor& northEastSouthWestResizeCursor() 152{ 153 return globalCursor; 154} 155 156const Cursor& northWestSouthEastResizeCursor() 157{ 158 return globalCursor; 159} 160 161const Cursor& columnResizeCursor() 162{ 163 return globalCursor; 164} 165 166const Cursor& rowResizeCursor() 167{ 168 return globalCursor; 169} 170 171const Cursor& verticalTextCursor() 172{ 173 return globalCursor; 174} 175 176const Cursor& cellCursor() 177{ 178 return globalCursor; 179} 180 181const Cursor& contextMenuCursor() 182{ 183 return globalCursor; 184} 185 186const Cursor& noDropCursor() 187{ 188 return globalCursor; 189} 190 191const Cursor& copyCursor() 192{ 193 return globalCursor; 194} 195 196const Cursor& progressCursor() 197{ 198 return globalCursor; 199} 200 201const Cursor& aliasCursor() 202{ 203 return globalCursor; 204} 205 206const Cursor& noneCursor() 207{ 208 return globalCursor; 209} 210 211const Cursor& notAllowedCursor() 212{ 213 return globalCursor; 214} 215 216const Cursor& zoomInCursor() 217{ 218 return globalCursor; 219} 220 221const Cursor& zoomOutCursor() 222{ 223 return globalCursor; 224} 225 226const Cursor& grabCursor() 227{ 228 return globalCursor; 229} 230 231const Cursor& grabbingCursor() 232{ 233 return globalCursor; 234} 235 236} // namespace WebCore 237 238