[vala] gdk-pixbuf-2.0: Use metadata instead of custom defintions for Pixbuf
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] gdk-pixbuf-2.0: Use metadata instead of custom defintions for Pixbuf
- Date: Wed, 19 Oct 2016 16:43:57 +0000 (UTC)
commit f52b484954d3297ae4c3230fbe969db18eb08841
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Oct 19 18:35:13 2016 +0200
gdk-pixbuf-2.0: Use metadata instead of custom defintions for Pixbuf
vapi/gdk-pixbuf-2.0.vapi | 21 +++++++++++++--------
vapi/metadata/GdkPixbuf-2.0-custom.vala | 12 ------------
vapi/metadata/GdkPixbuf-2.0.metadata | 20 +++++++++++++++++---
3 files changed, 30 insertions(+), 23 deletions(-)
---
diff --git a/vapi/gdk-pixbuf-2.0.vapi b/vapi/gdk-pixbuf-2.0.vapi
index 94cb336..fe41048 100644
--- a/vapi/gdk-pixbuf-2.0.vapi
+++ b/vapi/gdk-pixbuf-2.0.vapi
@@ -23,7 +23,7 @@ namespace Gdk {
[Version (since = "2.32")]
public Pixbuf.from_bytes (GLib.Bytes data, Gdk.Colorspace colorspace, bool has_alpha, int
bits_per_sample, int width, int height, int rowstride);
[CCode (has_construct_function = false)]
- 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);
+ 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 (scope =
"async")] 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)]
@@ -49,11 +49,12 @@ namespace Gdk {
public Pixbuf.from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable = null)
throws GLib.Error;
[CCode (cname = "gdk_pixbuf_new_from_stream_async", has_construct_function = false)]
[Version (since = "2.24")]
- public async Pixbuf.from_stream_async (GLib.InputStream stream, GLib.Cancellable?
cancellable) throws GLib.Error;
+ public async Pixbuf.from_stream_async (GLib.InputStream stream, GLib.Cancellable? cancellable
= null) throws GLib.Error;
[CCode (has_construct_function = false)]
[Version (since = "2.14")]
public Pixbuf.from_stream_at_scale (GLib.InputStream stream, int width, int height, bool
preserve_aspect_ratio, GLib.Cancellable? cancellable = null) throws GLib.Error;
- [CCode (cname = "gdk_pixbuf_new_from_stream_at_scale_async", finish_name =
"gdk_pixbuf_new_from_stream_finish")]
+ [CCode (finish_name = "gdk_pixbuf_save_to_stream_finish", has_construct_function = false,
type = "void")]
+ [Version (since = "2.24")]
public async Pixbuf.from_stream_at_scale_async (GLib.InputStream stream, int width, int
height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable = null) throws GLib.Error;
[CCode (has_construct_function = false)]
public Pixbuf.from_xpm_data ([CCode (array_length = false, array_null_terminated = true)]
string[] data);
@@ -96,19 +97,23 @@ 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 ([CCode (array_length_type = "gsize", type = "gchar**")] out
uint8[] buffer, string type, ...) throws GLib.Error;
+ [Version (since = "2.4")]
+ public bool save_to_buffer ([CCode (array_length_cname = "buffer_size", array_length_pos =
1.5, array_length_type = "gsize")] out uint8[] buffer, string type, ...) throws GLib.Error;
[Version (since = "2.4")]
public bool save_to_bufferv ([CCode (array_length_cname = "buffer_size", array_length_pos =
1.5, array_length_type = "gsize")] out uint8[] buffer, string type, [CCode (array_length = false,
array_null_terminated = true)] string[] option_keys, [CCode (array_length = false, array_null_terminated =
true)] string[] option_values) throws GLib.Error;
- public bool save_to_callback (Gdk.PixbufSaveFunc save_func, string type, ...) throws
GLib.Error;
+ [Version (since = "2.4")]
+ public bool save_to_callback ([CCode (delegate_target_pos = 1.5)] Gdk.PixbufSaveFunc
save_func, string type, ...) throws GLib.Error;
[Version (since = "2.4")]
public bool save_to_callbackv ([CCode (delegate_target_pos = 1.5)] Gdk.PixbufSaveFunc
save_func, string type, [CCode (array_length = false, array_null_terminated = true)] string[] option_keys,
[CCode (array_length = false, array_null_terminated = true)] string[] option_values) throws GLib.Error;
+ [Version (since = "2.14")]
public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable?
cancellable = null, ...) throws GLib.Error;
[CCode (finish_name = "gdk_pixbuf_save_to_stream_finish")]
- public async bool save_to_stream_async (GLib.OutputStream stream, string type,
GLib.Cancellable? cancellable = null, ...) throws GLib.Error;
+ [Version (since = "2.24")]
+ public async void save_to_stream_async (GLib.OutputStream stream, string type,
GLib.Cancellable? cancellable = null, ...) throws GLib.Error;
[Version (since = "2.36")]
public bool save_to_streamv (GLib.OutputStream stream, string type, [CCode (array_length =
false, array_null_terminated = true)] string[] option_keys, [CCode (array_length = false,
array_null_terminated = true)] string[] option_values, GLib.Cancellable? cancellable = null) throws
GLib.Error;
[Version (since = "2.36")]
- public async void save_to_streamv_async (GLib.OutputStream stream, string type, [CCode
(array_length = false, array_null_terminated = true)] string[] option_keys, [CCode (array_length = false,
array_null_terminated = true)] string[] option_values, GLib.Cancellable? cancellable);
+ public async void save_to_streamv_async (GLib.OutputStream stream, string type, [CCode
(array_length = false, array_null_terminated = true)] string[] option_keys, [CCode (array_length = false,
array_null_terminated = true)] string[] option_values, GLib.Cancellable? cancellable = null);
public bool savev (string filename, string type, [CCode (array_length = false,
array_null_terminated = true)] string[] option_keys, [CCode (array_length = false, array_null_terminated =
true)] string[] option_values) throws GLib.Error;
public void scale (Gdk.Pixbuf dest, int dest_x, int dest_y, int dest_width, int dest_height,
double offset_x, double offset_y, double scale_x, double scale_y, Gdk.InterpType interp_type);
public Gdk.Pixbuf scale_simple (int dest_width, int dest_height, Gdk.InterpType interp_type);
@@ -143,7 +148,7 @@ namespace Gdk {
public PixbufAnimation.from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable =
null) throws GLib.Error;
[CCode (cname = "gdk_pixbuf_animation_new_from_stream_async", has_construct_function = false)]
[Version (since = "2.28")]
- public async PixbufAnimation.from_stream_async (GLib.InputStream stream, GLib.Cancellable?
cancellable) throws GLib.Error;
+ public async PixbufAnimation.from_stream_async (GLib.InputStream stream, GLib.Cancellable?
cancellable = null) throws GLib.Error;
public int get_height ();
public Gdk.PixbufAnimationIter get_iter (GLib.TimeVal? start_time);
public unowned Gdk.Pixbuf get_static_image ();
diff --git a/vapi/metadata/GdkPixbuf-2.0-custom.vala b/vapi/metadata/GdkPixbuf-2.0-custom.vala
index fe5b3ef..34bb18b 100644
--- a/vapi/metadata/GdkPixbuf-2.0-custom.vala
+++ b/vapi/metadata/GdkPixbuf-2.0-custom.vala
@@ -1,7 +1,5 @@
namespace Gdk {
public class Pixbuf : GLib.Object {
- [CCode (has_construct_function = false)]
- 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, cname = "gdk_pixbuf_new_from_data")]
public Pixbuf.with_unowned_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);
[Version (deprecated_since = "vala-0.18", replacement = "Pixbuf.from_stream_async")]
@@ -10,16 +8,6 @@ namespace Gdk {
[Version (deprecated_since = "vala-0.18", replacement = "Pixbuf.from_stream_at_scale_async")]
[CCode (cname = "gdk_pixbuf_new_from_stream_at_scale_async", finish_name =
"gdk_pixbuf_new_from_stream_finish")]
public static async Gdk.Pixbuf new_from_stream_at_scale_async (GLib.InputStream stream, int
width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable = null) throws GLib.Error;
- [CCode (cname = "gdk_pixbuf_new_from_stream_at_scale_async", finish_name =
"gdk_pixbuf_new_from_stream_finish")]
- public async Pixbuf.from_stream_at_scale_async (GLib.InputStream stream, int width, int
height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable = null) throws GLib.Error;
- [CCode (has_construct_function = false)]
- public Pixbuf.subpixbuf (Gdk.Pixbuf src_pixbuf, int src_x, int src_y, int width, int height);
- public bool save (string filename, string type, ...) throws GLib.Error;
- public bool save_to_buffer ([CCode (array_length_type = "gsize", type = "gchar**")] out
uint8[] buffer, string type, ...) throws GLib.Error;
- public bool save_to_callback (Gdk.PixbufSaveFunc save_func, string type, ...) throws
GLib.Error;
- public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable?
cancellable = null, ...) throws GLib.Error;
- [CCode (finish_name = "gdk_pixbuf_save_to_stream_finish")]
- public async bool save_to_stream_async (GLib.OutputStream stream, string type,
GLib.Cancellable? cancellable = null, ...) throws GLib.Error;
}
[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", instance_pos = -0.9)]
diff --git a/vapi/metadata/GdkPixbuf-2.0.metadata b/vapi/metadata/GdkPixbuf-2.0.metadata
index 361e3bf..acc4124 100644
--- a/vapi/metadata/GdkPixbuf-2.0.metadata
+++ b/vapi/metadata/GdkPixbuf-2.0.metadata
@@ -1,7 +1,21 @@
+*.*.cancellable#parameter nullable default=null
+
Pixbuf
.new_from_xpm_data.data type="string[]"
- .new_from_stream_at_scale_async skip
- .new_subpixbuf skip
+ .new_from_stream_at_scale_async symbol_type="constructor" throws="GLib.Error"
finish_name="gdk_pixbuf_save_to_stream_finish"
+ .new_from_data.data owned
+ .new_subpixbuf symbol_type="constructor"
+ .get_file_info_async.cancellable default=()
+ .save* skip=false
+ .save throws throws="GLib.Error"
+ .save.error skip
+ .save_to_buffer throws throws="GLib.Error"
+ .save_to_buffer.error skip
+ .save_to_callback throws throws="GLib.Error"
+ .save_to_callback.error skip
+ .save_to_stream throws throws="GLib.Error"
+ .save_to_stream.error skip
+ .save_to_stream_async finish_name="gdk_pixbuf_save_to_stream_finish" throws="GLib.Error"
.save_to_stream_finish skip
// gdk-pixdata.h isn't included by gdk-pixbuf.h
@@ -11,7 +25,7 @@ Pixbuf
// default values other than null
Pixbuf
- .new_from_data skip
+ .new_from_data.destroy_fn default=GLib.free
// Bug #558620: default values
Pixbuf
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]