X11ViewersAccess.mesa
Copyright Ó 1989, 1991, 1993 by Xerox Corporation.  All rights reserved.
Christian Jacobi, September 6, 1989 6:04:25 pm PDT
Christian Jacobi, March 8, 1993 12:38 pm PST
 
DIRECTORY
Rope USING [ROPE],
Xl USING [Connection],
XTk USING [Widget];
 
X11ViewersAccess: CEDAR DEFINITIONS = BEGIN
Access functions
CurrentServer: PROC [] RETURNS [Rope.ROPE];
CurrentConnection: PROC [] RETURNS [Xl.Connection];
Shell: 
PROC [] 
RETURNS [XTk.Widget];
The shell might be reused (e.g. on migration) but also replaced (e.g. on error recovery) 
 
Display Modes
Among the possible display modes are
$color8
$bw
$bwX2
 
Clients must be aware that there are some more display modes, and, that not all display modes might be implemented or available on a particular screen.  The SetDisplayMode does the best it can, or, nothing if an unavailable display mode is required.
 
DBDisplayMode: 
PROC [c: Xl.Connection] 
RETURNS [
ATOM];
Ask xrdb database for display mode, returns NIL if none found.
 
BareDisplayMode: 
PROC [c: Xl.Connection] 
RETURNS [
ATOM];
Guess display mode from available connection information. 
 
ActualDisplayMode: 
PROC [] 
RETURNS [
ATOM];
Returns current mode.
 
SetDisplayMode: 
PROC [a: 
ATOM ¬ 
NIL];
Tries to set a new mode now.  NIL uses a default value. 
 
SetDefaultDisplayMode: 
PROC [a: 
ATOM ¬ 
NIL];
Defines the default behaviour of SetDisplayMode[NIL]. (E.g. used on new displays).  
NIL resets default system behaviour (ask db first, bare mode if db has no entry).
 
END.