Today, i see function `gtk_text_buffer_get_bounds` document:

------------------------------> document start <------------------------------
/**
 * gtk_text_buffer_get_bounds:
 * @buffer: a #GtkTextBuffer 
 * @start: iterator to initialize with first position in the buffer
 * @end: iterator to initialize with the end iterator
 *
 * Retrieves the first and last iterators in the buffer, i.e. the
 * entire buffer lies within the range [...@start,@end).
 * 
 **/
void
gtk_text_buffer_get_bounds (GtkTextBuffer *buffer,
                            GtkTextIter   *start,
                            GtkTextIter   *end)
...
------------------------------> document end   <------------------------------

So textBufferGetBounds should be

     "TextBufferClass self => self -> IO (TextIter, TextIter)", 

and not current type signature

    "TextBufferClass self => self -> TextIter -> TextIter -> IO ()"
    
return `IO ()` haven't any sense.


Below is my new implement of `textBufferGetBounds`:

------------------------------> implement start <------------------------------
textBufferGetBounds :: TextBufferClass self => self -> IO (TextIter, TextIter)
textBufferGetBounds self = do
  start <- makeEmptyTextIter
  end   <- makeEmptyTextIter
  {# call unsafe text_buffer_get_bounds #}
     (toTextBuffer self)
     start
     end
  return (start, end)
------------------------------> implement end   <------------------------------

What do you think?

  -- Andy


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to