DIRECTORY ClassIncreek USING [Increek, SetAtLatest], Process USING [Abort], Rope USING [ROPE], TIPTables USING [TIPTable, TIPScreenCoords, TIPScreenCoordsRec, TIPTime]; TIPUser: CEDAR DEFINITIONS IMPORTS ClassIncreek, Process = BEGIN TIPClient: TYPE = REF TIPClientRec; -- Handle on a TIP input process TIPTable: TYPE = TIPTables.TIPTable; -- TIP parsing table TIPScreenCoords: TYPE = TIPTables.TIPScreenCoords; TIPScreenCoordsRec: TYPE = TIPTables.TIPScreenCoordsRec; CreateClient: PROC [notify: TIPNotifyProc _ NIL, buttons: TIPButtonProc _ NIL] RETURNS [self: TIPClient] ; DestroyClient: PROC [self: TIPClient] ; CreateParseInfo: PROC [parseTable: TIPTable _ NIL] RETURNS [new: TIPParseInfo] ; ParseOneEvent: PROC [parseInfo: TIPParseInfo] RETURNS [result: LIST OF REF ANY] ; InstantiateNewTIPTable: PROC [file: Rope.ROPE _ NIL] RETURNS [table: TIPTable] ; TransparentTIPTable: PROC RETURNS [table: TIPTable] ; InvalidTable: SIGNAL [errorMsg: Rope.ROPE]; PushTIPTable: PROC [user: TIPClient, table: TIPTable, opaque: BOOLEAN] ; PopTIPTable: PROC [user: TIPClient] RETURNS [old: TIPTable] ; DiscardTypeAhead: PROC [user: TIPClient] = TRUSTED INLINE {ClassIncreek.SetAtLatest[user.parseInfo.inCreek]}; ResetTIPContext: PROC [user: TIPClient, table: TIPTable, notify: TIPNotifyProc, interrupt: BOOLEAN _ FALSE] ; InterruptTIP: UNSAFE PROC [self: TIPUser.TIPClient] = UNCHECKED INLINE { Process.Abort[self.matcher]}; TIPClientRec: TYPE = PRIVATE RECORD [ parseInfo: TIPParseInfo, -- increeks and parse tables for matching notifyProc: TIPNotifyProc _ NIL, -- notification of table recognised events buttonProc: TIPButtonProc _ NIL, -- special button handling (for Cedar InputFocus) discardProc: TIPNotifyProc _ NIL, -- discarded actions (currently unused) matcher: PROCESS -- the parser process ]; TIPParseInfo: TYPE = REF TIPParseInfoRec; TIPParseInfoRec: TYPE = RECORD [ inCreek, localCreek, timeCreek: ClassIncreek.Increek, creekStack: ARRAY [0..10) OF ClassIncreek.Increek, tableHead: TIPTable ]; TIPNotifyProc: TYPE = PROC [results: LIST OF REF ANY] ; TIPButtonProc: TYPE = PROC [screenXY: TIPTables.TIPScreenCoords, mouseEvent: MouseEvent, state: ClassIncreek.Increek] RETURNS [consume: BOOLEAN _ FALSE] ; MouseEvent: TYPE = {buttonUp, buttonDown, motion} ; MatchProcess: PRIVATE PROC [self: TIPClient] ; TIPPredicate: TYPE = PROC RETURNS [BOOLEAN] ; RegisterTIPPredicate: PROC [key: ATOM, p: TIPPredicate]; stdChar: REF CHARACTER; stdCoords: TIPTables.TIPScreenCoords; stdTime: TIPTables.TIPTime; Start: PROC ; -- hack to fix VMSegmentsBug 8/14/81; call this before using END. HTIPUser.mesa; Last Edited by McGregor, October 21, 1982 10:16 am Last Edited by: Maxwell, January 3, 1983 11:01 am Documentation on [Indigo]TIP>TIP.documentation These two basic handles may eventually become opaque types TIPScreenCoords are used to pass the hardware cursor information. [0,0] is lower left. Creates (and FORKs) a new TIP process. Cleanly destroys a TIP process. For convenience in creating a ParseInfo from scratch given a TIP Parse Table and state, tries to parse a single event. If the first action does not match the start of a valid event, then NIL is returned. Note that the parseInfo.inCreek holds state info on CALL and RETURN. TIP tables are user-editable and normally live in the CIFS file system. Clients may instantiate new tables with this routine. An error in reading in a new table can produce the continuable InvalidTable signal. In rare cases, a client wishes to gain access to the lower level increek actions. This TIPTable always returns each action as a list of: {ClassIncreek.Increek, REF ClassIncreek.ActionBody).. Layer a new TIP table to the input device interpreter. If opaque is TRUE, then unrecognised actions will be discarded without searching the complete TIP table stack past the top entry. discard the topmost entry in the device input interpreter stack. This may cause the popped entry to be garbage-collected unless the client saves a reference to it. discard any mouse/keyboard events not yet processed Smashes a new TIP table and NotifyProc into the input device interpreter. Experts/hackers only, please. Forces TIP interpreter to top level state. Experts/hackers only, please. a user-defined predicate may be included in the enables list of a TIPTable via this association mechanism. TIP replaces $Char, $Coords, and $TIME with the following real addresses when constructing a TIPTable. Êÿ– "Mesa" style˜JšÏcA™AJšœ1™1J™šÏk ˜ Jšœ žœ˜*Jšœžœ ˜Jšœžœžœ˜Jšœ žœ:˜IJ˜—Jšœ žœžœž˜@J˜Jš5™5J˜Jš:™:J˜Jšœ žœžœ ˜DJšœ žœ˜9J˜JšW™WJšœžœ˜2Jšœžœ ˜8J˜šÏn œžœžœžœ˜NJšžœ˜Jš&™&J˜—šŸ œžœ˜'Jš™J˜—šŸœžœžœžœ˜PJš4™4J˜—šŸ œžœžœ žœžœžœžœ˜QJšÝ™ÝJ˜—š Ÿœžœ žœžœžœ˜PJšÓ™ÓJ˜—šŸœžœžœ˜5Jš¿™¿J˜—Jšœžœžœ˜+J˜šŸ œžœ,žœ˜HJš¹™¹J˜—šŸ œžœžœ˜=Jš¤™¤J˜J˜—šŸœžœž˜9J˜3Jš3™3J˜—šŸœžœ:˜OJšœ žœžœ˜JšI™IJš™J˜—š Ÿ œžœžœž œžœ˜HJšœ˜Jš*™*Jš™J˜J˜—šœžœžœžœ˜%Jšœ)˜EJšœžœ*˜KJšœžœ1˜RJšœžœ'˜IJšœ žœ˜*J˜J˜Jšœžœžœ˜)šœžœžœ˜ J˜5Jšœ žœ žœ˜2J˜J˜J˜—JšŸ œžœžœ žœžœžœžœ˜7J˜šŸ œžœžœ&˜@J˜4Jšžœ žœžœ˜$J˜Jšœ žœ#˜3J˜—JšŸ œžœžœ˜.J˜—Jš Ÿ œžœžœžœžœ˜-J˜šŸœžœžœ˜8Jšj™jJ˜—Jšf™fJ˜Jšœ žœž œ˜J˜%J˜J˜JšŸœžœ<˜JJ˜Jšžœ˜J˜J˜—…— @‡