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
displaymanager.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
4
#
ifndef
QARKUI_DISPLAY_MANAGER_H
5
#
define
QARKUI_DISPLAY_MANAGER_H
6
7
#
include
<
QtCore
/
private
/
qcore_ohos_p
.
h
>
8
#
include
<
QtCore
/
private
/
qohoscommon_p
.
h
>
9
#
include
<
QtCore
/
qglobal
.
h
>
10
#
include
<
qohosdisplayinfo
.
h
>
11
12
QT_BEGIN_NAMESPACE
13
14
namespace
QArkUi
{
15
16
class
QOhosDisplayManager
:
public
std
::
enable_shared_from_this
<
QOhosDisplayManager
>
17
{
18
public
:
19
using
JsDisplayId
=
QOhosDisplayInfo
::JsDisplayId;
20
21
struct
CreateInfo
22
{
23
QOhosConsumer
<
QOhosJsState
&,
std
::
vector
<
QOhosDisplayInfo
>>
displaysUpdatedCb
;
24
QOhosConsumer
<
QOhosJsState
&,
JsDisplayId
,
QRectF
>
displayAvailableAreaChangedCb
;
25
};
26
27
static
std
::shared_ptr<
QOhosDisplayManager
>
create
(QOhosJsState &jsState,
CreateInfo
createInfo);
28
29
std
::
vector
<
QOhosDisplayInfo
>
getRegisteredDisplayInfos
();
30
31
private
:
32
QOhosDisplayManager(QOhosJsState &jsState,
CreateInfo
createInfo);
33
34
void
registerDisplayCallbackListener(
35
QNapi::Object displayModule,
const
std
::string &eventName,
36
QOhosConsumer<QOhosJsState &, QOhosDisplayInfo::JsDisplayId> handleFunction);
37
bool
tryRegisterDisplay(QOhosJsState &jsState,
JsDisplayId
displayId);
38
void
rebuildRegisteredDisplayList(QOhosJsState &jsState);
39
40
std::vector<QOhosDisplayInfo> m_registeredDisplayInfos;
41
std::vector<std::shared_ptr<
void
>> m_destroyNotifiers;
42
std::map<JsDisplayId, std::shared_ptr<
void
>> m_perDisplayDestroyNotifiers;
43
QOhosConsumer<QOhosJsState &, JsDisplayId, QRectF> m_availableAreaChangedCb;
44
};
45
46
QPoint
mapFromDisplayToGlobal
(
const
QPoint &displayOffset,
QOhosDisplayInfo
::JsDisplayId jsDisplayId);
47
48
}
49
50
QT_END_NAMESPACE
51
52
#
endif
QArkUi::QOhosDisplayManager
Definition
displaymanager.h:17
QArkUi::QOhosDisplayManager::getRegisteredDisplayInfos
std::vector< QOhosDisplayInfo > getRegisteredDisplayInfos()
Definition
displaymanager.cpp:131
QArkUi::QOhosDisplayManager::create
static std::shared_ptr< QOhosDisplayManager > create(QOhosJsState &jsState, CreateInfo createInfo)
Definition
displaymanager.cpp:125
QArkUi::QOhosDisplayManager::JsDisplayId
QOhosDisplayInfo::JsDisplayId JsDisplayId
Definition
displaymanager.h:19
QArkUi
Definition
displaymanager.cpp:17
QArkUi::mapFromDisplayToGlobal
QPoint mapFromDisplayToGlobal(const QPoint &displayOffset, QOhosDisplayInfo::JsDisplayId jsDisplayId)
Definition
displaymanager.cpp:178
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
QArkUi::QOhosDisplayManager::CreateInfo
Definition
displaymanager.h:22
QArkUi::QOhosDisplayManager::CreateInfo::displayAvailableAreaChangedCb
QOhosConsumer< QOhosJsState &, JsDisplayId, QRectF > displayAvailableAreaChangedCb
Definition
displaymanager.h:24
QOhosDisplayInfo
Definition
qohosdisplayinfo.h:20
qtbase
src
plugins
platforms
ohos
qarkui
displaymanager.h
Generated on
for Qt by
1.18.0