XlGContextOps.mesa
Copyright Ó 1991 by Xerox Corporation. All rights reserved.
Christian Jacobi, February 20, 1991 11:06:36 am PST
Christian Jacobi, August 13, 1991 9:28 pm PDT
DIRECTORY
Xl;
XlGContextOps: CEDAR DEFINITIONS
~ BEGIN OPEN Xl;
ContextValueKey: TYPE =
MACHINE DEPENDENT { function, planeMask, foreground, background, lineWidth, lineStyle, capStyle, joinStyle, fillStyle, fillRule, tile, stipple, tileStippleXOrigin, tileStippleYOrigin, font, subwindowMode, graphicsExposures, clipXOrigin, clipYOrigin, clipMask, dashOffset, dashes, arcMode, unused23, unused24, unused25, unused26, unused27, unused28, unused29, unused30, unused31(31)};
GCValueMask: TYPE = PACKED ARRAY ContextValueKey OF BOOL;
GCID: PROC [gc: GContext, flush: BOOL ¬ TRUE] RETURNS [id: ID];
Gives access to underlaying id [for interoperability reasons].
Might return nullID if gc not yet moved to server.
Warning 2: Actual gc on server is freed when GContext on host is garbage collected; keeping id does not prevent garbage collection.
SetGContext: PROC [gc: GContext, key: ContextValueKey, value: CARD32];
Set any gc value...
Delayed until gc is actually used
FlushGContext: PROC [gc: GContext, drawable: Drawable ¬ nullDrawable, details: Details ¬ NIL];
Explicitely moves accumulated state to the server; rarely necessary. Details is ignored if no request needs to be performed, and, it may even not be fully implemented. In any case, the details fields synchronous and errorMatch are certainly implemented.
Implementor warning: This a normal procedure for clients; it grabs a monitor lock.
InvalidateGC: PROC [gc: GContext, value: ContextValueKey];
Not an X request
Tells that cached gc value is not available on server
InvalidateGCMask: PROC [gc: GContext, mask: GCValueMask ¬ ALL[TRUE]];
Not an X request
Tells that cached gc values are not available on server
ValidateGC: PROC [gc: GContext, value: ContextValueKey];
Not an X request
Tells that cached gc value is already available on server
ValidateGCMask: PROC [gc: GContext, mask: GCValueMask ¬ ALL[FALSE]];
Not an X request
Tells that cached gc values are already available on server
CopyGC: PROC [c: Connection, srcGCID, destGCID: ID, mask: GCValueMask ¬ ALL[FALSE], details: Details ¬ NIL];
This request works on ID level, assuming it is used mainly for interoperability reasons.
If used on GContext level with GCID, don't forget to "flush" src and "invalidate" dest
END.