#include "CursorUtils.h"

Qt::CursorShape
MapCursorShape(cef_cursor_type_t& type)
{
  static Qt::CursorShape sCursorTable[] = {
    Qt::ArrowCursor,        // CT_POINTER = 0,
    Qt::CrossCursor,        // CT_CROSS,
    Qt::PointingHandCursor, // CT_HAND,
    Qt::IBeamCursor,        // CT_IBEAM,
    Qt::WaitCursor,         // CT_WAIT,
    Qt::WhatsThisCursor,    // CT_HELP,
    Qt::SizeHorCursor,      // CT_EASTRESIZE,
    Qt::SizeVerCursor,      // CT_NORTHRESIZE,
    Qt::SizeBDiagCursor,    // CT_NORTHEASTRESIZE,
    Qt::SizeFDiagCursor,    // CT_NORTHWESTRESIZE,
    Qt::SizeVerCursor,      // CT_SOUTHRESIZE,
    Qt::SizeFDiagCursor,    // CT_SOUTHEASTRESIZE,
    Qt::SizeBDiagCursor,    // CT_SOUTHWESTRESIZE,
    Qt::SizeHorCursor,      // CT_WESTRESIZE,
    Qt::SizeVerCursor,      // CT_NORTHSOUTHRESIZE,
    Qt::SizeHorCursor,      // CT_EASTWESTRESIZE,
    Qt::SizeAllCursor,      // CT_NORTHEASTSOUTHWESTRESIZE,
    Qt::SizeAllCursor,      // CT_NORTHWESTSOUTHEASTRESIZE,
    Qt::SplitHCursor,       // CT_COLUMNRESIZE,
    Qt::SplitVCursor,       // CT_ROWRESIZE,
    Qt::ArrowCursor,        // CT_MIDDLEPANNING,
    Qt::ArrowCursor,        // CT_EASTPANNING,
    Qt::ArrowCursor,        // CT_NORTHPANNING,
    Qt::ArrowCursor,        // CT_NORTHEASTPANNING,
    Qt::ArrowCursor,        // CT_NORTHWESTPANNING,
    Qt::ArrowCursor,        // CT_SOUTHPANNING,
    Qt::ArrowCursor,        // CT_SOUTHEASTPANNING,
    Qt::ArrowCursor,        // CT_SOUTHWESTPANNING,
    Qt::ArrowCursor,        // CT_WESTPANNING,
    Qt::ArrowCursor,        // CT_MOVE,
    Qt::ArrowCursor,        // CT_VERTICALTEXT,
    Qt::ArrowCursor,        // CT_CELL,
    Qt::ArrowCursor,        // CT_CONTEXTMENU,
    Qt::ArrowCursor,        // CT_ALIAS,
    Qt::ArrowCursor,        // CT_PROGRESS,
    Qt::ArrowCursor,        // CT_NODROP,
    Qt::ArrowCursor,        // CT_COPY,
    Qt::ArrowCursor,        // CT_NONE,
    Qt::ForbiddenCursor,    // CT_NOTALLOWED,
    Qt::ArrowCursor,        // CT_ZOOMIN,
    Qt::ArrowCursor,        // CT_ZOOMOUT,
    Qt::OpenHandCursor,     // CT_GRAB,
    Qt::ClosedHandCursor,   // CT_GRABBING,
    Qt::ArrowCursor,        // CT_MIDDLE_PANNING_VERTICAL,
    Qt::ArrowCursor,        // CT_MIDDLE_PANNING_HORIZONTAL,
    Qt::ArrowCursor,        // CT_CUSTOM,
    Qt::ArrowCursor,        // CT_DND_NONE,
    Qt::DragMoveCursor,     // CT_DND_MOVE,
    Qt::DragCopyCursor,     // CT_DND_COPY,
    Qt::DragLinkCursor,     // CT_DND_LINK,
  };
  return sCursorTable[type];
}
