From: Andy S. <And...@co...> - 2010-07-04 13:18:03
|
diffing dir... Fri Jul 2 10:30:22 EDT 2010 Andy Stewart <laz...@gm...> * Add widgetEvent. Ignore-this: 57d807386fa34f6323c285913c4e1cf0 { hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 205 + widgetEvent, hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 361 - +import Control.Monad.Reader (ask) +import Control.Monad.Trans (liftIO) hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2093 +-- | Rarely-used function. This function is used to emit the event signals on a widget (those signals +-- should never be emitted without using this function to do so). If you want to synthesize an event +-- though, don't use this function; instead, use 'mainDoEvent' so the event will behave as if it +-- were in the event queue. Don't synthesize expose events; instead, use 'windowInvalidateRect' +-- to invalidate a region of the window. +widgetEvent :: WidgetClass self => self -> EventM t Bool +widgetEvent widget = do + ptr <- ask + liftIO $ liftM toBool $ {#call widget_event #} (toWidget widget) (castPtr ptr) + } |