comparison lib/ur/basis.urs @ 2130:e8863d9f8c59

New mouse events oncontextmenu, onmouseenter, and onmouseleave.
author Ziv Scully <ziv@mit.edu>
date Tue, 07 Apr 2015 14:18:53 -0400
parents 5439b35c5d0b
children 3ca67d73fa5d
comparison
equal deleted inserted replaced
2129:e0843b2a636d 2130:e8863d9f8c59
831 type mouseEvent = { ScreenX : int, ScreenY : int, ClientX : int, ClientY : int, 831 type mouseEvent = { ScreenX : int, ScreenY : int, ClientX : int, ClientY : int,
832 CtrlKey : bool, ShiftKey : bool, AltKey : bool, MetaKey : bool, 832 CtrlKey : bool, ShiftKey : bool, AltKey : bool, MetaKey : bool,
833 Button : mouseButton } 833 Button : mouseButton }
834 834
835 con mouseEvents = map (fn _ :: Unit => mouseEvent -> transaction unit) 835 con mouseEvents = map (fn _ :: Unit => mouseEvent -> transaction unit)
836 [Onclick, Ondblclick, Onmousedown, Onmousemove, Onmouseout, Onmouseover, Onmouseup] 836 [Onclick, Oncontextmenu, Ondblclick, Onmousedown, Onmouseenter, Onmouseleave, Onmousemove, Onmouseout, Onmouseover, Onmouseup]
837 837
838 type keyEvent = { KeyCode : int, 838 type keyEvent = { KeyCode : int,
839 CtrlKey : bool, ShiftKey : bool, AltKey : bool, MetaKey : bool } 839 CtrlKey : bool, ShiftKey : bool, AltKey : bool, MetaKey : bool }
840 840
841 con keyEvents = map (fn _ :: Unit => keyEvent -> transaction unit) 841 con keyEvents = map (fn _ :: Unit => keyEvent -> transaction unit)
1118 val onServerError : (string -> transaction unit) -> transaction unit 1118 val onServerError : (string -> transaction unit) -> transaction unit
1119 1119
1120 (* More standard document-level JavaScript handlers *) 1120 (* More standard document-level JavaScript handlers *)
1121 val onClick : (mouseEvent -> transaction unit) -> transaction unit 1121 val onClick : (mouseEvent -> transaction unit) -> transaction unit
1122 val onDblclick : (mouseEvent -> transaction unit) -> transaction unit 1122 val onDblclick : (mouseEvent -> transaction unit) -> transaction unit
1123 val onContextmenu : (mouseEvent -> transaction unit) -> transaction unit
1123 val onKeydown : (keyEvent -> transaction unit) -> transaction unit 1124 val onKeydown : (keyEvent -> transaction unit) -> transaction unit
1124 val onKeypress : (keyEvent -> transaction unit) -> transaction unit 1125 val onKeypress : (keyEvent -> transaction unit) -> transaction unit
1125 val onKeyup : (keyEvent -> transaction unit) -> transaction unit 1126 val onKeyup : (keyEvent -> transaction unit) -> transaction unit
1126 val onMousedown : (mouseEvent -> transaction unit) -> transaction unit 1127 val onMousedown : (mouseEvent -> transaction unit) -> transaction unit
1128 val onMouseenter : (mouseEvent -> transaction unit) -> transaction unit
1129 val onMouseleave : (mouseEvent -> transaction unit) -> transaction unit
1127 val onMousemove : (mouseEvent -> transaction unit) -> transaction unit 1130 val onMousemove : (mouseEvent -> transaction unit) -> transaction unit
1128 val onMouseout : (mouseEvent -> transaction unit) -> transaction unit 1131 val onMouseout : (mouseEvent -> transaction unit) -> transaction unit
1129 val onMouseover : (mouseEvent -> transaction unit) -> transaction unit 1132 val onMouseover : (mouseEvent -> transaction unit) -> transaction unit
1130 val onMouseup : (mouseEvent -> transaction unit) -> transaction unit 1133 val onMouseup : (mouseEvent -> transaction unit) -> transaction unit
1131 1134