#include "imager.h"
#include "imio.h"
+static im_context_t get_context(void);
+
/*
DON'T ADD CASTS TO THESE
*/
myfree_file_line,
myrealloc_file_line,
- i_img_8_new,
- i_img_16_new,
- i_img_double_new,
- i_img_pal_new,
+ im_img_8_new,
+ im_img_16_new,
+ im_img_double_new,
+ im_img_pal_new,
i_img_destroy,
i_sametype,
i_sametype_chans,
i_quant_translate,
i_quant_transparent,
- i_clear_error,
- i_push_error,
+ im_clear_error,
+ im_push_error,
i_push_errorf,
- i_push_errorvf,
+ im_push_errorvf,
i_tags_new,
i_tags_set,
i_rubthru,
/* IMAGER_API_LEVEL 2 functions */
- i_set_image_file_limits,
- i_get_image_file_limits,
- i_int_check_image_file_limits,
+ im_set_image_file_limits,
+ im_get_image_file_limits,
+ im_int_check_image_file_limits,
i_flood_fill_border,
i_flood_cfill_border,
i_loog,
/* IMAGER_API_LEVEL 4 functions */
- i_img_alloc,
- i_img_init,
+ im_img_alloc,
+ im_img_init,
/* IMAGER_API_LEVEL 5 functions */
i_img_is_monochrome,
io_new_buffer,
io_new_cb,
io_slurp,
- io_glue_destroy
+ io_glue_destroy,
+
+ get_context
};
/* in general these functions aren't called by Imager internally, but
return i_setcolors(im, index, colors, count);
}
+/*
+=item im_get_context()
+
+Retrieve the context object for the current thread.
+
+Inside Imager itself this is just a function pointer, which the
+Imager.xs BOOT handler initializes for use within perl. If you're
+taking the Imager code and embedding it elsewhere you need to
+initialize the C<im_get_context> pointer at some point.
+
+=cut
+*/
+
+static im_context_t
+get_context(void) {
+ return im_get_context();
+}