4#ifndef QWINDOWSCURSOR_H
5#define QWINDOWSCURSOR_H
7#include <QtCore/qt_windows.h>
9#include <qpa/qplatformcursor.h>
10#include <QtCore/qsharedpointer.h>
11#include <QtCore/qhash.h>
30 return (
size_t(k.bitmapCacheKey) +
size_t(k.maskCacheKey)) ^
seed;
41 DestroyCursor(m_hcursor);
44 bool isNull()
const {
return !m_hcursor; }
104 StandardCursorCache m_standardCursorCache;
105 PixmapCursorCache m_pixmapCursorCache;
107 mutable QPixmap m_copyDragCursor;
108 mutable QPixmap m_moveDragCursor;
109 mutable QPixmap m_linkDragCursor;
110 mutable QPixmap m_ignoreDragCursor;
112 static HCURSOR m_overriddenCursor;
113 static HCURSOR m_overrideCursor;
CursorHandle(HCURSOR hcursor=nullptr)
The QCursor class provides a mouse cursor with an arbitrary shape.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
Platform cursor implementation.
static bool hasOverrideCursor()
static QPoint mousePosition()
void setOverrideCursor(const QCursor &cursor) override
Reimplement this function in subclass to set an override cursor on the associated screen and return t...
static HCURSOR createPixmapCursor(const PixmapCursor &pc, qreal scaleFactor=1)
static HCURSOR createPixmapCursor(QPixmap pixmap, const QPoint &hotSpot, qreal scaleFactor=1)
void changeCursor(QCursor *widgetCursor, QWindow *widget) override
Set a cursor on a window.
static PixmapCursor customCursor(Qt::CursorShape cursorShape, const QPlatformScreen *screen=nullptr)
HCURSOR hCursor(const QCursor &c) const
void clearOverrideCursor() override
Reimplement this function in subclass to clear the override cursor.
CursorHandlePtr standardWindowCursor(Qt::CursorShape s=Qt::ArrowCursor)
Return cached standard cursor resources or create new ones.
static State cursorState()
static HCURSOR createCursorFromShape(Qt::CursorShape cursorShape, const QPlatformScreen *screen=nullptr)
static void enforceOverrideCursor()
QPixmap dragDefaultCursor(Qt::DropAction action) const
CursorHandlePtr pixmapWindowCursor(const QCursor &c)
Return cached pixmap cursor or create new one.
QSize size() const override
Returns the size of the cursor, in native pixels.
QPoint pos() const override
void setPos(const QPoint &pos) override
Combined button and popup list for selecting options.
GLfloat GLfloat GLfloat GLfloat h
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
bool operator==(const QWindowsPixmapCursorCacheKey &k1, const QWindowsPixmapCursorCacheKey &k2)
size_t qHash(const QWindowsPixmapCursorCacheKey &k, size_t seed) noexcept
PixmapCursor(const QPixmap &pix=QPixmap(), const QPoint &h=QPoint())