DIRECTORY CursorTypes, Imager, Rope, UserInput, ViewersWorldRefType; ViewersWorld: CEDAR DEFINITIONS = BEGIN CursorArray: TYPE = CursorTypes.CursorArray; Cursor32ArrayRef: TYPE ~ CursorTypes.Cursor32ArrayRef; Ref: TYPE = ViewersWorldRefType.Ref; GetInputHandle: PROC [viewersWorld: Ref] RETURNS [handle: UserInput.Handle]; RestartInput: PROC [viewersWorld: Ref]; SetCursorPattern: PROC [viewersWorld: Ref, deltaX, deltaY: INTEGER, cursorPattern: CursorArray, patternName: ATOM ฌ $Unnamed, cursor: REF ฌ NIL]; GetCursorPattern: PROC [viewersWorld: Ref, cursor: REF ฌ NIL] RETURNS [deltaX, deltaY: INTEGER, cursorPattern: CursorArray, patternName: ATOM]; SetBigCursorPattern: PROC [viewersWorld: Ref, deltaX, deltaY: INTEGER, cursorPattern: Cursor32ArrayRef, patternName: ATOM ฌ $Unnamed, cursor: REF ฌ NIL]; GetBigCursorPattern: PROC [viewersWorld: Ref, cursor: REF ฌ NIL] RETURNS [deltaX, deltaY: INTEGER, cursorPattern: Cursor32ArrayRef, patternName: ATOM]; IsBigCursorPattern: PROC [viewersWorld: Ref, cursor: REF ฌ NIL] RETURNS [BOOL]; BigCursorsSupported: PROC [viewersWorld: Ref] RETURNS [BOOL]; SetCursorColor: PROC [viewersWorld: Ref, color: Imager.Color, cursor: REF ฌ NIL]; GetCursorColor: PROC [viewersWorld: Ref, cursor: REF ฌ NIL] RETURNS [color: Imager.Color]; SetMousePosition: PROC [viewersWorld: Ref, x, y: INTEGER, display: REF ฌ NIL, device: REF ฌ NIL]; GetMousePosition: PROC [viewersWorld: Ref, device: REF ฌ NIL] RETURNS [x, y: INTEGER, display: REF ฌ NIL]; SetCutBuffer: PROC [viewersWorld: Ref, buffer: ATOM, data: Rope.ROPE]; GetCutBuffer: PROC [viewersWorld: Ref, buffer: ATOM] RETURNS [data: Rope.ROPE]; BlinkViewersWorld: PROC [viewersWorld: Ref, display: REF ฌ NIL, frequency: CARDINAL ฌ 750, duration: CARDINAL ฌ 500]; SetSize: PROC [viewersWorld: Ref, width, height: NAT, display: REF ฌ NIL]; GetSize: PROC [viewersWorld: Ref, display: REF ฌ NIL] RETURNS [width, height: NAT]; GetDeviceSize: PROC [viewersWorld: Ref, display: REF ฌ NIL] RETURNS [w, h: NAT]; GetWorldProp: PROC [viewersWorld: Ref, prop: REF] RETURNS [val: REF]; PutWorldProp: PROC [viewersWorld: Ref, prop: REF, val: REF]; RemWorldProp: PROC [viewersWorld: Ref, prop: REF]; RevokeColorMapIndexProc: TYPE = PROC [viewersWorld: Ref, index: CARDINAL, clientData: REF]; outOfColormapEntries: ERROR; AllocateColorMapIndex: PROC [viewersWorld: Ref, display: REF ฌ NIL, revokeIndex: RevokeColorMapIndexProc, clientData: REF ฌ NIL] RETURNS [index: CARDINAL]; FreeColorMapIndex: PROC [viewersWorld: Ref, index: CARDINAL, display: REF ฌ NIL]; SetColorMapEntry: PROC [viewersWorld: Ref, index: CARDINAL, display: REF ฌ NIL, red, green, blue: INTEGER]; GetColorMapEntry: PROC [viewersWorld: Ref, index: CARDINAL, display: REF ฌ NIL] RETURNS [red, green, blue: INTEGER]; END. B ViewersWorld.mesa Copyright ำ 1988, 1991, 1992 by Xerox Corporation. All rights reserved. Bier, August 13, 1990 3:50 pm PDT Willie-s, October 29, 1991 4:07 pm PST Christian Jacobi, March 4, 1992 5:01 pm PST Michael Plass, February 25, 1992 1:35 pm PST A big switch which allows separate implementation of viewer worlds. Input The process that takes actions from the input queue has died. Create a new one. Cursors "cursor" will be a description of which cursor's pattern to change. If cursor = NIL, the default mouse cursor is intended. [deltaX, deltaY] is the vector displacement of the lower left hand corner to the pattern from the true mouse position. Usually, these numbers will be zero or negative (see global.info in CursorsImpl.SetCursor for examples). patternName is a hint to the class implementor. It should either be $Unnamed, or it should be a distinct name for each distinct pattern -- this allows the server to tell that it has seen this pattern before without actually looking at the bits. "cursor" will be a description of which cursor's pattern to get. If cursor = NIL, the default mouse cursor is intended. [deltaX, deltaY] is the vector displacement of the lower left hand corner to the pattern from the true mouse position. Usually, these numbers will be zero or negative (see global.info in CursorsImpl.SetCursor for examples). patternName should be the same name provided to the SetCursorPatternProc or $Unnamed if the pattern did not originate from a ViewersWorld (or if the name has been forgotten). Like SetCursorPattern but sets a 32 by 32 bit cursor. Like GetCursorPattern but gets a 32 by 32 bit cursor. Returns TRUE if cursor is currently a 32 by 32 bit (instead of 16 by 16 bit) pattern. Returns TRUE is 32 by 32 bit cursors are supported by viewersWorld's class. The 1-bits of the cursor will take on the new color. The 0-bits are transparent. For now, color should be a constant color. "cursor" describes which cursor to recolor. If cursor = NIL, the default mouse cursor is intended. "cursor" describes which cursor's color to return. If cursor = NIL, the default mouse cursor is intended. Changes the hardware interpretation of the given device's position. "display" describes which display it is on. The pointing device may be a mouse, a pen, or something else. If device = NIL, the default mouse is intended. Returns the screen and coordinates on that screen of the given pointing device. "device" describes which pointing device's position to return. In fact, the pointing device may be a mouse, a pen, or something else. If device = NIL, the default mouse cursor is intended. Get user's attention. Might flash "screen" or beep. If the beep technique is used, frequency (in Hz.) and duration (in milliseconds) are proposed. If no feedback is available, does nothing. Informs ViewersWorld that it should take up the given amount of space on the named screen. Gets the values previously set by SetSize. Gets from the ViewersWorld class the width and height of the named screen. Screens are refered to by number. The main screen is screen 0. I don't know the difference between GetSize and GetDeviceSize. Ch.J. Color map stuff Called by the screen server when it can no longer guarantee that this color map index won't be mapped by other applications. clientData is the same value that was passed as clientData to AllocateColorMapIndex. raised by AllocateColorMapIndex Returns a colormap index (e.g. a number from 0 to 255 for 8-bit color maps) that the ViewersWorld can use to do color map animation. Any object drawn by placing this index in the frame buffer can be color changed by modifying the color map for that index. This index can be revoked by class implementor (e.g., if an X window is moved to a different display with a different color map). If this occurs, RevokeColorMapIndex will be called. Gives up the right to draw objects with this index. It can then be allocated to other applications. red, green, blue should be between 0 and 255. They should not be gamma-corrected. red, green, blue should be between 0 and 255. They should not be gamma-corrected. สœ•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ ฯeœ<™HKšœ!™!K™&K™+K™,K™KšœC™CK™—šฯk ˜ K˜:—K˜Kšฯn œžœž œ˜!Kšž˜K˜Kšœ žœ˜,Kšœžœ ˜6Kšœžœ˜$K˜K™K™K˜KšŸœžœžœ˜LK˜šŸ œžœ˜'K™P—K˜K™K™š Ÿœžœ%žœ+žœžœžœ˜‘KšœQะkoœ€™ิ—šŸœžœžœžœžœžœ+žœ˜KšœN œน™Š—š Ÿœžœ%žœ0žœžœžœ˜™Kšœ5™5—šŸœžœžœžœžœžœ0žœ˜—Kšœ5™5—š Ÿœžœžœžœžœžœ˜OK™U—šŸœžœžœžœ˜=KšœK™K—šŸœžœ2žœžœ˜QKšœธ œ'™โ—š Ÿœžœžœžœžœ˜ZKšœ@ œ'™j—šŸœžœžœ žœžœ žœžœ˜aKšœฝ œ ™เ—šŸœžœžœžœžœžœ žœžœ˜jKšœๅ œ'™—K™KšŸ œžœžœ žœ˜FKš Ÿ œžœžœžœ žœ˜OK˜š Ÿœžœžœžœ žœžœ˜uJ™ภ—K˜š Ÿœžœ$žœ žœžœ˜JK™ZK™—š Ÿœžœžœžœžœžœ˜SKšœ*™*—K˜š Ÿ œžœžœžœžœžœ˜PK™‹Kšœ$ŸœŸ œ™EK™—Kš Ÿ œžœžœžœžœ˜EKšŸ œžœžœžœ˜