2 * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
3 * Copyright (C) 2006 George Staikos <staikos@kde.org>
4 * Copyright (C) 2006 Charles Samuels <charles@kde.org>
5 * Copyright (C) 2008 Holger Hans Peter Freyther
6 * Copyright (C) 2008 Kenneth Rohde Christiansen
7 * Copyright (C) 2009-2010 ProFUSION embedded systems
8 * Copyright (C) 2009-2010 Samsung Electronics
10 * All rights reserved.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
21 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
22 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
25 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
29 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 #include "NotImplemented.h"
42 #include <wtf/Assertions.h>
46 Cursor::Cursor(const Cursor& other)
47 : m_type(other.m_type)
48 , m_image(other.m_image)
49 , m_hotSpot(other.m_hotSpot)
50 , m_platformCursor(other.m_platformCursor)
58 static const char* cursorString(Cursor::Type type)
60 static const char* cursorStrings[] = {
68 "cursor/north_resize",
69 "cursor/north_east_resize",
70 "cursor/north_west_resize",
71 "cursor/south_resize",
72 "cursor/south_east_resize",
73 "cursor/south_west_resize",
75 "cursor/north_south_resize",
76 "cursor/east_west_resize",
77 "cursor/north_east_south_west_resize",
78 "cursor/north_west_south_east_resize",
79 "cursor/column_resize",
81 "cursor/middle_panning",
82 "cursor/east_panning",
83 "cursor/north_panning",
84 "cursor/north_east_panning",
85 "cursor/north_west_panning",
86 "cursor/south_panning",
87 "cursor/south_east_panning",
88 "cursor/south_west_panning",
89 "cursor/west_panning",
91 "cursor/vertical_text",
93 "cursor/context_menu",
104 ""}; // FIXME: Just return "" for custom type. We don't support it now.
105 return cursorStrings[type];
108 void Cursor::ensurePlatformCursor() const
110 if (m_platformCursor)
112 m_platformCursor = cursorString(m_type);