summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcursor.h
blob: 1fad7475e028cb399a70ae55883920c5cd1d997e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef QWASMCURSOR_H
#define QWASMCURSOR_H

#include <qpa/qplatformcursor.h>

class QWasmCursor : public QPlatformCursor
{
public:
    void changeCursor(QCursor *windowCursor, QWindow *window) override;

    QByteArray cursorShapeToHtml(Qt::CursorShape shape);
    static void setOverrideWasmCursor(QCursor *windowCursor, QScreen *screen);
    static void clearOverrideWasmCursor(QScreen *screen);
private:
    QByteArray htmlCursorName = "default";
    void setWasmCursor(QScreen *screen, const QByteArray &name);
};

#endif