Whoops
[llpp.git] / ffi.ml
blobdd099bbf822244b68238870c448cd4c5e43b8399
1 open Config;;
3 type initparams = (angle * fitmodel * trimparams * texcount * sliceheight *
4 memsize * colorspace * fontpath * trimcachepath);;
6 external init : Unix.file_descr -> initparams -> unit = "ml_init";;
7 external seltext : opaque -> (int * int * int * int) -> unit = "ml_seltext";;
8 external hassel : opaque -> bool = "ml_hassel";;
9 external getpdimrect : int -> float array = "ml_getpdimrect";;
10 external whatsunder : opaque -> x -> y -> under = "ml_whatsunder";;
11 external markunder : opaque -> x -> y -> mark -> bool = "ml_markunder";;
12 external clearmark : opaque -> unit = "ml_clearmark";;
13 external zoomforh : int -> int -> int -> int -> float = "ml_zoom_for_height";;
14 external getmaxw : unit -> float = "ml_getmaxw";;
15 external postprocess :
16 opaque -> int -> int -> int -> (int * string * int) -> int
17 = "ml_postprocess";;
18 external pagebbox : opaque -> bbox = "ml_getpagebox";;
19 external setaalevel : int -> unit = "ml_setaalevel";;
20 external setpapercolor : rgba -> unit = "ml_setpapercolor";;
21 external realloctexts : int -> bool = "ml_realloctexts";;
22 external findlink : opaque -> linkdir -> link = "ml_findlink";;
23 external getlink : opaque -> int -> under = "ml_getlink";;
24 external getlinkrect : opaque -> int -> irect = "ml_getlinkrect";;
25 external getlinkcount : opaque -> int = "ml_getlinkcount";;
26 external findpwl : int -> int -> pagewithlinks = "ml_find_page_with_links";;
27 external getpbo : width -> height -> colorspace -> opaque = "ml_getpbo";;
28 external freepbo : opaque -> unit = "ml_freepbo";;
29 external unmappbo : opaque -> unit = "ml_unmappbo";;
30 external bousable : unit -> bool = "ml_bo_usable";;
31 external unproject : opaque -> int -> int -> (int * int) option
32 = "ml_unproject";;
33 external project : opaque -> int -> int -> float -> float -> (float * float)
34 = "ml_project";;
35 external drawtile : tileparams -> opaque -> unit = "ml_drawtile";;
36 external rectofblock : opaque -> int -> int -> float array option
37 = "ml_rectofblock";;
38 external begintiles : unit -> unit = "ml_begintiles";;
39 external endtiles : unit -> unit = "ml_endtiles";;
40 external addannot : opaque -> int -> int -> string -> unit = "ml_addannot";;
41 external modannot : opaque -> slinkindex -> string -> unit = "ml_modannot";;
42 external delannot : opaque -> slinkindex -> unit = "ml_delannot";;
43 external hasunsavedchanges : unit -> bool = "ml_hasunsavedchanges";;
44 external savedoc : string -> unit = "ml_savedoc";;
45 external getannotcontents : opaque -> slinkindex -> string
46 = "ml_getannotcontents";;
47 external drawprect : opaque -> int -> int -> float array -> unit
48 = "ml_drawprect";;
49 external wcmd : Unix.file_descr -> bytes -> int -> unit = "ml_wcmd";;
50 external rcmd : Unix.file_descr -> string = "ml_rcmd";;
51 external uritolocation : string -> (pageno * float * float)
52 = "ml_uritolocation";;
53 external isexternallink : string -> bool = "ml_isexternallink";;
55 (* copysel _will_ close the supplied descriptor *)
56 external copysel : Unix.file_descr -> opaque -> unit = "ml_copysel";;
58 external drawstr : int -> int -> int -> string -> float = "ml_draw_string";;
60 external fz_version : unit -> string = "ml_fz_version";;
61 external llpp_version : unit -> string = "ml_llpp_version";;