From: Axel S. <si...@co...> - 2009-09-10 21:21:59
|
Thu Sep 10 17:19:08 EDT 2009 Axe...@en... * Add the dragStatus function and more comments. hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs.pp 84 + dragStatus, hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs.pp 181 +-- * Things become more complicated when you try to preview the dragged data, +-- as described in the documentation for 'dragMotion'. The default +-- behaviors described by flags make some assumptions, that can conflict +-- with your own signal handlers. For instance 'DestDefaultDrop' causes +-- invokations of 'dragStatus' in the handler of 'dragMotion", and +-- invokations of 'dragFinish' in 'dragDataReceived'. Especially the +-- latter is dramatic, when your own 'dragMotion' handler calls +-- 'dragGetData' to inspect the dragged data. +-- hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs.pp 593 +-- | Visualises the actions offered by the drag source. +-- +-- * This function is called by the drag destination in response to +-- 'dragMotion' called by the drag source. The passed-in action +-- is indicated where @Nothing@ will show that the drop is not +-- allowed. +-- +dragStatus :: DragContext -> Maybe DragAction -> TimeStamp -> IO () +dragStatus ctxt mAction ts = + {# call gdk_drag_status #} ctxt (maybe 0 (fromIntegral . fromEnum) mAction) + (fromIntegral ts) + [_$_] |