1 #ifndef FITZ_CONTEXT_IMP_H 2 #define FITZ_CONTEXT_IMP_H 3 4 #include "mupdf/fitz.h" 5 6 extern fz_alloc_context fz_alloc_default; 7 extern fz_locks_context fz_locks_default; 8 9 /* FIXME: Make all these static? */ 10 double fz_drand48(fz_context *ctx); 11 int32_t fz_lrand48(fz_context *ctx); 12 int32_t fz_mrand48(fz_context *ctx); 13 double fz_erand48(fz_context *ctx, uint16_t xsubi[3]); 14 int32_t fz_jrand48(fz_context *ctx, uint16_t xsubi[3]); 15 int32_t fz_nrand48(fz_context *ctx, uint16_t xsubi[3]); 16 void fz_lcong48(fz_context *ctx, uint16_t param[7]); 17 uint16_t *fz_seed48(fz_context *ctx, uint16_t seed16v[3]); 18 void fz_srand48(fz_context *ctx, int32_t seedval); 19 20 void fz_new_colorspace_context(fz_context *ctx); 21 fz_colorspace_context *fz_keep_colorspace_context(fz_context *ctx); 22 void fz_drop_colorspace_context(fz_context *ctx); 23 24 void fz_new_font_context(fz_context *ctx); 25 26 fz_font_context *fz_keep_font_context(fz_context *ctx); 27 void fz_drop_font_context(fz_context *ctx); 28 29 struct fz_tuning_context 30 { 31 int refs; 32 fz_tune_image_decode_fn *image_decode; 33 void *image_decode_arg; 34 fz_tune_image_scale_fn *image_scale; 35 void *image_scale_arg; 36 }; 37 38 void fz_default_image_decode(void *arg, int w, int h, int l2factor, fz_irect *subarea); 39 int fz_default_image_scale(void *arg, int dst_w, int dst_h, int src_w, int src_h); 40 41 void fz_init_aa_context(fz_context *ctx); 42 43 void fz_new_glyph_cache_context(fz_context *ctx); 44 fz_glyph_cache *fz_keep_glyph_cache(fz_context *ctx); 45 void fz_drop_glyph_cache_context(fz_context *ctx); 46 47 void fz_new_document_handler_context(fz_context *ctx); 48 void fz_drop_document_handler_context(fz_context *ctx); 49 fz_document_handler_context *fz_keep_document_handler_context(fz_context *ctx); 50 51 #endif 52