[gtkada] Gdk.Pixbuf patch - inline data

jeff at thecreems.com jeff at thecreems.com
Tue Jan 18 04:51:24 CET 2005


Ok. I created a patch based on the approach I took for the 
inline data creation of pixbufs. I originally did not take 
the same approach as what had been done with the 
Create_Pixmap from data (which used Chars_Ptr_Array) so 
before creating this patch I looked at changing my 
approach.

After looking at it (and perhaps I am missing something) I 
find the use of a chars_ptr_array for data which is likely 
(for the foreseeable future) to be pragma Imported from C 
to be a little clumsy (since Chars_Ptr_array is 
unconstrained).

Perhaps this is a bit evil but it just seemed to me that 
using an access to an unsigned_char was an easier to use 
approach (for users of the routine). Simply declare an 
aliased variable, pragma import it and pass the 'access of 
it to the new routine.

I am certainly willing to re-work this if someone can 
explain why the Char_Ptr_array is easier to use or lends 
any real additional error checking over this approach.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixbuf_patch
Type: application/octet-stream
Size: 2259 bytes
Desc: not available
Url : /pipermail/gtkada/attachments/20050117/357a28bb/attachment.obj 


More information about the gtkada mailing list