From: Jim I. <ji...@ap...> - 2001-10-20 18:00:40
|
On Saturday, October 20, 2001, at 03:19 AM, Mats Bengtsson wrote: > > Jim Ingham wrote: >> ... I bet once you get it built your troubles will only be >> beginning, since the Mac OS X event loop and the Mac event loop and the >> Unix event loops are all totally different... Jack Jensen and I have >> discussed this a little bit, but we haven't reached any firm >> conclusions > > Don't know how the Carbon event loop works, but for QuickTimeTcl I > need a hook to the Mac event loop for processing movie playback etc. > Now this is 'Tcl_MacSetEventProc', but I think it hijacks the > event loop completely. Perhaps it would be good to allow for > more than one extension to get a hook into the mac event loop. > Probably you already thought of this. Just wanted to remind you. No, it doesn't "hijack the event loop completely". It sets the function that the Tcl event loop calls to convert a native event to a Tcl event. IIRC (Bruce and I talked about this when he first did QTTcl, but it has been a while...) you look at the events on the stream, and if you get a "Play Movie" type event you handle it specially, and otherwise you send it on to the function that was in place beforehand (TkMacConvertEvent). It would be much cleaner to have windows or subwindows register special handlers for events at the native level, than to have to re-route the whole event conversion mechanism. Another way to do this is to rely on the Handler chain mechanism in Carbon Events, and so any event that the Tk event converter doesn't recognize just gets sent up the chain, and you will have to register a Carbon Event handler to deal with it. I think something like this is what Jack needs as well. I need to take a look at QTTcl again, figure out what things you need to do, and see if I can come up with a good solution for you. I definitely want to get this working, QTTcl is a VERY cool extension. But I never did like the way it worked before, since it meant that you had to get your hands on everybodies events to do something that was specific to your window... I want to get a better answer to the "how do I build any extensions at all" question first, then I will look at this. However, if you want to give it a try in the meantime, you are more than welcome. Jim > > /Mats > > PS: For QuickTimeTcl on Windows I use the Win32 native event loop, > emulated mac events, and Tk's event loop. Just love to get > one more event loop to deal with. > > _______________________________________________ > Tcl-mac mailing list > Tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac > _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- Jim Ingham ji...@ap... Developer Tools - gdb |