[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

IMInitializeKeymap Subroutine

Purpose

Initializes the keymap associated with a specified language.

Library

Input Method Library (libIM.a)

Syntax

IMMap IMInitalizeKeymap(Name)
char *Name;

Description

The IMInitializeKeymap subroutine initializes an input method keymap (imkeymap). The IMAIXMapping and IMSimpleMapping subroutines use the imkeymap to perform mapping of keysym state modifiers to strings. The IMInitializeKeymap subroutine finds the imkeymap that performs the keysym mapping and returns an imkeymap descriptor, IMMap. The strings returned by the imkeymap mapping functions are treated as unsigned bytes.

The applications that use input methods usually do not need to manage imkeymaps separately. The imkeymaps are managed internally by input methods.

The IMInitializeKeymap subroutine searches for an imkeymap file whose name is in the form Name.im. The Name parameter is passed to the IMInitializeKeymap subroutine. The imkeymap file is accessed in the directories specified by the LOCPATH environment variable. The default location for input method files is the /usr/lib/nls/loc directory. If none of the LOCPATH directories contain the keymap method specified by the Name parameter, the default location is searched.

Note: All setuid and setgid programs will ignore the LOCPATH environment variable.

The name of the imkeymap file usually corresponds to the locale name, which is in the form Language_territory.codesest@modifier. In the AIXwindows environment, the modifier is in the form @im=modifier. The IMInitializeKeymap subroutine converts the @im= substring to @ (at sign) when searching for loadable input method files.

Parameters

Name Specifies the name of the imkeymap.

Return Values

The IMInitializeKeymap subroutine returns a descriptor of type IMMap. Returning a null value indicates the occurrence of an error. The IMMap descriptor is defined in the im.h file as the caddr_t structure. This descriptor is used for keymap manipulation functions.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Files

/usr/lib/nls/loc Contains loadable input-method files.

Related Information

The IMFreeKeymap, IMQueryLanguage subroutine.

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


[ Previous | Next | Contents | Glossary | Home | Search ]