Important: The information in this document is obsolete and should not be used for new development.
GetServiceList
TheGetServiceListfunction obtains a complete list of text service components of a given kind available to the user of your client application.
FUNCTION GetServiceList (numOfInterfaceTypes: Integer; supportedInterfaceTypes: InterfaceTypeList; VAR serviceInfo: TextServiceListHandle; VAR seedValue: LongInt): OSErr;
numOfInterfaceTypes- The number of interface types supported by your client application.
supportedInterfaceTypes- A list of the interface types supported by your client application. The data type
InterfaceTypeListis a simple list of 4-character (OSType) tags.serviceInfo- A handle to the text service component list data structure. If the handle is
NIL, the Text Services Manager allocates the handle; otherwise, it assumes the handle is a valid text service component list handle, as defined by theTextServiceListHandledata type.seedValue- A value that indicates whether the list of text service components returned by
GetServiceListmay have been modified. This value is returned in this parameter after the Text Services Manager calls the Component ManagerGetComponentListModSeedfunction.DESCRIPTION
When your client application callsGetServiceList, 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 theTextServiceListdata 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
GetComponentListModSeedfunction and returns the value in themodseedparameter. You can save that value and, the next time you need to draw or regenerate the list of services, call the Component ManagerGetComponentListModSeedfunction. If the seed value differs from the one you received from your last call toGetServiceList, you need to callGetServiceListonce more to update the information. Alternatively, you can simply callGetServiceListeach time you need to update the list, although that may be less efficient.
GetServiceListuses the text service component information record, defined by theTextServiceInfodata type, and the text service component list record, defined by theTextServiceListdata type.
TYPE TextServiceInfo = RECORD fComponent: Component; fItemName: Str255; END; TextServicesInfoPtr = ^TextServiceInfo;
Field Description
fComponent- A component identifier for this text service component. You can use the component identifier in Text Services Manager functions that open or obtain information about a text service component.
itemName- A Pascal string with the name of a text service component. (The script system to use for displaying the string is specified in the
componentFlagsfield of the component description record. See page 7-15.)TYPE TextServiceList = RECORD fTextServiceCount: Integer; fServices: ARRAY[0..0] of TextServiceInfo; END; TextServiceListPtr = ^TextServiceList; TextServiceListHandle = ^TextServiceListPtr;
Field Description
fTextServiceCount- An integer that provides the number of text service components in the text service component list.
fServices- A variable-length array of text service component information records.
RESULT CODES
noErr No error memFullErr Insufficient memory tsmUnsupportedTypeErr Supported type was not 'tsvc'