[vala] Fixed save_to_buffer methods inside the gdk-pixbuf bindings
- From: Adrien Bustany <abustany src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Fixed save_to_buffer methods inside the gdk-pixbuf bindings
- Date: Thu, 20 May 2010 15:59:19 +0000 (UTC)
commit 30bbee45ffa6fac001a0a1fd6b2a31fd285cf31c
Author: Jakob Westhoff <jakob westhoffswelt de>
Date: Wed May 19 16:54:48 2010 +0200
Fixed save_to_buffer methods inside the gdk-pixbuf bindings
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 | 4 +-
.../gdk-pixbuf-2.0/gdk-pixbuf-2.0-custom.vala | 28 ++++++++++++++++++++
.../gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata | 5 +--
3 files changed, 32 insertions(+), 5 deletions(-)
---
diff --git a/vapi/gdk-pixbuf-2.0.vapi b/vapi/gdk-pixbuf-2.0.vapi
index a667f71..21622b1 100644
--- a/vapi/gdk-pixbuf-2.0.vapi
+++ b/vapi/gdk-pixbuf-2.0.vapi
@@ -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
index 0000000..862331e
--- /dev/null
+++ b/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0-custom.vala
@@ -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;
+ }
+}
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 8411e94..0e10878 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
@@ -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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]