Carbon


GetDefaultInputMethod

Header: TextServices.h Carbon status: Supported

Returns the default (input method) text service component for a given script and language.

OSErr GetDefaultInputMethod (
    Component *ts, 
    ScriptLanguageRecord *slRecordPtr
);
Parameter descriptions
ts

A pointer to the component identifier of the input method text service component that is associated with the script and language combination given in the slRecord parameter.

slRecordPtr

A pointer to a script-language structure that describes the script and language combination that is associated with the input method text service specified in the ts parameter.

function result

A result code.

DISCUSSION

The operating system uses GetDefaultInputMethod to find out which input method to activate when the user selects a new keyboard script from the Keyboard menu or by Command-key combination, or when an application calls KeyScript to change keyboard scripts.

You can use the text service component function GetScriptLanguageSupport to determine which additional scripts and languages a text service component supports.

VERSION NOTES

In versions of Japanese system software starting with KanjiTalk 7.0, if the default input method is an old (pre-KanjiTalk 7.0) non-TSM-aware method, GetDefaultInputMethod returns the error tsmInputMethodIsOldErr. In that case the ts parameter contains the script code of the old input method in its high-order word, and the reference ID of the old input method in its low-order word.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)