[vala] gdk-pixbuf-2.0: Fix PixbufSaveFunc and Pixbuf.save_to_callbackv bindings



commit 18b78abc708a7cc1c6ef5ed00a0149d2d41b131a
Author: Luca Bruno <lucabru src gnome org>
Date:   Mon Jun 13 13:33:41 2011 +0200

    gdk-pixbuf-2.0: Fix PixbufSaveFunc and Pixbuf.save_to_callbackv bindings
    
    Based on patch by Robert Ancell.
    
    Fixes bug 652441.

 vapi/gdk-pixbuf-2.0.vapi                           |    8 ++++----
 .../gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata         |    7 +++++--
 2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/vapi/gdk-pixbuf-2.0.vapi b/vapi/gdk-pixbuf-2.0.vapi
index 8910a83..bf00ca6 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 25ad7f5..05b2d09 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"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]