[vala/switch-to-gir-gdkpixbuf] gdk-pixbuf-2.0: Switch to GIR



commit b3c7c58da82698b2c124aac7cb26601122519e0d
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue May 10 17:32:19 2011 +0200

    gdk-pixbuf-2.0: Switch to GIR

 vapi/gdk-pixbuf-2.0.vapi                           |  154 +++--
 vapi/metadata/GdkPixbuf-2.0.metadata               |   20 +
 .../packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.defines |    1 -
 vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.deps   |    1 -
 vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.files  |    3 -
 vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.gi     |  824 --------------------
 .../gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata         |   37 -
 .../gdk-pixbuf-2.0/gdk-pixbuf-2.0.namespace        |    1 -
 8 files changed, 114 insertions(+), 927 deletions(-)
---
diff --git a/vapi/gdk-pixbuf-2.0.vapi b/vapi/gdk-pixbuf-2.0.vapi
index 8910a83..38e0f9d 100644
--- a/vapi/gdk-pixbuf-2.0.vapi
+++ b/vapi/gdk-pixbuf-2.0.vapi
@@ -1,23 +1,22 @@
-/* gdk-pixbuf-2.0.vapi generated by vapigen, do not modify. */
+/* gdk-pixbuf-2.0.vapi generated by lt-vapigen, do not modify. */
 
 [CCode (cprefix = "Gdk", lower_case_cprefix = "gdk_", gir_namespace = "GdkPixbuf", gir_version = "2.0")]
 namespace Gdk {
-	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[CCode (type_id = "gdk_pixbuf_get_type ()", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public class Pixbuf : GLib.Object, GLib.Icon {
 		[CCode (has_construct_function = false)]
 		public Pixbuf (Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height);
-		public unowned Gdk.Pixbuf add_alpha (bool substitute_color, uchar r, uchar g, uchar b);
-		public unowned Gdk.Pixbuf apply_embedded_orientation ();
+		public Gdk.Pixbuf add_alpha (bool substitute_color, uint8 r, uint8 g, uint8 b);
+		public Gdk.Pixbuf apply_embedded_orientation ();
 		public void composite (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, int overall_alpha);
 		public void composite_color (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, int overall_alpha, int check_x, int check_y, int check_size, uint32 color1, uint32 color2);
-		public unowned Gdk.Pixbuf composite_color_simple (int dest_width, int dest_height, Gdk.InterpType interp_type, int overall_alpha, int check_size, uint32 color1, uint32 color2);
+		public Gdk.Pixbuf composite_color_simple (int dest_width, int dest_height, Gdk.InterpType interp_type, int overall_alpha, int check_size, uint32 color1, uint32 color2);
 		public Gdk.Pixbuf copy ();
 		public void copy_area (int src_x, int src_y, int width, int height, Gdk.Pixbuf dest_pixbuf, int dest_x, int dest_y);
-		public static GLib.Quark error_quark ();
 		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 (type = "guchar*", 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);
 		[CCode (has_construct_function = false)]
 		public Pixbuf.from_file (string filename) throws GLib.Error;
 		[CCode (has_construct_function = false)]
@@ -25,44 +24,36 @@ namespace Gdk {
 		[CCode (has_construct_function = false)]
 		public Pixbuf.from_file_at_size (string filename, int width, int height) throws GLib.Error;
 		[CCode (has_construct_function = false)]
-		public Pixbuf.from_inline (int data_length, [CCode (array_length = false)] uint8[] data, bool copy_pixels = true) throws GLib.Error;
+		public Pixbuf.from_inline (int data_length, [CCode (type = "guint8*", array_length = false)] uint8[] data, bool copy_pixels = true) throws GLib.Error;
 		public static unowned Gdk.Pixbuf from_pixdata (Gdk.Pixdata pixdata, bool copy_pixels) throws GLib.Error;
 		[CCode (has_construct_function = false)]
 		public Pixbuf.from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
-		[CCode (type = "void", has_construct_function = false)]
-		public async Pixbuf.from_stream_async (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
 		[CCode (has_construct_function = false)]
 		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 (type = "void", has_construct_function = false)]
-		public async Pixbuf.from_stream_at_scale_async (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable = null);
 		[CCode (has_construct_function = false)]
-		public Pixbuf.from_xpm_data ([CCode (array_length = false)] string[] data);
+		public Pixbuf.from_xpm_data (string data);
 		public int get_bits_per_sample ();
 		public Gdk.Colorspace get_colorspace ();
-		public static unowned Gdk.PixbufFormat get_file_info (string filename, out int width, out int height);
+		public static Gdk.PixbufFormat get_file_info (string filename, out int width, out int height);
 		public static GLib.SList<weak Gdk.PixbufFormat> get_formats ();
 		public bool get_has_alpha ();
 		public int get_height ();
 		public int get_n_channels ();
 		public unowned string get_option (string key);
-		[CCode (array_length = false)]
+		[CCode (array_length = false, array_null_terminated = true)]
 		public unowned uint8[] get_pixels ();
 		public int get_rowstride ();
 		public int get_width ();
+		public static unowned string gettext (string msgid);
+		public Gdk.Pixbuf new_subpixbuf (int src_x, int src_y, int width, int height);
 		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 (type = "gchar**", array_length_type = "gsize")] out uint8[] buffer, string type, ...) throws GLib.Error;
-		public bool save_to_bufferv ([CCode (type = "gchar**", array_length_type = "gsize")] out uint8[] 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 = null) throws GLib.Error;
-		public async bool save_to_stream_async (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null) throws GLib.Error;
-		public bool savev (string filename, string type, out unowned string option_keys, out unowned string option_values) 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_callbackv ([CCode (delegate_target_pos = 1.5)] Gdk.PixbufSaveFunc save_func, string type, string option_keys, string option_values) throws GLib.Error;
+		public bool savev (string filename, string type, string option_keys, 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);
-		[CCode (has_construct_function = false)]
-		public Pixbuf.subpixbuf (Gdk.Pixbuf src_pixbuf, int src_x, int src_y, int width, int height);
+		public bool set_option (string key, string value);
 		public int bits_per_sample { get; construct; }
 		public Gdk.Colorspace colorspace { get; construct; }
 		public bool has_alpha { get; construct; }
@@ -72,63 +63,80 @@ namespace Gdk {
 		public int rowstride { get; construct; }
 		public int width { get; construct; }
 	}
-	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[CCode (type_id = "gdk_pixbuf_animation_get_type ()", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public class PixbufAnimation : GLib.Object {
 		[CCode (has_construct_function = false)]
 		protected PixbufAnimation ();
 		[CCode (has_construct_function = false)]
 		public PixbufAnimation.from_file (string filename) throws GLib.Error;
 		public int get_height ();
-		public unowned Gdk.PixbufAnimationIter get_iter (GLib.TimeVal start_time);
-		public unowned Gdk.Pixbuf get_static_image ();
+		public virtual Gdk.PixbufAnimationIter get_iter (GLib.TimeVal start_time);
+		[NoWrapper]
+		public virtual void get_size (int width, int height);
+		public virtual unowned Gdk.Pixbuf get_static_image ();
 		public int get_width ();
-		public bool is_static_image ();
+		public virtual bool is_static_image ();
 	}
-	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[CCode (type_id = "gdk_pixbuf_animation_iter_get_type ()", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public class PixbufAnimationIter : GLib.Object {
 		[CCode (has_construct_function = false)]
 		protected PixbufAnimationIter ();
-		public bool advance (GLib.TimeVal current_time);
-		public int get_delay_time ();
-		public unowned Gdk.Pixbuf get_pixbuf ();
-		public bool on_currently_loading_frame ();
+		public virtual bool advance (GLib.TimeVal current_time);
+		public virtual int get_delay_time ();
+		public virtual unowned Gdk.Pixbuf get_pixbuf ();
+		public virtual bool on_currently_loading_frame ();
 	}
 	[Compact]
-	[CCode (copy_function = "gdk_pixbuf_format_copy", type_id = "GDK_TYPE_PIXBUF_FORMAT", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[CCode (copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gdk_pixbuf_format_get_type ()", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public class PixbufFormat {
-		public unowned Gdk.PixbufFormat copy ();
-		public unowned string get_description ();
+		public weak string description;
+		public bool disabled;
+		public weak string domain;
+		public weak string extensions;
+		public uint32 flags;
+		public weak string license;
+		public weak string mime_types;
+		public weak string name;
+		public Gdk.PixbufModulePattern signature;
+		public Gdk.PixbufFormat copy ();
+		public void free ();
+		public string get_description ();
 		[CCode (array_length = false, array_null_terminated = true)]
 		public string[] get_extensions ();
-		public unowned string get_license ();
+		public string get_license ();
 		[CCode (array_length = false, array_null_terminated = true)]
 		public string[] get_mime_types ();
-		public unowned string get_name ();
+		public string get_name ();
 		public bool is_disabled ();
 		public bool is_scalable ();
 		public bool is_writable ();
 		public void set_disabled (bool disabled);
 	}
-	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[CCode (type_id = "gdk_pixbuf_loader_get_type ()", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public class PixbufLoader : GLib.Object {
 		[CCode (has_construct_function = false)]
 		public PixbufLoader ();
 		public bool close () throws GLib.Error;
 		public unowned Gdk.PixbufAnimation get_animation ();
-		public unowned Gdk.PixbufFormat get_format ();
+		public Gdk.PixbufFormat get_format ();
 		public unowned Gdk.Pixbuf get_pixbuf ();
 		public void set_size (int width, int height);
 		[CCode (has_construct_function = false)]
 		public PixbufLoader.with_mime_type (string mime_type) throws GLib.Error;
 		[CCode (has_construct_function = false)]
 		public PixbufLoader.with_type (string image_type) throws GLib.Error;
-		public bool write ([CCode (array_length_type = "gsize")] uint8[] buf) throws GLib.Error;
+		public bool write (uint8 buf, size_t count) throws GLib.Error;
 		public virtual signal void area_prepared ();
 		public virtual signal void area_updated (int x, int y, int width, int height);
 		public virtual signal void closed ();
 		public virtual signal void size_prepared (int width, int height);
 	}
-	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[CCode (type_id = "gdk_pixbuf_non_anim_get_type ()", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	public class PixbufNonAnim : Gdk.PixbufAnimation {
+		[CCode (type = "GdkPixbufAnimation*", has_construct_function = false)]
+		public PixbufNonAnim (Gdk.Pixbuf pixbuf);
+	}
+	[CCode (type_id = "gdk_pixbuf_simple_anim_get_type ()", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public class PixbufSimpleAnim : Gdk.PixbufAnimation {
 		[CCode (has_construct_function = false)]
 		public PixbufSimpleAnim (int width, int height, float rate);
@@ -137,15 +145,24 @@ namespace Gdk {
 		public void set_loop (bool loop);
 		public bool loop { get; set; }
 	}
-	[Compact]
-	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
-	public class PixbufSimpleAnimClass {
-	}
-	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[CCode (type_id = "gdk_pixbuf_simple_anim_iter_get_type ()", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public class PixbufSimpleAnimIter : Gdk.PixbufAnimationIter {
 		[CCode (has_construct_function = false)]
 		protected PixbufSimpleAnimIter ();
 	}
+	[CCode (type_id = "GDK_TYPE_PIXBUF_MODULE", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	public struct PixbufModule {
+		public weak string module_name;
+		public weak string module_path;
+		public weak GLib.Module module;
+		public weak Gdk.PixbufFormat info;
+	}
+	[CCode (type_id = "GDK_TYPE_PIXBUF_MODULE_PATTERN", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	public struct PixbufModulePattern {
+		public weak string prefix;
+		public weak string mask;
+		public int relevance;
+	}
 	[CCode (type_id = "GDK_TYPE_PIXDATA", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public struct Pixdata {
 		public uint32 magic;
@@ -154,12 +171,9 @@ namespace Gdk {
 		public uint32 rowstride;
 		public uint32 width;
 		public uint32 height;
-		[CCode (array_length = false)]
-		public weak uint8[] pixel_data;
-		public bool deserialize ([CCode (array_length_pos = 0.9)] uint8[] stream) throws GLib.Error;
-		public void* from_pixbuf (Gdk.Pixbuf pixbuf, bool use_rle);
-		public uint8[] serialize ();
-		public unowned GLib.StringBuilder to_csource (string name, Gdk.PixdataDumpType dump_type);
+		public uint8 pixel_data;
+		public bool deserialize (uint stream_length, uint8 stream) throws GLib.Error;
+		public uint8 serialize (uint stream_length_p);
 	}
 	[CCode (cprefix = "GDK_COLORSPACE_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public enum Colorspace {
@@ -177,6 +191,13 @@ namespace Gdk {
 		BILEVEL,
 		FULL
 	}
+	[CCode (cprefix = "GDK_PIXBUF_FORMAT_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[Flags]
+	public enum PixbufFormatFlags {
+		WRITABLE,
+		SCALABLE,
+		THREADSAFE
+	}
 	[CCode (cprefix = "GDK_PIXBUF_ROTATE_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public enum PixbufRotation {
 		NONE,
@@ -184,7 +205,8 @@ namespace Gdk {
 		UPSIDEDOWN,
 		CLOCKWISE
 	}
-	[CCode (cprefix = "GDK_PIXDATA_DUMP_", has_type_id = false, cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[CCode (cprefix = "GDK_PIXDATA_DUMP_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[Flags]
 	public enum PixdataDumpType {
 		PIXDATA_STREAM,
 		PIXDATA_STRUCT,
@@ -195,7 +217,8 @@ namespace Gdk {
 		CONST,
 		RLE_DECODER
 	}
-	[CCode (cprefix = "GDK_PIXDATA_", has_type_id = false, cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[CCode (cprefix = "GDK_PIXDATA_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
+	[Flags]
 	public enum PixdataType {
 		COLOR_TYPE_RGB,
 		COLOR_TYPE_RGBA,
@@ -214,11 +237,22 @@ namespace Gdk {
 		UNKNOWN_TYPE,
 		UNSUPPORTED_OPERATION,
 		FAILED,
+		public static GLib.Quark quark ();
 	}
-	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
-	public delegate void PixbufDestroyNotify ([CCode (array_length = false)] uint8[] pixels);
-	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
-	public delegate bool PixbufSaveFunc (string buf, size_t count) throws GLib.Error;
+	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", has_target = false)]
+	public delegate void PixbufDestroyNotify (uint8 pixels, void* data);
+	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", has_target = false)]
+	public delegate void PixbufModuleFillInfoFunc (Gdk.PixbufFormat info);
+	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", has_target = false)]
+	public delegate void PixbufModuleFillVtableFunc (Gdk.PixbufModule module);
+	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", instance_pos = 2.9)]
+	public delegate void PixbufModulePreparedFunc (Gdk.Pixbuf pixbuf, Gdk.PixbufAnimation anim);
+	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", instance_pos = 2.9)]
+	public delegate void PixbufModuleSizeFunc (int width, int height);
+	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", instance_pos = 5.9)]
+	public delegate void PixbufModuleUpdatedFunc (Gdk.Pixbuf pixbuf, int x, int y, int width, int height);
+	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", has_target = false)]
+	public delegate bool PixbufSaveFunc (string buf, size_t count, GLib.Error error, void* data);
 	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public const int PIXBUF_FEATURES_H;
 	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
diff --git a/vapi/metadata/GdkPixbuf-2.0.metadata b/vapi/metadata/GdkPixbuf-2.0.metadata
new file mode 100644
index 0000000..2ba264d
--- /dev/null
+++ b/vapi/metadata/GdkPixbuf-2.0.metadata
@@ -0,0 +1,20 @@
+// Vala-specific
+*.*.cancellable nullable default=null
+
+// No delegates
+PixbufModule
+	.stop_load skip
+	.load_increment skip
+	.save skip
+
+// Report upstream
+Pixbuf
+	.flip nullable
+	.new_from_data.data array
+	.new_from_data.destroy_fn nullable
+	.from_pixdata skip=false
+	.new_from_inline.data array
+	.new_from_inline.copy_pixels default=true
+	.get_file_info.width out
+	.get_file_info.height out
+	.get_pixels array
\ No newline at end of file



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]