XlService.mesa
Copyright Ó 1988, 1991 by Xerox Corporation. All rights reserved.
Christian Jacobi, May 5, 1988 4:59:50 pm PDT
Christian Jacobi, March 7, 1991 5:06 pm PST
DIRECTORY
Xl USING [Connection, InitializeProcType];
XlService: CEDAR DEFINITIONS
~ BEGIN OPEN Xl;
A "Service" is the union of connections which share name space for X entities [e.g. windows].
A service contains only connections from the same Cedar address space. Rebooting an X server creates a new service [because it creates a new name space].
GetService:
PROC [c: Connection]
RETURNS [service:
REF];
Gets a ref representing the identity of the service.
Identities can be compared or passed to property functions
PutProp: PROC [service: REF, key: REF, val: REF ¬ NIL];
GetProp:
PROC [service:
REF, key:
REF]
RETURNS [val:
REF ¬
NIL];
These properties stay inside the Cedar address space and are NOT moved to the actual X server; therefore these properties are vanilla Cedar properties and may contain REF's. [Clients which want to store properties into the real server address space may use normal X properties on the root window [but no REF's please]]
PutServiceProp: PROC [c: Connection, key: REF, val: REF ¬ NIL];
GetServiceProp:
PROC [c: Connection, key:
REF]
RETURNS [val:
REF];
Shortcuts
GetServicePropAndInit:
PROC [c: Connection, key:
REF, init: InitializeProcType]
RETURNS [val:
REF];
Initializing utility
Atomically executes init exactly when the service has no key property, then puts the return value as key property. The c parameter is passed to init.
END.