]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gdk-pixbuf-2.0: Fix PixbufSaveFunc and Pixbuf.save_to_callbackv bindings
authorLuca Bruno <lucabru@src.gnome.org>
Mon, 13 Jun 2011 11:33:41 +0000 (13:33 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Mon, 13 Jun 2011 11:33:41 +0000 (13:33 +0200)
Based on patch by Robert Ancell.

Fixes bug 652441.

vapi/gdk-pixbuf-2.0.vapi
vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata

index 8910a8392e444e5fd9468fdd828df9cc511b89c0..bf00ca68c010aee3b7951fc0c86d7a0c59884b54 100644 (file)
@@ -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")]
index 25ad7f59f5d49841d8d479e930cfd5c68cd92ecc..05b2d0949816ea80df0d0f6a5e8be44c1d50c3e3 100644 (file)
@@ -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"