DIRECTORY Interminal USING [CursorArray, GetMousePosition, MousePosition]; Cursors: CEDAR DEFINITIONS IMPORTS Interminal = BEGIN CursorArray: TYPE = Interminal.CursorArray; 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(64)}; 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] = INLINE {RETURN[globalInfo.type]}; GetCursorInfo: PROC RETURNS [CursorInfo] = INLINE {RETURN[globalInfo]}; globalInfo: PRIVATE CursorInfo; NewCursor: PROC [bits: CursorArray, hotX, hotY: INTEGER _ 0] RETURNS [CursorType]; CornerSide: TYPE = {upperSide, lowerSide, leftSide, rightSide, upperLeft, upperRight, lowerLeft, lowerRight}; AddCursorCorner: PUBLIC PROC [cornerSide: CornerSide] ; GetCursorCoords: PROC RETURNS [Interminal.MousePosition] = TRUSTED INLINE {RETURN[Interminal.GetMousePosition[]]}; END. :Cursors.mesa; Last Edited by McGregor, June 9, 1982 3:01 pm Last Edited by: Maxwell, January 3, 1983 12:11 pm Types: Procedural Interface: For info on the currently displayed cursor To roll your own cursors; allocates a new unique type Adds lines on top, sides, or both to currently displayed cursor Reads hardware mouse locs, mapping through hot spot of current cursor. Note that this reads the real-time value of the cursor and extreme caution should be used when interacting with clients of Inscripts, since they may be currently reading events long passed. Κ-– "cedar" style˜JšΟc;™;Jšœ1™1J™šΟk ˜ Jšœ žœ0˜@J˜—Jšœ žœžœž˜5J˜Jš™J˜Jšœ žœ˜+J˜Jšœžœžœ %˜IJ˜šœ žœžœ˜J˜J˜J˜—šœ žœžœ˜Jšœ˜+JšœžœH˜[Jšœžœ˜Jšœ žœžœ˜J˜—šœ žœžœž œ˜&J˜DJ˜AJ˜GJ˜IJ˜CJ˜-J˜Jšœžœ%˜;Jšœžœ!˜3J˜—Jš™J˜JšΟn œžœ0˜NJ˜JšŸ œžœ˜J˜Jš Ÿ œžœžœžœžœ˜Hš Ÿ œžœžœžœžœ˜GJš*™*Jšœ žœ ˜J˜—šŸ œžœ!žœžœ˜RJš5™5J˜—šœ žœE˜UJ˜J˜—šŸœžœžœ˜7Jš?™?J˜—šŸœžœžœž˜IJšœžœ!˜(Jš…™…J˜—Jšžœ˜J˜J˜—…—Δ +