]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
mx-1.0: various fixes for Image.set_from_buffer/data methods
authorEvan Nemerson <evan@coeus-group.com>
Fri, 20 Jan 2012 09:22:17 +0000 (01:22 -0800)
committerEvan Nemerson <evan@coeus-group.com>
Fri, 20 Jan 2012 09:22:17 +0000 (01:22 -0800)
Fixes bug 668318.

vapi/metadata/Mx-1.0.metadata
vapi/mx-1.0.vapi

index e69b4cf1d88571a5d3d04188b534524555f7239c..226231eecc334cd01fedbadbd22c80e39a7b90cd 100644 (file)
@@ -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
index 6fd8f4850cb2641146201491f7ef4eeae134e32e..189378c264cfe1cc0973b8904a8f82794ef06d60 100644 (file)
@@ -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);