From: Luca Bruno Date: Mon, 13 Jun 2011 11:33:41 +0000 (+0200) Subject: gdk-pixbuf-2.0: Fix PixbufSaveFunc and Pixbuf.save_to_callbackv bindings X-Git-Tag: 0.13.0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18b78abc708a7cc1c6ef5ed00a0149d2d41b131a;p=thirdparty%2Fvala.git gdk-pixbuf-2.0: Fix PixbufSaveFunc and Pixbuf.save_to_callbackv bindings Based on patch by Robert Ancell. Fixes bug 652441. --- diff --git a/vapi/gdk-pixbuf-2.0.vapi b/vapi/gdk-pixbuf-2.0.vapi index 8910a8392..bf00ca68c 100644 --- a/vapi/gdk-pixbuf-2.0.vapi +++ b/vapi/gdk-pixbuf-2.0.vapi @@ -55,7 +55,7 @@ namespace Gdk { public bool save_to_buffer ([CCode (type = "gchar**", array_length_type = "gsize")] out uint8[] buffer, string type, ...) throws GLib.Error; public bool save_to_bufferv ([CCode (type = "gchar**", array_length_type = "gsize")] out uint8[] buffer, string type, string[] option_keys, string[] option_values) throws GLib.Error; public bool save_to_callback (Gdk.PixbufSaveFunc save_func, string type, ...) throws GLib.Error; - public bool save_to_callbackv (Gdk.PixbufSaveFunc save_func, string type, string[] option_keys, string[] option_values) throws GLib.Error; + public bool save_to_callbackv (Gdk.PixbufSaveFunc save_func, string type, [CCode (array_length = false, array_null_terminated = true)] string[] option_keys, [CCode (array_length = false, array_null_terminated = true)] string[] option_values) throws GLib.Error; public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null) throws GLib.Error; public async bool save_to_stream_async (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null) throws GLib.Error; public bool savev (string filename, string type, out unowned string option_keys, out unowned string option_values) throws GLib.Error; @@ -213,12 +213,12 @@ namespace Gdk { BAD_OPTION, UNKNOWN_TYPE, UNSUPPORTED_OPERATION, - FAILED, + FAILED } [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")] public delegate void PixbufDestroyNotify ([CCode (array_length = false)] uint8[] pixels); - [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")] - public delegate bool PixbufSaveFunc (string buf, size_t count) throws GLib.Error; + [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", instance_pos = -0.9)] + public delegate bool PixbufSaveFunc ([CCode (array_length_type = "gsize")] uint8[] buf) throws GLib.Error; [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")] public const int PIXBUF_FEATURES_H; [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")] diff --git a/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata b/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata index 25ad7f59f..05b2d0949 100644 --- a/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata +++ b/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata @@ -18,8 +18,8 @@ gdk_pixbuf_save_to_buffer ellipsis="1" gdk_pixbuf_save_to_bufferv.option_keys is_array="1" gdk_pixbuf_save_to_bufferv.option_values is_array="1" gdk_pixbuf_save_to_callback ellipsis="1" -gdk_pixbuf_save_to_callbackv.option_keys is_array="1" -gdk_pixbuf_save_to_callbackv.option_values is_array="1" +gdk_pixbuf_save_to_callbackv.option_keys is_array="1" no_array_length="1" array_null_terminated="1" +gdk_pixbuf_save_to_callbackv.option_values is_array="1" no_array_length="1" array_null_terminated="1" gdk_pixbuf_scale_simple transfer_ownership="1" gdk_pixbuf_rotate_simple transfer_ownership="1" gdk_pixbuf_flip nullable="1" transfer_ownership="1" @@ -27,6 +27,9 @@ gdk_pixbuf_loader_write.buf type_name="uint8" is_array="1" array_length_type="gs gdk_pixbuf_loader_write.count hidden="1" GdkPixbufDestroyNotify.pixels type_name="uint8" is_array="1" no_array_length="1" GdkPixbufError errordomain="1" +GdkPixbufSaveFunc instance_pos="-0.9" +GdkPixbufSaveFunc.buf type_name="uint8[]" array_length_type="gsize" +GdkPixbufSaveFunc.count hidden="1" gdk_pixbuf_format_get_mime_types is_array="1" transfer_ownership="1" no_array_length="1" array_null_terminated="1" gdk_pixbuf_format_get_extensions is_array="1" transfer_ownership="1" no_array_length="1" array_null_terminated="1" GdkPixdata is_value_type="1"