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

layout_object_create Subroutine

Purpose

Initializes a layout context.

Library

Layout Library (libi18n.a)

Syntax

#include <sys/lc_layout.h>
int layout_object_create (locale_name, layout_object)
const char *locale_name;
LayoutObject *layout_object;

Description

The layout_object_create subroutine creates the LayoutObject structure associated with the locale specified by the locale_name parameter. The LayoutObject structure is a symbolic link containing all the data and methods necessary to perform the layout operations on context dependent and bidirectional characters of the locale specified.

When the layout_object_create subroutine completes without errors, the layout_object parameter points to a valid LayoutObject structure that can be used by other BIDI subroutines. The returned LayoutObject structure is initialized to an initial state that defines the behavior of the BIDI subroutines. This initial state is locale dependent and is described by the layout values returned by the layout_ object_getvalue subroutine. You can change the layout values of the LayoutObject structure using the layout_object_setvalue subroutine. Any state maintained by the LayoutObject structure is independent of the current global locale set with the setlocale subroutine.

Note: If you are developing internationalized applications that may support multibyte locales, please see Use of the libcur Package in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs

Parameters

locale_name Specifies a locale. It is recommended that you use the LC_CTYPE category by calling the setlocale (LC_CTYPE,NULL) subroutine.
layout_object Points to a valid LayoutObject structure that can be used by other layout subroutines. This parameter is used only when the layout_object_create subroutine completes without errors.

The layout_object parameter is not set and a non-zero value is returned if a valid LayoutObject structure cannot be created.

Return Values

Upon successful completion, the layout_object_create subroutine returns a value of 0. The layout_object parameter points to a valid handle.

Error Codes

If the layout_object_create subroutine fails, it returns the following error codes:

LAYOUT_EINVAL The locale specified by the locale_name parameter is not available.
LAYOUT_EMFILE The OPEN_MAX value of files descriptors are currently open in the calling process.
LAYOUT_ENOMEM Insufficient storage space is available.

Implementation Specifics

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

Related Information

The layout_object_editshape subroutine, layout_object_free subroutine, layout_object_getvalue subroutine, layout_object_setvalue subroutine, layout_object_shapeboxchars subroutine, layout_object_transform subroutine.

Bidirectionality and Arabic Character Shaping 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 ]