Carbon


GetTextServiceMenu

Header: TextServices.h Carbon status: Supported

Returns a handle to a menu belonging to a text service component.

ComponentResult GetTextServiceMenu (
    ComponentInstance ts, 
    MenuRef *serviceMenu
);
Parameter descriptions
ts

A component instance created by a prior call to the Component Manager OpenComponent function.

serviceMenu

A pointer to a menu handle (defined by the Menu Manager MenuHandle data type) for the text service component that is to be updated. The menu handle may be preallocated or it may be NULL. If the menu handle is NULL, the text service component should allocate a new menu and return it.

function result

If the text service component does not have a menu, it should return a ComponentResult value of TSMHasNoMenuErr.

DISCUSSION

If you are writing a text service component, it must implement a function for this call.

The Text Services Manager calls GetTextServiceMenu to a text service component when the component is opened or activated, so that it can put the component’s menu on the menu bar.

All instances of an input-method component must share a single menu handle, allocated in the system heap.

Client applications also may make this call, but the Text Services Manager does not play a role in the connection between the client application making the call and the text service component receiving it. If you are an application making this call, you need to know the component instance of the component whose function you are calling.

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)