Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwasmeventdispatcher.cpp
Go to the documentation of this file.
1
// Copyright (C) 2018 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4
#
include
"qwasmeventdispatcher.h"
5
#
include
"qwasmintegration.h"
6
7
#
include
<
QtGui
/
qpa
/
qwindowsysteminterface
.
h
>
8
9
QT_BEGIN_NAMESPACE
10
11
QWasmEventDispatcher::QWasmEventDispatcher(std::shared_ptr<QWasmSuspendResumeControl> suspendResume)
12
:QEventDispatcherWasm(suspendResume)
13
{
14
15
}
16
17
// Note: All event dispatcher functionality is implemented in QEventDispatcherWasm
18
// in QtCore, except for processPostedEvents() below which uses API from QtGui.
19
bool
QWasmEventDispatcher
::
sendPostedEvents
()
20
{
21
QEventDispatcherWasm::sendPostedEvents();
22
return
QWindowSystemInterface::sendWindowSystemEvents(QEventLoop::AllEvents);
23
}
24
25
void
QWasmEventDispatcher
::
onLoaded
()
26
{
27
// This function is called when the application is ready to paint
28
// the first frame. Send the qtlaoder onLoaded event first (via
29
// the base class implementation), and then enable/call requestUpdate
30
// to deliver a frame.
31
QEventDispatcherWasm::onLoaded();
32
33
// Make sure all screens have a defined size; and pick
34
// up size changes due to onLoaded event handling.
35
QWasmIntegration
*wasmIntegration =
QWasmIntegration
::
get
(
)
;
36
wasmIntegration
->
resizeAllScreens
(
)
;
37
38
wasmIntegration
->
releaseRequesetUpdateHold
(
)
;
39
}
40
41
QT_END_NAMESPACE
QWasmEventDispatcher
Definition
qwasmeventdispatcher.h:16
QWasmEventDispatcher::onLoaded
void onLoaded() override
Definition
qwasmeventdispatcher.cpp:25
QWasmEventDispatcher::sendPostedEvents
bool sendPostedEvents() override
Definition
qwasmeventdispatcher.cpp:19
QWasmIntegration
Definition
qwasmintegration.h:41
QWasmIntegration::get
static QWasmIntegration * get()
Definition
qwasmintegration.h:77
QWasmIntegration::releaseRequesetUpdateHold
void releaseRequesetUpdateHold()
Definition
qwasmintegration.cpp:229
QWasmIntegration::resizeAllScreens
void resizeAllScreens()
Definition
qwasmintegration.cpp:434
QPlatformGraphicsBufferHelper
\inmodule QtGui
qtbase
src
plugins
platforms
wasm
qwasmeventdispatcher.cpp
Generated on
for Qt by
1.14.0