[Gtk-sharp-list] Pixbuf API observations.

Charles Iliya Krempeaux charles@reptile.ca
17 Feb 2003 21:37:56 -0800


On Mon, 2003-02-17 at 17:41, Miguel de Icaza wrote:
> Hello!
>     Today I documented the Pixbuf class for Gtk# (changes are on CVS),
> and I noticed a few problems with the API.  I do not know yet how the
> API generator works, so I will not attempt to fix those (but I can fix
> things that can be manually exposed).
>     I can fill bugs if people think it is appropriate once I get a
> go/no-go on the following changes:
> * Problems
> 	* Constructor based on: gdk_pixbuf_new_from_data
> 	  	The first argument should be a "byte *data", but instead
> 	 	the generator picks `byte data'.

Wouldn't an array be better?  (Although, if you did use "byte[] data",
then you'd get the overhead of having the runtime bounds checking.)

> 	* Constructor based on gdk_pixbuf_new_from_inline
> 		The first argument should be a "byte *data", but instead
> 	 	the geneator picks "byte data".

Same comment.  Wouldn't using "byte[] data" be better?

> 	* Pixels property return value.
> 		The return value for this is `byte' instead of `byte *'
> 	* GdkRGB seems to be missing from the generated bindings.

That's probably because GdkRGB is NOT based on GObject.  It's
just a struct, if I remember correctly.  (A handwritten .cs
file likely needs to be created for it.)

See ya

     Charles Iliya Krempeaux, BSc

 Reptile Consulting & Services    604-REPTILE    http://www.reptile.ca/