![]() |
GetServiceList |
||||
Header: | TextServices.h | Carbon status: | Supported | |
Obtains a complete list of text service components of a given kind available to the user of your client application.
OSErr GetServiceList ( SInt16 numOfInterface, OSType *supportedInterfaceTypes, TextServiceListHandle *serviceInfo, SInt32 *seedValue );
The number of interface types supported by your client application.
A pointer to a list of the interface types supported by your client application. The data type InterfaceTypeList is a simple list of 4-character (OSType) tags.
A handle to the text service component list data structure. If the handle is NULL, the Text Services Manager allocates the handle; otherwise, it assumes the handle is a valid text service component list handle, as defined by the TextServiceListHandle data type.
A pointer to a value that indicates whether the list of text service components returned by GetServiceList may have been modified. This value is returned in this parameter after the Text Services Manager calls the Component Manager GetComponentListModSeed function.
A result code.
Your client application is responsible for providing a wayusually a menufor the user to choose from among all available text service components. To get a list of available text service components to display in a menu, call the GetServiceList function. Be sure to filter out input methods, because the Keyboard menu already displays them.
When your client application calls GetServiceList, the Text Services Manager locates all the text service components that support the specified interface and text service component types and creates a text service component list, defined by the TextServiceList data type, that contains an entry for each of the text service components.
It is possible to register text service components or withdraw them from registration at any time. Once it has compiled a list of text services, the Text Services Manager invokes the GetComponentListModSeed function and returns the value in the modseed parameter. You can save that value and, the next time you need to draw or regenerate the list of services, call the Component Manager GetComponentListModSeed function. If the seed value differs from the one you received from your last call to GetServiceList, you need to call GetServiceList once more to update the information. Alternatively, you can simply call GetServiceList each time you need to update the list, although that may be less efficient.
GetServiceList uses the text service component information structure, defined by the TextServiceInfo data type, and the text service component list structure, defined by the TextServiceList data type.
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)