XlImplSpecialMonitor.mesa
Copyright Ó 1988, 1989, 1990, 1991, 1992 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, May 10, 1988
Christian Jacobi, April 21, 1992 2:58 pm PDT
DIRECTORY
PropList, UnsafePropList, Xl, XlEventProperties;
XlImplSpecialMonitor:
CEDAR
MONITOR
--used to be a different monitor; now isn't any more
IMPORTS PropList, UnsafePropList
EXPORTS Xl, XlEventProperties
Property procedures need separate monitor:
The same property procedures work both inside and outside a connections regular monitor...
PutEventProp:
PUBLIC
PROC [ev: Xl.Event, key:
REF, val:
REF]
RETURNS [
REF] =
TRUSTED {
event: REF Xl.EventRep ~ LOOPHOLE[ev];
RETURN [ UnsafePropList.PutProp[LOOPHOLE[@event.props], key, val] ]
};
GetEventProp:
PUBLIC
PROC [ev: Xl.Event, key:
REF]
RETURNS [
REF] =
TRUSTED {
event: REF Xl.EventRep ~ LOOPHOLE[ev];
RETURN [ UnsafePropList.GetProp[LOOPHOLE[@event.props], key] ]
};
PutConnectionProp:
PUBLIC
PROC [c: Xl.Connection, key:
REF, val:
REF] = {
[] ¬ PropList.PutProp[c.properties, key, val]
};
GetConnectionProp:
PUBLIC
PROC [c: Xl.Connection, key:
REF]
RETURNS [
REF] = {
RETURN [ PropList.GetProp[c.properties, key] ]
};
GetConnectionPropAndInit:
PUBLIC
PROC [c: Xl.Connection, key:
REF, init: Xl.InitializeProcType ]
RETURNS [val:
REF] = {
WrapInit: PropList.InitializeProcType = {
val ¬ init[NARROW[data], key]
};
val ¬ PropList.GetPropOrInit[c.properties, key, WrapInit, c].val
};
PutScreenProp:
PUBLIC
PROC [screen: Xl.Screen, key:
REF, val:
REF ¬
NIL] = {
[] ¬ PropList.PutProp[screen.properties, key, val]
};
GetScreenProp:
PUBLIC
PROC [screen: Xl.Screen, key:
REF]
RETURNS [val:
REF] = {
RETURN [ PropList.GetProp[screen.properties, key] ]
};
PutScreenDepthProp:
PUBLIC
PROC [sd: Xl.ScreenDepth, key:
REF, val:
REF ¬
NIL] = {
[] ¬ PropList.PutProp[sd.properties, key, val]
};
GetScreenDepthProp:
PUBLIC
PROC [sd: Xl.ScreenDepth, key:
REF]
RETURNS [val:
REF] = {
RETURN [ PropList.GetProp[sd.properties, key] ]
};
PutVisualTypeProp:
PUBLIC
PROC [vt: Xl.VisualType, key:
REF, val:
REF ¬
NIL] = {
[] ¬ PropList.PutProp[vt.properties, key, val]
};
GetVisualTypeProp:
PUBLIC
PROC [vt: Xl.VisualType, key:
REF]
RETURNS [val:
REF] = {
RETURN [ PropList.GetProp[vt.properties, key] ]
};
END.