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

NAME

6       XtAllocateGC - obtain a sharable GC with modifiable fields
7

SYNTAX

9       #include <X11/Intrinsic.h>
10
11       GC XtAllocateGC(Widget w, Cardinal depth, XtGCMask value_mask, XGCVal‐
12              ues *values, XtGCMask dynamic_mask, XtGCMask unused_mask);
13

ARGUMENTS

15       values    Specifies the actual values for this GC.
16
17       value_mask
18                 Specifies which fields of the values are specified.
19
20       w         Specifies the widget.
21
22       depth     Specifies the depth for which the returned GC is valid, or 0.
23
24       dynamic_mask
25                 Specifies the fields of the GC that will be modified by the
26                 caller.
27
28       unused_mask
29                 Specifies the fields of the GC that will not be needed by the
30                 caller.
31

DESCRIPTION

33       The XtAllocateGC function returns a sharable GC that may be modified by
34       the client.  The screen field of the specified widget or of the nearest
35       widget ancestor of the specified object and the specified depth argu‐
36       ment supply the root and drawable depths for which the GC is to be
37       valid.  If depth is zero the depth is taken from the depth field of the
38       specified widget or of the nearest widget ancestor of the specified
39       object.
40
41       The value_mask argument specifies the fields of the GC that will be
42       initialized with the respective members of the values structure.  The
43       dynamic_mask argument specifies fields that the caller intends to mod‐
44       ify during program execution.  The caller must ensure that the corre‐
45       sponding GC field is set prior to each use of the GC. The unused_mask
46       argument specifies fields of the GC that are of no interest to the
47       caller.  The caller may make no assumptions about the contents of any
48       fields specified in unused_mask. The caller may assume that at all
49       times all fields not specified in either dynamic_mask or unused_mask
50       have their default value if not specified in value_mask or the value
51       specified by values.  If a field is specified in both value_mask and
52       dynamic_mask, the effect is as if it were specified only in
53       dynamic_mask and then immediately set to the value in values. If a
54       field is set in unused_mask and also in either value_mask or
55       dynamic_mask, the specification in unused_mask is ignored.
56
57       XtAllocateGC tries to minimize the number of unique GCs created by com‐
58       paring the arguments with those of previous calls and returning an
59       existing GC when there are no conflicts.  XtAllocateGC may modify and
60       return an existing GC if it was allocated with a nonzero unused_mask.
61

SEE ALSO

63       XtGetGC
64       X Toolkit Intrinsics - C Language Interface
65       Xlib - C Language X Interface
66
67
68
69X Version 11                      libXt 1.2.0                  XtAllocateGC(3)
Impressum