From 3406eff147ec805a6ec881074436dc4a86a0ee41 Mon Sep 17 00:00:00 2001 From: Evan Nemerson Date: Fri, 20 Jan 2012 01:22:17 -0800 Subject: [PATCH] mx-1.0: various fixes for Image.set_from_buffer/data methods Fixes bug 668318. --- vapi/metadata/Mx-1.0.metadata | 6 ++++++ vapi/mx-1.0.vapi | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/vapi/metadata/Mx-1.0.metadata b/vapi/metadata/Mx-1.0.metadata index e69b4cf1d..226231eec 100644 --- a/vapi/metadata/Mx-1.0.metadata +++ b/vapi/metadata/Mx-1.0.metadata @@ -18,6 +18,12 @@ Table Widget .paint_background#method name="paint_background_with_defaults" +// http://bugzilla.clutter-project.org/show_bug.cgi?id=2688 +Image + .set_from_buffer*.buffer type="owned uint8[]?" array_length_idx=1 + .set_from_buffer*.buffer_free_func nullable + .set_from_data.data type="uint8[]?" + // Fixed upstream in mx 1.3.1 ButtonGroup .set_active_button.button nullable diff --git a/vapi/mx-1.0.vapi b/vapi/mx-1.0.vapi index 6fd8f4850..189378c26 100644 --- a/vapi/mx-1.0.vapi +++ b/vapi/mx-1.0.vapi @@ -531,10 +531,10 @@ namespace Mx { public uint get_scale_width_threshold (); public uint get_transition_duration (); public void set_allow_upscale (bool allow); - public bool set_from_buffer (uint8 buffer, size_t buffer_size, GLib.DestroyNotify buffer_free_func) throws GLib.Error; - public bool set_from_buffer_at_size (uint8 buffer, size_t buffer_size, GLib.DestroyNotify buffer_free_func, int width, int height) throws GLib.Error; + public bool set_from_buffer ([CCode (array_length_cname = "buffer_size", array_length_pos = 1.5, array_length_type = "gsize", type = "guchar*")] owned uint8[]? buffer, GLib.DestroyNotify? buffer_free_func) throws GLib.Error; + public bool set_from_buffer_at_size ([CCode (array_length_cname = "buffer_size", array_length_pos = 1.5, array_length_type = "gsize", type = "guchar*")] owned uint8[]? buffer, GLib.DestroyNotify? buffer_free_func, int width, int height) throws GLib.Error; public bool set_from_cogl_texture (Cogl.Handle texture); - public bool set_from_data (uint8 data, Cogl.PixelFormat pixel_format, int width, int height, int rowstride) throws GLib.Error; + public bool set_from_data ([CCode (array_length = false, type = "guchar*")] uint8[]? data, Cogl.PixelFormat pixel_format, int width, int height, int rowstride) throws GLib.Error; public bool set_from_file (string filename) throws GLib.Error; public bool set_from_file_at_size (string filename, int width, int height) throws GLib.Error; public void set_image_rotation (float rotation); -- 2.47.2