1XtSetArg(3)                      XT FUNCTIONS                      XtSetArg(3)
2
3
4

NAME

6       XtSetArg, XtMergeArgLists - set and merge ArgLists
7

SYNTAX

9       #include <X11/Intrinsic.h>
10
11       int XtSetArg(Arg arg, String name, XtArgVal value);
12
13       ArgList XtMergeArgLists(ArgList args1, Cardinal num_args1, ArgList
14              args2, Cardinal num_args2);
15

ARGUMENTS

17       arg       Specifies the name-value pair to set.
18
19       args1     Specifies the first ArgList.
20
21       args2     Specifies the second ArgList.
22
23       num_args1 Specifies the number of arguments in the first argument list.
24
25       num_args2 Specifies the number of arguments in the second argument
26                 list.
27
28       name      Specifies the name of the resource.
29
30       value     Specifies the value of the resource if it will fit in an
31                 XtArgVal or the address.
32

DESCRIPTION

34       The XtSetArg function is usually used in a highly stylized manner to
35       minimize the probability of making a mistake; for example:
36
37              Arg args[20];
38              int n;
39
40              n = 0;
41              XtSetArg(args[n], XtNheight, 100);      n++;
42              XtSetArg(args[n], XtNwidth, 200);       n++;
43              XtSetValues(widget, args, n);
44
45       Alternatively, an application can statically declare the argument list
46       and use XtNumber:
47
48              static Args args[] = {
49                      {XtNheight, (XtArgVal) 100},
50                      {XtNwidth, (XtArgVal) 200},
51              };
52              XtSetValues(Widget, args, XtNumber(args));
53
54       Note that you should not use auto-increment or auto-decrement within
55       the first argument to XtSetArg.  XtSetArg can be implemented as a macro
56       that dereferences the first argument twice.
57
58       The XtMergeArgLists function allocates enough storage to hold the com‐
59       bined ArgList structures and copies them into it.  Note that it does
60       not check for duplicate entries.  When it is no longer needed, free the
61       returned storage by using XtFree.
62

SEE ALSO

64       XtOffset(3)
65       X Toolkit Intrinsics - C Language Interface
66       Xlib - C Language X Interface
67
68
69
70X Version 11                      libXt 1.2.0                      XtSetArg(3)
Impressum