IMLookupString Subroutine

Purpose

Maps a Key/State (key symbol/state) pair to a string.

Library

Input Method Library (libIM.a)

Syntax

int IMLookupString(Im, Key, State, String, Length)
IMObject  Im;
KeySym  Key;
uint  State, * Length;
caddr_t * String;

Description

The IMLookupString subroutine is used to map a Key/State pair to a localized string. It uses an internal input method keymap (imkeymap) file to map a keysym/modifier to a string. The string returned is encoded in the same code set as the locale of IMObject and IM Front End Processor.

Note: The buffer returned from the IMLookupString subroutine is owned by the input method editor and can not continue between calls.

Parameters

Item Description
Im Specifies the input method instance.
Key Specifies the key symbol for the event.
State Defines the state for the event. A value of 0 means that the key is not redefined.
String Holds the returned string, if one exists. A null value means that no composed string is ready.
Length Defines the length string on input. If the string is not null, identifies the length returned.

Return Values

Item Description
IMError Error encountered.
IMReturnNothing No string or keysym was returned.
IMReturnString String returned.