![]() |
OpenTextService |
||||
Header: | TextServices.h | Carbon status: | Supported | |
Instructs the Text Services Manager to open a text service component that a user has chosen and to associate it with a TSM document.
OSErr OpenTextService ( TSMDocumentID idocID, Component aComponent, ComponentInstance *aComponentInstance );
The identification number of a TSM document created by a prior call to the NewTSMDocument function.
A component identifier for this text service component.
Upon completion of the call, contains a pointer to a component instance. This value identifies your applications connection to a text service component. You must supply this value whenever you call the text service functions provided by the component directly.
A result code.
You can obtain the component identifier to pass in aComponent by comparing the menu item name selected by the user with the component item names in the TextServiceList structure obtained by calling GetServiceList.
The Text Services Manager opens the requested component by calling the Component Manager OpenComponent function.
If the specified text service component is already open, the Text Services Manager does not open it again and the tsmComponentAlreadyOpenErr error message is returned as a result code. Whether or not the text service is open, the Text Services Manager calls the functions InitiateTextService and ActivateTextService for the given text service and returns a valid component instance. Upon completion of the OpenTextService call, the selected text service component is initialized and active.
This function is for opening text service components other than input methods. Your application does not need to open or close input methods.
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)