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
qwaylandinputmethodeventbuilder_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
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
QWAYLANDINPUTMETHODEVENTBUILDER_H
6
#
define
QWAYLANDINPUTMETHODEVENTBUILDER_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
<
QInputMethodEvent
>
20
#
include
<
private
/
qglobal_p
.
h
>
21
22
#
include
<
utility
>
// for std::pair
23
24
QT_BEGIN_NAMESPACE
25
26
class
QWaylandInputMethodEventBuilder
27
{
28
public
:
29
QWaylandInputMethodEventBuilder() =
default
;
30
~QWaylandInputMethodEventBuilder();
31
32
void
reset();
33
34
void
setCursorPosition(int32_t index, int32_t anchor);
35
void
setDeleteSurroundingText(uint32_t beforeLength, uint32_t afterLength);
36
37
void
addPreeditStyling(uint32_t index, uint32_t length, uint32_t style);
38
void
setPreeditCursor(int32_t index);
39
40
QInputMethodEvent *buildCommit(
const
QString &text);
41
QInputMethodEvent *buildPreedit(
const
QString &text);
42
43
static
int
indexFromWayland(
const
QString &text,
int
length,
int
base = 0);
44
static
int
indexToWayland(
const
QString &text,
int
length,
int
base = 0);
45
46
static
int
trimmedIndexFromWayland(
const
QString &text,
int
length,
int
base = 0);
47
private
:
48
std::pair<
int
,
int
> replacementForDeleteSurrounding();
49
50
int32_t m_anchor = 0;
51
int32_t m_cursor = 0;
52
uint32_t m_deleteBefore = 0;
53
uint32_t m_deleteAfter = 0;
54
55
int32_t m_preeditCursor = 0;
56
QList<QInputMethodEvent::Attribute> m_preeditStyles;
57
};
58
59
struct
QWaylandInputMethodContentType
{
60
uint32_t
hint
= 0;
61
uint32_t
purpose
= 0;
62
63
static
QWaylandInputMethodContentType
convert
(Qt::InputMethodHints hints);
64
static
QWaylandInputMethodContentType
convertV3
(Qt::InputMethodHints hints);
65
};
66
67
68
QT_END_NAMESPACE
69
70
#
endif
// QWAYLANDINPUTMETHODEVENTBUILDER_H
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
QWaylandInputMethodContentType
Definition
qwaylandinputmethodeventbuilder_p.h:59
QWaylandInputMethodContentType::purpose
uint32_t purpose
Definition
qwaylandinputmethodeventbuilder_p.h:61
QWaylandInputMethodContentType::convert
static QWaylandInputMethodContentType convert(Qt::InputMethodHints hints)
Definition
qwaylandinputmethodeventbuilder.cpp:168
QWaylandInputMethodContentType::hint
uint32_t hint
Definition
qwaylandinputmethodeventbuilder_p.h:60
QWaylandInputMethodContentType::convertV3
static QWaylandInputMethodContentType convertV3(Qt::InputMethodHints hints)
Definition
qwaylandinputmethodeventbuilder.cpp:222
qtbase
src
plugins
platforms
wayland
shared
qwaylandinputmethodeventbuilder_p.h
Generated on
for Qt by
1.18.0