Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xgetgcvalues(3) [hpux man page]

XGetGCValues()															    XGetGCValues()

Name
  XGetGCValues - obtain components of a given GC from Xlib's GC cache.

Synopsis
  Status XGetGCValues(display, gc, valuemask, values_return)
	Display *display;
	GC gc;
	unsigned long valuemask;
	XGCValues *values_return;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  gc	    Specifies the graphics context.

  valuemask Specifies	     which	 components	  in	   the	     GC       are	to	 be	  returned	 in	  the
	    values_return argument.  This argument is the bitwise inclusive OR of zero or more of the valid GC component mask bits.

  values_return
	    Returns the GC values in the specified XGCValues structure.

Returns
  Zero on failure, non-zero on success.

Availability
  Release 4 and later.

Description
  XGetGCValues() returns the components specified by valuemask for the specified GC.  Note that the clip mask and dash list  (represented  by
  the  GCClipMask  and GCDashList bits, respectively, in the valuemask) cannot be requested.  Also note that an invalid resource ID (with one
  or more of the three most-significant bits set to one) will be returned for GCFont, GCTile, and GCStipple if the component has  never  been
  explicitly  set  by  the client.  If the valuemask contains a valid set of GC mask bits (any of those listed in the Structures section with
  the exception of GCClipMask and GCDashList) and no error occur, XGetGCValues() sets the requested components in values_return and returns a
  non-zero status.  Otherwise, it returns a zero status.

  For more information, see Volume One, Chapter 5, The Graphics Context.

Structures
     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 */
	 int fill_rule; 	   /* EvenOddRule, WindingRule */
	 int arc_mode;		   /* ArcPieSlice, ArcChord */
	 Pixmap tile;		   /* tile pixmap for tiling operations */
	 Pixmap stipple;	   /* stipple 1 plane pixmap for stipping */
	 int ts_x_origin;	   /* offset for tile or stipple operations */
	 int ts_y_origin;
	 Font font;		   /* default text font for text operations */
	 int subwindow_mode;	   /* ClipByChildren, IncludeInferiors */
	 Bool graphics_exposures;  /* generate events on XCopyArea, XCopyPlane */
	 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;

     #define GCFunction 	     (1L<<0)
     #define GCPlaneMask	     (1L<<1)
     #define GCForeground	     (1L<<2)
     #define GCBackground	     (1L<<3)
     #define GCLineWidth	     (1L<<4)
     #define GCLineStyle	     (1L<<5)
     #define GCCapStyle 	     (1L<<6)
     #define GCJoinStyle	     (1L<<7)
     #define GCFillStyle	     (1L<<8)
     #define GCFillRule 	     (1L<<9)
     #define GCTile		     (1L<<10)
     #define GCStipple		     (1L<<11)
     #define GCTileStipXOrigin	     (1L<<12)
     #define GCTileStipYOrigin	     (1L<<13)
     #define GCFont		     (1L<<14)
     #define GCSubwindowMode	     (1L<<15)
     #define GCGraphicsExposures     (1L<<16)
     #define GCClipXOrigin	     (1L<<17)
     #define GCClipYOrigin	     (1L<<18)
     #define GCClipMask 	     (1L<<19)	 /* not valid in this call */
     #define GCDashOffset	     (1L<<20)
     #define GCDashList 	     (1L<<21)	 /* not valid in this call */
     #define GCArcMode		     (1L<<22)

See Also
  XChangeGC(), XCopyGC(), XCreateGC().

Xlib - Window Manager Hints													    XGetGCValues()
Man Page