blob: 01b5cfa88ad36d6865eafe0a4bc8979762f58644 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
/*
Originally based on code from "platform/macos/joypad_macos.h" from Godot Engine v4.0
Copyright (c) 2014-present Godot Engine contributors
Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.
*/
#ifndef WINDOWSMOUSEINPUT_H
#define WINDOWSMOUSEINPUT_H
#include <QtUniversalInput/private/qmouseinput_p.h>
#include <QTimer>
#include <QVector2D>
QT_BEGIN_NAMESPACE
class WindowsMouseInput : public QMouseInput
{
Q_OBJECT
public:
WindowsMouseInput();
~WindowsMouseInput();
QVector2D getMouseDelta();
void setCursorCenterOfWindow();
public Q_SLOTS:
void onUpdate();
private:
QTimer* m_timer = nullptr;
bool m_wasDisabled = false;
};
QT_END_NAMESPACE
#endif // WINDOWSMOUSEINPUT_H
|