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)
11 type colorspace = | Rgb | Gray
13 | KMinsrt of key | KMinsrl of key list | KMmulti of key list * key list
15 and keyhash = (key, keymap) Hashtbl.t
16 and keystate = | KSnone | KSinto of (key list * key list)
19 | Csingle of singlecolumn
20 | Cmulti of multicolumns
21 | Csplit of splitcolumns
27 and multicolumns = multicol * pagegeom
28 and singlecolumn = pagegeom
29 and splitcolumns = columncount * pagegeom
30 and pagegeom = (pdimno * x * y * (pageno * width * height * leftx)) array
31 and multicol = columncount * covercount * covercount
35 and x = int and y = int and leftx = int
37 and width = int and height = int
38 and memsize = int and texcount = int
39 and sliceheight = int;;
40 let scrollbvv = 1 and scrollbhv = 2;;
46 printf "mutable $1:$2;"
48 assi
="$assi dst.$1 <- src.$1;"
50 i
() { g
"$1" int
"$2"; }
51 b
() { g
"$1" bool
"$2"; }
52 f
() { g
"$1" float
"$2"; }
53 s
() { g
"$1" string
"$2"; }
55 printf "mutable $1:$2;\n"
57 assi
="$assi dst.keyhashes <- copykeyhashes src;"
60 printf "mutable $1 : float option;\n"
62 assi
="$assi dst.pax <- if src.pax = None then None else Some 0.0;"
67 i scrollb
"scrollbhv lor scrollbvv"
85 g fitmodel fitmodel FitProportional
87 g trimfuzz irect
"(0,0,0,0)"
88 g memlimit memsize
"32 lsl 20"
89 g texcount texcount
256
90 g sliceheight sliceheight
24
92 g bgcolor rgb
"(0.5, 0.5, 0.5)"
93 g papercolor rgba
"(1.0, 1.0, 1.0, 0.0)"
94 g sbarcolor rgba
"(0.64, 0.64, 0.64, 0.7)"
95 g sbarhndlcolor rgba
"(0.0, 0.0, 0.0, 0.7)"
96 g texturecolor rgba
"(0.0, 0.0, 0.0, 0.0)"
100 g mustoresize memsize
"256 lsl 20"
103 s urilauncher
'(match[@warning "-4"] platform with |Pmacos -> {|open "%s"|}|_ -> {|echo "%s"|})'
104 s pathlauncher
'{|lp "%s"|}'
105 g colorspace colorspace Rgb
108 g columns columns
"Csingle [||]"
109 g beyecolumns
"columncount option" None
110 s selcmd
'(match platform with |Plinux|Pbsd -> "LC_CTYPE=UTF-8 xclip -i"|Pmacos -> "LC_CTYPE=UTF-8 pbcopy"|Punknown -> "cat")'
111 s pastecmd
'(match platform with |Plinux|Pbsd -> "LC_CTYPE=UTF-8 xclip -o"|Pmacos -> "LC_CTYPE=UTF-8 pbpaste"|Punknown -> "echo")'
116 K keyhashes
'(string * keyhash) list' \
117 '(let mk n = (n, Hashtbl.create 1) in
118 [ mk "global"; mk "info" ; mk "help"; mk "outline"; mk "listview"
119 ; mk "birdseye"; mk "textentry"; mk "links"; mk "view" ])'
120 i hfsize
'12 * Wsi.fontsizefactor ()'
124 s stcmd
"{|echo SyncTex|}"
126 g paxmark mark Mark_word
131 b coarseprespos false
139 let copykeyhashes c = List.map (fun (k, v) -> k, Hashtbl.copy v) c.keyhashes;;
140 let defconf = {$init};;
141 let setconf dst src = $assi;