egra: moved "disabled" and "accept/cancel" properties to the base widget class
[iv.d.git] / imlib2.d
blobb27647660bbb3a117ba2648a0a8ac8fbbcd206d9
1 /* Invisible Vector Library
2 * coded by Ketmar // Invisible Vector <ketmar@ketmar.no-ip.org>
3 * Understanding is not required. Only obedience.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3 of the License ONLY.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 // docs: https://docs.enlightenment.org/api/imlib2/html/imlib2_8c.html
18 // sample: https://docs.enlightenment.org/api/imlib2/html/
19 module iv.imlib2 /*is aliced*/;
20 pragma(lib, "Imlib2");
21 import iv.x11;
22 import iv.alice;
24 extern(C) nothrow @nogc:
26 # ifndef X_DISPLAY_MISSING
27 # include <X11/Xlib.h>
28 # endif
31 alias DATA64 = ulong;
32 alias DATA32 = uint;
33 alias DATA16 = ushort;
34 alias DATA8 = ubyte;
36 /* opaque data types */
37 //typedef Imlib_Context = void*;
38 alias Imlib_Context = void*;
39 //typedef Imlib_Image = void*;
40 alias Imlib_Image = void*;
41 //typedef Imlib_Color_Modifier = void*;
42 alias Imlib_Color_Modifier = void*;
43 //typedef Imlib_Updates = void*;
44 alias Imlib_Updates = void*;
45 //typedef Imlib_Font = void*;
46 alias Imlib_Font = void*;
47 //typedef Imlib_Color_Range = void*;
48 alias Imlib_Color_Range = void*;
49 //typedef Imlib_Filter = void*;
50 alias Imlib_Filter = void*;
51 alias Imlib_Border = _imlib_border;
52 alias Imlib_Color = _imlib_color;
53 //typedef ImlibPolygon = void*;
54 alias ImlibPolygon = void*;
56 /* blending operations */
57 enum /*_imlib_operation*/
59 IMLIB_OP_COPY,
60 IMLIB_OP_ADD,
61 IMLIB_OP_SUBTRACT,
62 IMLIB_OP_RESHADE
65 enum /*_imlib_text_direction*/
67 IMLIB_TEXT_TO_RIGHT = 0,
68 IMLIB_TEXT_TO_LEFT = 1,
69 IMLIB_TEXT_TO_DOWN = 2,
70 IMLIB_TEXT_TO_UP = 3,
71 IMLIB_TEXT_TO_ANGLE = 4
74 enum /*_imlib_load_error*/
76 IMLIB_LOAD_ERROR_NONE,
77 IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST,
78 IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY,
79 IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_READ,
80 IMLIB_LOAD_ERROR_NO_LOADER_FOR_FILE_FORMAT,
81 IMLIB_LOAD_ERROR_PATH_TOO_LONG,
82 IMLIB_LOAD_ERROR_PATH_COMPONENT_NON_EXISTANT,
83 IMLIB_LOAD_ERROR_PATH_COMPONENT_NOT_DIRECTORY,
84 IMLIB_LOAD_ERROR_PATH_POINTS_OUTSIDE_ADDRESS_SPACE,
85 IMLIB_LOAD_ERROR_TOO_MANY_SYMBOLIC_LINKS,
86 IMLIB_LOAD_ERROR_OUT_OF_MEMORY,
87 IMLIB_LOAD_ERROR_OUT_OF_FILE_DESCRIPTORS,
88 IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_WRITE,
89 IMLIB_LOAD_ERROR_OUT_OF_DISK_SPACE,
90 IMLIB_LOAD_ERROR_UNKNOWN
93 /* Encodings known to Imlib2 (so far) */
94 enum /*_imlib_TTF_encoding*/
96 IMLIB_TTF_ENCODING_ISO_8859_1,
97 IMLIB_TTF_ENCODING_ISO_8859_2,
98 IMLIB_TTF_ENCODING_ISO_8859_3,
99 IMLIB_TTF_ENCODING_ISO_8859_4,
100 IMLIB_TTF_ENCODING_ISO_8859_5
104 typedef enum _imlib_operation Imlib_Operation;
105 typedef enum _imlib_load_error Imlib_Load_Error;
106 typedef enum _imlib_load_error ImlibLoadError;
107 typedef enum _imlib_text_direction Imlib_Text_Direction;
108 typedef enum _imlib_TTF_encoding Imlib_TTF_Encoding;
110 alias Imlib_Operation = int;
111 alias Imlib_Load_Error = int;
112 alias ImlibLoadError = int;
113 alias Imlib_Text_Direction = int;
114 alias Imlib_TTF_Encoding = int;
116 struct _imlib_border
118 int left, right, top, bottom;
121 struct _imlib_color
123 int alpha, red, green, blue;
126 /* Progressive loading callbacks */
127 /*typedef*/alias Imlib_Progress_Function = int function (
128 Imlib_Image im, char percent,
129 int update_x, int update_y,
130 int update_w, int update_h);
131 //typedef Imlib_Data_Destructor_Function = void function (Imlib_Image im, void *data);
132 alias Imlib_Data_Destructor_Function = void function (Imlib_Image im, void *data);
134 /*EAPI*/ Imlib_Context imlib_context_new ();
135 /*EAPI*/ void imlib_context_free(Imlib_Context context);
137 /*EAPI*/ void imlib_context_push(Imlib_Context context);
138 /*EAPI*/ void imlib_context_pop();
139 /*EAPI*/ Imlib_Context imlib_context_get();
141 /* context setting */
142 //# ifndef X_DISPLAY_MISSING
143 /*EAPI*/ void imlib_context_set_display(Display * display);
144 /*EAPI*/ void imlib_context_disconnect_display();
145 /*EAPI*/ void imlib_context_set_visual(Visual * visual);
146 /*EAPI*/ void imlib_context_set_colormap(Colormap colormap);
147 /*EAPI*/ void imlib_context_set_drawable(Drawable drawable);
148 /*EAPI*/ void imlib_context_set_mask(Pixmap mask);
149 //# endif
150 /*EAPI*/ void imlib_context_set_dither_mask(char dither_mask);
151 /*EAPI*/ void imlib_context_set_mask_alpha_threshold(int mask_alpha_threshold);
152 /*EAPI*/ void imlib_context_set_anti_alias(char anti_alias);
153 /*EAPI*/ void imlib_context_set_dither(char dither);
154 /*EAPI*/ void imlib_context_set_blend(char blend);
155 /*EAPI*/ void imlib_context_set_color_modifier(Imlib_Color_Modifier color_modifier);
156 /*EAPI*/ void imlib_context_set_operation(Imlib_Operation operation);
157 /*EAPI*/ void imlib_context_set_font(Imlib_Font font);
158 /*EAPI*/ void imlib_context_set_direction(Imlib_Text_Direction direction);
159 /*EAPI*/ void imlib_context_set_angle(double angle);
160 /*EAPI*/ void imlib_context_set_color(int red, int green, int blue, int alpha);
161 /*EAPI*/ void imlib_context_set_color_hsva(float hue, float saturation, float value, int alpha);
162 /*EAPI*/ void imlib_context_set_color_hlsa(float hue, float lightness, float saturation, int alpha);
163 /*EAPI*/ void imlib_context_set_color_cmya(int cyan, int magenta, int yellow, int alpha);
164 /*EAPI*/ void imlib_context_set_color_range(Imlib_Color_Range color_range);
165 /*EAPI*/ void imlib_context_set_progress_function(Imlib_Progress_Function
166 progress_function);
167 /*EAPI*/ void imlib_context_set_progress_granularity(char progress_granularity);
168 /*EAPI*/ void imlib_context_set_image(Imlib_Image image);
169 /*EAPI*/ void imlib_context_set_cliprect(int x, int y, int w, int h);
170 /*EAPI*/ void imlib_context_set_TTF_encoding(Imlib_TTF_Encoding encoding);
172 /* context getting */
173 //# ifndef X_DISPLAY_MISSING
174 /*EAPI*/ Display *imlib_context_get_display();
175 /*EAPI*/ Visual *imlib_context_get_visual();
176 /*EAPI*/ Colormap imlib_context_get_colormap();
177 /*EAPI*/ Drawable imlib_context_get_drawable();
178 /*EAPI*/ Pixmap imlib_context_get_mask();
179 //# endif
180 /*EAPI*/ char imlib_context_get_dither_mask();
181 /*EAPI*/ char imlib_context_get_anti_alias();
182 /*EAPI*/ int imlib_context_get_mask_alpha_threshold();
183 /*EAPI*/ char imlib_context_get_dither();
184 /*EAPI*/ char imlib_context_get_blend();
185 /*EAPI*/ Imlib_Color_Modifier imlib_context_get_color_modifier();
186 /*EAPI*/ Imlib_Operation imlib_context_get_operation();
187 /*EAPI*/ Imlib_Font imlib_context_get_font();
188 /*EAPI*/ double imlib_context_get_angle();
189 /*EAPI*/ Imlib_Text_Direction imlib_context_get_direction();
190 /*EAPI*/ void imlib_context_get_color(int *red, int *green, int *blue, int *alpha);
191 /*EAPI*/ void imlib_context_get_color_hsva(float *hue, float *saturation, float *value, int *alpha);
192 /*EAPI*/ void imlib_context_get_color_hlsa(float *hue, float *lightness, float *saturation, int *alpha);
193 /*EAPI*/ void imlib_context_get_color_cmya(int *cyan, int *magenta, int *yellow, int *alpha);
194 /*EAPI*/ Imlib_Color *imlib_context_get_imlib_color();
195 /*EAPI*/ Imlib_Color_Range imlib_context_get_color_range();
196 /*EAPI*/ Imlib_Progress_Function imlib_context_get_progress_function();
197 /*EAPI*/ char imlib_context_get_progress_granularity();
198 /*EAPI*/ Imlib_Image imlib_context_get_image();
199 /*EAPI*/ void imlib_context_get_cliprect(int *x, int *y, int *w, int *h);
200 /*EAPI*/ Imlib_TTF_Encoding imlib_context_get_TTF_encoding();
202 /*EAPI*/ int imlib_get_cache_size();
203 /*EAPI*/ void imlib_set_cache_size(int bytes);
204 /*EAPI*/ int imlib_get_color_usage();
205 /*EAPI*/ void imlib_set_color_usage(int max);
206 /*EAPI*/ void imlib_flush_loaders();
207 //# ifndef X_DISPLAY_MISSING
208 /*EAPI*/ int imlib_get_visual_depth(Display * display, Visual * visual);
209 /*EAPI*/ Visual *imlib_get_best_visual(Display * display, int screen,
210 int *depth_return);
211 //# endif
213 /*EAPI*/ Imlib_Image imlib_load_image(const(char)* file);
214 /*EAPI*/ Imlib_Image imlib_load_image_immediately(const(char)* file);
215 /*EAPI*/ Imlib_Image imlib_load_image_without_cache(const(char)* file);
216 /*EAPI*/ Imlib_Image imlib_load_image_immediately_without_cache(const(char)* file);
217 /*EAPI*/ Imlib_Image imlib_load_image_with_error_return(const(char)* file,
218 Imlib_Load_Error *
219 error_return);
220 /*EAPI*/ void imlib_free_image();
221 /*EAPI*/ void imlib_free_image_and_decache();
223 /* query/modify image parameters */
224 /*EAPI*/ int imlib_image_get_width();
225 /*EAPI*/ int imlib_image_get_height();
226 /*EAPI*/ const(char)* imlib_image_get_filename();
227 /*EAPI*/ DATA32 *imlib_image_get_data(); // b, g, r, a
228 /*EAPI*/ const(DATA32) *imlib_image_get_data_for_reading_only();
229 /*EAPI*/ void imlib_image_put_back_data(DATA32 * data);
230 /*EAPI*/ char imlib_image_has_alpha();
231 /*EAPI*/ void imlib_image_set_changes_on_disk();
232 /*EAPI*/ void imlib_image_get_border(Imlib_Border * border);
233 /*EAPI*/ void imlib_image_set_border(Imlib_Border * border);
234 /*EAPI*/ void imlib_image_set_format(const(char)* format);
235 /*EAPI*/ void imlib_image_set_irrelevant_format(char irrelevant);
236 /*EAPI*/ void imlib_image_set_irrelevant_border(char irrelevant);
237 /*EAPI*/ void imlib_image_set_irrelevant_alpha(char irrelevant);
238 /*EAPI*/ char *imlib_image_format();
239 /*EAPI*/ void imlib_image_set_has_alpha(char has_alpha);
240 /*EAPI*/ void imlib_image_query_pixel(int x, int y, Imlib_Color * color_return);
241 /*EAPI*/ void imlib_image_query_pixel_hsva(int x, int y, float *hue, float *saturation, float *value, int *alpha);
242 /*EAPI*/ void imlib_image_query_pixel_hlsa(int x, int y, float *hue, float *lightness, float *saturation, int *alpha);
243 /*EAPI*/ void imlib_image_query_pixel_cmya(int x, int y, int *cyan, int *magenta, int *yellow, int *alpha);
245 /* rendering functions */
246 //# ifndef X_DISPLAY_MISSING
247 /*EAPI*/ void imlib_render_pixmaps_for_whole_image(Pixmap * pixmap_return,
248 Pixmap * mask_return);
249 /*EAPI*/ void imlib_render_pixmaps_for_whole_image_at_size(Pixmap * pixmap_return,
250 Pixmap * mask_return,
251 int width, int height);
252 /*EAPI*/ void imlib_free_pixmap_and_mask(Pixmap pixmap);
253 /*EAPI*/ void imlib_render_image_on_drawable(int x, int y);
254 /*EAPI*/ void imlib_render_image_on_drawable_at_size(int x, int y, int width,
255 int height);
256 /*EAPI*/ void imlib_render_image_part_on_drawable_at_size(int source_x,
257 int source_y,
258 int source_width,
259 int source_height, int x,
260 int y, int width,
261 int height);
262 /*EAPI*/ DATA32 imlib_render_get_pixel_color();
263 //# endif
264 /*EAPI*/ void imlib_blend_image_onto_image(Imlib_Image source_image,
265 char merge_alpha, int source_x,
266 int source_y, int source_width,
267 int source_height, int destination_x,
268 int destination_y, int destination_width,
269 int destination_height);
271 /* creation functions */
272 /*EAPI*/ Imlib_Image imlib_create_image(int width, int height);
273 /*EAPI*/ Imlib_Image imlib_create_image_using_data(int width, int height,
274 DATA32 * data);
275 /*EAPI*/ Imlib_Image imlib_create_image_using_copied_data(int width, int height,
276 DATA32 * data);
277 //# ifndef X_DISPLAY_MISSING
278 /*EAPI*/ Imlib_Image imlib_create_image_from_drawable(Pixmap mask, int x, int y,
279 int width, int height,
280 char need_to_grab_x);
281 /*EAPI*/ Imlib_Image imlib_create_image_from_ximage(XImage *image, XImage *mask, int x, int y,
282 int width, int height,
283 char need_to_grab_x);
284 /*EAPI*/ Imlib_Image imlib_create_scaled_image_from_drawable(Pixmap mask,
285 int source_x,
286 int source_y,
287 int source_width,
288 int source_height,
289 int destination_width,
290 int destination_height,
291 char need_to_grab_x,
292 char
293 get_mask_from_shape);
294 /*EAPI*/ char imlib_copy_drawable_to_image(Pixmap mask, int x, int y, int width,
295 int height, int destination_x,
296 int destination_y, char need_to_grab_x);
297 //# endif
298 /*EAPI*/ Imlib_Image imlib_clone_image();
299 /*EAPI*/ Imlib_Image imlib_create_cropped_image(int x, int y, int width,
300 int height);
301 /*EAPI*/ Imlib_Image imlib_create_cropped_scaled_image(int source_x, int source_y,
302 int source_width,
303 int source_height,
304 int destination_width,
305 int destination_height);
307 /* imlib updates. lists of rectangles for storing required update draws */
308 /*EAPI*/ Imlib_Updates imlib_updates_clone(Imlib_Updates updates);
309 /*EAPI*/ Imlib_Updates imlib_update_append_rect(Imlib_Updates updates, int x, int y,
310 int w, int h);
311 /*EAPI*/ Imlib_Updates imlib_updates_merge(Imlib_Updates updates, int w, int h);
312 /*EAPI*/ Imlib_Updates imlib_updates_merge_for_rendering(Imlib_Updates updates,
313 int w, int h);
314 /*EAPI*/ void imlib_updates_free(Imlib_Updates updates);
315 /*EAPI*/ Imlib_Updates imlib_updates_get_next(Imlib_Updates updates);
316 /*EAPI*/ void imlib_updates_get_coordinates(Imlib_Updates updates, int *x_return,
317 int *y_return, int *width_return,
318 int *height_return);
319 /*EAPI*/ void imlib_updates_set_coordinates(Imlib_Updates updates, int x, int y,
320 int width, int height);
321 /*EAPI*/ void imlib_render_image_updates_on_drawable(Imlib_Updates updates, int x,
322 int y);
323 /*EAPI*/ Imlib_Updates imlib_updates_init();
324 /*EAPI*/ Imlib_Updates imlib_updates_append_updates(Imlib_Updates updates,
325 Imlib_Updates appended_updates);
327 /* image modification */
328 /*EAPI*/ void imlib_image_flip_horizontal();
329 /*EAPI*/ void imlib_image_flip_vertical();
330 /*EAPI*/ void imlib_image_flip_diagonal();
331 /*EAPI*/ void imlib_image_orientate(int orientation);
332 /*EAPI*/ void imlib_image_blur(int radius);
333 /*EAPI*/ void imlib_image_sharpen(int radius);
334 /*EAPI*/ void imlib_image_tile_horizontal();
335 /*EAPI*/ void imlib_image_tile_vertical();
336 /*EAPI*/ void imlib_image_tile();
338 /* fonts and text */
339 /*EAPI*/ Imlib_Font imlib_load_font(const(char)* font_name);
340 /*EAPI*/ void imlib_free_font();
341 /* NB! The four functions below are deprecated. */
342 /*EAPI*/ int imlib_insert_font_into_fallback_chain(Imlib_Font font, Imlib_Font fallback_font);
343 /*EAPI*/ void imlib_remove_font_from_fallback_chain(Imlib_Font fallback_font);
344 /*EAPI*/ Imlib_Font imlib_get_prev_font_in_fallback_chain(Imlib_Font fn);
345 /*EAPI*/ Imlib_Font imlib_get_next_font_in_fallback_chain(Imlib_Font fn);
346 /* NB! The four functions above are deprecated. */
347 /*EAPI*/ void imlib_text_draw(int x, int y, const(char)* text);
348 /*EAPI*/ void imlib_text_draw_with_return_metrics(int x, int y, const(char)* text,
349 int *width_return,
350 int *height_return,
351 int *horizontal_advance_return,
352 int *vertical_advance_return);
353 /*EAPI*/ void imlib_get_text_size(const(char)* text, int *width_return,
354 int *height_return);
355 /*EAPI*/ void imlib_get_text_advance(const(char)* text,
356 int *horizontal_advance_return,
357 int *vertical_advance_return);
358 /*EAPI*/ int imlib_get_text_inset(const(char)* text);
359 /*EAPI*/ void imlib_add_path_to_font_path(const(char)* path);
360 /*EAPI*/ void imlib_remove_path_from_font_path(const(char)* path);
361 /*EAPI*/ char **imlib_list_font_path(int *number_return);
362 /*EAPI*/ int imlib_text_get_index_and_location(const(char)* text, int x, int y,
363 int *char_x_return,
364 int *char_y_return,
365 int *char_width_return,
366 int *char_height_return);
367 /*EAPI*/ void imlib_text_get_location_at_index(const(char)* text, int index,
368 int *char_x_return,
369 int *char_y_return,
370 int *char_width_return,
371 int *char_height_return);
372 /*EAPI*/ char **imlib_list_fonts(int *number_return);
373 /*EAPI*/ void imlib_free_font_list(char **font_list, int number);
374 /*EAPI*/ int imlib_get_font_cache_size();
375 /*EAPI*/ void imlib_set_font_cache_size(int bytes);
376 /*EAPI*/ void imlib_flush_font_cache();
377 /*EAPI*/ int imlib_get_font_ascent();
378 /*EAPI*/ int imlib_get_font_descent();
379 /*EAPI*/ int imlib_get_maximum_font_ascent();
380 /*EAPI*/ int imlib_get_maximum_font_descent();
382 /* color modifiers */
383 /*EAPI*/ Imlib_Color_Modifier imlib_create_color_modifier();
384 /*EAPI*/ void imlib_free_color_modifier();
385 /*EAPI*/ void imlib_modify_color_modifier_gamma(double gamma_value);
386 /*EAPI*/ void imlib_modify_color_modifier_brightness(double brightness_value);
387 /*EAPI*/ void imlib_modify_color_modifier_contrast(double contrast_value);
388 /*EAPI*/ void imlib_set_color_modifier_tables(DATA8 * red_table,
389 DATA8 * green_table,
390 DATA8 * blue_table,
391 DATA8 * alpha_table);
392 /*EAPI*/ void imlib_get_color_modifier_tables(DATA8 * red_table,
393 DATA8 * green_table,
394 DATA8 * blue_table,
395 DATA8 * alpha_table);
396 /*EAPI*/ void imlib_reset_color_modifier();
397 /*EAPI*/ void imlib_apply_color_modifier();
398 /*EAPI*/ void imlib_apply_color_modifier_to_rectangle(int x, int y, int width,
399 int height);
401 /* drawing on images */
402 /*EAPI*/ Imlib_Updates imlib_image_draw_pixel(int x, int y, char make_updates);
403 /*EAPI*/ Imlib_Updates imlib_image_draw_line(int x1, int y1, int x2, int y2,
404 char make_updates);
405 /*EAPI*/ void imlib_image_draw_rectangle(int x, int y, int width, int height);
406 /*EAPI*/ void imlib_image_fill_rectangle(int x, int y, int width, int height);
407 /*EAPI*/ void imlib_image_copy_alpha_to_image(Imlib_Image image_source, int x,
408 int y);
409 /*EAPI*/ void imlib_image_copy_alpha_rectangle_to_image(Imlib_Image image_source,
410 int x, int y, int width,
411 int height,
412 int destination_x,
413 int destination_y);
414 /*EAPI*/ void imlib_image_scroll_rect(int x, int y, int width, int height,
415 int delta_x, int delta_y);
416 /*EAPI*/ void imlib_image_copy_rect(int x, int y, int width, int height, int new_x,
417 int new_y);
419 /* polygons */
420 /*EAPI*/ ImlibPolygon imlib_polygon_new();
421 /*EAPI*/ void imlib_polygon_free(ImlibPolygon poly);
422 /*EAPI*/ void imlib_polygon_add_point(ImlibPolygon poly, int x, int y);
423 /*EAPI*/ void imlib_image_draw_polygon(ImlibPolygon poly, ubyte closed);
424 /*EAPI*/ void imlib_image_fill_polygon(ImlibPolygon poly);
425 /*EAPI*/ void imlib_polygon_get_bounds(ImlibPolygon poly, int *px1, int *py1,
426 int *px2, int *py2);
427 /*EAPI*/ ubyte imlib_polygon_contains_point(ImlibPolygon poly, int x, int y);
429 /* ellipses */
430 /*EAPI*/ void imlib_image_draw_ellipse(int xc, int yc, int a, int b);
431 /*EAPI*/ void imlib_image_fill_ellipse(int xc, int yc, int a, int b);
433 /* color ranges */
434 /*EAPI*/ Imlib_Color_Range imlib_create_color_range();
435 /*EAPI*/ void imlib_free_color_range();
436 /*EAPI*/ void imlib_add_color_to_color_range(int distance_away);
437 /*EAPI*/ void imlib_image_fill_color_range_rectangle(int x, int y, int width,
438 int height, double angle);
439 /*EAPI*/ void imlib_image_fill_hsva_color_range_rectangle(int x, int y, int width,
440 int height, double angle);
442 /* image data */
443 /*EAPI*/ void imlib_image_attach_data_value(const(char)* key, void *data, int value,
444 Imlib_Data_Destructor_Function
445 destructor_function);
446 /*EAPI*/ void *imlib_image_get_attached_data(const(char)* key);
447 /*EAPI*/ int imlib_image_get_attached_value(const(char)* key);
448 /*EAPI*/ void imlib_image_remove_attached_data_value(const(char)* key);
449 /*EAPI*/ void imlib_image_remove_and_free_attached_data_value(const(char)* key);
451 /* saving */
452 /*EAPI*/ void imlib_save_image(const(char)* filename);
453 /*EAPI*/ void imlib_save_image_with_error_return(const(char)* filename,
454 Imlib_Load_Error * error_return);
456 /* FIXME: */
457 /* need to add arbitrary rotation routines */
459 /* rotation/skewing */
460 /*EAPI*/ Imlib_Image imlib_create_rotated_image(double angle);
462 /* rotation from buffer to context (without copying)*/
463 /*EAPI*/ void imlib_rotate_image_from_buffer(double angle,
464 Imlib_Image source_image);
466 /*EAPI*/ void imlib_blend_image_onto_image_at_angle(Imlib_Image source_image,
467 char merge_alpha, int source_x,
468 int source_y, int source_width,
469 int source_height,
470 int destination_x,
471 int destination_y, int angle_x,
472 int angle_y);
473 /*EAPI*/ void imlib_blend_image_onto_image_skewed(Imlib_Image source_image,
474 char merge_alpha, int source_x,
475 int source_y, int source_width,
476 int source_height,
477 int destination_x,
478 int destination_y, int h_angle_x,
479 int h_angle_y, int v_angle_x,
480 int v_angle_y);
481 //# ifndef X_DISPLAY_MISSING
482 /*EAPI*/ void imlib_render_image_on_drawable_skewed(int source_x, int source_y,
483 int source_width,
484 int source_height,
485 int destination_x,
486 int destination_y,
487 int h_angle_x, int h_angle_y,
488 int v_angle_x, int v_angle_y);
489 /*EAPI*/ void imlib_render_image_on_drawable_at_angle(int source_x, int source_y,
490 int source_width,
491 int source_height,
492 int destination_x,
493 int destination_y,
494 int angle_x, int angle_y);
495 //# endif
497 /* image filters */
498 /*EAPI*/ void imlib_image_filter();
499 /*EAPI*/ Imlib_Filter imlib_create_filter(int initsize);
500 /*EAPI*/ void imlib_context_set_filter(Imlib_Filter filter);
501 /*EAPI*/ Imlib_Filter imlib_context_get_filter();
502 /*EAPI*/ void imlib_free_filter();
503 /*EAPI*/ void imlib_filter_set(int xoff, int yoff, int a, int r, int g, int b);
504 /*EAPI*/ void imlib_filter_set_alpha(int xoff, int yoff, int a, int r, int g,
505 int b);
506 /*EAPI*/ void imlib_filter_set_red(int xoff, int yoff, int a, int r, int g, int b);
507 /*EAPI*/ void imlib_filter_set_green(int xoff, int yoff, int a, int r, int g,
508 int b);
509 /*EAPI*/ void imlib_filter_set_blue(int xoff, int yoff, int a, int r, int g, int b);
510 /*EAPI*/ void imlib_filter_constants(int a, int r, int g, int b);
511 /*EAPI*/ void imlib_filter_divisors(int a, int r, int g, int b);
513 /*EAPI*/ void imlib_apply_filter(char *script, ...);
515 /*EAPI*/ void imlib_image_clear();
516 /*EAPI*/ void imlib_image_clear_color(int r, int g, int b, int a);