XlWMOpsImpl.mesa
Copyright Ó 1988, 1991..1991 by Xerox Corporation. All rights reserved.
Christian Jacobi, April 26, 1988 8:00:18 pm PDT
Christian Jacobi, October 1, 1991 10:49 am PDT
DIRECTORY Xl, XlPrivate, XlWMOps;
XlWMOpsImpl:
CEDAR
MONITOR
LOCKS c
USING c: Connection
IMPORTS Xl, XlPrivate
EXPORTS XlWMOps
SHARES Xl, XlPrivate
~
BEGIN
OPEN Xl, XlWMOps, XlPrivate;
ChangeSaveSet:
PUBLIC
PROC [c: Connection, window: Window, op: InsertDelete, details: Details] = {
action:
PROC [c: Connection] ~ {
BInit[c, 6, ORD[op], 2];
BPutDrawable[c, window];
FinishWithDetails[c, details];
};
DoWithLocks[c, action, details];
};
Int16:
PROC [i:
INT]
RETURNS [
INT16] = {
--gracefully clip range
IF i>=0
THEN RETURN [MIN[i, LAST[INT16]]]
ELSE RETURN [MAX[i, FIRST[INT16]]]
};
SetScreenSaver:
PUBLIC
PROC [c: Connection, timeout:
INT ¬ -1, interval:
INT ¬ -1, blanking: Maybe ¬ default, exposures: Maybe ¬ default, details: Details] ~ {
action:
PROC [c: Connection] ~ {
BInit[c, 107, 0, 3];
BPutINT16[c, Int16[timeout]];
BPutINT16[c, Int16[interval]];
BPut8[c, ORD[blanking]];
BPut8[c, ORD[exposures]];
BPut16[c, 0]; --unused
FinishWithDetails[c, details];
};
DoWithLocks[c, action, details];
};
ForceScreenSaver:
PUBLIC
PROC [c: Connection, mode: ResetActivate, details: Details] ~ {
action:
PROC [c: Connection] ~ {
BInit[c, 115, ORD[mode], 1];
FinishWithDetails[c, details];
};
DoWithLocks[c, action, details];
};
SetAccessControl:
PUBLIC
PROC [c: Connection, enable:
BOOL, details: Details] ~ {
action:
PROC [c: Connection] ~ {
BInit[c, 111, IF enable THEN 1 ELSE 0, 1];
FinishWithDetails[c, details];
};
DoWithLocks[c, action, details];
};
SetCloseDownMode:
PUBLIC
PROC [c: Connection, mode: CloseDownMode, details: Details] ~ {
action:
PROC [c: Connection] ~ {
BInit[c, 112, ORD[mode], 1];
FinishWithDetails[c, details];
};
IF mode#destroy
THEN {
Xl.PutConnectionProp[c, $XlImplSomeResource, NIL]; -- Xl.CloseConnection's impl checks for this property
};
DoWithLocks[c, action, details];
};
KillClient:
PUBLIC
PROC [c: Connection, resource:
ID, details: Details] ~ {
action:
PROC [c: Connection] ~ {
BInit[c, 113, 0, 2];
BPut32[c, resource];
FinishWithDetails[c, details];
};
DoWithLocks[c, action, details];
};
END.