[gtkada] Cairo : Binding hints for cairo_image_surface_create_from_png_stream

David SAUVAGE - AdaLabs Ltd david.sauvage at adalabs.com
Fri Sep 9 14:34:49 CEST 2011


Hi,

As those cairo services [1] do not seem to be part of the current GTKAda
bindings, I am trying to add them.

I have a pain concerning cairo_image_surface_create_from_png_stream [2],
as the cairo_read_func_t type seems to require in the Ada world a
function that would have out parameter to be able to proceed a memory
allocation for the data parameter [2] (thus, using an anonymous access
type does not seems to be sufficient).

Any tips that could help me achieve this in Ada using the current GNAT
GPL 2011 is most welcome.

Cheers,

[1]
cairo_surface_write_to_png_stream
cairo_image_surface_create_from_png_stream

http://cgit.freedesktop.org/cairo/tree/src/cairo.h

[2]
http://cairographics.org/manual/cairo-PNG-Support.html#cairo-image-surface-create-from-png-stream


-- 

David SAUVAGE

Software Agile Architect, Director
AdaLabs Ltd - Mauritius
http://adalabs.com
+230 428 18 32
skype sauvaged
BRN C10097052
VAT 27035043




More information about the gtkada mailing list