PalmOSGlue.lib
or libPalmOSGlue.a
).
DateGlue.h
, FntGlue.h
, TxtGlue.h
, TsmGlue.h
, and WinGlue.h
(in the International
directory), and make calls as they are listed in this chapter, then your code will run regardless of whether the device's version of the operating system implements international support. The code in PalmOSGlue either uses the text manager or international manager on the ROM or, if the managers don't exist, executes a simple Latin equivalent of the function.
NOTE:  PalmOSGlue is a link library, not a shared library. Linking with this library increases your application's code size. The amount by which your code size increases varies depending on the number of library functions you call. Use PalmOSGlue only on versions 2.0 and later of Palm OS®.
FontID FntGlueGetDefaultFontID ( FontDefaultType inFontType)
  |
-> |
A FontDefaultType constant specifying one of the system default fonts. This value can be one of the following: |
  |
|
The default font for the system. |
  |
|
The default large font. |
  |
|
The default small font. |
  |
|
The default bold font. |
inFontType
.
defaultSystemFont
and defaultSmallFont
might return the same font ID or different font IDs, depending on the system locale.
FontSelect
,
FntGetFont
,
FntSetFont
Boolean TxtGlueCharIsVirtual(UInt16 inModifiers, WChar inChar)
  |
-> |
The value passed in the modifiers field of the keyDownEvent . |
  |
-> |
A character. |
true
if the character inChar
is a virtual character, false
otherwise.
keyDownEvent
for a virtual character because the range for virtual characters overlaps the range for "real" characters that should appear on the screen. Earlier releases of the operating system did not always set the command modifier for virtual characters.
chr
and modifiers
fields exactly as you received them in the
keyDownEvent
, and this function performs the appropriate check based on the operating system version.
WChar TxtGlueGetHorizEllipsisChar (void)
TxtGlueGetHorizEllipsisChar
to return the appropriate code for horizontal ellipsis regardless of which version of Palm OS your application is run on.
ChrHorizEllipsis
,
TxtGlueGetNumericSpaceChar
WChar TxtGlueGetNumericSpaceChar (void)
TxtGlueGetNumericSpaceChar
to return the appropriate code for numeric space regardless of which version of Palm OS your application is run on.
ChrNumericSpace
,
TxtGlueGetHorizEllipsisChar
WChar TxtGlueLowerChar (WChar inChar)
TxtGlueUpperChar
,
TxtGlueLowerStr
,
TxtGlueUpperStr
, TxtGlueTransliterate
,
TxtTransliterate
,
StrToLower
void TxtGlueLowerStr (Char* ioString, UInt16 inMaxLength)
  |
<-> |
The string to be converted. |
  |
-> |
The size of the buffer that contains the string, excluding the terminating NULL character. |
ioString
the input string with its letters converted to lowercase.
ioString
after this call returns.
ioString
points to the start of a a valid character. That is, it must point to the first byte of a multi-byte character or it must point to a single-byte character. If it doesn't, results are unpredictable.
TxtGlueUpperStr
,
TxtGlueLowerChar
,
TxtGlueUpperChar
,
StrToLower
TxtGlueTransliterate
,
TxtTransliterate
TxtFindString
or
FindStrInStr
.
void TxtGluePrepFindString (const Char* inSource, CharPtr outDest, UInt16 inDstSize)
  |
|
Pointer to the text to be searched for. Must not be NULL . |
  |
|
The same text as in inSource but converted to a suitable format for searching. outDest must not be the same address as inSource . |
  |
|
The length in bytes of the area pointed to by outDest . |
outDest
an appropriately converted string.
TxtGlueFindString
, TxtFindString
, or FindStrInStr
to perform a search that is internal to your application. If you use any of these three search routines in response to the
sysAppLaunchCmdFind
launch code, the string that the launch code passes in is already properly normalized for the search.
inDstSize
bytes of inSource
are written to outDest
. If necessary to prevent overflow of the destination buffer, not all of inSource
is converted.
inSource
points to the start of a valid character. That is, it must point to the first byte of a multi-byte character or it must point to a single-byte character. If it doesn't, results are unpredictable.
Char* TxtGlueStripSpaces (Char* ioStr, Boolean leading, Boolean trailing)
  |
<-> |
Any string. |
  |
-> |
If true , strip the leading spaces from the string. |
  |
-> |
If true , strip the trailing spaces from the string. |
ioStr
with the specified spaces stripped from it. Note that this function both changes the ioStr
buffer parameter and returns a pointer to it.
ioStr
points to the start of a a valid character. That is, it must point to the first byte of a multi-byte character or it must point to a single-byte character. If it doesn't, results are unpredictable.
WChar TxtGlueUpperChar (WChar inChar)
TxtGlueLowerChar
,
TxtGlueUpperStr
TxtGlueLowerStr
, TxtGlueTransliterate
,
TxtTransliterate
StrToLower
void TxtGlueUpperStr (Char* ioString, UInt16 inMaxLength)
  |
<-> |
The string to be converted. |
  |
-> |
The size of the buffer that contains the string, excluding the terminating NULL character. |
ioString
the input string with its letters converted to uppercase.
ioString
after this call returns.
TxtGlueLowerStr
,
TxtGlueUpperChar
,
TxtGlueLowerChar
, TxtGlueTransliterate
,
TxtTransliterate
StrToLower
  |   |