1 /* gdk-pixbuf-2.0.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Gdk", lower_case_cprefix = "gdk_", gir_namespace = "GdkPixbuf", gir_version = "2.0")]
5 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
6 public class Pixbuf : GLib.Object, GLib.Icon {
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)] uint8[] 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)] uint8[] data, bool copy_pixels = true) 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 (type = "void", has_construct_function = false)]
33 public async Pixbuf.from_stream_async (GLib.InputStream stream, GLib.Cancellable cancellable) throws GLib.Error;
34 [CCode (has_construct_function = false)]
35 public Pixbuf.from_stream_at_scale (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable) throws GLib.Error;
36 [CCode (type = "void", has_construct_function = false)]
37 public async Pixbuf.from_stream_at_scale_async (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable cancellable);
38 [CCode (has_construct_function = false)]
39 public Pixbuf.from_xpm_data ([CCode (array_length = false)] string[] data);
40 public int get_bits_per_sample ();
41 public Gdk.Colorspace get_colorspace ();
42 public static unowned Gdk.PixbufFormat get_file_info (string filename, out int width, out int height);
43 public static GLib.SList<weak Gdk.PixbufFormat> get_formats ();
44 public bool get_has_alpha ();
45 public int get_height ();
46 public int get_n_channels ();
47 public unowned string get_option (string key);
48 [CCode (array_length = false)]
49 public unowned uint8[] get_pixels ();
50 public int get_rowstride ();
51 public int get_width ();
52 public Gdk.Pixbuf rotate_simple (Gdk.PixbufRotation angle);
53 public void saturate_and_pixelate (Gdk.Pixbuf dest, float saturation, bool pixelate);
54 public bool save (string filename, string type, ...) throws GLib.Error;
55 public bool save_to_buffer ([CCode (type = "gchar**", array_length_type = "gsize")] out uint8[] buffer, string type, ...) throws GLib.Error;
56 public bool save_to_bufferv ([CCode (type = "gchar**", array_length_type = "gsize")] out uint8[] buffer, string type, string[] option_keys, string[] option_values) throws GLib.Error;
57 public bool save_to_callback (Gdk.PixbufSaveFunc save_func, string type, ...) throws GLib.Error;
58 public bool save_to_callbackv (Gdk.PixbufSaveFunc save_func, string type, string[] option_keys, string[] option_values) throws GLib.Error;
59 public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable cancellable) throws GLib.Error;
60 public async bool save_to_stream_async (GLib.OutputStream stream, string type, GLib.Cancellable cancellable) throws GLib.Error;
61 public bool savev (string filename, string type, out unowned string option_keys, out unowned string option_values) throws GLib.Error;
62 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);
63 public Gdk.Pixbuf scale_simple (int dest_width, int dest_height, Gdk.InterpType interp_type);
64 [CCode (has_construct_function = false)]
65 public Pixbuf.subpixbuf (Gdk.Pixbuf src_pixbuf, int src_x, int src_y, int width, int height);
66 public int bits_per_sample { get; construct; }
67 public Gdk.Colorspace colorspace { get; construct; }
68 public bool has_alpha { get; construct; }
69 public int height { get; construct; }
70 public int n_channels { get; construct; }
71 public void* pixels { get; construct; }
72 public int rowstride { get; construct; }
73 public int width { get; construct; }
75 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
76 public class PixbufAnimation : GLib.Object {
77 [CCode (has_construct_function = false)]
78 protected PixbufAnimation ();
79 [CCode (has_construct_function = false)]
80 public PixbufAnimation.from_file (string filename) throws GLib.Error;
81 public int get_height ();
82 public unowned Gdk.PixbufAnimationIter get_iter (GLib.TimeVal start_time);
83 public unowned Gdk.Pixbuf get_static_image ();
84 public int get_width ();
85 public bool is_static_image ();
87 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
88 public class PixbufAnimationIter : GLib.Object {
89 [CCode (has_construct_function = false)]
90 protected PixbufAnimationIter ();
91 public bool advance (GLib.TimeVal current_time);
92 public int get_delay_time ();
93 public unowned Gdk.Pixbuf get_pixbuf ();
94 public bool on_currently_loading_frame ();
97 [CCode (copy_function = "gdk_pixbuf_format_copy", type_id = "GDK_TYPE_PIXBUF_FORMAT", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
98 public class PixbufFormat {
99 public unowned Gdk.PixbufFormat copy ();
100 public unowned string get_description ();
101 [CCode (array_length = false, array_null_terminated = true)]
102 public string[] get_extensions ();
103 public unowned string get_license ();
104 [CCode (array_length = false, array_null_terminated = true)]
105 public string[] get_mime_types ();
106 public unowned string get_name ();
107 public bool is_disabled ();
108 public bool is_scalable ();
109 public bool is_writable ();
110 public void set_disabled (bool disabled);
112 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
113 public class PixbufLoader : GLib.Object {
114 [CCode (has_construct_function = false)]
115 public PixbufLoader ();
116 public bool close () throws GLib.Error;
117 public unowned Gdk.PixbufAnimation get_animation ();
118 public unowned Gdk.PixbufFormat get_format ();
119 public unowned Gdk.Pixbuf get_pixbuf ();
120 public void set_size (int width, int height);
121 [CCode (has_construct_function = false)]
122 public PixbufLoader.with_mime_type (string mime_type) throws GLib.Error;
123 [CCode (has_construct_function = false)]
124 public PixbufLoader.with_type (string image_type) throws GLib.Error;
125 public bool write ([CCode (array_length_type = "gsize")] uint8[] buf) throws GLib.Error;
126 public virtual signal void area_prepared ();
127 public virtual signal void area_updated (int x, int y, int width, int height);
128 public virtual signal void closed ();
129 public virtual signal void size_prepared (int width, int height);
131 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
132 public class PixbufSimpleAnim : Gdk.PixbufAnimation {
133 [CCode (has_construct_function = false)]
134 public PixbufSimpleAnim (int width, int height, float rate);
135 public void add_frame (Gdk.Pixbuf pixbuf);
136 public bool get_loop ();
137 public void set_loop (bool loop);
138 public bool loop { get; set; }
141 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
142 public class PixbufSimpleAnimClass {
144 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
145 public class PixbufSimpleAnimIter : Gdk.PixbufAnimationIter {
146 [CCode (has_construct_function = false)]
147 protected PixbufSimpleAnimIter ();
149 [CCode (type_id = "GDK_TYPE_PIXDATA", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
150 public struct Pixdata {
153 public uint32 pixdata_type;
154 public uint32 rowstride;
156 public uint32 height;
157 [CCode (array_length = false)]
158 public weak uint8[] pixel_data;
159 public bool deserialize ([CCode (array_length_pos = 0.9)] uint8[] stream) throws GLib.Error;
160 public void* from_pixbuf (Gdk.Pixbuf pixbuf, bool use_rle);
161 public uint8[] serialize ();
162 public unowned GLib.StringBuilder to_csource (string name, Gdk.PixdataDumpType dump_type);
164 [CCode (cprefix = "GDK_COLORSPACE_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
165 public enum Colorspace {
168 [CCode (cprefix = "GDK_INTERP_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
169 public enum InterpType {
175 [CCode (cprefix = "GDK_PIXBUF_ALPHA_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
176 public enum PixbufAlphaMode {
180 [CCode (cprefix = "GDK_PIXBUF_ROTATE_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
181 public enum PixbufRotation {
187 [CCode (cprefix = "GDK_PIXDATA_DUMP_", has_type_id = false, cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
188 public enum PixdataDumpType {
198 [CCode (cprefix = "GDK_PIXDATA_", has_type_id = false, cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
199 public enum PixdataType {
209 [CCode (cprefix = "GDK_PIXBUF_ERROR_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
210 public errordomain PixbufError {
215 UNSUPPORTED_OPERATION,
218 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
219 public delegate void PixbufDestroyNotify ([CCode (array_length = false)] uint8[] pixels);
220 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
221 public delegate bool PixbufSaveFunc (string buf, size_t count, GLib.Error error);
222 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
223 public const int PIXBUF_FEATURES_H;
224 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
225 public const int PIXBUF_MAGIC_NUMBER;
226 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
227 public const int PIXBUF_MAJOR;
228 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
229 public const int PIXBUF_MICRO;
230 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
231 public const int PIXBUF_MINOR;
232 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
233 public const string PIXBUF_VERSION;
234 [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
235 public const int PIXDATA_HEADER_LENGTH;