DIRECTORY CursorTypes, Imager, ViewerClasses, ViewersWorldRefType; MultiCursors: CEDAR DEFINITIONS = BEGIN CursorArray: TYPE ~ CursorTypes.CursorArray; CursorType: TYPE ~ ViewerClasses.CursorType; PredefinedCursor: TYPE ~ CursorType[activate..textPointer]; ClientCursor: TYPE ~ CursorType(textPointer..last); CursorInfo: TYPE ~ RECORD [ type: CursorType, -- the unique cursor type hotX: INTEGER ¬ 0, -- these define a logical "hot-spot", or "activation point" for a cursor hotY: INTEGER ¬ 0, inverted: BOOL ¬ FALSE ]; Cursor32Array: TYPE ~ CursorTypes.Cursor32Array; Cursor32ArrayRef: TYPE ~ CursorTypes.Cursor32ArrayRef; CornerSide: TYPE ~ {upperSide, lowerSide, leftSide, rightSide, upperLeft, upperRight, lowerLeft, lowerRight}; VWorld: TYPE ~ ViewersWorldRefType.Ref; SetACursorColor: PROC [color: Imager.Color, cursor: ATOM, vWorld: VWorld ¬ NIL]; GetACursorColor: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [color: Imager.Color]; InvertACursor: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL]; SetACursor: PROC [type: CursorType, cursor: ATOM, vWorld: VWorld ¬ NIL]; GetACursor: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [CursorType]; GetACursorInfo: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [CursorInfo]; NewBigCursor: PROC [bits: Cursor32ArrayRef, hotX, hotY: INTEGER ¬ 0] RETURNS [CursorType]; AddACursorCorner: PROC [cornerSide: CornerSide, cursor: ATOM, vWorld: VWorld ¬ NIL]; SetACursorOffset: PROC [deltaX, deltaY: INTEGER, enableTracking: BOOL ¬ TRUE, cursor: ATOM, vWorld: VWorld ¬ NIL]; GetACursorOffset: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [deltaX, deltaY: INTEGER, trackingEnabled: BOOL]; SetACursorPosition: PROC [posX, posY: INTEGER, enableTracking: BOOL ¬ TRUE, cursor: ATOM, vWorld: VWorld ¬ NIL]; GetACursorPosition: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [deltaX, deltaY: INTEGER, trackingEnabled: BOOL]; SetAMousePosition: PROC [x, y: INTEGER, display: REF ¬ NIL, cursor: ATOM, vWorld: VWorld ¬ NIL]; GetAMousePosition: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [x, y: INTEGER, display: REF ¬ NIL]; NewCursor: PROC [bits: CursorArray, hotX, hotY: INTEGER ¬ 0] RETURNS [CursorType]; DefaultMouseGrain: PROC RETURNS [ticks: CARD16, dots: INTEGER]; SetAMouseGrain: PROC [ticks: CARD16, dots: INTEGER, cursor: ATOM, vWorld: VWorld ¬ NIL]; SetACursorPattern: PROC [cursorPattern: CursorArray, deltaX, deltaY: INTEGER, cursor: ATOM, vWorld: VWorld ¬ NIL]; SetABigCursorPattern: PROC [cursorPattern: Cursor32ArrayRef, deltaX, deltaY: INTEGER, cursor: ATOM, vWorld: VWorld ¬ NIL]; HasBigPattern: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [BOOL]; GetACursorPattern: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [cursorPattern: CursorArray, deltaX, deltaY: INTEGER]; GetABigCursorPattern: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [cursorPattern: Cursor32ArrayRef, deltaX, deltaY: INTEGER]; SetACursorPatternOnly: PROC [cursorPattern: CursorArray, cursor: ATOM, vWorld: VWorld ¬ NIL]; SetABigCursorPatternOnly: PROC [cursorPattern: Cursor32ArrayRef, cursor: ATOM, vWorld: VWorld ¬ NIL]; GetACursorPatternOnly: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [cursorPattern: CursorArray]; GetABigCursorPatternOnly: PROC [cursor: ATOM, vWorld: VWorld ¬ NIL] RETURNS [cursorPattern: Cursor32ArrayRef]; END. Ξ MultiCursors.mesa Copyright Σ 1990, 1991, 1992 by Xerox Corporation. All rights reserved. Bier, August 13, 1990 3:42 pm PDT Willie-s, May 31, 1991 10:11 am PDT Michael Plass, February 25, 1992 12:27 pm PST Christian Jacobi, March 3, 1992 2:17 pm PST Contents: Routines to extend Viewers to handle multiple cursors and large cursors In the routines below, if cursor = NIL, the default mouse cursor is assumed. If vWorld = NIL, the default ViewersWorld in this virtual address space is assumed. red, green, and blue should be between 0 and 255. "cursor" describes which cursor to recolor. The values of red, green, and blue should not be gamma-corrected. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Swap the on bits and off bits of the cursor. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Force bits into the cursor bitmap for the given cursor (window manager use only). The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. For info on the current appearance of the given cursor. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. To roll your own cursors; allocates a new unique value of the CursorType enumerated type. Adds lines on top, sides, or both to current appearance of the given cursor. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Lower-Level Routines. Use with Care Offsets origin of cursor bitmap by the specified number of screen points. enableTracking _ FALSE to disable automatic cursor tracking. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Sets the cursor position directly to the desired value (useful for cursor gridding). enableTracking _ FALSE to disable automatic cursor tracking. Position may not be in synch with UserInput fetches. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Returns the current cursor position. Position may not be in synch with UserInput fetches. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Modifies hardware interpretation of mouse position; to be used at own peril!! This is possibly useful for locking mouse into nearby position, etc. "screen" describes which display the mouse is on. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Returns the current position, may be out of synch with UserInput fetches!! The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Recording grain hints. This are provided by higher levels at the time those levels are created. Subsequent recorded events will be entered at the specified grain. Unless the higher levels are running in more or less real time, these hints will not be too valuable. To roll your own cursors; allocates a new unique type The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Changes the cursor bit array and the offset of the hot spot. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Changes the cursor bit array and the offset of the hot spot when the cursor is 32 by 32 bits. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Fetches the cursor bit array, and the offset of the hot spot. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Fetches the cursor bit array, and the offset of the hot spot when the cursor is 32 by 32 bits. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Changes the cursor bit array. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Changes the cursor bit array when the cursor is 32 by 32 bits. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Fetches the cursor bit array. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Fetches the cursor bit array when the cursor is 32 by 32 bits. The (cursor, vWorld) pair names a particular cursor on a particular Viewers desktop. Κl•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ Οeœ<™HKšœ!™!K™#K™-K™+K™KšœR™RK™—šΟk ˜ Kšœ8˜8—K˜KšΟn œžœž œž˜'K˜Kšœ žœ˜,Kšœ žœ˜,Kšœžœ%˜;Kšœžœ!˜3šœ žœžœ˜KšœΟc˜+Kšœžœ H˜[Kšœžœ˜Kšœ žœž˜Kšœ˜K˜—K˜Kšœžœ˜0Kšœžœ ˜6šœ žœE˜UK˜K˜—Kšœžœ˜'K˜Kšœ‘™‘K˜šŸœžœžœžœ˜PKšœχ™χK˜—š Ÿœžœ žœžœžœ˜YKšœT™TK˜—šŸ œžœ žœžœ˜9Kšœ‚™‚K™—šŸ œžœžœžœ˜HKšœ§™§K˜—š Ÿ œžœ žœžœžœ˜KKšœT™T—K˜š Ÿœžœ žœžœžœ˜OKš 9œS ™K˜—šŸ œžœ&žœžœ˜ZKš >œ  ™YK˜—šŸœžœ"žœžœ˜TKš NœS ™’—K˜K™$K™šŸœžœžœžœžœ žœžœ˜rKšœ\žœ|™έK™—šŸœžœ žœžœžœžœžœ˜uKšœT™TK˜—šŸœžœžœžœžœ žœžœ˜pKšœgžœ²™žK™—šŸœžœ žœžœžœžœžœ˜wKšœ°™°K˜—šŸœžœžœ žœžœ žœžœ˜`Kšœœ™œK™—šŸœžœ žœžœžœžœ žœžœ˜iKšœ ™ K™—Kšœ‹™‹K˜šŸ œžœ!žœžœ˜RKš 5™5K˜—Kš Ÿœžœžœ žœžœ˜?š Ÿœžœ žœžœ žœžœ˜XKšœT™TK˜—š Ÿœžœ.žœ žœžœ˜rKšœ’™’K˜—š Ÿœžœ3žœ žœžœ˜zKšœ³™³K™—š Ÿ œžœ žœžœžœžœ˜HKšœT™T—K˜š Ÿœžœ žœžœžœ.žœ˜{Kšœ“™“K˜—š Ÿœžœ žœžœžœ3žœ˜ƒKšœ΄™΄K™—šŸœžœ&žœžœ˜]Kšœs™sK˜—šŸœžœ+žœžœ˜eKšœ”™”K™—š Ÿœžœ žœžœžœ˜fKšœs™sK˜—š Ÿœžœ žœžœžœ#˜nKšœ”™”—K˜Kšžœ˜K˜—…— ψ$2