DIRECTORY CD; CDEvents: CEDAR DEFINITIONS = BEGIN EventProc: TYPE = PROC [event: REF, design: CD.Design, x: REF] RETURNS [dont: BOOL _ FALSE]; RegisterEventProc: PROC [event: REF, proc: EventProc, filter: CD.Technology_NIL]; EventRegistration: TYPE = REF EventRegistrationRep; EventRegistrationRep: TYPE; RegisterEventType: PROC [eventName: REF] RETURNS [EventRegistration]; ProcessEvent: PROC [ev: EventRegistration, design: CD.Design, x: REF_NIL, listenToDont: BOOL _ FALSE] RETURNS [dont: BOOL]; END. dCDEvents.mesa a ChipNDale module Copyright c 1983, 1985 by Xerox Corporation. All rights reserved. by Christian Jacobi, September 16, 1983 2:11 pm last edited by Christian Jacobi, September 19, 1985 3:07:33 am PDT Events are like interrupts. Some procedure might raise an event, which will cause all the registered handlers to be called. To prevent uncontrolled calling of an event, an implementor can hide the EventRegistration. --User level --dont will abort (some) events and (sometimes) the remaining EventProcs --event is the event which caused the call --design onto which event happened --x parameter passed through from ProcessEvent, event-specific --Eventprocs must not be to much time consuming --registers a procedure which is called each time a specific event occurs --the procedure might stop certain events with the dont result --if filter#NIL, proc is only called if event occurs on design of technology=filter --event must have been previously registered with RegisterEventType --Implementor level --may raise CD.Error[doubleRegistration] and others. --the EventRegistration is the key to call ProcessEvent --if ATOM are used for eventName, include them manual in the list --on file ... see the DF file for documentation --called on certain events --can be called only if the EventRegistration is known --dont: if any one handler returned dont Κ΅˜codešœ&™&Kšœ Οmœ7™BKšœ1™1KšœC™C—K˜KšΟk œžœ˜ K˜KšΠlnœžœž œ˜Kšž˜K˜KšœΫ™ΫK˜K™ K˜šœ žœžœ žœ žœ žœžœžœžœ˜\KšœH™HKšœ*™*Kšœ"™"Kšœ>™>Kšœ/™/K˜—š Οnœžœ žœžœ žœ˜QKšœI™IKšœ>™>KšœS™SKšœC™CK˜—K˜K™K˜šœžœžœ˜3Kšœžœ˜K˜—š œžœ žœžœ˜EKšœ4™4Kšœ7™7KšœA™AKšœ/™/K˜—š  œžœ!žœ žœžœžœžœžœžœ˜|Kšœ™Kšœ6™6Kšœ(™(—K˜Kšžœ˜K˜—…— !