1 /* gdk-pixbuf-2.0.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Gdk", lower_case_cprefix = "gdk_")]
5 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
6 public class Pixbuf : GLib.Object {
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 unowned Gdk.Pixbuf add_alpha (bool substitute_color, uchar r, uchar g, uchar b);
10 public unowned Gdk.Pixbuf apply_embedded_orientation ();
11 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);
12 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);
13 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);
14 public Gdk.Pixbuf copy ();
15 public void copy_area (int src_x, int src_y, int width, int height, Gdk.Pixbuf dest_pixbuf, int dest_x, int dest_y);
16 public static GLib.Quark error_quark ();
17 public void fill (uint32 pixel);
18 public Gdk.Pixbuf flip (bool horizontal);
19 [CCode (has_construct_function = false)]
20 public Pixbuf.from_data ([CCode (array_length = false)] uchar[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify? destroy_fn);
21 [CCode (has_construct_function = false)]
22 public Pixbuf.from_file (string filename) throws GLib.Error;
23 [CCode (has_construct_function = false)]
24 public Pixbuf.from_file_at_scale (string filename, int width, int height, bool preserve_aspect_ratio) throws GLib.Error;
25 [CCode (has_construct_function = false)]
26 public Pixbuf.from_file_at_size (string filename, int width, int height) throws GLib.Error;
27 [CCode (has_construct_function = false)]
28 public Pixbuf.from_inline (int data_length, [CCode (array_length = false)] uchar[] data, bool copy_pixels) throws GLib.Error;
29 public static unowned Gdk.Pixbuf from_pixdata (Gdk.Pixdata pixdata, bool copy_pixels) throws GLib.Error;
30 [CCode (has_construct_function = false)]
31 public Pixbuf.from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable) throws GLib.Error;
32 [CCode (has_construct_function = false)]
33 public Pixbuf.from_stream_at_scale (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable) throws GLib.Error;
34 [CCode (has_construct_function = false)]
35 public Pixbuf.from_xpm_data ([CCode (array_length = false)] string[] data);
36 public int get_bits_per_sample ();
37 public Gdk.Colorspace get_colorspace ();
38 public static unowned Gdk.PixbufFormat get_file_info (string filename, out int width, out int height);
39 public static unowned GLib.SList get_formats ();
40 public bool get_has_alpha ();
41 public int get_height ();
42 public int get_n_channels ();
43 public unowned string get_option (string key);
44 [CCode (array_length = false)]
45 public unowned uchar[] get_pixels ();
46 public int get_rowstride ();
47 public int get_width ();
48 public Gdk.Pixbuf rotate_simple (Gdk.PixbufRotation angle);
49 public void saturate_and_pixelate (Gdk.Pixbuf dest, float saturation, bool pixelate);
50 public bool save (string filename, string type, ...) throws GLib.Error;
51 public bool save_to_buffer (string buffer, size_t buffer_size, string type, ...) throws GLib.Error;
52 public bool save_to_bufferv (string buffer, size_t buffer_size, string type, string[] option_keys, string[] option_values) throws GLib.Error;
53 public bool save_to_callback (Gdk.PixbufSaveFunc save_func, string type) throws GLib.Error;
54 public bool save_to_callbackv (Gdk.PixbufSaveFunc save_func, string type, string[] option_keys, string[] option_values) throws GLib.Error;
55 public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable cancellable) throws GLib.Error;
56 public bool savev (string filename, string type, out unowned string option_keys, out unowned string option_values) throws GLib.Error;
57 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);
58 public Gdk.Pixbuf scale_simple (int dest_width, int dest_height, Gdk.InterpType interp_type);
59 [CCode (has_construct_function = false)]
60 public Pixbuf.subpixbuf (Gdk.Pixbuf src_pixbuf, int src_x, int src_y, int width, int height);
61 public int bits_per_sample { get; construct; }
62 public Gdk.Colorspace colorspace { get; construct; }
63 public bool has_alpha { get; construct; }
64 public int height { get; construct; }
65 public int n_channels { get; construct; }
66 public void* pixels { get; construct; }
67 public int rowstride { get; construct; }
68 public int width { get; construct; }
70 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
71 public class PixbufAnimation : GLib.Object {
72 [CCode (has_construct_function = false)]
73 public PixbufAnimation.from_file (string filename) throws GLib.Error;
74 public int get_height ();
75 public unowned Gdk.PixbufAnimationIter get_iter (GLib.TimeVal start_time);
76 public unowned Gdk.Pixbuf get_static_image ();
77 public int get_width ();
78 public bool is_static_image ();
80 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
81 public class PixbufAnimationIter : GLib.Object {
82 public bool advance (GLib.TimeVal current_time);
83 public int get_delay_time ();
84 public unowned Gdk.Pixbuf get_pixbuf ();
85 public bool on_currently_loading_frame ();
88 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
89 public class PixbufFormat {
90 public unowned string get_description ();
91 public unowned string get_extensions ();
92 public unowned string get_license ();
93 public unowned string get_mime_types ();
94 public unowned string get_name ();
95 public bool is_disabled ();
96 public bool is_scalable ();
97 public bool is_writable ();
98 public void set_disabled (bool disabled);
100 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
101 public class PixbufLoader : GLib.Object {
102 [CCode (has_construct_function = false)]
103 public PixbufLoader ();
104 public bool close () throws GLib.Error;
105 public unowned Gdk.PixbufAnimation get_animation ();
106 public unowned Gdk.PixbufFormat get_format ();
107 public unowned Gdk.Pixbuf get_pixbuf ();
108 public void set_size (int width, int height);
109 [CCode (has_construct_function = false)]
110 public PixbufLoader.with_mime_type (string mime_type) throws GLib.Error;
111 [CCode (has_construct_function = false)]
112 public PixbufLoader.with_type (string image_type) throws GLib.Error;
113 public bool write (uchar[] buf) throws GLib.Error;
114 public virtual signal void area_prepared ();
115 public virtual signal void area_updated (int x, int y, int width, int height);
116 public virtual signal void closed ();
117 public virtual signal void size_prepared (int width, int height);
119 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
120 public class PixbufSimpleAnim : Gdk.PixbufAnimation {
121 [CCode (has_construct_function = false)]
122 public PixbufSimpleAnim (int width, int height, float rate);
123 public void add_frame (Gdk.Pixbuf pixbuf);
126 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
127 public class PixbufSimpleAnimClass {
129 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
130 public class PixbufSimpleAnimIter : Gdk.PixbufAnimationIter {
132 [CCode (type_id = "GDK_TYPE_PIXDATA", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
133 public struct Pixdata {
136 public uint32 pixdata_type;
137 public uint32 rowstride;
139 public uint32 height;
140 [CCode (array_length = false)]
141 public weak uchar[] pixel_data;
142 public bool deserialize ([CCode (array_length_pos = 0.9)] uchar[] stream) throws GLib.Error;
143 public void* from_pixbuf (Gdk.Pixbuf pixbuf, bool use_rle);
144 public unowned uchar[] serialize ();
145 public unowned GLib.StringBuilder to_csource (string name, Gdk.PixdataDumpType dump_type);
147 [CCode (cprefix = "GDK_COLORSPACE_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
148 public enum Colorspace {
151 [CCode (cprefix = "GDK_INTERP_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
152 public enum InterpType {
158 [CCode (cprefix = "GDK_PIXBUF_ALPHA_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
159 public enum PixbufAlphaMode {
163 [CCode (cprefix = "GDK_PIXBUF_ERROR_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
164 public enum PixbufError {
169 UNSUPPORTED_OPERATION,
172 [CCode (cprefix = "GDK_PIXBUF_ROTATE_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
173 public enum PixbufRotation {
179 [CCode (cprefix = "GDK_PIXDATA_DUMP_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
180 public enum PixdataDumpType {
190 [CCode (cprefix = "GDK_PIXDATA_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
191 public enum PixdataType {
201 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
202 public delegate void PixbufDestroyNotify (uchar[] pixels);
203 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
204 public delegate bool PixbufSaveFunc (string buf, size_t count, GLib.Error error);
205 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
206 public const int PIXBUF_FEATURES_H;
207 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
208 public const int PIXBUF_MAGIC_NUMBER;
209 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
210 public const int PIXBUF_MAJOR;
211 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
212 public const int PIXBUF_MICRO;
213 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
214 public const int PIXBUF_MINOR;
215 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
216 public const string PIXBUF_VERSION;
217 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
218 public const int PIXDATA_HEADER_LENGTH;