6 type rgb = float * float * float
7 type rgba = float * float * float * float
8 type fitmodel = | FitWidth | FitProportional | FitPage
9 type irect = (int * int * int * int)
10 type colorspace = | Rgb | Bgr | Gray
12 | KMinsrt of key | KMinsrl of key list | KMmulti of key list * key list
14 and keyhash = (key, keymap) Hashtbl.t
15 and keystate = |KSnone |KSinto of (key list * key list)
18 | Csingle of singlecolumn
19 | Cmulti of multicolumns
20 | Csplit of splitcolumns
26 and multicolumns = multicol * pagegeom
27 and singlecolumn = pagegeom
28 and splitcolumns = columncount * pagegeom
29 and pagegeom = (pdimno * x * y * (pageno * width * height * leftx)) array
30 and multicol = columncount * covercount * covercount
34 and x = int and y = int and leftx = int
36 and width = int and height = int
37 and memsize = int and texcount = int
38 and sliceheight = int;;
39 let scrollbvv = 1 and scrollbhv = 2;;
45 printf "mutable $1:$2;"
47 assi
="$assi dst.$1 <- src.$1;"
49 i
() { g
"$1" int
"$2"; }
50 b
() { g
"$1" bool
"$2"; }
51 f
() { g
"$1" float
"$2"; }
52 s
() { g
"$1" string
"$2"; }
54 printf "mutable $1:$2;\n"
56 assi
="$assi dst.keyhashes <- copykeyhashes src;"
59 printf "mutable $1 : float option;\n"
61 assi
="$assi dst.pax <- if src.pax = None then None else Some 0.0;"
66 i scrollb
"scrollbhv lor scrollbvv"
84 g fitmodel fitmodel FitProportional
86 g trimfuzz irect
"(0,0,0,0)"
87 g memlimit memsize
"32 lsl 20"
88 g texcount texcount
256
89 g sliceheight sliceheight
24
91 g bgcolor rgb
"(0.5, 0.5, 0.5)"
92 g sbarcolor rgba
"(0.64, 0.64, 0.64, 0.7)"
93 g sbarhndlcolor rgba
"(0.0, 0.0, 0.0, 0.7)"
97 g mustoresize memsize
"256 lsl 20"
100 s urilauncher E.s
'(match platform with |Plinux|Pbsd -> {|xdg-open "%s"|}|Pmacos -> {|open "%s"|}|Punknown -> {|echo "%s"|})'
101 s pathlauncher
'{|lp "%s"|}'
102 g colorspace colorspace Rgb
105 g columns columns
"Csingle [||]"
106 g beyecolumns
"columncount option" None
107 s selcmd
'(match platform with |Plinux|Pbsd -> "LC_CTYPE=UTF-8 xclip -i"|Pmacos -> "LC_CTYPE=UTF-8 pbcopy"|Punknown -> "cat")'
112 K keyhashes
'(string * keyhash) list' \
113 '(let mk n = (n, Hashtbl.create 1) in
114 [ mk "global"; mk "info" ; mk "help"; mk "outline"; mk "listview"
115 ; mk "birdseye"; mk "textentry"; mk "links"; mk "view" ])'
116 i hfsize
'12 * Wsi.fontsizefactor ()'
120 s stcmd
"{|echo SyncTex|}"
122 g paxmark mark Mark_word
127 b coarseprespos false
135 let copykeyhashes c = List.map (fun (k, v) -> k, Hashtbl.copy v) c.keyhashes;;
136 let defconf = {$init};;
137 let setconf dst src = $assi;