TextMgr.h File Reference

#include <PalmTypes.h>
#include <Chars.h>

Go to the source code of this file.

Classes

struct  TxtConvertStateType

Defines

#define byteAttrFirst   0x80
#define byteAttrHighLow   (byteAttrFirst | byteAttrLast)
#define byteAttrLast   0x40
#define byteAttrMiddle   0x20
#define byteAttrSingle   0x01
#define byteAttrSingleLow   (byteAttrSingle | byteAttrLast)
#define CHAR_ENCODING_VALUE(value)   ((CharEncodingType)value)
#define charAttr_BB   0x00000080
#define charAttr_CN   0x00000040
#define charAttr_DI   0x00000020
#define charAttr_DO   0x00000400
#define charAttr_LO   0x00000010
#define charAttr_PU   0x00000008
#define charAttr_SP   0x00000004
#define charAttr_UP   0x00000002
#define charAttr_XA   0x00000200
#define charAttr_XD   0x00000001
#define charAttr_XS   0x00000100
#define charAttrAlNum   (charAttr_DI|charAttr_LO|charAttr_UP|charAttr_XA)
#define charAttrAlpha   (charAttr_LO|charAttr_UP|charAttr_XA)
#define charAttrCntrl   (charAttr_BB|charAttr_CN)
#define charAttrDelim   (charAttr_SP|charAttr_PU)
#define charAttrGraph   (charAttr_DI|charAttr_LO|charAttr_PU|charAttr_UP|charAttr_XA)
#define charAttrPrint   (charAttr_DI|charAttr_LO|charAttr_PU|charAttr_SP|charAttr_UP|charAttr_XA)
#define charAttrSpace   (charAttr_CN|charAttr_SP|charAttr_XS)
#define charEncodingAscii   CHAR_ENCODING_VALUE(1)
#define charEncodingAsmo708   CHAR_ENCODING_VALUE(52)
#define charEncodingAsmo708Fr   CHAR_ENCODING_VALUE(56)
#define charEncodingAsmo708Plus   CHAR_ENCODING_VALUE(55)
#define charEncodingBig5   CHAR_ENCODING_VALUE(60)
#define charEncodingBig5_HKSCS   CHAR_ENCODING_VALUE(79)
#define charEncodingBig5Plus   CHAR_ENCODING_VALUE(80)
#define charEncodingCP1250   CHAR_ENCODING_VALUE(27)
#define charEncodingCP1251   CHAR_ENCODING_VALUE(38)
#define charEncodingCP1252   CHAR_ENCODING_VALUE(7)
#define charEncodingCP1253   CHAR_ENCODING_VALUE(34)
#define charEncodingCP1254   CHAR_ENCODING_VALUE(46)
#define charEncodingCP1255   CHAR_ENCODING_VALUE(72)
#define charEncodingCP1255V   CHAR_ENCODING_VALUE(73)
#define charEncodingCP1256   CHAR_ENCODING_VALUE(53)
#define charEncodingCP1257   CHAR_ENCODING_VALUE(21)
#define charEncodingCP1258   CHAR_ENCODING_VALUE(66)
#define charEncodingCP437   CHAR_ENCODING_VALUE(13)
#define charEncodingCP737   CHAR_ENCODING_VALUE(36)
#define charEncodingCP775   CHAR_ENCODING_VALUE(18)
#define charEncodingCP850   CHAR_ENCODING_VALUE(12)
#define charEncodingCP852   CHAR_ENCODING_VALUE(28)
#define charEncodingCP853   CHAR_ENCODING_VALUE(50)
#define charEncodingCP855   CHAR_ENCODING_VALUE(42)
#define charEncodingCP857   CHAR_ENCODING_VALUE(48)
#define charEncodingCP860   CHAR_ENCODING_VALUE(15)
#define charEncodingCP861   CHAR_ENCODING_VALUE(16)
#define charEncodingCP863   CHAR_ENCODING_VALUE(17)
#define charEncodingCP864   CHAR_ENCODING_VALUE(54)
#define charEncodingCP865   CHAR_ENCODING_VALUE(14)
#define charEncodingCP866   CHAR_ENCODING_VALUE(43)
#define charEncodingCP869   CHAR_ENCODING_VALUE(35)
#define charEncodingCP874   CHAR_ENCODING_VALUE(64)
#define charEncodingCP932   CHAR_ENCODING_VALUE(8)
#define charEncodingCP949   CHAR_ENCODING_VALUE(68)
#define charEncodingDstBestFitFlag   0x8000
#define charEncodingEucJp   CHAR_ENCODING_VALUE(25)
#define charEncodingEucKr   CHAR_ENCODING_VALUE(67)
#define charEncodingGB2312   CHAR_ENCODING_VALUE(58)
#define charEncodingGBK   CHAR_ENCODING_VALUE(82)
#define charEncodingGSM   CHAR_ENCODING_VALUE(90)
#define charEncodingHasDoubleByte   0x00000002
#define charEncodingHasLigatures   0x00000004
#define charEncodingHZ   CHAR_ENCODING_VALUE(59)
#define charEncodingISO2022CN   CHAR_ENCODING_VALUE(89)
#define charEncodingISO2022Jp   CHAR_ENCODING_VALUE(10)
#define charEncodingISO2022Kr   CHAR_ENCODING_VALUE(69)
#define charEncodingISO8859_1   CHAR_ENCODING_VALUE(2)
#define charEncodingISO8859_2   CHAR_ENCODING_VALUE(26)
#define charEncodingISO8859_3   CHAR_ENCODING_VALUE(22)
#define charEncodingISO8859_4   CHAR_ENCODING_VALUE(23)
#define charEncodingISO8859_5   CHAR_ENCODING_VALUE(39)
#define charEncodingISO8859_6   CHAR_ENCODING_VALUE(51)
#define charEncodingISO8859_7   CHAR_ENCODING_VALUE(33)
#define charEncodingISO8859_8   CHAR_ENCODING_VALUE(71)
#define charEncodingISO8859_8I   CHAR_ENCODING_VALUE(70)
#define charEncodingISO8859_9   CHAR_ENCODING_VALUE(47)
#define charEncodingKoi8   CHAR_ENCODING_VALUE(41)
#define charEncodingKoi8R   CHAR_ENCODING_VALUE(40)
#define charEncodingMacAra   CHAR_ENCODING_VALUE(57)
#define charEncodingMacCyr   CHAR_ENCODING_VALUE(44)
#define charEncodingMacintosh   CHAR_ENCODING_VALUE(20)
#define charEncodingMacIslande   CHAR_ENCODING_VALUE(19)
#define charEncodingMacTurc   CHAR_ENCODING_VALUE(49)
#define charEncodingMacUkraine   CHAR_ENCODING_VALUE(45)
#define charEncodingMacXCroate   CHAR_ENCODING_VALUE(30)
#define charEncodingMacXGr   CHAR_ENCODING_VALUE(37)
#define charEncodingMacXLat2   CHAR_ENCODING_VALUE(31)
#define charEncodingMacXRomania   CHAR_ENCODING_VALUE(32)
#define charEncodingMax   CHAR_ENCODING_VALUE(91)
#define charEncodingOnlySingleByte   0x00000001
#define charEncodingPalmBig5   CHAR_ENCODING_VALUE(81)
#define charEncodingPalmGB   CHAR_ENCODING_VALUE(83)
#define charEncodingPalmGSM   CHAR_ENCODING_VALUE(78)
#define charEncodingPalmKorean   CHAR_ENCODING_VALUE(91)
#define charEncodingPalmLatin   CHAR_ENCODING_VALUE(3)
#define charEncodingPalmSJIS   CHAR_ENCODING_VALUE(5)
#define charEncodingRightToLeft   0x00000008
#define charEncodingShiftJIS   CHAR_ENCODING_VALUE(4)
#define charEncodingTis620   CHAR_ENCODING_VALUE(74)
#define charEncodingUCS2   CHAR_ENCODING_VALUE(9)
#define charEncodingUCS4   CHAR_ENCODING_VALUE(88)
#define charEncodingUnknown   CHAR_ENCODING_VALUE(0)
#define charEncodingUTF16   CHAR_ENCODING_VALUE(75)
#define charEncodingUTF16BE   CHAR_ENCODING_VALUE(76)
#define charEncodingUTF16LE   CHAR_ENCODING_VALUE(77)
#define charEncodingUTF32   CHAR_ENCODING_VALUE(84)
#define charEncodingUTF32BE   CHAR_ENCODING_VALUE(85)
#define charEncodingUTF32LE   CHAR_ENCODING_VALUE(86)
#define charEncodingUTF7   CHAR_ENCODING_VALUE(24)
#define charEncodingUTF7_IMAP   CHAR_ENCODING_VALUE(87)
#define charEncodingUTF8   CHAR_ENCODING_VALUE(6)
#define charEncodingVietnet   CHAR_ENCODING_VALUE(65)
#define charEncodingViqr   CHAR_ENCODING_VALUE(62)
#define charEncodingViscii   CHAR_ENCODING_VALUE(61)
#define charEncodingVncii   CHAR_ENCODING_VALUE(63)
#define charEncodingXAutoJp   CHAR_ENCODING_VALUE(11)
#define charEncodingXKamenicky   CHAR_ENCODING_VALUE(29)
#define kTxtConvertStateSize   32
#define maxCharBytes   4
#define maxEncodingNameLength   40
#define sizeOf7BitChar(c)   1
#define textMgrBestFitFlag   0x00000004
#define textMgrExistsFlag   0x00000001
#define textMgrHighASCIIFixupFlag   0x00000008
#define textMgrStrictFlag   0x00000002
#define textSubstitutionDefaultLen   1
#define textSubstitutionDefaultStr   "?"
#define textSubstitutionEncoding   charEncodingUTF8
#define translitOpCustomBase   1000
#define translitOpLowerCase   1
#define translitOpPreprocess   0x8000
#define translitOpReserved2   2
#define translitOpReserved3   3
#define translitOpStandardBase   0
#define translitOpUpperCase   0
#define TxtCharIsAlNum(ch)   ((TxtCharAttr(ch) & charAttrAlNum) != 0)
#define TxtCharIsAlpha(ch)   ((TxtCharAttr(ch) & charAttrAlpha) != 0)
#define TxtCharIsCntrl(ch)   ((TxtCharAttr(ch) & charAttrCntrl) != 0)
#define TxtCharIsDelim(ch)   ((TxtCharAttr(ch) & charAttrDelim) != 0)
#define TxtCharIsDigit(ch)   ((TxtCharAttr(ch) & charAttr_DI) != 0)
#define TxtCharIsGraph(ch)   ((TxtCharAttr(ch) & charAttrGraph) != 0)
#define TxtCharIsHardKey(m, c)
#define TxtCharIsHex(ch)   ((TxtCharAttr(ch) & charAttr_XD) != 0)
#define TxtCharIsLower(ch)   ((TxtCharAttr(ch) & charAttr_LO) != 0)
#define TxtCharIsPrint(ch)   ((TxtCharAttr(ch) & charAttrPrint) != 0)
#define TxtCharIsPunct(ch)   ((TxtCharAttr(ch) & charAttr_PU) != 0)
#define TxtCharIsRockerKey(m, c)
#define TxtCharIsSpace(ch)   ((TxtCharAttr(ch) & charAttrSpace) != 0)
#define TxtCharIsUpper(ch)   ((TxtCharAttr(ch) & charAttr_UP) != 0)
#define TxtCharIsVirtual(m, c)   (((m) & commandKeyMask) != 0)
#define TxtCharIsWheelKey(m, c)
#define txtErrConvertOverflow   (txtErrorClass | 4)
#define txtErrConvertUnderflow   (txtErrorClass | 5)
#define txtErrMalformedText   (txtErrorClass | 9)
#define txtErrNoCharMapping   (txtErrorClass | 7)
#define txtErrTranslitOverflow   (txtErrorClass | 3)
#define txtErrTranslitOverrun   (txtErrorClass | 2)
#define txtErrTranslitUnderflow   (txtErrorClass | 8)
#define txtErrUknownTranslitOp   (txtErrorClass | 1)
#define txtErrUnknownEncoding   (txtErrorClass | 6)
#define txtErrUnknownEncodingFallbackCopy   (txtErrorClass | 10)
#define TxtNextCharSize(iTextP, iOffset)   TxtGetNextChar((iTextP), (iOffset), NULL)
#define TxtPreviousCharSize(iTextP, iOffset)   TxtGetPreviousChar((iTextP), (iOffset), NULL)

Typedefs

typedef uint16_t CharEncodingType
typedef uint16_t TranslitOpType

Functions

uint8_t TxtByteAttr (uint8_t iByte)
int16_t TxtCaselessCompare (const char *s1, size_t s1Len, size_t *s1MatchLen, const char *s2, size_t s2Len, size_t *s2MatchLen)
uint32_t TxtCharAttr (wchar32_t iChar)
wchar32_t TxtCharBounds (const char *iTextP, size_t iOffset, size_t *oCharStart, size_t *oCharEnd)
CharEncodingType TxtCharEncoding (wchar32_t iChar)
Boolean TxtCharIsValid (wchar32_t iChar)
size_t TxtCharSize (wchar32_t iChar)
uint32_t TxtCharXAttr (wchar32_t iChar)
int16_t TxtCompare (const char *s1, size_t s1Len, size_t *s1MatchLen, const char *s2, size_t s2Len, size_t *s2MatchLen)
status_t TxtConvertEncoding (Boolean newConversion, TxtConvertStateType *ioStateP, const char *srcTextP, size_t *ioSrcBytes, CharEncodingType srcEncoding, char *dstTextP, size_t *ioDstBytes, CharEncodingType dstEncoding, const char *substitutionStr, size_t substitutionLen)
const char * TxtEncodingName (CharEncodingType iEncoding)
Boolean TxtFindString (const char *iSrcStringP, const char *iTargetStringP, size_t *oFoundPos, size_t *oFoundLen)
wchar32_t TxtGetChar (const char *iTextP, size_t iOffset)
uint32_t TxtGetEncodingFlags (CharEncodingType iEncoding)
size_t TxtGetNextChar (const char *iTextP, size_t iOffset, wchar32_t *oChar)
size_t TxtGetPreviousChar (const char *iTextP, size_t iOffset, wchar32_t *oChar)
size_t TxtGetTruncationOffset (const char *iTextP, size_t iOffset)
size_t TxtGetWordWrapOffset (const char *iTextP, size_t iOffset)
CharEncodingType TxtMaxEncoding (CharEncodingType a, CharEncodingType b)
CharEncodingType TxtNameToEncoding (const char *iEncodingName)
char * TxtParamString (const char *inTemplate, const char *param0, const char *param1, const char *param2, const char *param3)
size_t TxtPrepFindString (const char *iSrcTextP, size_t iSrcLen, char *oDstTextP, size_t iDstSize)
uint16_t TxtReplaceStr (char *iStringP, size_t iMaxLen, const char *iParamStringP, uint16_t iParamNum)
size_t TxtSetNextChar (char *iTextP, size_t iOffset, wchar32_t iChar)
CharEncodingType TxtStrEncoding (const char *iStringP)
status_t TxtTransliterate (const char *iSrcTextP, size_t iSrcLength, char *oDstTextP, size_t *ioDstLength, TranslitOpType iTranslitOp)
Boolean TxtTruncateString (char *iDstString, const char *iSrcString, size_t iMaxLength, Boolean iAddEllipsis)
Boolean TxtWordBounds (const char *iTextP, size_t iLength, size_t iOffset, size_t *oWordStart, size_t *oWordEnd)


Define Documentation

#define byteAttrFirst   0x80
 

#define byteAttrHighLow   (byteAttrFirst | byteAttrLast)
 

#define byteAttrLast   0x40
 

#define byteAttrMiddle   0x20
 

#define byteAttrSingle   0x01
 

#define byteAttrSingleLow   (byteAttrSingle | byteAttrLast)
 

#define CHAR_ENCODING_VALUE value   )     ((CharEncodingType)value)
 

#define charAttr_BB   0x00000080
 

#define charAttr_CN   0x00000040
 

#define charAttr_DI   0x00000020
 

#define charAttr_DO   0x00000400
 

#define charAttr_LO   0x00000010
 

#define charAttr_PU   0x00000008
 

#define charAttr_SP   0x00000004
 

#define charAttr_UP   0x00000002
 

#define charAttr_XA   0x00000200
 

#define charAttr_XD   0x00000001
 

#define charAttr_XS   0x00000100
 

#define charAttrAlNum   (charAttr_DI|charAttr_LO|charAttr_UP|charAttr_XA)
 

#define charAttrAlpha   (charAttr_LO|charAttr_UP|charAttr_XA)
 

#define charAttrCntrl   (charAttr_BB|charAttr_CN)
 

#define charAttrDelim   (charAttr_SP|charAttr_PU)
 

#define charAttrGraph   (charAttr_DI|charAttr_LO|charAttr_PU|charAttr_UP|charAttr_XA)
 

#define charAttrPrint   (charAttr_DI|charAttr_LO|charAttr_PU|charAttr_SP|charAttr_UP|charAttr_XA)
 

#define charAttrSpace   (charAttr_CN|charAttr_SP|charAttr_XS)
 

#define charEncodingAscii   CHAR_ENCODING_VALUE(1)
 

#define charEncodingAsmo708   CHAR_ENCODING_VALUE(52)
 

#define charEncodingAsmo708Fr   CHAR_ENCODING_VALUE(56)
 

#define charEncodingAsmo708Plus   CHAR_ENCODING_VALUE(55)
 

#define charEncodingBig5   CHAR_ENCODING_VALUE(60)
 

#define charEncodingBig5_HKSCS   CHAR_ENCODING_VALUE(79)
 

#define charEncodingBig5Plus   CHAR_ENCODING_VALUE(80)
 

#define charEncodingCP1250   CHAR_ENCODING_VALUE(27)
 

#define charEncodingCP1251   CHAR_ENCODING_VALUE(38)
 

#define charEncodingCP1252   CHAR_ENCODING_VALUE(7)
 

#define charEncodingCP1253   CHAR_ENCODING_VALUE(34)
 

#define charEncodingCP1254   CHAR_ENCODING_VALUE(46)
 

#define charEncodingCP1255   CHAR_ENCODING_VALUE(72)
 

#define charEncodingCP1255V   CHAR_ENCODING_VALUE(73)
 

#define charEncodingCP1256   CHAR_ENCODING_VALUE(53)
 

#define charEncodingCP1257   CHAR_ENCODING_VALUE(21)
 

#define charEncodingCP1258   CHAR_ENCODING_VALUE(66)
 

#define charEncodingCP437   CHAR_ENCODING_VALUE(13)
 

#define charEncodingCP737   CHAR_ENCODING_VALUE(36)
 

#define charEncodingCP775   CHAR_ENCODING_VALUE(18)
 

#define charEncodingCP850   CHAR_ENCODING_VALUE(12)
 

#define charEncodingCP852   CHAR_ENCODING_VALUE(28)
 

#define charEncodingCP853   CHAR_ENCODING_VALUE(50)
 

#define charEncodingCP855   CHAR_ENCODING_VALUE(42)
 

#define charEncodingCP857   CHAR_ENCODING_VALUE(48)
 

#define charEncodingCP860   CHAR_ENCODING_VALUE(15)
 

#define charEncodingCP861   CHAR_ENCODING_VALUE(16)
 

#define charEncodingCP863   CHAR_ENCODING_VALUE(17)
 

#define charEncodingCP864   CHAR_ENCODING_VALUE(54)
 

#define charEncodingCP865   CHAR_ENCODING_VALUE(14)
 

#define charEncodingCP866   CHAR_ENCODING_VALUE(43)
 

#define charEncodingCP869   CHAR_ENCODING_VALUE(35)
 

#define charEncodingCP874   CHAR_ENCODING_VALUE(64)
 

#define charEncodingCP932   CHAR_ENCODING_VALUE(8)
 

#define charEncodingCP949   CHAR_ENCODING_VALUE(68)
 

#define charEncodingDstBestFitFlag   0x8000
 

#define charEncodingEucJp   CHAR_ENCODING_VALUE(25)
 

#define charEncodingEucKr   CHAR_ENCODING_VALUE(67)
 

#define charEncodingGB2312   CHAR_ENCODING_VALUE(58)
 

#define charEncodingGBK   CHAR_ENCODING_VALUE(82)
 

#define charEncodingGSM   CHAR_ENCODING_VALUE(90)
 

#define charEncodingHasDoubleByte   0x00000002
 

#define charEncodingHasLigatures   0x00000004
 

#define charEncodingHZ   CHAR_ENCODING_VALUE(59)
 

#define charEncodingISO2022CN   CHAR_ENCODING_VALUE(89)
 

#define charEncodingISO2022Jp   CHAR_ENCODING_VALUE(10)
 

#define charEncodingISO2022Kr   CHAR_ENCODING_VALUE(69)
 

#define charEncodingISO8859_1   CHAR_ENCODING_VALUE(2)
 

#define charEncodingISO8859_2   CHAR_ENCODING_VALUE(26)
 

#define charEncodingISO8859_3   CHAR_ENCODING_VALUE(22)
 

#define charEncodingISO8859_4   CHAR_ENCODING_VALUE(23)
 

#define charEncodingISO8859_5   CHAR_ENCODING_VALUE(39)
 

#define charEncodingISO8859_6   CHAR_ENCODING_VALUE(51)
 

#define charEncodingISO8859_7   CHAR_ENCODING_VALUE(33)
 

#define charEncodingISO8859_8   CHAR_ENCODING_VALUE(71)
 

#define charEncodingISO8859_8I   CHAR_ENCODING_VALUE(70)
 

#define charEncodingISO8859_9   CHAR_ENCODING_VALUE(47)
 

#define charEncodingKoi8   CHAR_ENCODING_VALUE(41)
 

#define charEncodingKoi8R   CHAR_ENCODING_VALUE(40)
 

#define charEncodingMacAra   CHAR_ENCODING_VALUE(57)
 

#define charEncodingMacCyr   CHAR_ENCODING_VALUE(44)
 

#define charEncodingMacintosh   CHAR_ENCODING_VALUE(20)
 

#define charEncodingMacIslande   CHAR_ENCODING_VALUE(19)
 

#define charEncodingMacTurc   CHAR_ENCODING_VALUE(49)
 

#define charEncodingMacUkraine   CHAR_ENCODING_VALUE(45)
 

#define charEncodingMacXCroate   CHAR_ENCODING_VALUE(30)
 

#define charEncodingMacXGr   CHAR_ENCODING_VALUE(37)
 

#define charEncodingMacXLat2   CHAR_ENCODING_VALUE(31)
 

#define charEncodingMacXRomania   CHAR_ENCODING_VALUE(32)
 

#define charEncodingMax   CHAR_ENCODING_VALUE(91)
 

#define charEncodingOnlySingleByte   0x00000001
 

#define charEncodingPalmBig5   CHAR_ENCODING_VALUE(81)
 

#define charEncodingPalmGB   CHAR_ENCODING_VALUE(83)
 

#define charEncodingPalmGSM   CHAR_ENCODING_VALUE(78)
 

#define charEncodingPalmKorean   CHAR_ENCODING_VALUE(91)
 

#define charEncodingPalmLatin   CHAR_ENCODING_VALUE(3)
 

#define charEncodingPalmSJIS   CHAR_ENCODING_VALUE(5)
 

#define charEncodingRightToLeft   0x00000008
 

#define charEncodingShiftJIS   CHAR_ENCODING_VALUE(4)
 

#define charEncodingTis620   CHAR_ENCODING_VALUE(74)
 

#define charEncodingUCS2   CHAR_ENCODING_VALUE(9)
 

#define charEncodingUCS4   CHAR_ENCODING_VALUE(88)
 

#define charEncodingUnknown   CHAR_ENCODING_VALUE(0)
 

#define charEncodingUTF16   CHAR_ENCODING_VALUE(75)
 

#define charEncodingUTF16BE   CHAR_ENCODING_VALUE(76)
 

#define charEncodingUTF16LE   CHAR_ENCODING_VALUE(77)
 

#define charEncodingUTF32   CHAR_ENCODING_VALUE(84)
 

#define charEncodingUTF32BE   CHAR_ENCODING_VALUE(85)
 

#define charEncodingUTF32LE   CHAR_ENCODING_VALUE(86)
 

#define charEncodingUTF7   CHAR_ENCODING_VALUE(24)
 

#define charEncodingUTF7_IMAP   CHAR_ENCODING_VALUE(87)
 

#define charEncodingUTF8   CHAR_ENCODING_VALUE(6)
 

#define charEncodingVietnet   CHAR_ENCODING_VALUE(65)
 

#define charEncodingViqr   CHAR_ENCODING_VALUE(62)
 

#define charEncodingViscii   CHAR_ENCODING_VALUE(61)
 

#define charEncodingVncii   CHAR_ENCODING_VALUE(63)
 

#define charEncodingXAutoJp   CHAR_ENCODING_VALUE(11)
 

#define charEncodingXKamenicky   CHAR_ENCODING_VALUE(29)
 

#define kTxtConvertStateSize   32
 

#define maxCharBytes   4
 

#define maxEncodingNameLength   40
 

#define sizeOf7BitChar  )     1
 

#define textMgrBestFitFlag   0x00000004
 

#define textMgrExistsFlag   0x00000001
 

#define textMgrHighASCIIFixupFlag   0x00000008
 

#define textMgrStrictFlag   0x00000002
 

#define textSubstitutionDefaultLen   1
 

#define textSubstitutionDefaultStr   "?"
 

#define textSubstitutionEncoding   charEncodingUTF8
 

#define translitOpCustomBase   1000
 

#define translitOpLowerCase   1
 

#define translitOpPreprocess   0x8000
 

#define translitOpReserved2   2
 

#define translitOpReserved3   3
 

#define translitOpStandardBase   0
 

#define translitOpUpperCase   0
 

#define TxtCharIsAlNum ch   )     ((TxtCharAttr(ch) & charAttrAlNum) != 0)
 

#define TxtCharIsAlpha ch   )     ((TxtCharAttr(ch) & charAttrAlpha) != 0)
 

#define TxtCharIsCntrl ch   )     ((TxtCharAttr(ch) & charAttrCntrl) != 0)
 

#define TxtCharIsDelim ch   )     ((TxtCharAttr(ch) & charAttrDelim) != 0)
 

#define TxtCharIsDigit ch   )     ((TxtCharAttr(ch) & charAttr_DI) != 0)
 

#define TxtCharIsGraph ch   )     ((TxtCharAttr(ch) & charAttrGraph) != 0)
 

#define TxtCharIsHardKey m,
 ) 
 

Value:

((((m) & commandKeyMask) != 0) && \
                                ((((c) >= hardKeyMin) && ((c) <= hardKeyMax)) || ((c) == calcChr)))

#define TxtCharIsHex ch   )     ((TxtCharAttr(ch) & charAttr_XD) != 0)
 

#define TxtCharIsLower ch   )     ((TxtCharAttr(ch) & charAttr_LO) != 0)
 

#define TxtCharIsPrint ch   )     ((TxtCharAttr(ch) & charAttrPrint) != 0)
 

#define TxtCharIsPunct ch   )     ((TxtCharAttr(ch) & charAttr_PU) != 0)
 

#define TxtCharIsRockerKey m,
 ) 
 

Value:

((((m) & commandKeyMask) != 0) && \
                                    ((((c) >= vchrRockerUp) && ((c) <= vchrRockerCenter))))

#define TxtCharIsSpace ch   )     ((TxtCharAttr(ch) & charAttrSpace) != 0)
 

#define TxtCharIsUpper ch   )     ((TxtCharAttr(ch) & charAttr_UP) != 0)
 

#define TxtCharIsVirtual m,
 )     (((m) & commandKeyMask) != 0)
 

#define TxtCharIsWheelKey m,
 ) 
 

Value:

((((m) & commandKeyMask) != 0) && \
                                ((((c) >= vchrThumbWheelUp) && ((c) <= vchrThumbWheelBack))))

#define txtErrConvertOverflow   (txtErrorClass | 4)
 

#define txtErrConvertUnderflow   (txtErrorClass | 5)
 

#define txtErrMalformedText   (txtErrorClass | 9)
 

#define txtErrNoCharMapping   (txtErrorClass | 7)
 

#define txtErrTranslitOverflow   (txtErrorClass | 3)
 

#define txtErrTranslitOverrun   (txtErrorClass | 2)
 

#define txtErrTranslitUnderflow   (txtErrorClass | 8)
 

#define txtErrUknownTranslitOp   (txtErrorClass | 1)
 

#define txtErrUnknownEncoding   (txtErrorClass | 6)
 

#define txtErrUnknownEncodingFallbackCopy   (txtErrorClass | 10)
 

#define TxtNextCharSize iTextP,
iOffset   )     TxtGetNextChar((iTextP), (iOffset), NULL)
 

#define TxtPreviousCharSize iTextP,
iOffset   )     TxtGetPreviousChar((iTextP), (iOffset), NULL)
 


Typedef Documentation

typedef uint16_t CharEncodingType
 

typedef uint16_t TranslitOpType
 


Function Documentation

uint8_t TxtByteAttr uint8_t  iByte  ) 
 

int16_t TxtCaselessCompare const char *  s1,
size_t  s1Len,
size_t *  s1MatchLen,
const char *  s2,
size_t  s2Len,
size_t *  s2MatchLen
 

uint32_t TxtCharAttr wchar32_t  iChar  ) 
 

wchar32_t TxtCharBounds const char *  iTextP,
size_t  iOffset,
size_t *  oCharStart,
size_t *  oCharEnd
 

CharEncodingType TxtCharEncoding wchar32_t  iChar  ) 
 

Boolean TxtCharIsValid wchar32_t  iChar  ) 
 

size_t TxtCharSize wchar32_t  iChar  ) 
 

uint32_t TxtCharXAttr wchar32_t  iChar  ) 
 

int16_t TxtCompare const char *  s1,
size_t  s1Len,
size_t *  s1MatchLen,
const char *  s2,
size_t  s2Len,
size_t *  s2MatchLen
 

status_t TxtConvertEncoding Boolean  newConversion,
TxtConvertStateType ioStateP,
const char *  srcTextP,
size_t *  ioSrcBytes,
CharEncodingType  srcEncoding,
char *  dstTextP,
size_t *  ioDstBytes,
CharEncodingType  dstEncoding,
const char *  substitutionStr,
size_t  substitutionLen
 

const char* TxtEncodingName CharEncodingType  iEncoding  ) 
 

Boolean TxtFindString const char *  iSrcStringP,
const char *  iTargetStringP,
size_t *  oFoundPos,
size_t *  oFoundLen
 

wchar32_t TxtGetChar const char *  iTextP,
size_t  iOffset
 

uint32_t TxtGetEncodingFlags CharEncodingType  iEncoding  ) 
 

size_t TxtGetNextChar const char *  iTextP,
size_t  iOffset,
wchar32_t oChar
 

size_t TxtGetPreviousChar const char *  iTextP,
size_t  iOffset,
wchar32_t oChar
 

size_t TxtGetTruncationOffset const char *  iTextP,
size_t  iOffset
 

size_t TxtGetWordWrapOffset const char *  iTextP,
size_t  iOffset
 

CharEncodingType TxtMaxEncoding CharEncodingType  a,
CharEncodingType  b
 

CharEncodingType TxtNameToEncoding const char *  iEncodingName  ) 
 

char* TxtParamString const char *  inTemplate,
const char *  param0,
const char *  param1,
const char *  param2,
const char *  param3
 

size_t TxtPrepFindString const char *  iSrcTextP,
size_t  iSrcLen,
char *  oDstTextP,
size_t  iDstSize
 

uint16_t TxtReplaceStr char *  iStringP,
size_t  iMaxLen,
const char *  iParamStringP,
uint16_t  iParamNum
 

size_t TxtSetNextChar char *  iTextP,
size_t  iOffset,
wchar32_t  iChar
 

CharEncodingType TxtStrEncoding const char *  iStringP  ) 
 

status_t TxtTransliterate const char *  iSrcTextP,
size_t  iSrcLength,
char *  oDstTextP,
size_t *  ioDstLength,
TranslitOpType  iTranslitOp
 

Boolean TxtTruncateString char *  iDstString,
const char *  iSrcString,
size_t  iMaxLength,
Boolean  iAddEllipsis
 

Boolean TxtWordBounds const char *  iTextP,
size_t  iLength,
size_t  iOffset,
size_t *  oWordStart,
size_t *  oWordEnd