1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (C) Nicolas Bruguier 2009 <gandalfn@club-internet.fr>
6 * maiawm is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published
8 * by the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * maiawm is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 [CCode (cprefix = "Pixman", lower_case_cprefix = "pixman_", cheader_filename = "pixman.h")]
24 [CCode (cname = "pixman_fixed_t")]
25 [IntegerType (rank = 6)]
27 [CCode (cname = "pixman_fixed_to_double")]
28 public Pixman.double to_double();
29 [CCode (cname = "pixman_fixed_to_int")]
30 public Pixman.int to_int();
31 [CCode (cname = "pixman_fixed_ceil")]
35 [CCode (cname = "int")]
36 [IntegerType (rank = 6)]
38 [CCode (cname = "pixman_int_to_fixed")]
39 public Fixed to_fixed();
42 [CCode (cname = "double", default_value = "0.0")]
43 [FloatingType (rank = 2)]
44 public struct double {
45 [CCode (cname = "pixman_double_to_fixed")]
46 public Fixed to_fixed();
49 [CCode (cname = "pixman_box32_t")]
57 [CCode (cname = "pixman_region32_t")]
58 public struct Region32 {
62 public void init_rect (int x, int y, uint width, uint height);
63 public bool init_rects (Box32 boxes, int count);
64 public void init_with_extents (Box32 extents);
67 public bool copy (Region32 inRegion);
69 public bool not_empty ();
70 [CCode (cname = "pixman_region32_extents")]
71 public unowned Box32* get_extents();
72 public unowned Box32[] rectangles();
73 public bool subtract (Region32 reg_m, Region32 reg_s);
74 public bool union (Region32 reg_m, Region32 reg_s);
75 public bool intersect (Region32 reg_m, Region32 reg_s);
78 [CCode (cname = "pixman_filter_t")]
88 [CCode (cname = "pixman_op_t")]
109 DISJOINT_OVER_REVERSE,
113 DISJOINT_OUT_REVERSE,
115 DISJOINT_ATOP_REVERSE,
122 CONJOINT_OVER_REVERSE,
126 CONJOINT_OUT_REVERSE,
128 CONJOINT_ATOP_REVERSE,
150 [CCode (cname = "pixman_format_code_t", cprefix = "PIXMAN_")]
215 [CCode (ref_function = "pixman_image_ref", unref_function = "pixman_image_unref", cname = "pixman_image_t")]
217 [CCode (cname = "pixman_image_create_bits")]
218 public Image.for_bits (Format format, int width, int height, [CCode (array_length = false)] uchar[] bits, int rowstride_bytes);
220 [CCode (cname = "pixman_image_set_filter")]
221 public int set_filter (Pixman.Filter filter, [CCode (array_length = false)] Pixman.Fixed[] params, int n_filter_params);
224 [CCode (cname = "pixman_image_composite")]
225 public static void image_composite (Op op, Image src, Image? mask, Image dest, int16 src_x, int16 src_y, int16 mask_x, int16 mask_y, int16 dest_x, int16 dest_y, uint16 width, uint16 height);