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

Technical Reference: Base Operating System and Extensions, 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 (IMCreate Subroutine) subroutine, IMFilter (IMFilter Subroutine) subroutine, IMLookupString (IMLookupString Subroutine) subroutine, IMTextDraw (IMTextDraw Callback Subroutine) subroutine.

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

Understanding Callbacks in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


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