Sets the layout values of a LayoutObject structure.
Layout Library (libi18n.a)
#include <sys/lc_layout.h>
int layout_object_setvalue( layout_object, values, index)
LayoutObject layout_object;
LayoutValues values;
int *index;
The layout_object_setvalue subroutine changes the current layout values of the LayoutObject structure. The layout_object parameter specifies the LayoutObject structure created by the layout_object_create subroutine. The values are written into the LayoutObject structure and may affect the behavior of subsequent layout functions.
The name field of the LayoutValueRec structure contains the name of the layout value to be set. The value field contains the actual value to be set. The value field is large enough to support all types of layout values. For more information on layout value types, see "Layout Values for the Layout Library" in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.
Upon successful completion, the layout_object_setvalue subroutine returns a value of 0. All layout values were successfully set.
If the layout_object_setvalue subroutine fails, it returns the following values:
The following example sets the TypeofText value to Implicit and the out value to Visual.
#include <sys/lc_layout.h> #include <locale.h> main() { LayoutObject plh; int RC=0; LayoutValues layout; LayoutTextDescriptor Descr; int index; RC=layout_object_create(setlocale(LC_CTYPE,""),&plh); /* create object */ if (RC) {printf("Create error !!\n"); exit(0);} layout=malloc(2*sizeof(LayoutValueRec)); /*allocate layout array*/ Descr=malloc(sizeof(LayoutTextDescriptorRec)); /* allocate text descriptor */ layout[0].name=TypeOfText; /* set name */ layout[0].value=(caddr_t)Descr; /* set value */ layout[1].name=0; /* indicate end of array */ Descr->in=TEXT_IMPLICIT; Descr->out=TEXT_VISUAL; RC=layout_object_setvalue(plh,layout,&index); if (RC) printf("SetValue error at %d!!\n",index); /* check return code */ free(layout); /* free allocated memory */ free (Descr); RC=layout_object_free(plh); /* free layout object */ if (RC) printf("Free error !!\n"); }
The layout_object_create Subroutine, layout_object_editshape or wcslayout_object_editshape Subroutine, layout_object_free Subroutine, layout_object_getvalue Subroutine, layout_object_shapeboxchars Subroutine, and layout_object_transform or wcslayout_object_transform Subroutine.
Bidirectionality and Character Shaping and National Language Support Overview in AIX 5L Version 5.2 National Language Support Guide and Reference.