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

NAME

6       XtAllocateGC - obtain a sharable GC with modifiable fields
7

SYNTAX

9       GC XtAllocateGC(Widget w, Cardinal depth, XtGCMask value_mask, XGCVal‐
10              ues *values, XtGCMask dynamic_mask, XtGCMask unused_mask);
11

ARGUMENTS

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

DESCRIPTION

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

SEE ALSO

61       XtGetGC
62       X Toolkit Intrinsics - C Language Interface
63       Xlib - C Language X Interface
64
65
66
67X Version 11                      libXt 1.1.4                  XtAllocateGC(3)
Impressum