Mac OS 9
UnicodeUtilities.h File Reference

Types, constants, prototypes for Unicode Utilities (Unicode input and text utils) More...

#include <MacTypes.h>
#include <MacLocales.h>
#include <TextCommon.h>

Go to the source code of this file.

Data Structures

struct  UCKeyStateRecord
 
struct  UCKeyStateEntryTerminal
 
struct  UCKeyStateEntryRange
 
struct  UCKeyboardTypeHeader
 
struct  UCKeyboardLayout
 
struct  UCKeyLayoutFeatureInfo
 
struct  UCKeyModifiersToTableNum
 
struct  UCKeyToCharTableIndex
 
struct  UCKeyStateRecordsIndex
 
struct  UCKeyStateTerminators
 
struct  UCKeySequenceDataIndex
 

Typedefs

typedef UInt16 UCKeyOutput
 
typedef UInt16 UCKeyCharSeq
 
typedef struct UCKeyStateRecord UCKeyStateRecord
 
typedef struct UCKeyStateEntryTerminal UCKeyStateEntryTerminal
 
typedef struct UCKeyStateEntryRange UCKeyStateEntryRange
 
typedef struct UCKeyboardTypeHeader UCKeyboardTypeHeader
 
typedef struct UCKeyboardLayout UCKeyboardLayout
 
typedef struct UCKeyLayoutFeatureInfo UCKeyLayoutFeatureInfo
 
typedef struct UCKeyModifiersToTableNum UCKeyModifiersToTableNum
 
typedef struct UCKeyToCharTableIndex UCKeyToCharTableIndex
 
typedef struct UCKeyStateRecordsIndex UCKeyStateRecordsIndex
 
typedef struct UCKeyStateTerminators UCKeyStateTerminators
 
typedef struct UCKeySequenceDataIndex UCKeySequenceDataIndex
 
typedef struct OpaqueCollatorRef * CollatorRef
 
typedef UInt32 UCCollateOptions
 
typedef UInt32 UCCollationValue
 
typedef struct OpaqueTextBreakLocatorRef * TextBreakLocatorRef
 
typedef UInt32 UCTextBreakType
 
typedef UInt32 UCTextBreakOptions
 

Enumerations

enum  { kUCKeyOutputStateIndexMask = 0x4000 , kUCKeyOutputSequenceIndexMask = 0x8000 , kUCKeyOutputTestForIndexMask = 0xC000 , kUCKeyOutputGetIndexMask = 0x3FFF }
 
enum  { kUCKeyStateEntryTerminalFormat = 0x0001 , kUCKeyStateEntryRangeFormat = 0x0002 }
 
enum  {
  kUCKeyLayoutHeaderFormat = 0x1002 , kUCKeyLayoutFeatureInfoFormat = 0x2001 , kUCKeyModifiersToTableNumFormat = 0x3001 , kUCKeyToCharTableIndexFormat = 0x4001 ,
  kUCKeyStateRecordsIndexFormat = 0x5001 , kUCKeyStateTerminatorsFormat = 0x6001 , kUCKeySequenceDataIndexFormat = 0x7001
}
 
enum  { kUCKeyActionDown = 0 , kUCKeyActionUp = 1 , kUCKeyActionAutoKey = 2 , kUCKeyActionDisplay }
 
enum  { kUCKeyTranslateNoDeadKeysBit }
 
enum  { kUCKeyTranslateNoDeadKeysMask = 1L << kUCKeyTranslateNoDeadKeysBit }
 
enum  { kUnicodeCollationClass = FOUR_CHAR_CODE('ucol') }
 
enum  {
  kUCCollateComposeInsensitiveMask = 1L << 1 , kUCCollateWidthInsensitiveMask = 1L << 2 , kUCCollateCaseInsensitiveMask = 1L << 3 , kUCCollateDiacritInsensitiveMask = 1L << 4 ,
  kUCCollatePunctuationSignificantMask , kUCCollateDigitsOverrideMask = 1L << 16 , kUCCollateDigitsAsNumberMask = 1L << 17
}
 
enum  { kUCCollateStandardOptions }
 
enum  { kUCCollateTypeHFSExtended = 1 }
 
enum  { kUCCollateTypeSourceMask = 0x000000FF , kUCCollateTypeShiftBits = 24 }
 
enum  { kUCCollateTypeMask = kUCCollateTypeSourceMask << kUCCollateTypeShiftBits }
 
enum  { kUnicodeTextBreakClass = FOUR_CHAR_CODE('ubrk') }
 
enum  { kUCTextBreakCharMask = 1L << 0 , kUCTextBreakClusterMask = 1L << 2 , kUCTextBreakWordMask = 1L << 4 , kUCTextBreakLineMask = 1L << 6 }
 
enum  { kUCTextBreakLeadingEdgeMask = 1L << 0 , kUCTextBreakGoBackwardsMask = 1L << 1 , kUCTextBreakIterateMask = 1L << 2 }
 

Functions

OSStatus UCKeyTranslate (const UCKeyboardLayout *keyLayoutPtr, UInt16 virtualKeyCode, UInt16 keyAction, UInt32 modifierKeyState, UInt32 keyboardType, OptionBits keyTranslateOptions, UInt32 *deadKeyState, UniCharCount maxStringLength, UniCharCount *actualStringLength, UniChar unicodeString[])
 
OSStatus UCCreateCollator (LocaleRef locale, LocaleOperationVariant opVariant, UCCollateOptions options, CollatorRef *collatorRef)
 
OSStatus UCGetCollationKey (CollatorRef collatorRef, const UniChar *textPtr, UniCharCount textLength, ItemCount maxKeySize, ItemCount *actualKeySize, UCCollationValue collationKey[])
 
OSStatus UCCompareCollationKeys (const UCCollationValue *key1Ptr, ItemCount key1Length, const UCCollationValue *key2Ptr, ItemCount key2Length, Boolean *equivalent, SInt32 *order)
 
OSStatus UCCompareText (CollatorRef collatorRef, const UniChar *text1Ptr, UniCharCount text1Length, const UniChar *text2Ptr, UniCharCount text2Length, Boolean *equivalent, SInt32 *order)
 
OSStatus UCDisposeCollator (CollatorRef *collatorRef)
 
OSStatus UCCompareTextDefault (UCCollateOptions options, const UniChar *text1Ptr, UniCharCount text1Length, const UniChar *text2Ptr, UniCharCount text2Length, Boolean *equivalent, SInt32 *order)
 
OSStatus UCCompareTextNoLocale (UCCollateOptions options, const UniChar *text1Ptr, UniCharCount text1Length, const UniChar *text2Ptr, UniCharCount text2Length, Boolean *equivalent, SInt32 *order)
 
OSStatus UCCreateTextBreakLocator (LocaleRef locale, LocaleOperationVariant opVariant, UCTextBreakType breakTypes, TextBreakLocatorRef *breakRef)
 
OSStatus UCFindTextBreak (TextBreakLocatorRef breakRef, UCTextBreakType breakType, UCTextBreakOptions options, const UniChar *textPtr, UniCharCount textLength, UniCharArrayOffset startOffset, UniCharArrayOffset *breakOffset)
 
OSStatus UCDisposeTextBreakLocator (TextBreakLocatorRef *breakRef)
 

Detailed Description

Types, constants, prototypes for Unicode Utilities (Unicode input and text utils)

Introduced In: Mac OS 9.0
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 1997-2001 by Apple Computer, Inc., all rights reserved.

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Typedef Documentation

◆ UCKeyOutput

typedef UInt16 UCKeyOutput

CONSTANTS & DATA STRUCTURES for UCKeyTranslate & UCKeyboardLayout ('uchr'

resource)


UCKeyOutput & related stuff The interpretation of UCKeyOutput depends on bits 15-14. If they are 01, then bits 0-13 are an index in UCKeyStateRecordsIndex (resource-wide list). If they are 10, then bits 0-13 are an index in UCKeySequenceDataIndex (resource-wide list), or if UCKeySequenceDataIndex is not present or the index is beyond the end of the list, then bits 0-15 are a single Unicode character. Otherwise, bits 0-15 are a single Unicode character; a value of 0xFFFE-0xFFFF means no character output. UCKeyCharSeq is similar, but does not support indices in UCKeyStateRecordsIndex. For bits 15-14: If they are 10, then bits 0-13 are an index in UCKeySequenceDataIndex (resource-wide list), or if UCKeySequenceDataIndex is not present or the index is beyond the end of the list, then bits 0-15 are a single Unicode character. Otherwise, bits 0-15 are a single Unicode character; a value of

0xFFFE-0xFFFF means no character output.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kUCKeyOutputGetIndexMask 

test bits 14-15

◆ anonymous enum

anonymous enum

Here are the codes for entry formats currently defined. Each entry maps from curState to charData and nextState.

◆ anonymous enum

anonymous enum

Current format codes for the various tables (bits 12-15 indicate which table)

◆ anonymous enum

anonymous enum

Constants for keyAction parameter in UCKeyTranslate()

Enumerator
kUCKeyActionUp 

key is going down

kUCKeyActionAutoKey 

key is going up

kUCKeyActionDisplay 

auto-key down

◆ anonymous enum

anonymous enum

Bit assignments & masks for keyTranslateOptions parameter in UCKeyTranslate()

◆ anonymous enum

anonymous enum

CONSTANTS & DATA STRUCTURES for Unicode Collation

constant for LocaleOperationClass

◆ anonymous enum

anonymous enum
Enumerator
kUCCollateComposeInsensitiveMask 

Sensitivity options

kUCCollatePunctuationSignificantMask 

Other general options

kUCCollateDigitsOverrideMask 

Number-handling options

◆ anonymous enum

anonymous enum

Special values to specify various invariant orders for UCCompareTextNoLocale. These values use the high 8 bits of UCCollateOptions.

◆ anonymous enum

anonymous enum

These constants are used for masking and shifting the invariant order type.

◆ anonymous enum

anonymous enum

CONSTANTS & DATA STRUCTURES for Unicode TextBreak

constant for LocaleOperationClass

Function Documentation

◆ UCCompareCollationKeys()

OSStatus UCCompareCollationKeys ( const UCCollationValue *  key1Ptr,
ItemCount  key1Length,
const UCCollationValue *  key2Ptr,
ItemCount  key2Length,
Boolean equivalent,
SInt32 *  order 
)

UCCompareCollationKeys()

Non-Carbon CFM: in UnicodeUtilitiesCoreLib 8.6 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UCCompareText()

OSStatus UCCompareText ( CollatorRef  collatorRef,
const UniChar *  text1Ptr,
UniCharCount  text1Length,
const UniChar *  text2Ptr,
UniCharCount  text2Length,
Boolean equivalent,
SInt32 *  order 
)

UCCompareText()

Non-Carbon CFM: in UnicodeUtilitiesLib 8.6 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UCCompareTextDefault()

OSStatus UCCompareTextDefault ( UCCollateOptions  options,
const UniChar *  text1Ptr,
UniCharCount  text1Length,
const UniChar *  text2Ptr,
UniCharCount  text2Length,
Boolean equivalent,
SInt32 *  order 
)

Simple collation using default locale UCCompareTextDefault()

Non-Carbon CFM: in UnicodeUtilitiesLib 8.6 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UCCompareTextNoLocale()

OSStatus UCCompareTextNoLocale ( UCCollateOptions  options,
const UniChar *  text1Ptr,
UniCharCount  text1Length,
const UniChar *  text2Ptr,
UniCharCount  text2Length,
Boolean equivalent,
SInt32 *  order 
)

Simple locale-independent collation UCCompareTextNoLocale()

Non-Carbon CFM: in UnicodeUtilitiesCoreLib 8.6 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UCCreateCollator()

OSStatus UCCreateCollator ( LocaleRef  locale,
LocaleOperationVariant  opVariant,
UCCollateOptions  options,
CollatorRef *  collatorRef 
)

Standard collation functions UCCreateCollator()

Non-Carbon CFM: in UnicodeUtilitiesLib 8.6 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UCCreateTextBreakLocator()

OSStatus UCCreateTextBreakLocator ( LocaleRef  locale,
LocaleOperationVariant  opVariant,
UCTextBreakType  breakTypes,
TextBreakLocatorRef *  breakRef 
)

Standard text break (text boundary) functions UCCreateTextBreakLocator()

Non-Carbon CFM: in UnicodeUtilitiesLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UCDisposeCollator()

OSStatus UCDisposeCollator ( CollatorRef *  collatorRef)

UCDisposeCollator()

Non-Carbon CFM: in UnicodeUtilitiesLib 8.6 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UCDisposeTextBreakLocator()

OSStatus UCDisposeTextBreakLocator ( TextBreakLocatorRef *  breakRef)

UCDisposeTextBreakLocator()

Non-Carbon CFM: in UnicodeUtilitiesLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UCFindTextBreak()

OSStatus UCFindTextBreak ( TextBreakLocatorRef  breakRef,
UCTextBreakType  breakType,
UCTextBreakOptions  options,
const UniChar *  textPtr,
UniCharCount  textLength,
UniCharArrayOffset  startOffset,
UniCharArrayOffset breakOffset 
)

UCFindTextBreak()

Non-Carbon CFM: in UnicodeUtilitiesLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UCGetCollationKey()

OSStatus UCGetCollationKey ( CollatorRef  collatorRef,
const UniChar *  textPtr,
UniCharCount  textLength,
ItemCount  maxKeySize,
ItemCount *  actualKeySize,
UCCollationValue  collationKey[] 
)

UCGetCollationKey()

Non-Carbon CFM: in UnicodeUtilitiesLib 8.6 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UCKeyTranslate()

OSStatus UCKeyTranslate ( const UCKeyboardLayout keyLayoutPtr,
UInt16  virtualKeyCode,
UInt16  keyAction,
UInt32  modifierKeyState,
UInt32  keyboardType,
OptionBits  keyTranslateOptions,
UInt32 *  deadKeyState,
UniCharCount  maxStringLength,
UniCharCount *  actualStringLength,
UniChar  unicodeString[] 
)

FUNCTION PROTOTYPES

UCKeyTranslate()

Non-Carbon CFM: in UnicodeUtilitiesCoreLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later