<> <> <<>> 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.