update for 0.4.0 release
[vala-lang.git] / vapi / gdk-pixbuf-2.0.vapi
blob78277801aeb46acb84a8a6ae849db3472ff64009
1 /* gdk-pixbuf-2.0.vapi generated by lt-vapigen, do not modify. */
3 [CCode (cprefix = "Gdk", lower_case_cprefix = "gdk_")]
4 namespace Gdk {
5         [CCode (cprefix = "GDK_COLORSPACE_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
6         public enum Colorspace {
7                 RGB
8         }
9         [CCode (cprefix = "GDK_INTERP_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
10         public enum InterpType {
11                 NEAREST,
12                 TILES,
13                 BILINEAR,
14                 HYPER
15         }
16         [CCode (cprefix = "GDK_PIXBUF_ALPHA_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
17         public enum PixbufAlphaMode {
18                 BILEVEL,
19                 FULL
20         }
21         [CCode (cprefix = "GDK_PIXBUF_ERROR_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
22         public enum PixbufError {
23                 CORRUPT_IMAGE,
24                 INSUFFICIENT_MEMORY,
25                 BAD_OPTION,
26                 UNKNOWN_TYPE,
27                 UNSUPPORTED_OPERATION,
28                 FAILED
29         }
30         [CCode (cprefix = "GDK_PIXBUF_ROTATE_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
31         public enum PixbufRotation {
32                 NONE,
33                 COUNTERCLOCKWISE,
34                 UPSIDEDOWN,
35                 CLOCKWISE
36         }
37         [CCode (cprefix = "GDK_PIXDATA_DUMP_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
38         public enum PixdataDumpType {
39                 PIXDATA_STREAM,
40                 PIXDATA_STRUCT,
41                 MACROS,
42                 GTYPES,
43                 CTYPES,
44                 STATIC,
45                 CONST,
46                 RLE_DECODER
47         }
48         [CCode (cprefix = "GDK_PIXDATA_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
49         public enum PixdataType {
50                 COLOR_TYPE_RGB,
51                 COLOR_TYPE_RGBA,
52                 COLOR_TYPE_MASK,
53                 SAMPLE_WIDTH_8,
54                 SAMPLE_WIDTH_MASK,
55                 ENCODING_RAW,
56                 ENCODING_RLE,
57                 ENCODING_MASK
58         }
59         [Compact]
60         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
61         public class PixbufFormat {
62                 public weak string get_description ();
63                 public weak string get_extensions ();
64                 public weak string get_license ();
65                 public weak string get_mime_types ();
66                 public weak string get_name ();
67                 public bool is_disabled ();
68                 public bool is_scalable ();
69                 public bool is_writable ();
70                 public void set_disabled (bool disabled);
71         }
72         [Compact]
73         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
74         public class PixbufSimpleAnimClass {
75         }
76         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
77         public class Pixbuf : GLib.Object {
78                 public weak Gdk.Pixbuf add_alpha (bool substitute_color, uchar r, uchar g, uchar b);
79                 public weak Gdk.Pixbuf apply_embedded_orientation ();
80                 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);
81                 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, uint color1, uint color2);
82                 public weak Gdk.Pixbuf composite_color_simple (int dest_width, int dest_height, Gdk.InterpType interp_type, int overall_alpha, int check_size, uint color1, uint color2);
83                 public weak Gdk.Pixbuf copy ();
84                 public void copy_area (int src_x, int src_y, int width, int height, Gdk.Pixbuf dest_pixbuf, int dest_x, int dest_y);
85                 public static GLib.Quark error_quark ();
86                 public void fill (uint pixel);
87                 public weak Gdk.Pixbuf flip (bool horizontal);
88                 public static weak Gdk.Pixbuf from_pixdata (Gdk.Pixdata pixdata, bool copy_pixels) throws GLib.Error;
89                 public int get_bits_per_sample ();
90                 public Gdk.Colorspace get_colorspace ();
91                 public static weak Gdk.PixbufFormat get_file_info (string filename, int width, int height);
92                 public static weak GLib.SList get_formats ();
93                 public bool get_has_alpha ();
94                 public int get_height ();
95                 public int get_n_channels ();
96                 public weak string get_option (string key);
97                 [NoArrayLength]
98                 public weak uchar[] get_pixels ();
99                 public int get_rowstride ();
100                 public int get_width ();
101                 [CCode (has_construct_function = false)]
102                 public Pixbuf (Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height);
103                 [NoArrayLength]
104                 [CCode (has_construct_function = false)]
105                 public Pixbuf.from_data (uchar[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify? destroy_fn);
106                 [CCode (has_construct_function = false)]
107                 public Pixbuf.from_file (string filename) throws GLib.Error;
108                 [CCode (has_construct_function = false)]
109                 public Pixbuf.from_file_at_scale (string filename, int width, int height, bool preserve_aspect_ratio) throws GLib.Error;
110                 [CCode (has_construct_function = false)]
111                 public Pixbuf.from_file_at_size (string filename, int width, int height) throws GLib.Error;
112                 [CCode (has_construct_function = false)]
113                 public Pixbuf.from_inline (int data_length, uchar data, bool copy_pixels) throws GLib.Error;
114                 [CCode (has_construct_function = false)]
115                 public Pixbuf.from_stream (GLib.InputStream stream, GLib.Cancellable cancellable) throws GLib.Error;
116                 [CCode (has_construct_function = false)]
117                 public Pixbuf.from_stream_at_scale (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable cancellable) throws GLib.Error;
118                 [NoArrayLength]
119                 [CCode (has_construct_function = false)]
120                 public Pixbuf.from_xpm_data (string[] data);
121                 [CCode (has_construct_function = false)]
122                 public Pixbuf.subpixbuf (Gdk.Pixbuf src_pixbuf, int src_x, int src_y, int width, int height);
123                 public weak Gdk.Pixbuf rotate_simple (Gdk.PixbufRotation angle);
124                 public void saturate_and_pixelate (Gdk.Pixbuf dest, float saturation, bool pixelate);
125                 public bool save (string filename, string type, ...) throws GLib.Error;
126                 public bool save_to_buffer (string buffer, ulong buffer_size, string type, ...) throws GLib.Error;
127                 public bool save_to_bufferv (string buffer, ulong buffer_size, string type, string[] option_keys, string[] option_values) throws GLib.Error;
128                 public bool save_to_callback (Gdk.PixbufSaveFunc save_func, string type) throws GLib.Error;
129                 public bool save_to_callbackv (Gdk.PixbufSaveFunc save_func, string type, string[] option_keys, string[] option_values) throws GLib.Error;
130                 public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable cancellable) throws GLib.Error;
131                 public bool savev (string filename, string type, out weak string option_keys, out weak string option_values) throws GLib.Error;
132                 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);
133                 public weak Gdk.Pixbuf scale_simple (int dest_width, int dest_height, Gdk.InterpType interp_type);
134                 [NoAccessorMethod]
135                 public int bits_per_sample { get; construct; }
136                 [NoAccessorMethod]
137                 public Gdk.Colorspace colorspace { get; construct; }
138                 [NoAccessorMethod]
139                 public bool has_alpha { get; construct; }
140                 [NoAccessorMethod]
141                 public int height { get; construct; }
142                 [NoAccessorMethod]
143                 public int n_channels { get; construct; }
144                 [NoAccessorMethod]
145                 public void* pixels { get; construct; }
146                 [NoAccessorMethod]
147                 public int rowstride { get; construct; }
148                 [NoAccessorMethod]
149                 public int width { get; construct; }
150         }
151         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
152         public class PixbufAnimation : GLib.Object {
153                 public int get_height ();
154                 public weak Gdk.PixbufAnimationIter get_iter (GLib.TimeVal start_time);
155                 public weak Gdk.Pixbuf get_static_image ();
156                 public int get_width ();
157                 public bool is_static_image ();
158                 [CCode (has_construct_function = false)]
159                 public PixbufAnimation.from_file (string filename) throws GLib.Error;
160         }
161         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
162         public class PixbufAnimationIter : GLib.Object {
163                 public bool advance (GLib.TimeVal current_time);
164                 public int get_delay_time ();
165                 public weak Gdk.Pixbuf get_pixbuf ();
166                 public bool on_currently_loading_frame ();
167         }
168         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
169         public class PixbufLoader : GLib.Object {
170                 public bool close () throws GLib.Error;
171                 public weak Gdk.PixbufAnimation get_animation ();
172                 public weak Gdk.PixbufFormat get_format ();
173                 public weak Gdk.Pixbuf get_pixbuf ();
174                 [CCode (has_construct_function = false)]
175                 public PixbufLoader ();
176                 [CCode (has_construct_function = false)]
177                 public PixbufLoader.with_mime_type (string mime_type) throws GLib.Error;
178                 [CCode (has_construct_function = false)]
179                 public PixbufLoader.with_type (string image_type) throws GLib.Error;
180                 public void set_size (int width, int height);
181                 public bool write (uchar[] buf) throws GLib.Error;
182                 public virtual signal void area_prepared ();
183                 public virtual signal void area_updated (int x, int y, int width, int height);
184                 public virtual signal void closed ();
185                 public virtual signal void size_prepared (int width, int height);
186         }
187         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
188         public class PixbufSimpleAnim : Gdk.PixbufAnimation {
189                 public void add_frame (Gdk.Pixbuf pixbuf);
190                 [CCode (has_construct_function = false)]
191                 public PixbufSimpleAnim (int width, int height, float rate);
192         }
193         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
194         public class PixbufSimpleAnimIter : Gdk.PixbufAnimationIter {
195         }
196         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
197         public struct Pixdata {
198                 public uint magic;
199                 public int length;
200                 public uint pixdata_type;
201                 public uint rowstride;
202                 public uint width;
203                 public uint height;
204                 [NoArrayLength]
205                 public weak uchar[] pixel_data;
206                 public bool deserialize ([CCode (array_length_pos = 0.9)] uchar[] stream) throws GLib.Error;
207                 public void* from_pixbuf (Gdk.Pixbuf pixbuf, bool use_rle);
208                 public weak uchar[] serialize ();
209                 public weak GLib.StringBuilder to_csource (string name, Gdk.PixdataDumpType dump_type);
210         }
211         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
212         public delegate void PixbufDestroyNotify (uchar[] pixels);
213         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
214         public delegate bool PixbufSaveFunc (string buf, ulong count, GLib.Error error);
215         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
216         public const int PIXBUF_FEATURES_H;
217         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
218         public const int PIXBUF_MAGIC_NUMBER;
219         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
220         public const int PIXBUF_MAJOR;
221         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
222         public const int PIXBUF_MICRO;
223         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
224         public const int PIXBUF_MINOR;
225         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
226         public const string PIXBUF_VERSION;
227         [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
228         public const int PIXDATA_HEADER_LENGTH;