XSetState(3X) XSetState(3X)NAME XSetState, XSetFunction, XSetPlaneMask, XSetForeground, XSetBackground - set the foreground, background, plane mask and function components of the graphic context SYNOPSIS XSetState (display, gc, foreground, background, function, plane-mask) Display *display; GC gc; unsigned long foreground, background; int function; unsigned long plane-mask; XSetFunction (display, gc, function) Display *display; GC gc; int function; XSetPlaneMask (display, gc, plane-mask) Display *display; GC gc; unsigned long plane-mask; XSetForeground (display, gc, foreground) Display *display; GC gc; unsigned long foreground; XSetBackground (display, gc, background) Display *display; GC gc; unsigned long background; DESCRIPTION The XSetState function sets the foreground, background, plane mask, and function components for the specified graph- ic context. The XSetFunction function sets the specified value in the specified graphic context. The XSetPlaneMask function sets the plane mask in the speci- fied graphic context. The XSetForeground function sets the foreground in the specified graphic context. The XSetBackground function sets the background in the specified graphic context. November, 1990 1
XSetState(3X) XSetState(3X)Arguments These functions accept the following arguments: background Specifies the background to be set for the specified graphic context. display Specifies the connection to the X server. foreground Specifies the foreground to be set for the specified graphic context. function Specifies the function to be set for the specified graphic context. gc Specifies the graphic context. plane-mask Specifies the plane mask. ERRORS BadAlloc The server failed to allocate the requested resource or server memory. BadGC A value for a GC argument does not name a defined graphic context. BadValue A numeric value falls outside the range of values accepted by the request. Unless a range is speci- fied for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error. The XSetState and XSetFunction functions can generate BadAl- loc, BadGC, and BadValue errors. The XSetPlaneMask, XSetForeground, and XSetBackground functions can generate BadAlloc and BadGC errors. SEE ALSO XCreateGC(3X) XQueryBestSize(3X), XSetArcMode(3X), XSetClipOrigin(3X), XSetFillStyle(3X), XSetFont(3X), XSetLineAttributes(3X), XSetTile(3X)Xlib - C Language Interface2 November, 1990