summaryrefslogtreecommitdiff
path: root/vapi/gdk-pixbuf-2.0.vapi
diff options
context:
space:
mode:
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>2012-05-24 23:35:26 -0700
committerEvan Nemerson <evan@coeus-group.com>2012-05-25 10:53:38 -0700
commitde4fd9683767b754cd77e4cf4df0c84c67ddbade (patch)
treec40520b992cc4f205d5dd1e1a85863660fa6a376 /vapi/gdk-pixbuf-2.0.vapi
parentf312f8eb30ed7e2b7c3331cf70dd71886c148207 (diff)
downloadvala-de4fd9683767b754cd77e4cf4df0c84c67ddbade.tar.gz
gdk-pixbuf-2.0: Change ownership of Pixbuf.from_data.data
This also adds a Pixbuf.take_data which behaves like the old version. This can be helpful for avoiding unnecessary copies, but is easy to get wrong. Thanks to Patryk Zawadzki <patrys@pld-linux.org> for help in finding this issue out. Fixes bug 676695.
Diffstat (limited to 'vapi/gdk-pixbuf-2.0.vapi')
-rw-r--r--vapi/gdk-pixbuf-2.0.vapi4
1 files changed, 3 insertions, 1 deletions
diff --git a/vapi/gdk-pixbuf-2.0.vapi b/vapi/gdk-pixbuf-2.0.vapi
index 0a0eaacca..ee919cdf0 100644
--- a/vapi/gdk-pixbuf-2.0.vapi
+++ b/vapi/gdk-pixbuf-2.0.vapi
@@ -16,7 +16,7 @@ namespace Gdk {
public void fill (uint32 pixel);
public Gdk.Pixbuf? flip (bool horizontal);
[CCode (has_construct_function = false)]
- public Pixbuf.from_data ([CCode (array_length = false)] uint8[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify? destroy_fn);
+ public Pixbuf.from_data ([CCode (array_length = false)] owned uint8[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, [CCode (type = "GdkPixbufDestroyNotify")] Gdk.PixbufDestroyNotify? destroy_fn = GLib.free);
[CCode (has_construct_function = false)]
public Pixbuf.from_file (string filename) throws GLib.Error;
[CCode (has_construct_function = false)]
@@ -67,6 +67,8 @@ namespace Gdk {
public Gdk.Pixbuf scale_simple (int dest_width, int dest_height, Gdk.InterpType interp_type);
[CCode (has_construct_function = false)]
public Pixbuf.subpixbuf (Gdk.Pixbuf src_pixbuf, int src_x, int src_y, int width, int height);
+ [CCode (cname = "gdk_pixbuf_new_from_data", has_construct_function = false)]
+ public Pixbuf.take_data ([CCode (array_length = false)] uint8[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, [CCode (type = "GdkPixbufDestroyNotify")] Gdk.PixbufDestroyNotify? destroy_fn = null);
public int bits_per_sample { get; construct; }
public Gdk.Colorspace colorspace { get; construct; }
public bool has_alpha { get; construct; }