Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qunicodetables_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 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/* This file is autogenerated from the Unicode 14.0 database. Do not edit */
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists for the convenience
11// of internal files. This header file may change from version to version
12// without notice, or even be removed.
13//
14// We mean it.
15//
16
17#ifndef QUNICODETABLES_P_H
18#define QUNICODETABLES_P_H
19
20#include <QtCore/private/qglobal_p.h>
21
22#include <QtCore/qchar.h>
23
25
26#define UNICODE_DATA_VERSION QChar::Unicode_14_0
27
28namespace QUnicodeTables {
29
30enum Case {
35
37};
38
39struct Properties {
40 ushort category : 8; /* 5 used */
41 ushort direction : 8; /* 5 used */
44 signed short digitValue : 5;
45 signed short mirrorDiff : 16;
46 ushort unicodeVersion : 5; /* 5 used */
47 ushort eastAsianWidth : 3; /* 3 used */
49#ifdef Q_OS_WASM
50 unsigned char : 0; //wasm 64 packing trick
51#endif
52 struct {
54 signed short diff : 15;
56#ifdef Q_OS_WASM
57 unsigned char : 0; //wasm 64 packing trick
58#endif
59 ushort graphemeBreakClass : 5; /* 5 used */
60 ushort wordBreakClass : 5; /* 5 used */
61 ushort lineBreakClass : 6; /* 6 used */
62 ushort sentenceBreakClass : 4; /* 4 used */
63 ushort idnaStatus : 4; /* 3 used */
65};
66
67Q_CORE_EXPORT const Properties * QT_FASTCALL properties(char32_t ucs4) noexcept;
68Q_CORE_EXPORT const Properties * QT_FASTCALL properties(char16_t ucs2) noexcept;
69
70static_assert(sizeof(Properties) == 20);
71
72enum class EastAsianWidth : unsigned int {
73 A,
74 F,
75 H,
76 N,
77 Na,
78 W,
79};
80
97
99};
100
121
124
140
143
144// see http://www.unicode.org/reports/tr14/tr14-30.html
145// we don't use the XX and AI classes and map them to AL instead.
156
159
160enum class IdnaStatus : unsigned int {
162 Valid,
163 Ignored,
164 Mapped,
166};
167
168Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(char32_t ucs4) noexcept;
170{ return graphemeBreakClass(ch.unicode()); }
171
172Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass(char32_t ucs4) noexcept;
174{ return wordBreakClass(ch.unicode()); }
175
176Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass(char32_t ucs4) noexcept;
178{ return sentenceBreakClass(ch.unicode()); }
179
180Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(char32_t ucs4) noexcept;
182{ return lineBreakClass(ch.unicode()); }
183
184Q_CORE_EXPORT IdnaStatus QT_FASTCALL idnaStatus(char32_t ucs4) noexcept;
186{ return idnaStatus(ch.unicode()); }
187
188Q_CORE_EXPORT QStringView QT_FASTCALL idnaMapping(char32_t usc4) noexcept;
190{ return idnaMapping(ch.unicode()); }
191
192Q_CORE_EXPORT EastAsianWidth QT_FASTCALL eastAsianWidth(char32_t ucs4) noexcept;
194{ return eastAsianWidth(ch.unicode()); }
195
196} // namespace QUnicodeTables
197
199
200#endif // QUNICODETABLES_P_H
\inmodule QtCore
Definition qchar.h:48
\inmodule QtCore
Definition qstringview.h:76
Combined button and popup list for selecting options.
Q_CORE_EXPORT IdnaStatus QT_FASTCALL idnaStatus(char32_t ucs4) noexcept
@ GraphemeBreak_Extended_Pictographic
Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass(char32_t ucs4) noexcept
Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(char32_t ucs4) noexcept
Q_CORE_EXPORT QStringView QT_FASTCALL idnaMapping(char32_t ucs4) noexcept
Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass(char32_t ucs4) noexcept
Q_CORE_EXPORT EastAsianWidth QT_FASTCALL eastAsianWidth(char32_t ucs4) noexcept
Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(char32_t ucs4) noexcept
#define QT_FASTCALL
static const QCssKnownValue properties[NumProperties - 1]
unsigned short ushort
Definition qtypes.h:28
struct QUnicodeTables::Properties::@144 cases[NumCases]