1 /* librsvg-2.0.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Rsvg", gir_namespace = "Rsvg", gir_version = "2.0", lower_case_cprefix = "rsvg_")]
4 [Version (deprecated = true, deprecated_since = "2.36.2", replacement = "bindings distributed with librsvg-2.0")]
7 [CCode (cheader_filename = "librsvg/rsvg.h", cname = "LIBRSVG_MAJOR_VERSION")]
8 public const int MAJOR;
9 [CCode (cheader_filename = "librsvg/rsvg.h", cname = "LIBRSVG_MICRO_VERSION")]
10 public const int MICRO;
11 [CCode (cheader_filename = "librsvg/rsvg.h", cname = "LIBRSVG_MINOR_VERSION")]
12 public const int MINOR;
13 [CCode (cheader_filename = "librsvg/rsvg.h", cname = "LIBRSVG_VERSION")]
14 public const string STRING;
15 [CCode (cheader_filename = "librsvg/rsvg.h", cname = "LIBRSVG_CHECK_VERSION")]
16 public static bool check (int major, int minor, int micro);
18 [CCode (cheader_filename = "librsvg/rsvg.h", type_id = "rsvg_handle_get_type ()")]
19 public class Handle : GLib.Object {
20 [CCode (has_construct_function = false)]
22 public bool close () throws GLib.Error;
23 [Version (replacement = "GLib.Object.unref")]
25 [CCode (has_construct_function = false)]
26 [Version (since = "2.14")]
27 public Handle.from_data ([CCode (array_length_cname = "data_len", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] data) throws GLib.Error;
28 [CCode (has_construct_function = false)]
29 [Version (since = "2.14")]
30 public Handle.from_file (string file_name) throws GLib.Error;
31 [CCode (has_construct_function = false)]
32 [Version (since = "2.32")]
33 public Handle.from_gfile_sync (GLib.File file, Rsvg.HandleFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
34 [CCode (has_construct_function = false)]
35 [Version (since = "2.32")]
36 public Handle.from_stream_sync (GLib.InputStream input_stream, GLib.File? base_file, Rsvg.HandleFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
37 [Version (since = "2.8")]
38 public unowned string get_base_uri ();
39 [Version (deprecated_since = "2.36")]
40 public unowned string get_desc ();
41 [Version (since = "2.14")]
42 public Rsvg.DimensionData get_dimensions ();
43 [Version (since = "2.22")]
44 public bool get_dimensions_sub (out Rsvg.DimensionData dimension_data, string? id);
45 [Version (deprecated_since = "2.36")]
46 public unowned string get_metadata ();
47 public Gdk.Pixbuf? get_pixbuf ();
48 [Version (since = "2.14")]
49 public Gdk.Pixbuf? get_pixbuf_sub (string? id);
50 [Version (since = "2.22")]
51 public bool get_position_sub (out Rsvg.PositionData position_data, string id);
52 [Version (deprecated_since = "2.36")]
53 public unowned string get_title ();
54 [Version (since = "2.22")]
55 public bool has_sub (string id);
56 public void internal_set_testing (bool testing);
57 [Version (since = "2.32")]
58 public bool read_stream_sync (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
59 [Version (since = "2.14")]
60 public bool render_cairo (Cairo.Context cr);
61 [Version (since = "2.14")]
62 public bool render_cairo_sub (Cairo.Context cr, string? id);
63 [Version (since = "2.32")]
64 public void set_base_gfile (GLib.File base_file);
65 [Version (since = "2.9")]
66 public void set_base_uri (string base_uri);
67 [Version (since = "2.8")]
68 public void set_dpi (double dpi);
69 [Version (since = "2.8")]
70 public void set_dpi_x_y (double dpi_x, double dpi_y);
71 [Version (replacement = "render_cairo")]
72 public void set_size_callback (owned Rsvg.SizeFunc size_func);
73 [CCode (has_construct_function = false)]
74 [Version (since = "2.36")]
75 public Handle.with_flags (Rsvg.HandleFlags flags);
76 public bool write ([CCode (array_length_cname = "count", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] buf) throws GLib.Error;
77 public string base_uri { get; set construct; }
79 [Version (deprecated = true, deprecated_since = "2.36")]
80 public string desc { owned get; }
82 public double dpi_x { get; set construct; }
84 public double dpi_y { get; set construct; }
86 public double em { get; }
88 public double ex { get; }
90 [Version (since = "2.36")]
91 public Rsvg.HandleFlags flags { get; construct; }
93 public int height { get; }
95 [Version (deprecated = true, deprecated_since = "2.36")]
96 public string metadata { owned get; }
98 [Version (deprecated = true, deprecated_since = "2.36")]
99 public string title { owned get; }
101 public int width { get; }
103 [CCode (cheader_filename = "librsvg/rsvg.h", has_type_id = false)]
104 public struct DimensionData {
110 [CCode (cheader_filename = "librsvg/rsvg.h", has_type_id = false)]
111 public struct PositionData {
115 [CCode (cheader_filename = "librsvg/rsvg.h", cprefix = "RSVG_HANDLE_", type_id = "rsvg_handle_flags_get_type ()")]
117 public enum HandleFlags {
122 [CCode (cheader_filename = "librsvg/rsvg.h", cprefix = "RSVG_ERROR_")]
123 public errordomain Error {
125 public static GLib.Quark quark ();
127 [CCode (cheader_filename = "librsvg/rsvg.h")]
128 [Version (deprecated = true)]
129 public delegate void SizeFunc (ref int width, ref int height);
130 [CCode (cheader_filename = "librsvg/rsvg.h")]
131 [Version (since = "2.36")]
132 public static void cleanup ();
133 [CCode (cheader_filename = "librsvg/rsvg.h")]
134 [Version (deprecated_since = "2.36")]
135 public static void init ();
136 [CCode (cheader_filename = "librsvg/rsvg.h")]
137 [Version (deprecated = true)]
138 public static Gdk.Pixbuf pixbuf_from_file (string file_name) throws GLib.Error;
139 [CCode (cheader_filename = "librsvg/rsvg.h")]
140 [Version (deprecated = true)]
141 public static Gdk.Pixbuf pixbuf_from_file_at_max_size (string file_name, int max_width, int max_height) throws GLib.Error;
142 [CCode (cheader_filename = "librsvg/rsvg.h")]
143 [Version (deprecated = true)]
144 public static Gdk.Pixbuf pixbuf_from_file_at_size (string file_name, int width, int height) throws GLib.Error;
145 [CCode (cheader_filename = "librsvg/rsvg.h")]
146 [Version (deprecated = true)]
147 public static Gdk.Pixbuf pixbuf_from_file_at_zoom (string file_name, double x_zoom, double y_zoom) throws GLib.Error;
148 [CCode (cheader_filename = "librsvg/rsvg.h")]
149 [Version (deprecated = true)]
150 public static 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;
151 [CCode (cheader_filename = "librsvg/rsvg.h")]
152 [Version (since = "2.8")]
153 public static void set_default_dpi (double dpi);
154 [CCode (cheader_filename = "librsvg/rsvg.h")]
155 [Version (since = "2.8")]
156 public static void set_default_dpi_x_y (double dpi_x, double dpi_y);
157 [CCode (cheader_filename = "librsvg/rsvg.h")]
158 [Version (deprecated_since = "2.36")]
159 public static void term ();