Cursors.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last Edited by McGregor, June 9, 1982 3:01 pm
Last Edited by: Maxwell, January 3, 1983 12:11 pm
Doug Wyatt, April 24, 1985 10:35:13 pm PST
DIRECTORY
TerminalDefs USING [Cursor];
Cursors: CEDAR DEFINITIONS
~ BEGIN
CursorArray: TYPE ~ TerminalDefs.Cursor;
CursorHandle: TYPE ~ REF CursorRec; -- use these for user-defined cursors
CursorRec:
TYPE ~
RECORD [
info: CursorInfo,
bits: CursorArray
];
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
];
CursorType:
TYPE ~
MACHINE
DEPENDENT {
activate(0), blank(1), bullseye(2), confirm(3), crossHairsCircle(4),
ftp(5), typeKey(6), hourGlass(7), move(8), menu(9), mouseRed(10),
mouseYellow(11), mouseBlue(12), grow(13), pointDown(14), pointLeft(15),
pointRight(16), pointUp(17), questionMark(18), retry(19), scrollDown(20),
scrollLeft(21), scrollLeftRight(22), scrollRight(23), scrollUp(24),
scrollUpDown(25), textPointer(26), last(255)};
PredefinedCursor: TYPE ~ CursorType[activate..textPointer];
ClientCursor:
TYPE ~ CursorType(textPointer..last);
SetCursor: PROC [CursorType]; -- force bits into cursor bitmap (WMgr use only)
InvertCursor: PROC;
GetCursor: PROC RETURNS [CursorType];
GetCursorInfo:
PROC
RETURNS [CursorInfo];
For info on the currently displayed cursor
NewCursor:
PROC [bits: CursorArray, hotX, hotY:
INTEGER ← 0]
RETURNS [CursorType];
To roll your own cursors; allocates a new unique type
CornerSide:
TYPE ~ {upperSide, lowerSide, leftSide, rightSide, upperLeft, upperRight,
lowerLeft, lowerRight};
AddCursorCorner:
PUBLIC
PROC [cornerSide: CornerSide];
Adds lines on top, sides, or both to currently displayed cursor
END.