GNOME Bugzilla – Bug 329639
org.gnu.gtk.Image does not implement getPixbuf
Last modified: 2006-02-08 18:14:45 UTC
There is currently no way to get a pixbuf from an image, even though the gtk C bindings are in place
Created attachment 58611 [details] [review] implementation of java methods The methods for returning the image and image mask were also missing, are fixed in this patch. Also the implementation of the C methods have been changed so that they add references to the objects being returned since we do not own them.
The above patch has been committed to CVS HEAD
I'm sorry for not commenting earlier, but it seems to me that this patch is incorrect. The native side should be returning the value. I will discuss this further on IRC.
Created attachment 58947 [details] [review] Revised patch This revised patch has 2 jni methods, one for returning the image, the other for returning the bitmap
I didn't check the javadoc, but can these methods return null? I am not sure if getGObjectFromHandle() is able to deal with a null input. Otherwise, +1.
Have added checks to handle invalid calls to these functions (as per the gtk docs) and have committed the fix to CVS HEAD
Closing bug