Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qwasmanimationdriver_p.h
Go to the documentation of this file.
1
// Copyright (C) 2025 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QWASMANIMATIONDRIVER_P_H
6
#
define
QWASMANIMATIONDRIVER_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
20
#
include
<
QtCore
/
qabstractanimation
.
h
>
21
#
include
<
QtCore
/
qtimer
.
h
>
22
23
#
include
<
memory
>
24
25
QT_BEGIN_NAMESPACE
26
27
class
QUnifiedTimer;
28
29
class
Q_CORE_EXPORT
QWasmAnimationDriver
:
public
QAnimationDriver
30
{
31
Q_OBJECT
32
public
:
33
QWasmAnimationDriver(QUnifiedTimer *unifiedTimer);
34
~QWasmAnimationDriver() override;
35
36
qint64 elapsed()
const
override;
37
38
protected
:
39
void
start() override;
40
void
stop() override;
41
42
private
:
43
void
handleAnimationFrame(
double
timestamp);
44
void
handleFallbackTimeout();
45
double
getCurrentTimeFromTimeline()
const
;
46
47
QTimer fallbackTimer;
48
uint32_t m_animateCallbackHandle = 0;
49
double
m_startTimestamp = 0;
50
double
m_currentTimestamp = 0;
51
};
52
53
QT_END_NAMESPACE
54
55
#
endif
// QWASMANIMATIONDRIVER_P_H
QWasmAnimationDriver
Definition
qwasmanimationdriver_p.h:30
QT_BEGIN_NAMESPACE::FallbackTimerInterval
constexpr int FallbackTimerInterval
Definition
qwasmanimationdriver.cpp:18
qtbase
src
corelib
platform
wasm
qwasmanimationdriver_p.h
Generated on
for Qt by
1.18.0