codegen: Install as private library for sharing between internal components
[vala-gnome.git] / vapi / gdk-pixbuf-2.0.vapi
blob1497ff2dcda3f92b4c9b421bce2239ec76472806
1 /* gdk-pixbuf-2.0.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Gdk", gir_namespace = "GdkPixbuf", gir_version = "2.0", lower_case_cprefix = "gdk_")]
4 namespace Gdk {
5         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", type_id = "gdk_pixbuf_get_type ()")]
6         public class Pixbuf : GLib.Object, GLib.Icon, GLib.LoadableIcon {
7                 [CCode (has_construct_function = false)]
8                 public Pixbuf (Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height);
9                 public Gdk.Pixbuf add_alpha (bool substitute_color, uint8 r, uint8 g, uint8 b);
10                 [Version (since = "2.12")]
11                 public Gdk.Pixbuf apply_embedded_orientation ();
12                 [Version (since = "2.36.8")]
13                 public static int calculate_rowstride (Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height);
14                 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);
15                 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);
16                 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);
17                 public Gdk.Pixbuf copy ();
18                 public void copy_area (int src_x, int src_y, int width, int height, Gdk.Pixbuf dest_pixbuf, int dest_x, int dest_y);
19                 [Version (since = "2.36")]
20                 public bool copy_options (Gdk.Pixbuf dest_pixbuf);
21                 public void fill (uint32 pixel);
22                 [Version (since = "2.6")]
23                 public Gdk.Pixbuf? flip (bool horizontal);
24                 [CCode (has_construct_function = false)]
25                 [Version (since = "2.32")]
26                 public Pixbuf.from_bytes (GLib.Bytes data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride);
27                 [CCode (has_construct_function = false)]
28                 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);
29                 [CCode (has_construct_function = false)]
30                 public Pixbuf.from_file (string filename) throws GLib.Error;
31                 [CCode (has_construct_function = false)]
32                 [Version (since = "2.6")]
33                 public Pixbuf.from_file_at_scale (string filename, int width, int height, bool preserve_aspect_ratio) throws GLib.Error;
34                 [CCode (has_construct_function = false)]
35                 [Version (since = "2.4")]
36                 public Pixbuf.from_file_at_size (string filename, int width, int height) throws GLib.Error;
37                 [CCode (has_construct_function = false)]
38                 [Version (deprecated = true, deprecated_since = "2.32")]
39                 public Pixbuf.from_inline ([CCode (array_length_cname = "data_length", array_length_pos = 0.5)] uint8[] data, bool copy_pixels = true) throws GLib.Error;
40                 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
41                 [Version (deprecated = true, deprecated_since = "2.32")]
42                 public static Gdk.Pixbuf from_pixdata (Gdk.Pixdata pixdata, bool copy_pixels = true) throws GLib.Error;
43                 [CCode (has_construct_function = false)]
44                 [Version (since = "2.26")]
45                 public Pixbuf.from_resource (string resource_path) throws GLib.Error;
46                 [CCode (has_construct_function = false)]
47                 [Version (since = "2.26")]
48                 public Pixbuf.from_resource_at_scale (string resource_path, int width, int height, bool preserve_aspect_ratio) throws GLib.Error;
49                 [CCode (has_construct_function = false)]
50                 [Version (since = "2.14")]
51                 public Pixbuf.from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
52                 [CCode (finish_name = "gdk_pixbuf_new_from_stream_finish", has_construct_function = false, type = "void")]
53                 [Version (since = "2.24")]
54                 public async Pixbuf.from_stream_async (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
55                 [CCode (has_construct_function = false)]
56                 [Version (since = "2.14")]
57                 public Pixbuf.from_stream_at_scale (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable = null) throws GLib.Error;
58                 [CCode (finish_name = "gdk_pixbuf_new_from_stream_finish", has_construct_function = false, type = "void")]
59                 [Version (since = "2.24")]
60                 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;
61                 [CCode (has_construct_function = false)]
62                 public Pixbuf.from_xpm_data ([CCode (array_length = false, array_null_terminated = true)] string[] data);
63                 public int get_bits_per_sample ();
64                 [Version (since = "2.26")]
65                 public size_t get_byte_length ();
66                 public Gdk.Colorspace get_colorspace ();
67                 [Version (since = "2.4")]
68                 public static unowned Gdk.PixbufFormat? get_file_info (string filename, out int width, out int height);
69                 [Version (since = "2.32")]
70                 public static async unowned Gdk.PixbufFormat get_file_info_async (string filename, GLib.Cancellable? cancellable, out int width, out int height) throws GLib.Error;
71                 [Version (since = "2.2")]
72                 public static GLib.SList<weak Gdk.PixbufFormat> get_formats ();
73                 public bool get_has_alpha ();
74                 public int get_height ();
75                 public int get_n_channels ();
76                 public unowned string get_option (string key);
77                 [Version (since = "2.32")]
78                 public GLib.HashTable<weak string,weak string> get_options ();
79                 [CCode (array_length = false)]
80                 public unowned uint8[] get_pixels ();
81                 [CCode (array_length_pos = 0.1, array_length_type = "guint")]
82                 [Version (since = "2.26")]
83                 public unowned uint8[] get_pixels_with_length ();
84                 public int get_rowstride ();
85                 public int get_width ();
86                 [CCode (cname = "gdk_pixbuf_new_from_stream_async", finish_name = "gdk_pixbuf_new_from_stream_finish")]
87                 [Version (deprecated_since = "vala-0.18", replacement = "Pixbuf.from_stream_async")]
88                 public static async Gdk.Pixbuf new_from_stream_async (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
89                 [CCode (cname = "gdk_pixbuf_new_from_stream_at_scale_async", finish_name = "gdk_pixbuf_new_from_stream_finish")]
90                 [Version (deprecated_since = "vala-0.18", replacement = "Pixbuf.from_stream_at_scale_async")]
91                 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;
92                 [Version (since = "2.32")]
93                 public GLib.Bytes read_pixel_bytes ();
94                 [Version (since = "2.32")]
95                 public uint8 read_pixels ();
96                 [Version (since = "2.36")]
97                 public bool remove_option (string key);
98                 [Version (since = "2.6")]
99                 public Gdk.Pixbuf? rotate_simple (Gdk.PixbufRotation angle);
100                 public void saturate_and_pixelate (Gdk.Pixbuf dest, float saturation, bool pixelate);
101                 public bool save (string filename, string type, ...) throws GLib.Error;
102                 [Version (since = "2.4")]
103                 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;
104                 [Version (since = "2.4")]
105                 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;
106                 [Version (since = "2.4")]
107                 public bool save_to_callback ([CCode (delegate_target_pos = 1.5)] Gdk.PixbufSaveFunc save_func, string type, ...) throws GLib.Error;
108                 [Version (since = "2.4")]
109                 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;
110                 [Version (since = "2.14")]
111                 public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null, ...) throws GLib.Error;
112                 [CCode (finish_instance = false, finish_name = "gdk_pixbuf_save_to_stream_finish", sentinel = "NULL")]
113                 [Version (since = "2.24")]
114                 public async void save_to_stream_async (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null, ...) throws GLib.Error;
115                 [Version (since = "2.36")]
116                 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;
117                 [Version (since = "2.36")]
118                 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);
119                 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;
120                 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);
121                 public Gdk.Pixbuf scale_simple (int dest_width, int dest_height, Gdk.InterpType interp_type);
122                 [Version (since = "2.2")]
123                 public bool set_option (string key, string value);
124                 [CCode (has_construct_function = false)]
125                 public Pixbuf.subpixbuf (Gdk.Pixbuf src_pixbuf, int src_x, int src_y, int width, int height);
126                 [CCode (cname = "gdk_pixbuf_new_from_data", has_construct_function = false)]
127                 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);
128                 public int bits_per_sample { get; construct; }
129                 public Gdk.Colorspace colorspace { get; construct; }
130                 public bool has_alpha { get; construct; }
131                 public int height { get; construct; }
132                 public int n_channels { get; construct; }
133                 [NoAccessorMethod]
134                 public GLib.Bytes pixel_bytes { owned get; construct; }
135                 public void* pixels { get; construct; }
136                 public int rowstride { get; construct; }
137                 public int width { get; construct; }
138         }
139         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", type_id = "gdk_pixbuf_animation_get_type ()")]
140         public class PixbufAnimation : GLib.Object {
141                 [CCode (has_construct_function = false)]
142                 protected PixbufAnimation ();
143                 [CCode (has_construct_function = false)]
144                 public PixbufAnimation.from_file (string filename) throws GLib.Error;
145                 [CCode (has_construct_function = false)]
146                 [Version (since = "2.28")]
147                 public PixbufAnimation.from_resource (string resource_path) throws GLib.Error;
148                 [CCode (has_construct_function = false)]
149                 [Version (since = "2.28")]
150                 public PixbufAnimation.from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
151                 [CCode (cname = "gdk_pixbuf_animation_new_from_stream_async", has_construct_function = false)]
152                 [Version (since = "2.28")]
153                 public async PixbufAnimation.from_stream_async (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
154                 public int get_height ();
155                 public Gdk.PixbufAnimationIter get_iter (GLib.TimeVal? start_time);
156                 public unowned Gdk.Pixbuf get_static_image ();
157                 public int get_width ();
158                 public bool is_static_image ();
159         }
160         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", type_id = "gdk_pixbuf_animation_iter_get_type ()")]
161         public class PixbufAnimationIter : GLib.Object {
162                 [CCode (has_construct_function = false)]
163                 protected PixbufAnimationIter ();
164                 public bool advance (GLib.TimeVal? current_time);
165                 public int get_delay_time ();
166                 public unowned Gdk.Pixbuf get_pixbuf ();
167                 public bool on_currently_loading_frame ();
168         }
169         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gdk_pixbuf_format_get_type ()")]
170         [Compact]
171         public class PixbufFormat {
172                 [Version (since = "2.22")]
173                 public Gdk.PixbufFormat copy ();
174                 [Version (since = "2.22")]
175                 public void free ();
176                 [Version (since = "2.2")]
177                 public string get_description ();
178                 [CCode (array_length = false, array_null_terminated = true)]
179                 [Version (since = "2.2")]
180                 public string[] get_extensions ();
181                 [Version (since = "2.6")]
182                 public string get_license ();
183                 [CCode (array_length = false, array_null_terminated = true)]
184                 [Version (since = "2.2")]
185                 public string[] get_mime_types ();
186                 [Version (since = "2.2")]
187                 public string get_name ();
188                 [Version (since = "2.6")]
189                 public bool is_disabled ();
190                 [Version (since = "2.36")]
191                 public bool is_save_option_supported (string option_key);
192                 [Version (since = "2.6")]
193                 public bool is_scalable ();
194                 [Version (since = "2.2")]
195                 public bool is_writable ();
196                 [Version (since = "2.6")]
197                 public void set_disabled (bool disabled);
198         }
199         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", type_id = "gdk_pixbuf_loader_get_type ()")]
200         public class PixbufLoader : GLib.Object {
201                 [CCode (has_construct_function = false)]
202                 public PixbufLoader ();
203                 public bool close () throws GLib.Error;
204                 public unowned Gdk.PixbufAnimation get_animation ();
205                 [Version (since = "2.2")]
206                 public unowned Gdk.PixbufFormat? get_format ();
207                 public unowned Gdk.Pixbuf get_pixbuf ();
208                 [Version (since = "2.2")]
209                 public void set_size (int width, int height);
210                 [CCode (has_construct_function = false)]
211                 [Version (since = "2.4")]
212                 public PixbufLoader.with_mime_type (string mime_type) throws GLib.Error;
213                 [CCode (has_construct_function = false)]
214                 public PixbufLoader.with_type (string image_type) throws GLib.Error;
215                 public bool write ([CCode (array_length_cname = "count", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] buf) throws GLib.Error;
216                 [Version (since = "2.30")]
217                 public bool write_bytes (GLib.Bytes buffer) throws GLib.Error;
218                 public virtual signal void area_prepared ();
219                 public virtual signal void area_updated (int x, int y, int width, int height);
220                 public virtual signal void closed ();
221                 public virtual signal void size_prepared (int width, int height);
222         }
223         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", type_id = "gdk_pixbuf_simple_anim_get_type ()")]
224         public class PixbufSimpleAnim : Gdk.PixbufAnimation {
225                 [CCode (has_construct_function = false)]
226                 [Version (since = "2.8")]
227                 public PixbufSimpleAnim (int width, int height, float rate);
228                 [Version (since = "2.8")]
229                 public void add_frame (Gdk.Pixbuf pixbuf);
230                 [Version (since = "2.18")]
231                 public bool get_loop ();
232                 [Version (since = "2.18")]
233                 public void set_loop (bool loop);
234                 [Version (since = "2.18")]
235                 public bool loop { get; set; }
236         }
237         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", type_id = "gdk_pixbuf_simple_anim_iter_get_type ()")]
238         public class PixbufSimpleAnimIter : Gdk.PixbufAnimationIter {
239                 [CCode (has_construct_function = false)]
240                 protected PixbufSimpleAnimIter ();
241         }
242         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", has_type_id = false)]
243         public struct Pixdata {
244                 public uint32 magic;
245                 public int32 length;
246                 public uint32 pixdata_type;
247                 public uint32 rowstride;
248                 public uint32 width;
249                 public uint32 height;
250                 [CCode (array_length = false)]
251                 public weak uint8[] pixel_data;
252                 [Version (deprecated = true, deprecated_since = "2.32")]
253                 public bool deserialize ([CCode (array_length_cname = "stream_length", array_length_pos = 0.5, array_length_type = "guint")] uint8[] stream) throws GLib.Error;
254                 [CCode (array_length_pos = 0.1, array_length_type = "guint")]
255                 [Version (deprecated = true, deprecated_since = "2.32")]
256                 public uint8[] serialize ();
257                 [Version (deprecated = true, deprecated_since = "2.32")]
258                 public GLib.StringBuilder to_csource (string name, Gdk.PixdataDumpType dump_type);
259         }
260         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cprefix = "GDK_COLORSPACE_", type_id = "gdk_colorspace_get_type ()")]
261         public enum Colorspace {
262                 RGB
263         }
264         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cprefix = "GDK_INTERP_", type_id = "gdk_interp_type_get_type ()")]
265         public enum InterpType {
266                 NEAREST,
267                 TILES,
268                 BILINEAR,
269                 HYPER
270         }
271         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cprefix = "GDK_PIXBUF_ALPHA_", type_id = "gdk_pixbuf_alpha_mode_get_type ()")]
272         public enum PixbufAlphaMode {
273                 BILEVEL,
274                 FULL
275         }
276         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cprefix = "GDK_PIXBUF_ROTATE_", type_id = "gdk_pixbuf_rotation_get_type ()")]
277         public enum PixbufRotation {
278                 NONE,
279                 COUNTERCLOCKWISE,
280                 UPSIDEDOWN,
281                 CLOCKWISE
282         }
283         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", cprefix = "GDK_PIXDATA_DUMP_", has_type_id = false)]
284         [Flags]
285         public enum PixdataDumpType {
286                 PIXDATA_STREAM,
287                 PIXDATA_STRUCT,
288                 MACROS,
289                 GTYPES,
290                 CTYPES,
291                 STATIC,
292                 CONST,
293                 RLE_DECODER
294         }
295         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", cprefix = "GDK_PIXDATA_", has_type_id = false)]
296         [Flags]
297         public enum PixdataType {
298                 COLOR_TYPE_RGB,
299                 COLOR_TYPE_RGBA,
300                 COLOR_TYPE_MASK,
301                 SAMPLE_WIDTH_8,
302                 SAMPLE_WIDTH_MASK,
303                 ENCODING_RAW,
304                 ENCODING_RLE,
305                 ENCODING_MASK
306         }
307         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cprefix = "GDK_PIXBUF_ERROR_")]
308         public errordomain PixbufError {
309                 CORRUPT_IMAGE,
310                 INSUFFICIENT_MEMORY,
311                 BAD_OPTION,
312                 UNKNOWN_TYPE,
313                 UNSUPPORTED_OPERATION,
314                 FAILED,
315                 INCOMPLETE_ANIMATION;
316                 public static GLib.Quark quark ();
317         }
318         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", instance_pos = 1.9)]
319         public delegate void PixbufDestroyNotify ([CCode (array_length = false)] uint8[] pixels);
320         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", instance_pos = -0.9)]
321         public delegate bool PixbufSaveFunc ([CCode (array_length_type = "gsize")] uint8[] buf) throws GLib.Error;
322         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_FEATURES_H")]
323         public const int PIXBUF_FEATURES_H;
324         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_MAGIC_NUMBER")]
325         public const int PIXBUF_MAGIC_NUMBER;
326         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_MAJOR")]
327         public const int PIXBUF_MAJOR;
328         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_MICRO")]
329         public const int PIXBUF_MICRO;
330         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_MINOR")]
331         public const int PIXBUF_MINOR;
332         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_VERSION")]
333         public const string PIXBUF_VERSION;
334         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXDATA_HEADER_LENGTH")]
335         public const int PIXDATA_HEADER_LENGTH;