Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!ucdavis!csusac!unify!openlook!openlook-request From: jmck@Eng.Sun.COM (John McKernan) Newsgroups: comp.windows.open-look Subject: Re: Panels and events Message-ID: Date: 9 Nov 90 19:31:01 GMT Lines: 29 >I am assuming you are using xview in which case you can use >notify_dispatch routine in you compute routine to handle the >events that come in. Your Pause/interrupt routine could then >set a flag that could then be checked when you are in the >compute routine. > \\ \ Nolan C. Toone, Catalyst Tech Support Note that if you use notify dispatch, you can't use xv main loop. Also you can't call notify dispatch from a notify proc. An alternative is to do your drawing in an itimer function which is called every half second, or any other interval. Here's some example code for that approach: #include struct itimerval delay = {0,0,0,0}; void my_wait( seconds, funcptr ) int seconds; Notify_func (*funcptr) (); { delay.it_interval.tv_sec = seconds; delay.it_value.tv_sec = seconds; notify_set_itimer_func( frame, funcptr, ITIMER_REAL, &delay, NULL ); } John McKernan. Windows and Graphics Software, Sun Microsystems. jmck@sun.com