From: Axel S. <Axe...@en...> - 2008-07-21 20:43:34
|
Well, On Jul 21, 2008, at 22:12, Brandon S. Allbery KF8NH wrote: > > On 2008 Jul 21, at 14:27, Axel Simon wrote: > >> >> On Jul 21, 2008, at 20:14, Eric wrote: >> >>> Hi all, >>> >>> I was wondering - is there a Gtk2hs equivalent to Graphics.SOE.Gtk's >>> getWindowEvent i.e. a way to intercept any event generated by a >>> window >>> (instead of just the mouse event, or the expose event, etc)? >>> >> In fact, not even Gtk+ has a signal that is called on every event. > > I'm curious: if that's so, how does Graphics.SOE.Gtk do it? > It connects to key, mouse button, mouse motion, resize and close events since that's all SOE uses. Obviously, it wouldn't be too hard to write a function that connects to all possible events of a window and displays the result. One could define such a function outside of Gtk2Hs. The attached file is a modification of the hello world demo. I realised that Event is not actually in class Show, so I added that in the darcs repository. Thus, you have to go bleeding edge to actually run the program :-( Axel. |