1 | ; gdk-pixbuf.defs -*- lisp -*- |
---|
2 | |
---|
3 | (import "gdk.defs") |
---|
4 | |
---|
5 | (define-boxed GdkPixbuf |
---|
6 | (copy gdk_pixbuf_ref) |
---|
7 | (free gdk_pixbuf_unref)) |
---|
8 | |
---|
9 | (define-enum GdkColorspace |
---|
10 | (rgb GDK_COLORSPACE_RGB)) |
---|
11 | |
---|
12 | (define-enum GdkPixbufAlphaMode |
---|
13 | (bilevel GDK_PIXBUF_ALPHA_BILEVEL) |
---|
14 | (full GDK_PIXBUF_ALPHA_FULL)) |
---|
15 | |
---|
16 | (define-enum GdkInterpType |
---|
17 | (nearest GDK_INTERP_NEAREST) |
---|
18 | (tiles GDK_INTERP_TILES) |
---|
19 | (bilinear GDK_INTERP_BILINEAR) |
---|
20 | (hyper GDK_INTERP_HYPER)) |
---|
21 | |
---|
22 | ;;; accessors |
---|
23 | |
---|
24 | (define-func gdk_pixbuf_get_colorspace |
---|
25 | GdkColorspace |
---|
26 | ((GdkPixbuf pixbuf))) |
---|
27 | |
---|
28 | (define-func gdk_pixbuf_get_n_channels |
---|
29 | int |
---|
30 | ((GdkPixbuf pixbuf))) |
---|
31 | |
---|
32 | (define-func gdk_pixbuf_get_has_alpha |
---|
33 | bool |
---|
34 | ((GdkPixbuf pixbuf))) |
---|
35 | |
---|
36 | (define-func gdk_pixbuf_get_bits_per_sample |
---|
37 | int |
---|
38 | ((GdkPixbuf pixbuf))) |
---|
39 | |
---|
40 | ;(define-func gdk_pixbuf_get_pixels |
---|
41 | ; ?? |
---|
42 | ; ((GdkPixbuf pixbuf))) |
---|
43 | |
---|
44 | (define-func gdk_pixbuf_get_width |
---|
45 | int |
---|
46 | ((GdkPixbuf pixbuf))) |
---|
47 | |
---|
48 | (define-func gdk_pixbuf_get_height |
---|
49 | int |
---|
50 | ((GdkPixbuf pixbuf))) |
---|
51 | |
---|
52 | (define-func gdk_pixbuf_get_rowstride |
---|
53 | int |
---|
54 | ((GdkPixbuf pixbuf))) |
---|
55 | |
---|
56 | ;;; creation |
---|
57 | |
---|
58 | (define-func gdk_pixbuf_new |
---|
59 | (GdkPixbuf (copy nil)) |
---|
60 | ((GdkColorspace colorspace) |
---|
61 | (bool has_alpha) |
---|
62 | (int bits_per_sample) |
---|
63 | (int width) |
---|
64 | (int height))) |
---|
65 | |
---|
66 | (define-func gdk_pixbuf_copy |
---|
67 | (GdkPixbuf (copy nil)) |
---|
68 | ((GdkPixbuf pixbuf))) |
---|
69 | |
---|
70 | ;;; loading |
---|
71 | |
---|
72 | (define-func gdk_pixbuf_new_from_file |
---|
73 | (GdkPixbuf (copy nil)) |
---|
74 | ((string filename) |
---|
75 | ;; XXX fix this |
---|
76 | (pointer gerror (= "0")))) |
---|
77 | |
---|
78 | ;why the fuck was this changed to take a const char **? |
---|
79 | ;(define-func gdk_pixbuf_new_from_xpm_data |
---|
80 | ; (GdkPixbuf (copy nil)) |
---|
81 | ; ((string data))) |
---|
82 | |
---|
83 | ;;; manipulation |
---|
84 | |
---|
85 | (define-func gdk_pixbuf_add_alpha |
---|
86 | (GdkPixbuf (copy nil)) |
---|
87 | ((GdkPixbuf pixbuf) |
---|
88 | (bool subst_color) |
---|
89 | (uint r) |
---|
90 | (uint g) |
---|
91 | (uint b))) |
---|
92 | |
---|
93 | (define-func gdk_pixbuf_copy_area |
---|
94 | none |
---|
95 | ((GdkPixbuf src_pixbuf) |
---|
96 | (int src_x) |
---|
97 | (int src_y) |
---|
98 | (int width) |
---|
99 | (int height) |
---|
100 | (GdkPixbuf dest_pixbuf) |
---|
101 | (int dest_x) |
---|
102 | (int dest_y))) |
---|
103 | |
---|
104 | ;(define-func gdk_pixbuf_render_threshold_alpha |
---|
105 | ; none |
---|
106 | ; ((GdkPixbuf pixbuf) |
---|
107 | ; (GdkBitmap bitmap) |
---|
108 | ; (int src_x) |
---|
109 | ; (int src_y) |
---|
110 | ; (int dest_x) |
---|
111 | ; (int dest_y) |
---|
112 | ; (int width) |
---|
113 | ; (int height) |
---|
114 | ; (int alpha_threshold))) |
---|
115 | |
---|
116 | ;(define-func gdk_pixbuf_render_to_drawable |
---|
117 | ; none |
---|
118 | ; ((GdkPixbuf pixbuf) |
---|
119 | ; (GdkDrawable drawable) |
---|
120 | ; (GdkGC gc) |
---|
121 | ; (int src_y) |
---|
122 | ; (int dest_x) |
---|
123 | ; (int dest_y) |
---|
124 | ; (int width) |
---|
125 | ; (int height) |
---|
126 | ; (GdkRgbDither dither) |
---|
127 | ; (int x_dither) |
---|
128 | ; (int y_dither))) |
---|
129 | |
---|
130 | ;(define-func gdk_pixbuf_render_to_drawable_alpha |
---|
131 | ; none |
---|
132 | ; ((GdkPixbuf pixbuf) |
---|
133 | ; (GdkDrawable drawable) |
---|
134 | ; (GdkGC gc) |
---|
135 | ; (int src_y) |
---|
136 | ; (int dest_x) |
---|
137 | ; (int dest_y) |
---|
138 | ; (int width) |
---|
139 | ; (int height) |
---|
140 | ; (GdkPixbufAlphaMode alpha_mode) |
---|
141 | ; (int alpha_threshold) |
---|
142 | ; (GdkRgbDither dither) |
---|
143 | ; (int x_dither) |
---|
144 | ; (int y_dither))) |
---|
145 | |
---|
146 | ;(define-func gdk_pixbuf_render_pixmap_and_mask |
---|
147 | ; none |
---|
148 | ; ((GdkPixbuf pixbuf) |
---|
149 | ; ((ret GdkPixmap) pixmap_return) |
---|
150 | ; ((ret GdkBitmap) mask_return) |
---|
151 | ; (int alpha_threshold))) |
---|
152 | |
---|
153 | ;; gdk_pixbuf_get_from_drawable |
---|
154 | |
---|
155 | ;;; scaling |
---|
156 | |
---|
157 | (define-func gdk_pixbuf_scale |
---|
158 | none |
---|
159 | ((GdkPixbuf src) |
---|
160 | (GdkPixbuf dest) |
---|
161 | (int dest_x) |
---|
162 | (int dest_y) |
---|
163 | (int dest_width) |
---|
164 | (int dest_height) |
---|
165 | (double offset_x) |
---|
166 | (double offset_y) |
---|
167 | (double scale_x) |
---|
168 | (double scale_y) |
---|
169 | (GdkInterpType interp_type))) |
---|
170 | |
---|
171 | (define-func gdk_pixbuf_composite |
---|
172 | none |
---|
173 | ((GdkPixbuf src) |
---|
174 | (GdkPixbuf dest) |
---|
175 | (int dest_x) |
---|
176 | (int dest_y) |
---|
177 | (int dest_width) |
---|
178 | (int dest_height) |
---|
179 | (double offset_x) |
---|
180 | (double offset_y) |
---|
181 | (double scale_x) |
---|
182 | (double scale_y) |
---|
183 | (GdkInterpType interp_type) |
---|
184 | (int overall_alpha))) |
---|
185 | |
---|
186 | (define-func gdk_pixbuf_composite_color |
---|
187 | none |
---|
188 | ((GdkPixbuf src) |
---|
189 | (GdkPixbuf dest) |
---|
190 | (int dest_x) |
---|
191 | (int dest_y) |
---|
192 | (int dest_width) |
---|
193 | (int dest_height) |
---|
194 | (double offset_x) |
---|
195 | (double offset_y) |
---|
196 | (double scale_x) |
---|
197 | (double scale_y) |
---|
198 | (GdkInterpType interp_type) |
---|
199 | (int overall_alpha) |
---|
200 | (int check_x) |
---|
201 | (int check_y) |
---|
202 | (int check_size) |
---|
203 | (uint color1) |
---|
204 | (uint color2))) |
---|
205 | |
---|
206 | (define-func gdk_pixbuf_scale_simple |
---|
207 | (GdkPixbuf (copy nil)) |
---|
208 | ((GdkPixbuf src) |
---|
209 | (int dest_width) |
---|
210 | (int dest_height) |
---|
211 | (GdkInterpType interp_type))) |
---|
212 | |
---|
213 | (define-func gdk_pixbuf_composite_color_simple |
---|
214 | (GdkPixbuf (copy nil)) |
---|
215 | ((GdkPixbuf src) |
---|
216 | (int dest_width) |
---|
217 | (int dest_height) |
---|
218 | (GdkInterpType interp_type) |
---|
219 | (int overall_alpha) |
---|
220 | (int check_size) |
---|
221 | (uint color1) |
---|
222 | (uint color2))) |
---|
223 | |
---|
224 | ;;; XXX animations |
---|
225 | |
---|
226 | (options |
---|
227 | (includes "#include <gdk-pixbuf/gdk-pixbuf.h>") |
---|
228 | (init-func "sgtk_init_gdk_pixbuf_glue") |
---|
229 | (other-inits "sgtk_init_gtk_glib_glue") |
---|
230 | (other-inits "sgtk_init_gtk_gdk_glue")) |
---|