D-Bus: Emit cast to avoid C warning for signal handling in clients
[vala-lang.git] / vapi / pixman-1.vapi
blobb1633b40b3f53eb56877dcfa0300bd7101476227
1 [CCode (cheader_filename = "pixman.h")]
2 namespace Pixman {
3         namespace Version {
4                 public const int MAJOR;
5                 public const int MINOR;
6                 public const int MICRO;
7                 public const string STRING;
8                 [CCode (cname = "PIXMAN_VERSION")]
9                 public const int INT;
11                 public static int encode (int major, int minor, int micro);
12                 [CCode (cname = "pixman_version")]
13                 public static int library_int ();
14                 [CCode (cname = "pixman_string")]
15                 public static unowned string library_string ();
16         }
18         [SimpleType, IntegerType (rank = 6), CCode (cname = "pixman_fixed_16_16_t")]
19         public struct Fixed1616 : int32 {
20         }
22         [SimpleType, IntegerType (rank = 6), CCode (cname = "pixman_fixed_t")]
23         public struct Fixed : Fixed1616 {
24                 public int to_int ();
25                 public double to_double ();
26                 public Fixed frac ();
27                 public Fixed floor ();
28                 public Fixed ceil ();
29                 public Fixed fraction ();
30                 public Fixed mod_2 ();
31                 public Fixed sample_ceil_y (int bpp);
32                 public Fixed sample_floor_y (int bpp);
33         }
35         [CCode (cname = "struct pixman_color", has_type_id = false)]
36         public struct Color {
37                 public uint16 red;
38                 public uint16 green;
39                 public uint16 blue;
40                 public uint16 alpha;
41         }
43         [CCode (cname = "struct pixman_point_fixed", has_type_id = false)]
44         public struct PointFixed {
45                 public Pixman.Fixed x;
46                 public Pixman.Fixed y;
47         }
49         [CCode (cname = "struct pixman_line_fixed", has_type_id = false)]
50         public struct LineFixed {
51                 public Pixman.PointFixed p1;
52                 public Pixman.PointFixed p2;
53         }
55         [CCode (cname = "struct pixman_vector", has_type_id = false)]
56         public struct Vector {
57                 public Pixman.Fixed vector[3];
58         }
60         [CCode (cname = "struct pixman_transform", has_type_id = false)]
61         public struct Transform {
62                 [CCode (array_length = false)]
63                 public Pixman.Fixed[,] matrix;
65                 [CCode (cname = "pixman_transform_init_identity")]
66                 public Transform.identity ();
67                 public bool point_3d (Pixman.Vector vector);
68                 public bool point ();
69                 public bool multiply (Pixman.Transform l, Pixman.Transform r);
70                 [CCode (cname = "pixman_transform_init_scale")]
71                 public Transform.init_scale (Pixman.Fixed sx, Pixman.Fixed sy);
72                 public bool scale (Pixman.Transform reverse, Pixman.Fixed sx, Pixman.Fixed sy);
73                 [CCode (cname = "pixman_transform_init_rotate")]
74                 public Transform.init_rotate (Pixman.Fixed cos, Pixman.Fixed sin);
75                 public bool rotate (Pixman.Transform reverse, Pixman.Fixed c, Pixman.Fixed s);
76                 [CCode (cname = "pixman_transform_rotate")]
77                 public Transform.init_translate (Pixman.Fixed tx, Pixman.Fixed ty);
78                 public bool translate (Pixman.Transform reverse, Pixman.Fixed tx, Pixman.Fixed ty);
79                 public bool bounds (Pixman.Box16 b);
80                 public bool is_identity ();
81                 public bool is_scale ();
82                 public bool is_int_translate ();
83                 public bool is_inverse (Pixman.Transform b);
84         }
86         [CCode (cprefix = "PIXMAN_REGION_", has_type_id = false)]
87         public enum RegionOverlap {
88                 OUT,
89                 IN,
90                 PART
91         }
93         [CCode (cname = "pixman_region16_t", has_type_id = false, cprefix = "pixman_region_", destroy_function = "pixman_region_fini")]
94         public struct Region16 {
95                 public int16 x;
96                 public int16 y;
97                 public uint16 width;
98                 public uint16 height;
100                 public Region16 ();
101                 public Region16.rect (int x, int y, uint width, uint height);
102                 public Region16.rects (Pixman.Box16[] boxes);
103                 public Region16.with_extents (Pixman.Box16 extents);
105                 public void translate (int x, int y);
106                 public bool copy (out Pixman.Region16 region);
107                 [CCode (instance_pos = 1.1)]
108                 public bool intersect (out Pixman.Region16 new_reg, Pixman.Region16 reg2);
109                 [CCode (instance_pos = 1.1)]
110                 public bool union (out Pixman.Region16 new_reg, Pixman.Region16 reg2);
111                 [CCode (instance_pos = 1.1)]
112                 public bool union_rect (out Pixman.Region16 dest, int x, int y, uint width, uint height);
113                 [CCode (instance_pos = 1.1)]
114                 public bool subtract (out Pixman.Region16 reg_d, Pixman.Region16 reg_s);
115                 [CCode (instance_pos = 1.1)]
116                 public bool inverse (out Pixman.Region16 new_reg, Pixman.Box16 inv_rect);
117                 public bool contains_point (int x, int y, Pixman.Box16 box);
118                 public Pixman.RegionOverlap contains_rectangle (Pixman.Box16 prect);
119                 public bool not_empty ();
120                 public Pixman.Box16* extents ();
121                 public int n_rects ();
122                 public Pixman.Box16[] rectangles ();
123                 public bool equal (Pixman.Region16 region2);
124                 public bool selfcheck ();
125                 public void reset (Pixman.Box16 box);
126         }
128         [CCode (cname = "pixman_box16_t", has_type_id = false)]
129         public struct Box16 {
130                 public int16 x1;
131                 public int16 y1;
132                 public int16 x2;
133                 public int16 y2;
134         }
136         [CCode (cname = "pixman_rectangle16_t", has_type_id = false)]
137         public struct Rectangle16 {
138                 public Pixman.Box16 extents;
139         }
141         [CCode (cname = "pixman_region32_t", has_type_id = false, destroy_function = "pixman_region32_fini")]
142         public struct Region32 {
143                 public int32 x;
144                 public int32 y;
145                 public uint32 width;
146                 public uint32 height;
148                 public Region32 ();
149                 public Region32.rect (int x, int y, uint width, uint height);
150                 public Region32.rects (Pixman.Box32[] boxes);
151                 public Region32.with_extents (Pixman.Box32 extents);
153                 public void translate (int x, int y);
154                 public bool copy (out Pixman.Region32 region);
155                 [CCode (instance_pos = 1.1)]
156                 public bool intersect (out Pixman.Region32 new_reg, Pixman.Region32 reg2);
157                 [CCode (instance_pos = 1.1)]
158                 public bool union (out Pixman.Region32 new_reg, Pixman.Region32 reg2);
159                 [CCode (instance_pos = 1.1)]
160                 public bool union_rect (out Pixman.Region32 dest, int x, int y, uint width, uint height);
161                 [CCode (instance_pos = 1.1)]
162                 public bool subtract (out Pixman.Region32 reg_d, Pixman.Region32 reg_s);
163                 [CCode (instance_pos = 1.1)]
164                 public bool inverse (out Pixman.Region32 new_reg, Pixman.Box32 inv_rect);
165                 public bool contains_point (int x, int y, Pixman.Box32 box);
166                 public Pixman.RegionOverlap contains_rectangle (Pixman.Box32 prect);
167                 public bool not_empty ();
168                 public Pixman.Box32* extents ();
169                 public int n_rects ();
170                 public Pixman.Box32[] rectangles ();
171                 public bool equal (Pixman.Region32 region2);
172                 public bool selfcheck ();
173                 public void reset (Pixman.Box32 box);
174         }
176         [CCode (cname = "pixman_box32_t", has_type_id = false)]
177         public struct Box32 {
178                 public int32 x1;
179                 public int32 y1;
180                 public int32 x2;
181                 public int32 y2;
182         }
184         [CCode (cname = "pixman_rectangle32_t", has_type_id = false)]
185         public struct Rectangle32 {
186                 public Pixman.Box32 extents;
187         }
189         public static bool blt ([CCode (array_length = false, type = "uint32_t*")] uint8[] src_bits, [CCode (array_length = false, type = "uint32_t*")] uint8[] dst_bits, int src_stride, int dst_stride, int src_bpp, int dst_bpp, int src_x, int src_y, int dst_x, int dst_y, int width, int height);
190         public static bool fill ([CCode (array_length = false, type = "uint32_t*")] uint8[] bits, int stride, int bpp, int x, int y, int width, int height, uint32 _xor);
192         [CCode (cname = "pixman_read_memory_func_t", has_target = false)]
193         public delegate int32 ReadMemoryFunc ([CCode (type = "void*")] uint8[] src);
194         [CCode (cname = "pixman_write_memory_func_t", has_target = false)]
195         public delegate void WriteMemoryFunc ([CCode (type = "void*", array_length = false)] uint8[] dst, uint32 value, int size);
197         [CCode (cname = "struct pixman_gradient_stop", has_type_id = false)]
198         public struct GradientStop {
199                 public Pixman.Fixed x;
200                 public Pixman.Color color;
201         }
203         [CCode (cname = "struct pixman_indexed", has_type_id = false)]
204         public struct Indexed {
205                 public bool color;
206                 public uint32 rgba[256];
207                 public uint8 ent[32768];
208         }
210         [CCode (cname = "enum pixman_repeat_t", has_type_id = false)]
211         public enum Repeat {
212                 NONE,
213                 NORMAL,
214                 PAD,
215                 REFLECT
216         }
218         [CCode (cname = "enum pixman_filter_t", has_type_id = false)]
219         public enum Filter {
220                 FAST,
221                 GOOD,
222                 BEST,
223                 NEAREST,
224                 BILINEAR,
225                 CONVOLUTION
226         }
228         [CCode (cname = "enum pixman_op_t", has_type_id = false, cprefix = "PIXMAN_OP_")]
229         public enum Operation {
230                 CLEAR,
231                 SRC,
232                 DST,
233                 OVER,
234                 OVER_REVERSE,
235                 IN,
236                 IN_REVERSE,
237                 OUT,
238                 OUT_REVERSE,
239                 ATOP,
240                 ATOP_REVERSE,
241                 XOR,
242                 ADD,
243                 SATURATE,
245                 DISJOINT_CLEAR,
246                 DISJOINT_SRC,
247                 DISJOINT_DST,
248                 DISJOINT_OVER,
249                 DISJOINT_OVER_REVERSE,
250                 DISJOINT_IN,
251                 DISJOINT_IN_REVERSE,
252                 DISJOINT_OUT,
253                 DISJOINT_OUT_REVERSE,
254                 DISJOINT_ATOP,
255                 DISJOINT_ATOP_REVERSE,
256                 DISJOINT_XOR,
258                 CONJOINT_CLEAR,
259                 CONJOINT_SRC,
260                 CONJOINT_DST,
261                 CONJOINT_OVER,
262                 CONJOINT_OVER_REVERSE,
263                 CONJOINT_IN,
264                 CONJOINT_IN_REVERSE,
265                 CONJOINT_OUT,
266                 CONJOINT_OUT_REVERSE,
267                 CONJOINT_ATOP,
268                 CONJOINT_ATOP_REVERSE,
269                 CONJOINT_XOR,
271                 MULTIPLY,
272                 SCREEN,
273                 OVERLAY,
274                 DARKEN,
275                 LIGHTEN,
276                 COLOR_DODGE,
277                 COLOR_BURN,
278                 HARD_LIGHT,
279                 SOFT_LIGHT,
280                 DIFFERENCE,
281                 EXCLUSION,
282                 HSL_HUE,
283                 HSL_SATURATION,
284                 HSL_COLOR,
285                 HSL_LUMINOSITY
286         }
288         [CCode (cname = "int", cprefix = "PIXMAN_TYPE_", has_type_id = false)]
289         public enum FormatType {
290                 OTHER,
291                 A,
292                 ARGB,
293                 ABGR,
294                 COLOR,
295                 GRAY,
296                 YUV2,
297                 YV12,
298                 BGRA;
300                 [CCode (cname = "PIXMAN_FORMAT_COLOR")]
301                 public bool is_color ();
302         }
304         [CCode (cname = "pixman_format_code_t", has_type_id = false, cprefix = "PIXMAN_")]
305         public enum Format {
306                 [CCode (cname = "PIXMAN_a8r8g8b8")]
307                 A8R8G8B8,
308                 [CCode (cname = "PIXMAN_x8r8g8b8")]
309                 X8R8G8B8,
310                 [CCode (cname = "PIXMAN_a8b8g8r8")]
311                 A8B8G8R8,
312                 [CCode (cname = "PIXMAN_x8b8g8r8")]
313                 X8B8G8R8,
314                 [CCode (cname = "PIXMAN_b8g8r8a8")]
315                 B8G8R8A8,
316                 [CCode (cname = "PIXMAN_b8g8r8x8")]
317                 B8G8R8X8,
318                 [CCode (cname = "PIXMAN_x14r6g6b6")]
319                 X14R6G6B6,
320                 [CCode (cname = "PIXMAN_x2r10g10b10")]
321                 X2R10G10B10,
322                 [CCode (cname = "PIXMAN_a2r10g10b10")]
323                 A2R10G10B10,
324                 [CCode (cname = "PIXMAN_x2b10g10r10")]
325                 X2B10G10R10,
326                 [CCode (cname = "PIXMAN_a2b10g10r10")]
327                 A2B10G10R10,
328                 [CCode (cname = "PIXMAN_r8g8b8")]
329                 R8G8B8,
330                 [CCode (cname = "PIXMAN_b8g8r8")]
331                 B8G8R8,
332                 [CCode (cname = "PIXMAN_r5g6b5")]
333                 R5G6B5,
334                 [CCode (cname = "PIXMAN_b5g6r5")]
335                 B5G6R5,
336                 [CCode (cname = "PIXMAN_a1r5g5b5")]
337                 A1R5G5B5,
338                 [CCode (cname = "PIXMAN_x1r5g5b5")]
339                 X1R5G5B5,
340                 [CCode (cname = "PIXMAN_a1b5g5r5")]
341                 A1B5G5R5,
342                 [CCode (cname = "PIXMAN_x1b5g5r5")]
343                 X1B5G5R5,
344                 [CCode (cname = "PIXMAN_a4r4g4b4")]
345                 A4R4G4B4,
346                 [CCode (cname = "PIXMAN_x4r4g4b4")]
347                 X4R4G4B4,
348                 [CCode (cname = "PIXMAN_a4b4g4r4")]
349                 A4B4G4R4,
350                 [CCode (cname = "PIXMAN_x4b4g4r4")]
351                 X4B4G4R4,
352                 /* 8bpp formats */
353                 [CCode (cname = "PIXMAN_a8")]
354                 A8,
355                 [CCode (cname = "PIXMAN_r3g3b2")]
356                 R3G3B2,
357                 [CCode (cname = "PIXMAN_b2g3r3")]
358                 B2G3R3,
359                 [CCode (cname = "PIXMAN_a2r2g2b2")]
360                 A2R2G2B2,
361                 [CCode (cname = "PIXMAN_a2b2g2r2")]
362                 A2B2G2R2,
363                 [CCode (cname = "PIXMAN_c8")]
364                 C8,
365                 [CCode (cname = "PIXMAN_g8")]
366                 G8,
367                 [CCode (cname = "PIXMAN_x4a4")]
368                 X4A4,
369                 [CCode (cname = "PIXMAN_x4c4")]
370                 X4C4,
371                 [CCode (cname = "PIXMAN_x4g4")]
372                 X4G4,
373                 /* 4bpp formats */
374                 [CCode (cname = "PIXMAN_a4")]
375                 A4,
376                 [CCode (cname = "PIXMAN_r1g2b1")]
377                 R1G2B1,
378                 [CCode (cname = "PIXMAN_b1g2r1")]
379                 B1G2R1,
380                 [CCode (cname = "PIXMAN_a1r1g1b1")]
381                 A1R1G1B1,
382                 [CCode (cname = "PIXMAN_a1b1g1r1")]
383                 A1B1G1R1,
384                 [CCode (cname = "PIXMAN_c4")]
385                 C4,
386                 [CCode (cname = "PIXMAN_g4")]
387                 G4,
388                 /* 1bpp formats */
389                 [CCode (cname = "PIXMAN_a1")]
390                 A1,
391                 [CCode (cname = "PIXMAN_g1")]
392                 G1,
393                 /* YUV formats */
394                 [CCode (cname = "PIXMAN_yuy2")]
395                 YUY2,
396                 [CCode (cname = "PIXMAN_yv12")]
397                 YV12;
399                 [CCode (cname = "PIXMAN_FORMAT")]
400                 public static Pixman.Format create (int bpp, Pixman.FormatType type, int a, int r, int g, int b);
401                 [CCode (cname = "pixman_format_supported_destination")]
402                 public bool supported_destination ();
403                 [CCode (cname = "pixman_format_supported_source")]
404                 public bool supported_source ();
405         }
407         [CCode (cname = "pixman_image_t", cprefix = "pixman_", ref_function = "pixman_image_ref", unref_function = "pixman_image_unref", has_type_id = false)]
408         public class Image {
409                 [CCode (cname = "pixman_image_create_solid_fill")]
410                 public Image.solid_fill (Pixman.Color color);
411                 [CCode (cname = "pixman_image_create_linear_gradient")]
412                 public Image.linear_gradient (Pixman.PointFixed p1, Pixman.PointFixed p2, Pixman.GradientStop[] stops);
413                 [CCode (cname = "pixman_image_create_radial_gradient")]
414                 public Image.radial_gradient (Pixman.PointFixed inner, Pixman.PointFixed outer, Pixman.Fixed inner_radius, Pixman.Fixed outer_radius, Pixman.GradientStop[] stops);
415                 [CCode (cname = "pixman_image_create_conical_gradient")]
416                 public Image.conical_gradient (Pixman.PointFixed center, Pixman.Fixed angle, Pixman.GradientStop[] stops);
417                 [CCode (cname = "pixman_image_create_bits")]
418                 public Image.bits (Pixman.Format format, int width, int height, [CCode (type = "uint32_t*", array_length = false)] uint8[] bits, int rowstride_bytes);
420                 public bool set_clip_region (Pixman.Region16 clip_region);
421                 public Pixman.Region16 clip_region { set; }
422                 public bool set_clip_region32 (Pixman.Region32 clip_region32);
423                 public Pixman.Region32 clip_region32 { set; }
424                 public void set_has_client_clip (bool client_clip);
425                 public bool has_client_clip { set; }
426                 public bool set_transform (Pixman.Transform transform);
427                 public Pixman.Transform transform { set; }
428                 public void set_repeat (Pixman.Repeat repeat);
429                 public Pixman.Repeat repeat { set; }
430                 public bool set_filter (Pixman.Filter filter, Pixman.Fixed[] filter_params);
431                 public void set_source_clipping (bool source_clipping);
432                 public bool source_clipping { set; }
433                 public void set_alpha_map (Pixman.Image alpha_map, int16 x, int16 y);
434                 public void set_component_alpha (bool component_alpha);
435                 public bool component_alpha { set; }
436                 public bool set_accessors (Pixman.ReadMemoryFunc read_func, Pixman.WriteMemoryFunc write_func);
437                 public bool set_indexed (Pixman.Indexed indexed);
438                 public Pixman.Indexed indexed { set; }
439                 [CCode (array_length = false)]
440                 public uint32[] get_data ();
441                 public int get_width ();
442                 public int width { get; }
443                 public int get_height ();
444                 public int height { get; }
445                 public int get_stride ();
446                 public int stride { get; }
447                 public int get_depth ();
448                 public int depth { get; }
449                 [CCode (instance_pos = 1.1)]
450                 public bool fill_rectangles (Pixman.Operation op, Pixman.Color color, [CCode (array_length_pos = 2.1)] Pixman.Rectangle16[] rects);
452                 public static bool compute_composite_region (Pixman.Region16 region, Pixman.Image src_image, Pixman.Image? mask_image, Pixman.Image dst_image, int src_x, int src_y, int mask_x, int mask_y, int dest_x, int dest_y, int width, int height);
453                 [CCode (cname = "pixman_image_composite")]
454                 public static void composite (Pixman.Operation op, Pixman.Image src, Pixman.Image? mask, Pixman.Image dest, int16 src_x, int16 src_y, int16 mask_x, int16 mask_y, int16 dest_x, int16 dest_y, uint16 width, uint16 height);
456                 public void rasterize_edges (Pixman.Edge l, Pixman.Edge r, Pixman.Fixed t, Pixman.Fixed b);
457                 public void add_traps (int16 x_off, int16 y_off, [CCode (array_length_pos = 2.9)] Pixman.Trap[] traps);
458                 public void add_trapezoids (int16 x_off, int y_off, [CCode (array_length_pos = 2.9)] Pixman.Trap[] traps);
459                 public void rasterize_trapezoid (Pixman.Trapezoid trap, int x_off, int y_off);
460         }
462         [CCode (cname = "struct pixman_edge", has_type_id = false)]
463         public struct Edge {
464                 public Pixman.Fixed x;
465                 public Pixman.Fixed e;
466                 public Pixman.Fixed stepx;
467                 public Pixman.Fixed signdx;
468                 public Pixman.Fixed dy;
469                 public Pixman.Fixed dx;
471                 public Pixman.Fixed stepx_small;
472                 public Pixman.Fixed stepx_big;
473                 public Pixman.Fixed dx_small;
474                 public Pixman.Fixed dx_big;
476                 public void step (int n);
477                 public Edge (int bpp, Pixman.Fixed y_start, Pixman.Fixed x_top, Pixman.Fixed y_top, Pixman.Fixed x_bot, Pixman.Fixed y_bot);
478                 [CCode (cname = "pixman_line_fixed_edge_init")]
479                 public Edge.line_fixed (int bpp, Pixman.Fixed y, Pixman.LineFixed line, int x_off, int y_off);
480         }
482         [CCode (cname = "struct pixman_trapezoid", has_type_id = false)]
483         public struct Trapezoid {
484                 public Pixman.Fixed top;
485                 public Pixman.Fixed bottom;
486                 public Pixman.LineFixed left;
487                 public Pixman.LineFixed right;
489                 public bool valid ();
490         }
492         [CCode (cname = "struct pixman_span_fix", has_type_id = false)]
493         public struct SpanFix {
494                 public Pixman.Fixed l;
495                 public Pixman.Fixed r;
496                 public Pixman.Fixed y;
497         }
499         [CCode (cname = "struct pixman_trap", has_type_id = false)]
500         public struct Trap {
501                 public Pixman.SpanFix top;
502                 public Pixman.SpanFix bot;
503         }