Sets the layout values of a LayoutObject structure.
#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.
Note: Some layout values do alter internal states maintained by a LayoutObject structure.
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 Version 4.3 General Programming Concepts: Writing and Debugging Programs.
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
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 alllocated memory */ free (Descr); RC=layout_object_free(plh); /* free layout object */ if (RC) printf("Free error !!\n"); }
This subroutine is part of Base Operating System (BOS) Runtime.
The layout_object_create subroutine, layout_object_editshape subroutine, layout_object_free subroutine, layout_object_getvalue subroutine, layout_object_shapeboxchars subroutine, layout_object_transform subroutine.
Bidirectionality and Character Shaping Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
National Language Support Overview for Programming in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.