Hi,

I am attempting to use widgetModifyBase to change the background of a 
text entry, and then restore it again later. It's not clear to me how 
the restore should be done. It looks like the function should be taking 
(Maybe Color), and indeed the comment suggests this - see below.

According to the gtk c library documentation, a null pointer for color 
should be passed in to undo previous calls.

Am I missing something, or is this an oversight in the implementation?

Thanks,

Tim


widgetModifyBase :: WidgetClass self => self
  -> StateType -- ^ @state@ - the state for which to set the base color.
  -> Color     -- ^ @color@ - the color to assign (does not need to be
               -- allocated), or @Nothing@ to undo the effect of 
previous calls
               -- to of 'widgetModifyBase'.
  -> IO ()
widgetModifyBase self state color =
   with color $ \colorPtr ->
   {# call gtk_widget_modify_base #}
     (toWidget self)
     ((fromIntegral . fromEnum) state)
     (castPtr colorPtr)


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to