summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk/example/eyes.ml
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/labltk/example/eyes.ml')
-rw-r--r--otherlibs/labltk/example/eyes.ml22
1 files changed, 11 insertions, 11 deletions
diff --git a/otherlibs/labltk/example/eyes.ml b/otherlibs/labltk/example/eyes.ml
index eaa335809..7aeb1d583 100644
--- a/otherlibs/labltk/example/eyes.ml
+++ b/otherlibs/labltk/example/eyes.ml
@@ -20,23 +20,23 @@ let _ =
let top = openTk () in
let fw = Frame.create top in
pack [fw];
- let c = Canvas.create width: 200 height: 200 fw in
+ let c = Canvas.create ~width: 200 ~height: 200 fw in
let create_eye cx cy wx wy ewx ewy bnd =
let o2 = Canvas.create_oval
- x1:(cx - wx) y1:(cy - wy)
- x2:(cx + wx) y2:(cy + wy)
- outline: `Black width: 7
- fill: `White
+ ~x1:(cx - wx) ~y1:(cy - wy)
+ ~x2:(cx + wx) ~y2:(cy + wy)
+ ~outline: `Black ~width: 7
+ ~fill: `White
c
and o = Canvas.create_oval
- x1:(cx - ewx) y1:(cy - ewy)
- x2:(cx + ewx) y2:(cy + ewy)
- fill:`Black
+ ~x1:(cx - ewx) ~y1:(cy - ewy)
+ ~x2:(cx + ewx) ~y2:(cy + ewy)
+ ~fill:`Black
c in
let curx = ref cx
and cury = ref cy in
- bind events:[`Motion] extend:true fields:[`MouseX; `MouseY]
- action:(fun e ->
+ bind ~events:[`Motion] ~extend:true ~fields:[`MouseX; `MouseY]
+ ~action:(fun e ->
let nx, ny =
let xdiff = e.ev_MouseX - cx
and ydiff = e.ev_MouseY - cy in
@@ -48,7 +48,7 @@ let _ =
else
e.ev_MouseX, e.ev_MouseY
in
- Canvas.move canvas:c x: (nx - !curx) y: (ny - !cury) o;
+ Canvas.move ~canvas:c ~x: (nx - !curx) ~y: (ny - !cury) o;
curx := nx;
cury := ny)
c