Important: The information in this document is obsolete and should not be used for new development.
Direct Access to Text Service Components
Your client application can bypass the Text Services Manager and communicate with text service components directly. Many of the text service component routines correspond in function to the Text Services Manager application-interface routines. It is therefore possible for a client application to use the text service component routines if it needs to exert finer control over its interaction with text service components or if it requires specific kinds of text services or server-specific knowledge. It is not recommended in most cases, because the Text Services Manager is not available to help with dispatching and housekeeping chores.Calling the Component Manager
If your client application does not use the Text Services Manager, it has to communicate with the Component Manager directly to identify and initialize individual text service components. You can use Component Manager calls to find components, set a default component, get information about components, and open components. See the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for more information.Calling Text Service Components
If your client application calls text service components directly, it uses the text service component routines, a component-level interface described under "Text Service Component Routines" on page 7-84.After opening a text service component with the
OpenComponent
orOpenDefaultComponent
function, your client application callsInitiateTextService
function to instruct the text service component to commence its operations.To inform a text service component that its associated document window is becoming active or inactive, call the
ActivateTextService
orDeactivateTextService
function.You are responsible for adding the text service component menu to your application's menu bar. Furthermore, you are responsible for either disabling the menu or removing it from your menu bar when the text service component becomes inactive. Call the
GetTextServiceMenu
function to obtain menus from each open text service component.To pass events to text service components, call the
TextServiceEvent
function. You are also responsible for allowing the text service components to control the cursor. Use theSetTextServiceCursor
function to give the text service component a chance to set the cursor.When a user makes a selection from the menu for a text service component, call the
TextServiceMenuSelect
function.You should callTextServiceMenuSelect
right after the Menu Manager routinesMenuSelect
orMenuKey
.Before closing the component, call the
TerminateTextService
function to tell the text service component to finish its operations. You should remove the text service component's menu from the menu bar when the text service component is deactivated.