Go back to doing things inline
[llpp.git] / ffi.ml
blobf1e7c03a3a9134bca5473ce755880c57a2019bc2
1 open Config;;
3 type initparams = (angle * fitmodel * trimparams * texcount * sliceheight *
4 memsize * colorspace * fontpath);;
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 setdcf : string -> unit = "ml_setdcf";;
19 external pagebbox : opaque -> bbox = "ml_getpagebox";;
20 external setaalevel : int -> unit = "ml_setaalevel";;
21 external setpapercolor : rgba -> unit = "ml_setpapercolor";;
22 external realloctexts : int -> bool = "ml_realloctexts";;
23 external findlink : opaque -> linkdir -> link = "ml_findlink";;
24 external getlink : opaque -> int -> under = "ml_getlink";;
25 external getlinkrect : opaque -> int -> irect = "ml_getlinkrect";;
26 external getlinkcount : opaque -> int = "ml_getlinkcount";;
27 external findpwl : int -> int -> pagewithlinks = "ml_find_page_with_links";;
28 external getpbo : width -> height -> colorspace -> opaque = "ml_getpbo";;
29 external freepbo : opaque -> unit = "ml_freepbo";;
30 external unmappbo : opaque -> unit = "ml_unmappbo";;
31 external bousable : unit -> bool = "ml_bo_usable";;
32 external unproject : opaque -> int -> int -> (int * int) option
33 = "ml_unproject";;
34 external project : opaque -> int -> int -> float -> float -> (float * float)
35 = "ml_project";;
36 external drawtile : tileparams -> opaque -> unit = "ml_drawtile";;
37 external rectofblock : opaque -> int -> int -> float array option
38 = "ml_rectofblock";;
39 external begintiles : unit -> unit = "ml_begintiles";;
40 external endtiles : unit -> unit = "ml_endtiles";;
41 external addannot : opaque -> int -> int -> string -> unit = "ml_addannot";;
42 external modannot : opaque -> slinkindex -> string -> unit = "ml_modannot";;
43 external delannot : opaque -> slinkindex -> unit = "ml_delannot";;
44 external hasunsavedchanges : unit -> bool = "ml_hasunsavedchanges";;
45 external savedoc : string -> unit = "ml_savedoc";;
46 external getannotcontents : opaque -> slinkindex -> string
47 = "ml_getannotcontents";;
48 external drawprect : opaque -> int -> int -> float array -> unit
49 = "ml_drawprect";;
50 external wcmd : Unix.file_descr -> bytes -> int -> unit = "ml_wcmd";;
51 external rcmd : Unix.file_descr -> string = "ml_rcmd";;
52 external uritolocation : string -> (pageno * float * float)
53 = "ml_uritolocation";;
54 external isexternallink : string -> bool = "ml_isexternallink";;
56 (* copysel _will_ close the supplied descriptor *)
57 external copysel : Unix.file_descr -> opaque -> unit = "ml_copysel";;
59 external drawstr : int -> int -> int -> string -> float = "ml_draw_string";;
61 external fz_version : unit -> string = "ml_fz_version";;
62 external llpp_version : unit -> string = "ml_llpp_version";;