gdk.pixbuf: workaround for an incorrect return-value in .gir for gdk_pixbuf_get_pixels (fixes #61);
parent
3f0e1ce056
commit
d557085924
|
@ -1,12 +1,14 @@
|
||||||
! Copyright (C) 2010 Anton Gorenko.
|
! Copyright (C) 2010 Anton Gorenko.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien alien.data alien.libraries alien.syntax
|
USING: alien alien.data alien.libraries alien.syntax
|
||||||
combinators gio.ffi glib.ffi gmodule.ffi gobject-introspection
|
combinators gio.ffi glib.ffi gobject-introspection
|
||||||
gobject.ffi kernel libc sequences system vocabs.loader ;
|
gobject-introspection.standard-types kernel libc
|
||||||
EXCLUDE: alien.c-types => pointer ;
|
sequences system vocabs.loader ;
|
||||||
IN: gdk.pixbuf.ffi
|
IN: gdk.pixbuf.ffi
|
||||||
|
|
||||||
|
<<
|
||||||
"gio.ffi" require
|
"gio.ffi" require
|
||||||
|
>>
|
||||||
|
|
||||||
LIBRARY: gdk.pixbuf
|
LIBRARY: gdk.pixbuf
|
||||||
|
|
||||||
|
@ -19,6 +21,13 @@ LIBRARY: gdk.pixbuf
|
||||||
|
|
||||||
GIR: vocab:gdk/pixbuf/GdkPixbuf-2.0.gir
|
GIR: vocab:gdk/pixbuf/GdkPixbuf-2.0.gir
|
||||||
|
|
||||||
|
! <workaround incorrect return-value in gir
|
||||||
|
|
||||||
|
FORGET: gdk_pixbuf_get_pixels
|
||||||
|
FUNCTION: guint8* gdk_pixbuf_get_pixels ( GdkPixbuf* pixbuf ) ;
|
||||||
|
|
||||||
|
! workaround>
|
||||||
|
|
||||||
: data>GInputStream ( data -- GInputStream )
|
: data>GInputStream ( data -- GInputStream )
|
||||||
[ malloc-byte-array &free ] [ length ] bi
|
[ malloc-byte-array &free ] [ length ] bi
|
||||||
f g_memory_input_stream_new_from_data ;
|
f g_memory_input_stream_new_from_data ;
|
||||||
|
|
Loading…
Reference in New Issue