#include "config.h"
#include "Cursor.h"
#include "DeprecatedString.h"
#include "NotImplemented.h"
#include <wtf/Assertions.h>
#include <gdk/gdk.h>
#include <stdio.h>
namespace WebCore {
Cursor::Cursor(const Cursor& other)
: m_impl(other.m_impl)
{
if (m_impl)
gdk_cursor_ref(m_impl);
}
Cursor::Cursor(Image*, const IntPoint&)
{
notImplemented();
}
Cursor::~Cursor()
{
if (m_impl)
gdk_cursor_unref(m_impl);
}
Cursor& Cursor::operator=(const Cursor& other)
{
gdk_cursor_ref(other.m_impl);
gdk_cursor_unref(m_impl);
m_impl = other.m_impl;
return *this;
}
Cursor::Cursor(GdkCursor* c)
: m_impl(c)
{
m_impl = c;
ASSERT(c);
gdk_cursor_ref(c);
}
const Cursor& pointerCursor()
{
static Cursor c = gdk_cursor_new(GDK_LEFT_PTR);
return c;
}
const Cursor& crossCursor()
{
static Cursor c = gdk_cursor_new(GDK_CROSS);
return c;
}
const Cursor& handCursor()
{
static Cursor c = gdk_cursor_new(GDK_HAND2);
return c;
}
const Cursor& moveCursor()
{
static Cursor c = gdk_cursor_new(GDK_FLEUR);
return c;
}
const Cursor& iBeamCursor()
{
static Cursor c = gdk_cursor_new(GDK_XTERM);
return c;
}
const Cursor& waitCursor()
{
static Cursor c = gdk_cursor_new(GDK_WATCH);
return c;
}
const Cursor& helpCursor()
{
static Cursor c = gdk_cursor_new(GDK_QUESTION_ARROW);
return c;
}
const Cursor& eastResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_RIGHT_SIDE);
return c;
}
const Cursor& northResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_TOP_SIDE);
return c;
}
const Cursor& northEastResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_TOP_RIGHT_CORNER);
return c;
}
const Cursor& northWestResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_TOP_LEFT_CORNER);
return c;
}
const Cursor& southResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_BOTTOM_SIDE);
return c;
}
const Cursor& southEastResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_BOTTOM_RIGHT_CORNER);
return c;
}
const Cursor& southWestResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_BOTTOM_LEFT_CORNER);
return c;
}
const Cursor& westResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_LEFT_SIDE);
return c;
}
const Cursor& northSouthResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_TOP_TEE);
return c;
}
const Cursor& eastWestResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_LEFT_SIDE);
return c;
}
const Cursor& northEastSouthWestResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_SIZING);
return c;
}
const Cursor& northWestSouthEastResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_SIZING);
return c;
}
const Cursor& columnResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_DOUBLE_ARROW);
return c;
}
const Cursor& rowResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_DOUBLE_ARROW);
return c;
}
const Cursor& verticalTextCursor()
{
return pointerCursor();
}
const Cursor& cellCursor()
{
return pointerCursor();
}
const Cursor& contextMenuCursor()
{
return pointerCursor();
}
const Cursor& noDropCursor()
{
return pointerCursor();
}
const Cursor& copyCursor()
{
return pointerCursor();
}
const Cursor& progressCursor()
{
return pointerCursor();
}
const Cursor& aliasCursor()
{
return pointerCursor();
}
const Cursor& noneCursor()
{
return pointerCursor();
}
const Cursor& notAllowedCursor()
{
return pointerCursor();
}
const Cursor& zoomInCursor()
{
return pointerCursor();
}
const Cursor& zoomOutCursor()
{
return pointerCursor();
}
}