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

NAME

6       XtSetArg, XtMergeArgLists - set and merge ArgLists
7

SYNTAX

9       int XtSetArg(Arg arg, String name, XtArgVal value);
10
11       ArgList XtMergeArgLists(ArgList args1, Cardinal num_args1, ArgList
12              args2, Cardinal num_args2);
13

ARGUMENTS

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

DESCRIPTION

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

SEE ALSO

62       XtOffset(3)
63       X Toolkit Intrinsics - C Language Interface
64       Xlib - C Language X Interface
65
66
67
68X Version 11                      libXt 1.1.5                      XtSetArg(3)
Impressum