Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtGetGC(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtReleaseGC(1)

 

Name

XtGetGC — obtain a read-only, shareable GC. 

Synopsis

GC XtGetGC(object, value_mask, values)

    Widget object;
    XtGCMask value_mask;
    XGCValues ∗values;

Arguments

objectSpecifies the object with which the GC is to be associated; may be of class Object or any subclass thereof. 

value_mask
Specifies which fields of the GC are to be filled in with widget data.

valuesReturns the actual values for this GC. 

Description

The Intrinsics provide a mechanism whereby widgets can share a graphics context (GC), reducing the number of GCs created and thereby improving server performance.  The mechanism is a simple caching scheme, and all GCs obtained by means of this mechanism must be treated as read-only.  If a changeable GC is needed, the Xlib XCreateGC function should be used instead. 

The XtGetGC function returns a sharable, read-only GC.  The parameters to this function are the same as those for XCreateGC except that a widget is passed instead of a display. 

XtGetGC shares only GCs in which all values in the GC are the same.  In particular, it does not use the value_mask provided to determine which fields of the GC a widget considers relevant.  value_mask is used only to tell the server which fields should be filled in with widget data and which it should fill in with default values. 

For a more rigorous account of GCs, see Volume One, Xlib Programming Manual. 

Structures

typedef unsigned long  XtGCMask; /∗ Mask of values that are used by widget∗/

typedef struct {
int function;/∗ logical operation ∗/
unsigned long plane_mask;/∗ plane mask ∗/
unsigned long foreground;/∗ foreground pixel ∗/
unsigned long background;/∗ background pixel ∗/
int line_width;/∗ line width ∗/
int line_style;/∗ LineSolid, LineOnOffDash,
   LineDoubleDash ∗/
int cap_style;/∗ CapNotLast, CapButt,
   CapRound, CapProjecting ∗/
int join_style;/∗ JoinMiter, JoinRound, JoinBevel ∗/
int fill_style;/∗ FillSolid, FillTiled,
   FillStippled, FillOpaqueStippled ∗/
int fill_rule;/∗ EvenOddRule, WindingRule ∗/
int arc_mode;/∗ ArcChord, ArcPieSlice ∗/
Pixmap tile;/∗ tile pixmap for tiling operations ∗/
Pixmap stipple;/∗ stipple 1 plane pixmap for stipping ∗/
int ts_x_origin;/∗ offset for tile or
int ts_y_origin; ∗ stipple operations ∗/
Font font;/∗ default text font for text operations ∗/
int subwindow_mode;/∗ ClipByChildren, IncludeInferiors ∗/
Bool graphics_exposures;/∗ should exposures be generated? ∗/
int clip_x_origin;/∗ origin for clipping ∗/
int clip_y_origin;
Pixmap clip_mask;/∗ bitmap clipping; other calls for rects ∗/
int dash_offset;/∗ patterned/dashed line information ∗/
char dashes;
} XGCValues;

See Also

XtReleaseGC(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026