]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fixed save_to_buffer methods inside the gdk-pixbuf bindings
authorJakob Westhoff <jakob@westhoffswelt.de>
Wed, 19 May 2010 14:54:48 +0000 (16:54 +0200)
committerAdrien Bustany <abustany@gnome.org>
Thu, 20 May 2010 15:55:13 +0000 (11:55 -0400)
The gdk-pixbuf bindings were using the wrong method definiton for the
methods gdk_pixbuf_save_to_buffer and gdk_pixbuf_save_to_bufferv, which
made them unusable. This commit introduces a -custom.vala file to fix
this problem and create usable method signatures.

vapi/gdk-pixbuf-2.0.vapi
vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0-custom.vala [new file with mode: 0644]
vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata

index a667f717d44c5faf154060e0218f9500bc101f25..21622b1925bffdfc8266239f82f255d89625e830 100644 (file)
@@ -48,8 +48,8 @@ namespace Gdk {
                public Gdk.Pixbuf rotate_simple (Gdk.PixbufRotation angle);
                public void saturate_and_pixelate (Gdk.Pixbuf dest, float saturation, bool pixelate);
                public bool save (string filename, string type, ...) throws GLib.Error;
-               public bool save_to_buffer (string buffer, size_t buffer_size, string type, ...) throws GLib.Error;
-               public bool save_to_bufferv (string buffer, size_t buffer_size, string type, string[] option_keys, string[] option_values) throws GLib.Error;
+               public bool save_to_buffer ([CCode (array_length_type = "gsize")] out char[] buffer, string type, ...) throws GLib.Error;
+               public bool save_to_bufferv ([CCode (array_length_type = "gsize")] out char[] 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_stream (GLib.OutputStream stream, string type, GLib.Cancellable cancellable) throws GLib.Error;
diff --git a/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0-custom.vala b/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0-custom.vala
new file mode 100644 (file)
index 0000000..862331e
--- /dev/null
@@ -0,0 +1,28 @@
+/* gdk-pixbuf-2.0-custom.vala
+ *
+ * Copyright (C) 2010  Jakob Westhoff
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ *  Jakob Westhoff <jakob@westhoffswelt.de>
+ */
+
+namespace Gdk {
+       public class Pixbuf {
+               public bool save_to_buffer ([CCode (array_length_type = "gsize")] out char[] buffer, string type, ...) throws GLib.Error;
+               public bool save_to_bufferv ([CCode (array_length_type = "gsize")] out char[] buffer, string type, string[] option_keys, string[] option_values) throws GLib.Error;
+    }
+}
index 8411e945ac851a69cb62910bd3faccebd9cb066d..0e10878c79e1196da35b5639eead472056877557 100644 (file)
@@ -11,9 +11,8 @@ gdk_pixbuf_new_from_stream_at_scale.cancellable nullable="1"
 gdk_pixbuf_new_from_xpm_data.data is_array="1" no_array_length="1"
 gdk_pixbuf_new_from_inline.data is_array="1" no_array_length="1"
 gdk_pixbuf_save ellipsis="1"
-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_buffer hidden="1"
+gdk_pixbuf_save_to_bufferv hidden="1"
 gdk_pixbuf_save_to_callbackv.option_keys is_array="1"
 gdk_pixbuf_save_to_callbackv.option_values is_array="1"
 gdk_pixbuf_scale_simple transfer_ownership="1"