From: Evan Nemerson Date: Wed, 11 Mar 2009 20:47:16 +0000 (-0700) Subject: Bug 575099: Add librsvg-2.0 bindings X-Git-Tag: 0.6.0~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cbaeb09e1f5768405cd91c779dd0acf8b052198;p=thirdparty%2Fvala.git Bug 575099: Add librsvg-2.0 bindings --- diff --git a/vapi/Makefile.am b/vapi/Makefile.am index e99d409d0..b06ec5af8 100644 --- a/vapi/Makefile.am +++ b/vapi/Makefile.am @@ -101,6 +101,8 @@ dist_vapi_DATA = \ libosso.vapi \ libpanelapplet-2.0.deps \ libpanelapplet-2.0.vapi \ + librsvg-2.0.vapi \ + librsvg-2.0.deps \ libsexy.deps \ libsexy.vapi \ libsoup-2.2.vapi \ diff --git a/vapi/librsvg-2.0.deps b/vapi/librsvg-2.0.deps new file mode 100644 index 000000000..4cbbfb49e --- /dev/null +++ b/vapi/librsvg-2.0.deps @@ -0,0 +1,4 @@ +pango +cairo +gio-2.0 +gdk-pixbuf-2.0 diff --git a/vapi/librsvg-2.0.vapi b/vapi/librsvg-2.0.vapi new file mode 100644 index 000000000..38abe5456 --- /dev/null +++ b/vapi/librsvg-2.0.vapi @@ -0,0 +1,94 @@ +/* librsvg-2.0.vapi generated by lt-vapigen, do not modify. */ + +[CCode (cprefix = "Rsvg", lower_case_cprefix = "rsvg_")] +namespace Rsvg { + [Compact] + [CCode (cheader_filename = "librsvg/rsvg.h")] + public class DimensionData { + public double em; + public double ex; + public int height; + public int width; + } + [CCode (cheader_filename = "librsvg/rsvg.h")] + public class Handle : GLib.Object { + public bool close () throws GLib.Error; + public void free (); + [CCode (has_construct_function = false)] + public Handle.from_data (uchar data, size_t data_len) throws GLib.Error; + [CCode (has_construct_function = false)] + public Handle.from_file (string file_name) throws GLib.Error; + public unowned string get_base_uri (); + public unowned string get_desc (); + public void get_dimensions (Rsvg.DimensionData dimension_data); + public unowned string get_metadata (); + public unowned Gdk.Pixbuf get_pixbuf (); + public unowned Gdk.Pixbuf get_pixbuf_sub (string id); + public unowned string get_title (); + [CCode (has_construct_function = false)] + public Handle (); + public bool render_cairo (Cairo.Context cr); + public bool render_cairo_sub (Cairo.Context cr, string id); + public void set_base_uri (string base_uri); + public void set_dpi (double dpi); + public void set_dpi_x_y (double dpi_x, double dpi_y); + public void set_size_callback (owned Rsvg.SizeFunc size_func); + public bool write (uchar[] buf, size_t count) throws GLib.Error; + public string base_uri { get; set construct; } + public string desc { get; } + [NoAccessorMethod] + public double dpi_x { get; set construct; } + [NoAccessorMethod] + public double dpi_y { get; set construct; } + [NoAccessorMethod] + public double em { get; } + [NoAccessorMethod] + public double ex { get; } + [NoAccessorMethod] + public int height { get; } + public string metadata { get; } + public string title { get; } + [NoAccessorMethod] + public int width { get; } + } + [CCode (cprefix = "RSVG_ERROR_", cheader_filename = "librsvg/rsvg.h")] + public enum Error { + FAILED + } + [CCode (cheader_filename = "librsvg/rsvg.h")] + public delegate void SizeFunc (ref int width, ref int height); + [CCode (cheader_filename = "librsvg/rsvg.h")] + public const int LIBRSVG_FEATURES_H; + [CCode (cheader_filename = "librsvg/rsvg.h")] + public const int LIBRSVG_MAJOR_VERSION; + [CCode (cheader_filename = "librsvg/rsvg.h")] + public const int LIBRSVG_MICRO_VERSION; + [CCode (cheader_filename = "librsvg/rsvg.h")] + public const int LIBRSVG_MINOR_VERSION; + [CCode (cheader_filename = "librsvg/rsvg.h")] + public const string LIBRSVG_VERSION; + [CCode (cheader_filename = "librsvg/rsvg.h")] + public static GLib.Quark error_quark (); + [CCode (cheader_filename = "librsvg/rsvg.h")] + public static void init (); + [CCode (cname = "librsvg_postinit", cheader_filename = "librsvg/rsvg.h")] + public static void librsvg_postinit (void* app, void* modinfo); + [CCode (cname = "librsvg_preinit", cheader_filename = "librsvg/rsvg.h")] + public static void librsvg_preinit (void* app, void* modinfo); + [CCode (cheader_filename = "librsvg/rsvg.h")] + public static unowned Gdk.Pixbuf pixbuf_from_file (string file_name) throws GLib.Error; + [CCode (cheader_filename = "librsvg/rsvg.h")] + public static unowned Gdk.Pixbuf pixbuf_from_file_at_max_size (string file_name, int max_width, int max_height) throws GLib.Error; + [CCode (cheader_filename = "librsvg/rsvg.h")] + public static unowned Gdk.Pixbuf pixbuf_from_file_at_size (string file_name, int width, int height) throws GLib.Error; + [CCode (cheader_filename = "librsvg/rsvg.h")] + public static unowned Gdk.Pixbuf pixbuf_from_file_at_zoom (string file_name, double x_zoom, double y_zoom) throws GLib.Error; + [CCode (cheader_filename = "librsvg/rsvg.h")] + public static unowned Gdk.Pixbuf pixbuf_from_file_at_zoom_with_max (string file_name, double x_zoom, double y_zoom, int max_width, int max_height) throws GLib.Error; + [CCode (cheader_filename = "librsvg/rsvg.h")] + public static void set_default_dpi (double dpi); + [CCode (cheader_filename = "librsvg/rsvg.h")] + public static void set_default_dpi_x_y (double dpi_x, double dpi_y); + [CCode (cheader_filename = "librsvg/rsvg.h")] + public static void term (); +} diff --git a/vapi/packages/librsvg-2.0/librsvg-2.0.deps b/vapi/packages/librsvg-2.0/librsvg-2.0.deps new file mode 100644 index 000000000..4cbbfb49e --- /dev/null +++ b/vapi/packages/librsvg-2.0/librsvg-2.0.deps @@ -0,0 +1,4 @@ +pango +cairo +gio-2.0 +gdk-pixbuf-2.0 diff --git a/vapi/packages/librsvg-2.0/librsvg-2.0.files b/vapi/packages/librsvg-2.0/librsvg-2.0.files new file mode 100644 index 000000000..577298282 --- /dev/null +++ b/vapi/packages/librsvg-2.0/librsvg-2.0.files @@ -0,0 +1,2 @@ +include/librsvg-2 +lib/librsvg-2.so diff --git a/vapi/packages/librsvg-2.0/librsvg-2.0.gi b/vapi/packages/librsvg-2.0/librsvg-2.0.gi new file mode 100644 index 000000000..03877898a --- /dev/null +++ b/vapi/packages/librsvg-2.0/librsvg-2.0.gi @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vapi/packages/librsvg-2.0/librsvg-2.0.metadata b/vapi/packages/librsvg-2.0/librsvg-2.0.metadata new file mode 100644 index 000000000..02dfeba7a --- /dev/null +++ b/vapi/packages/librsvg-2.0/librsvg-2.0.metadata @@ -0,0 +1,5 @@ +Rsvg cheader_filename="librsvg/rsvg.h" +RsvgSizeFunc.width is_ref="1" +RsvgSizeFunc.height is_ref="1" +rsvg_handle_set_size_callback.size_func transfer_ownership="1" +rsvg_handle_set_size_callback.user_data_destroy hidden="1" diff --git a/vapi/packages/librsvg-2.0/librsvg-2.0.namespace b/vapi/packages/librsvg-2.0/librsvg-2.0.namespace new file mode 100644 index 000000000..723271669 --- /dev/null +++ b/vapi/packages/librsvg-2.0/librsvg-2.0.namespace @@ -0,0 +1 @@ +Rsvg