Flutter Engine
The Flutter Engine
|
#include <SkUnicode.h>
Classes | |
struct | BidiRegion |
struct | LineBreakBefore |
Public Types | |
enum | CodeUnitFlags { kNoCodeUnitFlag = 0x00 , kPartOfWhiteSpaceBreak = 0x01 , kGraphemeStart = 0x02 , kSoftLineBreakBefore = 0x04 , kHardLineBreakBefore = 0x08 , kPartOfIntraWordBreak = 0x10 , kControl = 0x20 , kTabulation = 0x40 , kGlyphClusterStart = 0x80 , kIdeographic = 0x100 , kEmoji = 0x200 , kWordBreak = 0x400 , kSentenceBreak = 0x800 } |
enum class | TextDirection { kLTR , kRTL } |
enum class | LineBreakType { kSoftLineBreak = 0 , kHardLineBreak = 100 } |
enum class | BreakType { kWords , kGraphemes , kLines , kSentences } |
typedef size_t | Position |
typedef uint8_t | BidiLevel |
Public Member Functions | |
~SkUnicode () override=default | |
virtual SkString | toUpper (const SkString &)=0 |
virtual SkString | toUpper (const SkString &, const char *locale)=0 |
virtual bool | isControl (SkUnichar utf8)=0 |
virtual bool | isWhitespace (SkUnichar utf8)=0 |
virtual bool | isSpace (SkUnichar utf8)=0 |
virtual bool | isTabulation (SkUnichar utf8)=0 |
virtual bool | isHardBreak (SkUnichar utf8)=0 |
virtual bool | isEmoji (SkUnichar utf8)=0 |
virtual bool | isEmojiComponent (SkUnichar utf8)=0 |
virtual bool | isEmojiModifierBase (SkUnichar utf8)=0 |
virtual bool | isEmojiModifier (SkUnichar utf8)=0 |
virtual bool | isRegionalIndicator (SkUnichar utf8)=0 |
virtual bool | isIdeographic (SkUnichar utf8)=0 |
virtual std::unique_ptr< SkBidiIterator > | makeBidiIterator (const uint16_t text[], int count, SkBidiIterator::Direction)=0 |
virtual std::unique_ptr< SkBidiIterator > | makeBidiIterator (const char text[], int count, SkBidiIterator::Direction)=0 |
virtual std::unique_ptr< SkBreakIterator > | makeBreakIterator (const char locale[], BreakType breakType)=0 |
virtual std::unique_ptr< SkBreakIterator > | makeBreakIterator (BreakType type)=0 |
virtual bool | getBidiRegions (const char utf8[], int utf8Units, TextDirection dir, std::vector< BidiRegion > *results)=0 |
virtual bool | getWords (const char utf8[], int utf8Units, const char *locale, std::vector< Position > *results)=0 |
virtual bool | getUtf8Words (const char utf8[], int utf8Units, const char *locale, std::vector< Position > *results)=0 |
virtual bool | getSentences (const char utf8[], int utf8Units, const char *locale, std::vector< Position > *results)=0 |
virtual bool | computeCodeUnitFlags (char utf8[], int utf8Units, bool replaceTabs, skia_private::TArray< SkUnicode::CodeUnitFlags, true > *results)=0 |
virtual bool | computeCodeUnitFlags (char16_t utf16[], int utf16Units, bool replaceTabs, skia_private::TArray< SkUnicode::CodeUnitFlags, true > *results)=0 |
template<typename Callback > | |
void | forEachCodepoint (const char *utf8, int32_t utf8Units, Callback &&callback) |
template<typename Callback > | |
void | forEachCodepoint (const char16_t *utf16, int32_t utf16Units, Callback &&callback) |
template<typename Callback > | |
void | forEachBidiRegion (const uint16_t utf16[], int utf16Units, SkBidiIterator::Direction dir, Callback &&callback) |
template<typename Callback > | |
void | forEachBreak (const char16_t utf16[], int utf16Units, SkUnicode::BreakType type, Callback &&callback) |
virtual void | reorderVisual (const BidiLevel runLevels[], int levelsCount, int32_t logicalFromVisual[])=0 |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Static Public Member Functions | |
static bool | hasTabulationFlag (SkUnicode::CodeUnitFlags flags) |
static bool | hasHardLineBreakFlag (SkUnicode::CodeUnitFlags flags) |
static bool | hasSoftLineBreakFlag (SkUnicode::CodeUnitFlags flags) |
static bool | hasGraphemeStartFlag (SkUnicode::CodeUnitFlags flags) |
static bool | hasControlFlag (SkUnicode::CodeUnitFlags flags) |
static bool | hasPartOfWhiteSpaceBreakFlag (SkUnicode::CodeUnitFlags flags) |
static bool | extractBidi (const char utf8[], int utf8Units, TextDirection dir, std::vector< BidiRegion > *bidiRegions) |
static SkString | convertUtf16ToUtf8 (const char16_t *utf16, int utf16Units) |
static SkString | convertUtf16ToUtf8 (const std::u16string &utf16) |
static std::u16string | convertUtf8ToUtf16 (const char *utf8, int utf8Units) |
static std::u16string | convertUtf8ToUtf16 (const SkString &utf8) |
template<typename Appender8 , typename Appender16 > | |
static bool | extractUtfConversionMapping (SkSpan< const char > utf8, Appender8 &&appender8, Appender16 &&appender16) |
Definition at line 77 of file SkUnicode.h.
typedef uint8_t SkUnicode::BidiLevel |
Definition at line 99 of file SkUnicode.h.
typedef size_t SkUnicode::Position |
Definition at line 98 of file SkUnicode.h.
|
strong |
Enumerator | |
---|---|
kWords | |
kGraphemes | |
kLines | |
kSentences |
Definition at line 112 of file SkUnicode.h.
Definition at line 79 of file SkUnicode.h.
|
strong |
Enumerator | |
---|---|
kSoftLineBreak | |
kHardLineBreak |
Definition at line 107 of file SkUnicode.h.
|
strong |
|
overridedefault |
|
pure virtual |
Implemented in SkUnicode_icu4x, SkUnicode_libgrapheme, SkUnicode_client, and SkUnicode_icu.
|
pure virtual |
Implemented in SkUnicode_icu4x, SkUnicode_libgrapheme, SkUnicode_client, and SkUnicode_icu.
Definition at line 14 of file SkUnicode.cpp.
|
static |
Definition at line 28 of file SkUnicode.cpp.
|
static |
Definition at line 32 of file SkUnicode.cpp.
|
static |
Definition at line 47 of file SkUnicode.cpp.
|
static |
|
inlinestatic |
Definition at line 193 of file SkUnicode.h.
|
inline |
Definition at line 266 of file SkUnicode.h.
|
inline |
Definition at line 290 of file SkUnicode.h.
|
inline |
Definition at line 239 of file SkUnicode.h.
|
inline |
Definition at line 254 of file SkUnicode.h.
|
pure virtual |
Implemented in SkUnicode_client, SkUnicode_icu, SkUnicode_icu4x, and SkUnicode_libgrapheme.
|
pure virtual |
Implemented in SkUnicode_client, SkUnicode_icu, and SkUnicode_libgrapheme.
|
pure virtual |
Implemented in SkUnicode_client, SkUnicode_icu, and SkUnicode_libgrapheme.
|
pure virtual |
Implemented in SkUnicode_client, SkUnicode_icu, SkUnicode_icu4x, and SkUnicode_libgrapheme.
|
static |
Definition at line 67 of file SkUnicode.cpp.
|
static |
Definition at line 63 of file SkUnicode.cpp.
|
static |
Definition at line 55 of file SkUnicode.cpp.
|
static |
Definition at line 71 of file SkUnicode.cpp.
|
static |
Definition at line 59 of file SkUnicode.cpp.
|
static |
Definition at line 51 of file SkUnicode.cpp.
|
pure virtual |
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Returns if a code point may start an emoji sequence. Returns true for '#', '*', and '0'-'9' since they may start an emoji sequence. To determine if a list of code points begins with an emoji sequence, use getEmojiSequence.
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Implemented in SkUnicodeHardCodedCharProperties, and SkUnicode_icu4x.
|
pure virtual |
Implemented in SkUnicode_client, SkUnicode_icu, SkUnicode_icu4x, and SkUnicode_libgrapheme.
|
pure virtual |
Implemented in SkUnicode_client, SkUnicode_icu, SkUnicode_icu4x, and SkUnicode_libgrapheme.
|
pure virtual |
Implemented in SkUnicode_client, SkUnicode_icu4x, SkUnicode_libgrapheme, and SkUnicode_icu.
|
pure virtual |
Implemented in SkUnicode_client, SkUnicode_icu4x, SkUnicode_libgrapheme, and SkUnicode_icu.
|
pure virtual |
Implemented in SkUnicode_client, SkUnicode_icu, SkUnicode_icu4x, and SkUnicode_libgrapheme.
Implemented in SkUnicode_client, SkUnicode_icu, SkUnicode_icu4x, and SkUnicode_libgrapheme.
Implemented in SkUnicode_client, SkUnicode_icu, SkUnicode_libgrapheme, and SkUnicode_icu4x.