[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

IMTextCursor Callback Subroutine


Asks the application to move the text cursor.


int IMTextCursor(IMDirectionCursorUData)
IMObject  IM;
uint  Direction;
int * Cursor;
caddr_t  UData;


The IMTextCursor subroutine is called by the Input Method when the Cursor Up or Cursor Down key is input to the IMFilter and IMLookupString subroutines.

This subroutine sets the new display cursor position in the text area to the integer pointed to by the Cursor parameter. The cursor position is relative to the top of the text area. A value of -1 indicates the cursor should not be moved.

Because the input method does not know the actual length of the screen it always treats a text string as one-dimensional (a single line). However, in the terminal emulator, the text string sometimes wraps to the next line. The IMTextCursor subroutine performs this conversion from single-line to multiline text strings. When you move the cursor up or down, the subroutine interprets the cursor position on the text string relative to the input method.

This subroutine is provided by applications that use input methods.


IM Indicates the Input Method instance.
Direction Specifies up or down.
Cursor Specifies the new cursor position or -1.
UData Specifies an argument passed by the IMCreate subroutine.

Return Values

If an error occurs, the IMTextCursor subroutine returns the IMError global variable. Otherwise, the IMNoError value is returned.

Related Information

The IMCreate (IMCreate Subroutine) subroutine, IMFilter (IMFilter Subroutine) subroutine, IMLookupString (IMLookupString Subroutine) subroutine, IMTextDraw (IMTextDraw Callback Subroutine) subroutine.

Input Methods, National Language Support Overview and Using Callbacks in AIX 5L Version 5.2 National Language Support Guide and Reference.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]