summaryrefslogtreecommitdiff
path: root/platform/ios/common.h
blob: 672ea119cb782627c386d235e79858e7ae5197ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef MuPDF_common_h
#define MuPDF_common_h

#include <UIKit/UIKit.h>

#undef ABS
#undef MIN
#undef MAX

#include "mupdf/fitz.h"
#include "dispatch/dispatch.h"

extern fz_context *ctx;
extern dispatch_queue_t queue;
extern float screenScale;

CGSize fitPageToScreen(CGSize page, CGSize screen);

int search_page(fz_document *doc, int number, char *needle, fz_cookie *cookie);

fz_rect search_result_bbox(fz_document *doc, int i);

CGDataProviderRef wrapPixmap(fz_pixmap *pix);

CGImageRef newCGImageWithPixmap(fz_pixmap *pix, CGDataProviderRef cgdata);

#endif