[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Base Operating System and Extensions Technical Reference, Volume 1

IMTextCursor Callback Subroutine

Purpose

Asks the application to move the text cursor.

Syntax

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

Description

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.

Parameters

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.

Implementation Specifics

This subroutine is provided by applications that use input methods.

Related Information

The IMCreate subroutine, IMFilter subroutine, IMLookupString subroutine, IMTextDraw subroutine.

Input Method Overview and National Language Support Overview for Programming in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

Understanding Callbacks in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]