Use proper value
[llpp.git] / ffi.ml
blobb073eaaf147b24b9d0665962e68b445ff0ffa842
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 realloctexts : int -> bool = "ml_realloctexts";;
21 external findlink : opaque -> linkdir -> link = "ml_findlink";;
22 external getlink : opaque -> int -> under = "ml_getlink";;
23 external getlinkrect : opaque -> int -> irect = "ml_getlinkrect";;
24 external getlinkcount : opaque -> int = "ml_getlinkcount";;
25 external findpwl : int -> int -> pagewithlinks = "ml_find_page_with_links";;
26 external getpbo : width -> height -> colorspace -> opaque = "ml_getpbo";;
27 external freepbo : opaque -> unit = "ml_freepbo";;
28 external unmappbo : opaque -> unit = "ml_unmappbo";;
29 external bousable : unit -> bool = "ml_bo_usable";;
30 external unproject : opaque -> int -> int -> (int * int) option
31 = "ml_unproject";;
32 external project : opaque -> int -> int -> float -> float -> (float * float)
33 = "ml_project";;
34 external drawtile : tileparams -> opaque -> unit = "ml_drawtile";;
35 external rectofblock : opaque -> int -> int -> float array option
36 = "ml_rectofblock";;
37 external begintiles : unit -> unit = "ml_begintiles";;
38 external endtiles : unit -> unit = "ml_endtiles";;
39 external addannot : opaque -> int -> int -> string -> unit = "ml_addannot";;
40 external modannot : opaque -> slinkindex -> string -> unit = "ml_modannot";;
41 external delannot : opaque -> slinkindex -> unit = "ml_delannot";;
42 external hasunsavedchanges : unit -> bool = "ml_hasunsavedchanges";;
43 external savedoc : string -> unit = "ml_savedoc";;
44 external getannotcontents : opaque -> slinkindex -> string
45 = "ml_getannotcontents";;
46 external drawprect : opaque -> int -> int -> float array -> unit
47 = "ml_drawprect";;
48 external wcmd : Unix.file_descr -> bytes -> int -> unit = "ml_wcmd";;
49 external rcmd : Unix.file_descr -> string = "ml_rcmd";;
50 external uritolocation : string -> (pageno * float * float)
51 = "ml_uritolocation";;
52 external isexternallink : string -> bool = "ml_isexternallink";;
54 (* copysel _will_ close the supplied descriptor *)
55 external copysel : Unix.file_descr -> opaque -> unit = "ml_copysel";;
57 external drawstr : int -> int -> int -> string -> float = "ml_draw_string";;
59 external fz_version : unit -> string = "ml_fz_version";;
60 external llpp_version : unit -> string = "ml_llpp_version";;