DIRECTORY ViewerClasses USING [ClickProc], TBQueue USING [Action], TiogaButtons USING [TiogaButton, TiogaButtonProc]; TBQueuePrivate: CEDAR DEFINITIONS ~ BEGIN Action: TYPE ~ TBQueue.Action; Event: TYPE ~ LIST OF Action; Queue: TYPE ~ REF QueueObj; QueueObj: TYPE ~ MONITORED RECORD [ notifier: PROCESS ฌ NIL, firstEvent: Event ฌ NIL, aborts: CARD ฌ 0, newEvent: CONDITION, stateChange: CONDITION, pushModel: BOOL, abortPending: BOOL ฌ FALSE ]; Enqueue: PROC [q: Queue, e: Event, immediate: BOOL]; MyClickInfo: TYPE ~ REF MyClickInfoObj; MyClickInfoObj: TYPE ~ RECORD [ tbProc: TiogaButtons.TiogaButtonProc, -- only one of these should be nonNIL mbProc: ViewerClasses.ClickProc, -- only one of these should be nonNIL immediate: BOOL, clientData: REF, q: Queue ]; TBUserClick: TiogaButtons.TiogaButtonProc; MBUserClick: ViewerClasses.ClickProc; END. H TBQueuePrivate.mesa Copyright ำ 1985, 1986, 1987, 1992 by Xerox Corporation. All rights reserved. Doug Wyatt, May 8, 1985 5:18:37 pm PDT Russ Atkinson (RRA) January 20, 1987 3:05:51 am PST Willie-Sue, January 26, 1987 2:11:58 pm PST Private definitions for TBQueue. A Queue represents a context for button/menu clicks or TiogaButton clicks. It contains a list of pending events. If pushModel, then notifierRunning is a BOOL that indicates whether or not a process is currently processing an event. (notifierRunning is ignored if NOT pushModel). If NOT pushModel, then newEvent is a CONDITION on which a client process may wait for the next event to occur. (newEvent is ignored if pushModel). An Action represents a single click or client-defined action. It contains the information needed to process the click when the notifier gets around to it, including all the arguments to a button proc. MyClickInfo is stored in the clientData field maintained by Viewers. Since we assign an MBQueue ClickProc and clientData with the button, we need this record to save the real clientData and ClickProc. We also save the queue, so we know the context of the click. Enqueues a primitive Event. Enqueues an event; expects clientData to be MyClickInfo with tbProc # NIL. Enqueues an event; expects clientData to be MyClickInfo with mbProc # NIL. ส•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ ฯeœC™NK™&K™3K™+—K˜Kšœ ™ ™šฯk ˜ Kšœžœ ˜ Kšœžœ ˜Kšœ žœ ˜2——K˜Kšฯnœžœž ˜!Kšœž˜K˜Kšœฎ™ฎK˜Kšœษ™ษK˜Kšœ‡™‡K˜Kšœžœ˜Kšœžœžœžœ˜K˜Kšœžœžœ ˜šœ žœž œžœ˜#Kšœ žœžœ˜Kšœžœ˜Kšœžœ˜Kšœ ž œ˜Kšœ ž œ˜Kšœ žœ˜Kšœžœž˜Kšœ˜K˜—šŸœžœ!žœ˜4K™—K˜Kšœ žœžœ˜'šœžœžœ˜Kšœ'ฯc%˜LKšœ" %˜GKšœ žœ˜Kšœ žœ˜K˜K˜K˜—K˜šŸ œ˜*KšœJ™JK™—šŸ œ˜%KšœJ™J—K˜Kšžœ˜—…—` ฤ