Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

Legacy Documentclose button

Important: The Script Manager is deprecated as of Mac OS X v10.5. Instead, you should update your application to handle Unicode text using the facilities of the Cocoa system (see Text System Overview) or Core Text (see Core Text Programming Guide). See also Internationalization Programming Topics.

Script Manager Reference (Not Recommended)

Framework
CoreServices/CoreServices.h
Declared in
Script.h

Overview

Important: The Script Manager is deprecated as of Mac OS X v10.5. Instead, you should update your application to handle Unicode text using the facilities of the Cocoa system (see Text System Overview) or Core Text (see Core Text Programming Guide). See also Internationalization Programming Topics.

The Script Manager makes script systems available and coordinates the interaction between many parts of the Mac OS and those available script systems. A script system (or script for short) is a collection of resources that provides for the representation of a particular writing system.

The Script Manager also provides several services directly to your application. Through them you can get information about the current text environment, modify that environment, and perform a variety of text-handling tasks.

The Script Manager has evolved through several versions. It started with sole responsibility for all international-compatibility and multilingual text issues, but as more power and features have been added, many of its specific functions have been moved to the other parts of system software.

For many text-related tasks, the Script Manager’s role is transparent when you make a script-aware Text Utilities or QuickDraw call while processing text, that routine may get the information it needs through the Script Manager. For example, when you call the QuickDraw function DrawText to draw a line of text, DrawText in turn calls the Script Manager to determine which script system your text belongs to before drawing it. In other situations you may need to call the Script Manager explicitly, to properly interpret the text you are processing.

Carbon supports most Script Manager functions. However, Apple recommends that whenever possible you should replace Script Manager calls with the appropriate Unicode functionality. For more information, see Unicode Utilities Reference and Supporting Unicode Input.

See also the KeyScript function documentation.

Functions by Task

Analyzing Characters

Checking and Setting Script Manager Variables

Checking and Setting Script Variables

Checking and Setting the System Direction

Determining Script Codes From Font Information

Directly Accessing International Resources

Converting Text

Data Types

CharByteTable

Represents an array of char values.

typedef  char CharByteTable[256];

Discussion

Used by the function FillParseTable.

Availability
Declared In
Script.h

CommentType

Represents an array of ScriptTokenType values.

typedef ScriptTokenType CommentType[4];

Availability
Declared In
Script.h

DelimType

Represents an array of ScriptTokenType values.

typedef ScriptTokenType DelimType[2];

Availability
Declared In
Script.h

ScriptTokenType

Defins a data type for the script token type.

typedef  short ScriptTokenType;

Discussion
Availability
Declared In
Script.h

TokenBlock

Contains information about text that is to be converted to tokens, the destination of the token list, a handle to the tokens resource, and a set of options.

struct TokenBlock {
   Ptr source;
   long sourceLength;
   Ptr tokenList;
   long tokenLength;
   long tokenCount;
   Ptr stringList;
   long stringLength;
   long stringCount;
   Boolean doString;
   Boolean doAppend;
   Boolean doAlphanumeric;
   Boolean doNest;
   ScriptTokenType leftDelims[2];
   ScriptTokenType rightDelims[2];
   ScriptTokenType leftComment[4];
   ScriptTokenType rightComment[4];
   ScriptTokenType escapeCode;
   ScriptTokenType decimalCode;
   Handle itlResource;
   long reserved[8];
};
typedef struct TokenBlock TokenBlock;
typedef TokenBlock * TokenBlockPtr;

Fields
source

A pointer to a stream of characters. On input to the function IntlTokenize, a pointer to the beginning of the source text (not a Pascal string) to be converted.

sourceLength

The length of the source stream. On input, the number of bytes in the source text.

tokenList

A pointer to an array of tokens. On input, a pointer to a buffer you have allocated. On output, a pointer to a list of token structures generated by the IntlTokenize function.

tokenLength

The maximum length of TokenList. On input, the maximum size of token list (in number of tokens, not bytes) that will fit into the buffer pointed to by the tokenList field.

tokenCount

The number of tokens generated by the tokenizer. On input (if doAppend = TRUE), must contain the correct number of tokens currently in the token list. (Ignored if doAppend = FALSE.) On output, the number of tokens currently in the token list.

stringList

A pointer to a stream of identifiers. On input (if doString = TRUE), a pointer to a buffer you have allocated. (Ignored if doString = FALSE) On output, a pointer to a list of strings generated by the IntlTokenize function.

stringLength

The length of the string list. On input (if doString = TRUE), the size in bytes of the string list buffer pointed to by the stringList field. (Ignored if doString = FALSE.)

stringCount

The number of bytes currently used. On input (if doString = TRUE and doAppend = TRUE), the correct current size in bytes of the string list. (Ignored if doString = FALSE or doAppend = FALSE.) On output, the current size in bytes of the string list. (Indeterminate if doString = FALSE.)

doString

A Boolean value. On input, if TRUE, instructs IntlTokenize to create a Pascal string representing the contents of each token it generates. If FALSE, IntlTokenize generates a token list without an associated string list.

doAppend

A Boolean value. On input, if TRUE, instructs IntlTokenize to append tokens and strings it generates to the current token list and string list. If FALSE, IntlTokenize writes over any previous contents of the buffer pointed to by tokenList and stringList.

doAlphanumeric

A Boolean value. On input, if TRUE, instructs IntlTokenize to interpret numeric characters as alphabetic when mixed with alphabetic characters. If FALSE, all numeric characters are interpreted as numbers.

doNest

A Boolean value. A value of type Boolean. On input, if TRUE, instructs IntlTokenize to allow nested comments (to any depth of nesting). If FALSE, comment delimiters may not be nested within other comment delimiters.

leftDelims

A value of type DelimType. On input, an array of two integers, each of which contains the token code of the symbol that may be used as an opening delimiter for a quoted literal. If only one opening delimiter is needed, the other must be specified to be delimPad.

rightDelims

A value of type DelimType. On input, an array of two integers, each of which contains the token code of the symbol that may be used as the matching closing delimiter for the corresponding opening delimiter in the leftDelims field.

leftComment

A value of type CommentType. On input, an array of two pairs of integers, each pair of which contains codes for the two token types that may be used as opening delimiters for comments.

rightComment

A value of type CommentType. On input, an array of two pairs of integers, each pair of which contains codes for the two token types that may be used as closing delimiters for comments.

escapeCode

A value of type TokenType. On input, a single integer that contains the token code for the symbol that may be an escape character within a quoted literal.

decimalCode

A value of type TokenType. On input, a single integer that contains the token type of the symbol to be used for a decimal point.

itlResource

A value of type Handle. On input, a handle to the tokens ( 'itl4') resource of the script system under which the source text was created.

reserved

An 8-byte array of type LongInt.On input, this must be set to 0.

Discussion

The token block structure is a parameter block used to pass information to the IntlTokenize function and to retrieve results from it.

Availability
Declared In
Script.h

TokenRec

Contains information about the conversion of a sequence of characters to a token.

struct TokenRec {
   ScriptTokenType theToken;
   Ptr position;
   long length;
   StringPtr stringPosition;
};
typedef struct TokenRec TokenRec;
typedef TokenRec * TokenRecPtr;

Fields
theToken

A numeric code that specifies the type of token (such as whitespace, opening parenthesis, alphabetic or numeric sequence) described by this token structure. Constants for all defined token codes are listed in “Obsolete Token Codes.”

position

A pointer to the first character in the source text that caused this particular token to be generated.

length

The length, in bytes, of the source text that caused this particular token to be generated.

stringPosition

If doString = TRUE, a pointer to a null-terminated Pascal string, padded if necessary so that its total number of bytes (length byte + text + null byte + padding) is even. If doString = FALSE, this field is NULL.

The value in the length byte of the null-terminated Pascal string does not include either the terminating zero byte or the possible additional padding byte. There may be as many as two additional bytes beyond the specified length.

Discussion

The token structure holds the results of the conversion of a sequence of characters to a token by the IntlTokenize function. When it analyzes text, IntlTokenize generates a token list, which is a sequence of token structures.

Availability
Declared In
Script.h

Constants

Assorted Constants

Calendar Codes

Specify constants for various calendars.

enum {
   calGregorian = 0,
   calArabicCivil = 1,
   calArabicLunar = 2,
   calJapanese = 3,
   calJewish = 4,
   calCoptic = 5,
   calPersian = 6
};

Constants
calGregorian

Specifies the Gregorian calendar.

Available in Mac OS X v10.0 and later.

Declared in Script.h

calArabicCivil

Specifies the Arabic civil calendar.

Available in Mac OS X v10.0 and later.

Declared in Script.h

calArabicLunar

Specifies the Arabic lunar calendar.

Available in Mac OS X v10.0 and later.

Declared in Script.h

calJapanese

Specifies the Japanese calendar.

Available in Mac OS X v10.0 and later.

Declared in Script.h

calJewish

Specifies the Jewish calendar.

Available in Mac OS X v10.0 and later.

Declared in Script.h

calCoptic

Specifies the Coptic calendar.

Available in Mac OS X v10.0 and later.

Declared in Script.h

calPersian

Specifies the Persian calendar.

Available in Mac OS X v10.0 and later.

Declared in Script.h

Discussion

These calendar codes are bit numbers, not masks.

Character Byte Types

Specify character byte types.

enum {
   smSingleByte = 0,
   smFirstByte = -1,
   smLastByte = 1,
   smMiddleByte = 2
};

Constants
smSingleByte

Specifes a single byte.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smFirstByte

Specifies the first byte.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smLastByte

Specifies the last byte.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smMiddleByte

Specifies the middle byte.

Available in Mac OS X v10.0 and later.

Declared in Script.h

Character Types

Specify basic character types.

enum {
   smCharPunct = 0x0000,
   smCharAscii = 0x0001,
   smCharEuro = 0x0007,
   smCharExtAscii = 0x0007,
   smCharKatakana = 0x0002,
   smCharHiragana = 0x0003,
   smCharIdeographic = 0x0004,
   smCharTwoByteGreek = 0x0005,
   smCharTwoByteRussian = 0x0006,
   smCharBidirect = 0x0008,
   smCharContextualLR = 0x0009,
   smCharNonContextualLR = 0x000A,
   smCharHangul = 0x000C,
   smCharJamo = 0x000D,
   smCharBopomofo = 0x000E,
   smCharGanaKana = 0x000F,
   smCharFISKana = 0x0002,
   smCharFISGana = 0x0003,
   smCharFISIdeo = 0x0004
};

Constants
smCharPunct

Specifies punctuation characters.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharAscii

Specifies ASCII characters.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharEuro

Specifies smCharEuro.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharExtAscii

Specifies a more correct synonym for smCharEuro.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharKatakana

Specifies additional character types for Japanese Katakana.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharHiragana

Specifies additional character types for Japanese Hiragana.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharIdeographic

Specifies additional character types for Hanzi, Kanji, and Hanja.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharTwoByteGreek

Specifies additional character types for double-byte Greek in Far East systems.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharTwoByteRussian

Specifies additional character types for double-byte Cyrillic in Far East systems.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharBidirect

Specifies additional character types for Arabic/Hebrew.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharContextualLR

Specifies contextual left-right: Thai, Indic scripts.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharNonContextualLR

Specifies additional character types for non-contextual left-right: Cyrillic, Greek.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharHangul

Specifies additional character types for Korean Hangul.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharJamo

Specifies additional character types for Korean Jamo.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharBopomofo

Specifies additional character types for Chinese Bopomofo.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharGanaKana

Specifies additional character types shared for Japanese Hiragana and Katakana.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharFISKana

Specifies obsolete Katakana names, for backward compatibility.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharFISGana

Specifies obsolete Hiragana namde, for backward compatibility.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharFISIdeo

Specifies obsolete Hanzi, Kanji, and Hanja names, for backward compatibility.

Available in Mac OS X v10.0 and later.

Declared in Script.h

Character Type Classes

Specify character-type classes for double-byte script systems.

enum {
   smCharFISGreek = 0x0005,
   smCharFISRussian = 0x0006,
   smPunctNormal = 0x0000,
   smPunctNumber = 0x0100,
   smPunctSymbol = 0x0200,
   smPunctBlank = 0x0300,
   smPunctRepeat = 0x0400,
   smPunctGraphic = 0x0500,
   smKanaSmall = 0x0100,
   smKanaHardOK = 0x0200,
   smKanaSoftOK = 0x0300,
   smIdeographicLevel1 = 0x0000,
   smIdeographicLevel2 = 0x0100,
   smIdeographicUser = 0x0200,
   smFISClassLvl1 = 0x0000,
   smFISClassLvl2 = 0x0100,
   smFISClassUser = 0x0200,
   smJamoJaeum = 0x0000,
   smJamoBogJaeum = 0x0100,
   smJamoMoeum = 0x0200,
   smJamoBogMoeum = 0x0300
};

Constants
smCharFISGreek

Specfies character-type classes for double-byte Greek in Far East systems.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharFISRussian

Specfies character-type classes for double-byte Cyrillic in Far East systems.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smPunctNormal

Specfies character-type classes for normal punctuation (smCharPunct).

Available in Mac OS X v10.0 and later.

Declared in Script.h

smPunctNumber

Specfies character-type classes for number punctuation (smCharPunct).

Available in Mac OS X v10.0 and later.

Declared in Script.h

smPunctSymbol

Specfies character-type classes for symbol punctuation (smCharPunct).

Available in Mac OS X v10.0 and later.

Declared in Script.h

smPunctBlank

Specfies additional character-type classes for punctuation in double-byte systems.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smPunctRepeat

Specifies a character-type class for repeat markers.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smPunctGraphic

Specifies a character-type class forl ine graphics.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKanaSmall

Specfies character-type classes for Katakana and Hiragana double-byte systems.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKanaHardOK

Specfies character-type classes for Katakana and Hiragana double-byte systems; can have dakuten.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKanaSoftOK

Specfies character-type classes for Katakana and Hiragana double-byte systems; can have dakuten or han-dakuten.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smIdeographicLevel1

Specfies character-type classes for Ideographic double-byte systems; level 1 char.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smIdeographicLevel2

Specfies character-type classes for Ideographic double-byte systems; level 2 char.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smIdeographicUser

Specfies character-type classes for Ideographic double-byte systems; user char.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smFISClassLvl1

Obsolete, for backward compatibility; level 1 char.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smFISClassLvl2

Obsolete, for backward compatibility; level 2 char.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smFISClassUser

Obsolete, for backward compatibility; user char.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smJamoJaeum

Specfies character-type Jamo classes for Korean systems; simple consonant char.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smJamoBogJaeum

Specfies character-type Jamo classes for Korean systems; complex consonant char.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smJamoMoeum

Specfies character-type Jamo classes for Korean systems; simple vowel char.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smJamoBogMoeum

Specfies character-type Jamo classes for Korean systems; complex vowel char.

Available in Mac OS X v10.0 and later.

Declared in Script.h

Character Type Field Masks

Specify masks used to extract information from the return value of the CharacterType function.

enum {
   smcTypeMask = 0x000F,
   smcReserved = 0x00F0,
   smcClassMask = 0x0F00,
   smcOrientationMask = 0x1000,
   smcRightMask = 0x2000,
   smcUpperMask = 0x4000,
   smcDoubleMask = 0x8000
};

Constants
smcTypeMask

Character-type mask.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smcReserved

Reserved.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smcClassMask

Character-class mask.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smcOrientationMask

Character orientation (double-byte scripts).

Available in Mac OS X v10.0 and later.

Declared in Script.h

smcRightMask

Writing direction (bidirectional scripts); main character set or subset (double-byte scripts)

Available in Mac OS X v10.0 and later.

Declared in Script.h

smcUpperMask

Uppercase or lowercase.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smcDoubleMask

Size (1 or 2 bytes).

Available in Mac OS X v10.0 and later.

Declared in Script.h

Discussion

These bit masks are used to extract fields from the return value of the CharacterType function.

The character type of the character in question is the result of performing an AND operation with smcTypeMask and the CharacterType result.

The character class of the character in question is the result of performing an AND operation with smcClassMask and the CharacterType result. Character classes can be considered as subtypes of character types.

The orientation of the character in question is the result of performing an AND operation with smcOrientationMask and the CharacterType result. The orientation value can be either smCharHorizontal or smCharVertical.

The direction of the character in question is the result of performing an AND operation with smcRightMask and the CharacterType result. The direction value can be either smCharLeft (left-to-right) or smCharRight (right-to-left).

The case of the character in question is the result of performing an AND operation with smcUpperMask and the CharacterType result. The case value can be either smCharLower or smCharUpper.

The size of the character in question is the result of performing an AND operation with smcDoubleMask and the CharacterType result. The size value can be either smChar1byte or smChar2byte.

Character Set Extensions

Specify extensions to character sets.

enum {
   diaeresisUprY = 0xD9,
   fraction = 0xDA,
   intlCurrency = 0xDB,
   leftSingGuillemet = 0xDC,
   rightSingGuillemet = 0xDD,
   fiLigature = 0xDE,
   flLigature = 0xDF,
   dblDagger = 0xE0,
   centeredDot = 0xE1,
   baseSingQuote = 0xE2,
   baseDblQuote = 0xE3,
   perThousand = 0xE4,
   circumflexUprA = 0xE5,
   circumflexUprE = 0xE6,
   acuteUprA = 0xE7,
   diaeresisUprE = 0xE8,
   graveUprE = 0xE9,
   acuteUprI = 0xEA,
   circumflexUprI = 0xEB,
   diaeresisUprI = 0xEC,
   graveUprI = 0xED,
   acuteUprO = 0xEE,
   circumflexUprO = 0xEF,
   appleLogo = 0xF0,
   graveUprO = 0xF1,
   acuteUprU = 0xF2,
   circumflexUprU = 0xF3,
   graveUprU = 0xF4,
   dotlessLwrI = 0xF5,
   circumflex = 0xF6,
   tilde = 0xF7,
   macron = 0xF8,
   breveMark = 0xF9,
   overDot = 0xFA,
   ringMark = 0xFB,
   cedilla = 0xFC,
   doubleAcute = 0xFD,
   ogonek = 0xFE,
   hachek = 0xFF
};

Keyboard Script Synchronization

Specifies to disable font and keyboard script synchronization.

enum {
   smfDisableKeyScriptSync = 27
};

Glyph Orientations

Specify character-type glyph orientation for double-byte systems.

enum {
   smCharHorizontal = 0x0000,
   smCharVertical = 0x1000,
   smCharLeft = 0x0000,
   smCharRight = 0x2000,
   smCharLower = 0x0000,
   smCharUpper = 0x4000,
   smChar1byte = 0x0000,
   smChar2byte = 0x8000
};

Constants
smCharHorizontal

Specifies horizontal character form.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharVertical

Specifies vertical character form.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharLeft

Specifies left character direction.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharRight

Specifies right character direction.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharLower

Specifies lowercase character modifers.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCharUpper

Specifies uppercase character modifers.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smChar1byte

Specifies character size modifiers (single or multiple bytes).

Available in Mac OS X v10.0 and later.

Declared in Script.h

smChar2byte

Specifies character size modifiers (single or multiple bytes).

Available in Mac OS X v10.0 and later.

Declared in Script.h

Keyboard Script Switching Selectors

Specify a keyboard script switching flag and mask.

enum {
   smKeyForceKeyScriptBit = 7,
   smKeyForceKeyScriptMask = 1 << smKeyForceKeyScriptBit
};

Constants
smKeyForceKeyScriptBit

A flag that specifies to force keyboard script switching.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeyForceKeyScriptMask

A mask that specifies to force keyboard script switching.

Available in Mac OS X v10.0 and later.

Declared in Script.h

Keyboard Script Values

Specify actions for keyboard scripts.

enum {
   smKeyNextScript = -1,
   smKeySysScript = -2,
   smKeySwapScript = -3,
   smKeyNextKybd = -4,
   smKeySwapKybd = -5,
   smKeyDisableKybds = -6,
   smKeyEnableKybds = -7,
   smKeyToggleInline = -8,
   smKeyToggleDirection = -9,
   smKeyNextInputMethod = -10,
   smKeySwapInputMethod = -11,
   smKeyDisableKybdSwitch = -12,
   smKeySetDirLeftRight = -15,
   smKeySetDirRightLeft = -16,
   smKeyRoman = -17
};

Constants
smKeyNextScript

Specifies to switch to the next available script.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeySysScript

Specfiies to switch to the system script.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeySwapScript

Specifies to switch to the previously-used script

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeyNextKybd

Specifies to switch to the next keyboard in current keyscript.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeySwapKybd

Specfies to switch to a previously-used keyboard in the current keyscript.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeyDisableKybds

Specifies to disable keyboards not in the system or Roman script.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeyEnableKybds

Specifies to enable keyboards for all enabled scripts.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeyToggleInline

Specifies to toggle inline input for the current keyscript

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeyToggleDirection

Specifies to toggle the default line direction (TESysJust).

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeyNextInputMethod

Specfies to switch to the next input method in the current keyscript.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeySwapInputMethod

Specfies to switch to the last-used input method in the current keyscript.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeyDisableKybdSwitch

Specfies to disable switching from the current keyboard.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeySetDirLeftRight

Specfies to set the default line direction to left-right, align left.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeySetDirRightLeft

Specfies to set the default line direction to right-left, align right.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKeyRoman

Specfies to set the keyscript to Roman. Does nothing if on a Roman-only system. This is unlike KeyScript(smRoman) which forces an update to current default Roman keyboard. See KeyScript documentation for more information.

Available in Mac OS X v10.0 and later.

Declared in Script.h

Keyboard Synchronization Mask

Disables font and keyboard script synchronization mask

enum {
   smfDisableKeyScriptSyncMask = 1L << smfDisableKeyScriptSync
};

Constants
smfDisableKeyScriptSyncMask

Disable font and keyboard script synchronization mask

Available in Mac OS X v10.0 and later.

Declared in Script.h

Discussion

Meta Script Codes

Specify implicit script codes.

enum {
   smSystemScript = -1,
   smCurrentScript = -2,
   smAllScripts = -3
};

Constants
smSystemScript

Specifies the system script.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCurrentScript

Specifies the font script.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smAllScripts

Specfies any script.

Available in Mac OS X v10.0 and later.

Declared in Script.h

Discussion

You can specify script systems with implicit and explicit script code constants in the script parameter of the GetScriptVariable and SetScriptVariable functions. The implicit script codes smSystemScript and smCurrentScript are special negative values for the system script and the font script, respectively.

Negative Verbs

Specify special negative verbs that were associated with WorldScript I.

enum {
   smLayoutCache = -309,
   smOldVerbSupport = -311,
   smSetKashidas = -291,
   smSetKashProp = -287,
   smScriptSysBase = -281,
   smScriptAppBase = -283,
   smScriptFntBase = -285,
   smScriptLigatures = -263,
   smScriptNumbers = -267
};

Constants
smLayoutCache

Specifies that HiWrd(param) is the number of entries, LoWrd is the maximum input length

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smOldVerbSupport

Specifies that a parameter is added to old verbs to map to WorldScript I verb.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smSetKashidas

Specifies parameter is on or off; obsolete verb = -36.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smSetKashProp

Specifies parameter is kashida proportion; obsolete verb = -32.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smScriptSysBase

Specifies parameter is associated font to use with the system font; obsolete verb = -26)

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smScriptAppBase

Specifies parameter is associated font to use with application font; obsolete verb = -28.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smScriptFntBase

Specifies that a parameter is associated font to use with all other fonts; obsolete verb = -30.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smScriptLigatures

Obsolete verb = -8.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smScriptNumbers

Obsolete verb = -12.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

Numeral Codes

Specify the kinds of numerals used by a script.

enum {
   intWestern = 0,
   intArabic = 1,
   intRoman = 2,
   intJapanese = 3,
   intEuropean = 4,
   intOutputMask = 0x8000
};

Constants
intWestern

Specifies Western numerals.

Available in Mac OS X v10.0 and later.

Declared in Script.h

intArabic

Specifies Native Arabic numerals.

Available in Mac OS X v10.0 and later.

Declared in Script.h

intRoman

Specifies Roman numerals.

Available in Mac OS X v10.0 and later.

Declared in Script.h

intJapanese

Specifies Japanese numerals.

Available in Mac OS X v10.0 and later.

Declared in Script.h

intEuropean

Specifies European numerals.

Available in Mac OS X v10.0 and later.

Declared in Script.h

intOutputMask

Specifies an output mask.

Available in Mac OS X v10.0 and later.

Declared in Script.h

Discussion

These constants specify bit numbers, not masks.

Script Redraw Selectors

Specify values for script redraw flags.

enum {
   smRedrawChar = 0,
   smRedrawWord = 1,
   smRedrawLine = -1
};

Constants
smRedrawChar

Specifies to redraw character only.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smRedrawWord

Specifies to redraw entire word (double-byte systems).

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smRedrawLine

Specifies to redraw entire line (bidirectional systems).

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

Script Codes

Specify Mac OS encodings that are related to a FOND ID range.

enum {
   smRoman = 0,
   smJapanese = 1,
   smTradChinese = 2,
   smKorean = 3,
   smArabic = 4,
   smHebrew = 5,
   smGreek = 6,
   smCyrillic = 7,
   smRSymbol = 8,
   smDevanagari = 9,
   smGurmukhi = 10,
   smGujarati = 11,
   smOriya = 12,
   smBengali = 13,
   smTamil = 14,
   smTelugu = 15,
   smKannada = 16,
   smMalayalam = 17,
   smSinhalese = 18,
   smBurmese = 19,
   smKhmer = 20,
   smThai = 21,
   smLao = 22,
   smGeorgian = 23,
   smArmenian = 24,
   smSimpChinese = 25,
   smTibetan = 26,
   smMongolian = 27,
   smEthiopic = 28,
   smGeez = 28,
   smCentralEuroRoman = 29,
   smVietnamese = 30,
   smExtArabic = 31,
   smUninterp = 32
};

Constants
smRoman

Specifies the Roman script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smJapanese

Specifies the Japanese script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smTradChinese

Specifies the traditional Chinese script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKorean

Specifies the Korean script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smArabic

Specifies the Arabic script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smHebrew

Specifies the Hebrew script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smGreek

Specifies the Greek script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCyrillic

Specifies the Cyrillic script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smRSymbol

Specifies right-to-left symbols. The script code represented by the constant smRSymbol is available as an alternative to smUninterp, for representation of special symbols that have a right-to-left line direction. Note, however, that the script management system provides no direct support for representation of text with this script code.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smDevanagari

Specifies the Devanagari script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smGurmukhi

Specifies the Gurmukhi script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smGujarati

Specifies the Gujarati script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smOriya

Specifies the Oriya script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smBengali

Specifies the Bengali script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smTamil

Specifies the Tamil script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smTelugu

Specifies the Telugu script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKannada

Specifies the Kannada/Kanarese script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smMalayalam

Specifies the Malayalam script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smSinhalese

Specifies the Sinhalese script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smBurmese

Specifies the Burmese script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smKhmer

Specifies the Khmer script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smThai

Specifies the Thai script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smLao

Specifies the Laotian script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smGeorgian

Specifies the Georgian script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smArmenian

Specifies the Armenian script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smSimpChinese

Specifies the simplified Chinese script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smTibetan

Specifies the Tibetan script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smMongolian

Specifies the Mongolian script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smEthiopic

Specifies the Geez/Ethiopic script system. This constant is the same as smGeez.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smGeez

Specifies the Geez/Ethiopic script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smCentralEuroRoman

Used for Czech, Slovak, Polish, Hungarian, Baltic languages.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smVietnamese

Specifies the Extended Roman script system for Vietnamese.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smExtArabic

Specifies the extended Arabic for Sindhi script system.

Available in Mac OS X v10.0 and later.

Declared in Script.h

smUninterp

Uninterpreted symbols. The script code represented by the constant smUninterp is available for representation of special symbols, such as items in a tool palette, that must not be considered as part of any actual script system. For manipulating and drawing such symbols, the smUninterp constant should be treated as if it indicated the Roman script system rather than the system script; that is, the default behavior of uninterpreted symbols should be Roman.

Available in Mac OS X v10.0 and later.

Declared in Script.h

Script Code - Unicode Input

Specifies the extended script code for full Unicode input.

enum {
   smUnicodeScript = 0x7E
};

Script Constants

Specify constants used to get and set script variables.

enum {
   smScriptNumDate = 30,
   smScriptKeys = 32,
   smScriptIcon = 34,
   smScriptPrint = 36,
   smScriptTrap = 38,
   smScriptCreator = 40,
   smScriptFile = 42,
   smScriptName = 44,
   smScriptMonoFondSize = 78,
   smScriptPrefFondSize = 80,
   smScriptSmallFondSize = 82,
   smScriptSysFondSize = 84,
   smScriptAppFondSize = 86,
   smScriptHelpFondSize = 88,
   smScriptValidStyles = 90,
   smScriptAliasStyle = 92
};

Constants
smScriptNumDate

(2 bytes) The numeral code and calendar code for the script. The numeral code specifies the kind of numerals the script uses, and is in the high-order byte of the word the calendar code specifies the type of calendar it uses and is in the low-order byte of the word. The value of this variable is initialized from the script system’s international bundle resource. It may be changed during execution when the user selects, for example, a new calendar from a script system’s control panel. See “Numeral Codes” and “Calendar Codes” for the different codes.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smScriptKeys

(2 bytes) The resource ID of the script’s current keyboard-layout ('KCHR') resource. The keyboard-layout resource is used to map virtual key codes into the correct character codes for the script. The value of this variable is initialized from the script system’s international bundle resource. It is updated when the user selects a new keyboard layout, or when the application calls the KeyScript function. You can force a particular keyboard layout to be used with your application by setting the value of this variable and then calling KeyScript.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smScriptIcon

(2 bytes) The resource ID of the script’s keyboard icon family (resource types 'kcs#', 'kcs4', and 'kcs8'). The keyboard icon family consists of the keyboard icons displayed in the keyboard menu. The value of this variable is initialized from the script system’s international bundle resource. Note that, unlike smScriptKeys, the value of this variable is not automatically updated when the keyboard layout changes. (System software assumes that the icon family has an identical ID to the keyboard-layout resource, and usually ignores this variable.)

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smScriptPrint

(4 bytes) The print action function vector, set up by the script system (or by the Script Manager if the smsfAutoInit bit is set) when the script is initialized.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smScriptTrap

(4 bytes) A pointer to the script’s script-structure dispatch function (for internal use only).

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in Script.h

smScriptCreator

(4 bytes) The 4-character creator type for the script system’s file, that is, the file containing the script system. For the Roman script system,