File tree Expand file tree Collapse file tree 6 files changed +47
-44
lines changed Expand file tree Collapse file tree 6 files changed +47
-44
lines changed Original file line number Diff line number Diff line change 1+ export function setPointerCapture ( id ) {
2+ return function ( el ) {
3+ return function ( ) {
4+ el . setPointerCapture ( id ) ;
5+ } ;
6+ } ;
7+ }
8+
9+ export function releasePointerCapture ( id ) {
10+ return function ( el ) {
11+ return function ( ) {
12+ el . releasePointerCapture ( id ) ;
13+ } ;
14+ } ;
15+ }
16+
17+ export function hasPointerCapture ( id ) {
18+ return function ( el ) {
19+ return function ( ) {
20+ return el . hasPointerCapture ( id ) ;
21+ } ;
22+ } ;
23+ }
Original file line number Diff line number Diff line change 1+ module Web.PointerEvent.Element
2+ ( hasPointerCapture
3+ , releasePointerCapture
4+ , setPointerCapture
5+ )
6+ where
7+ import Prelude
8+ import Effect (Effect )
9+ import Web.PointerEvent.PointerEvent (PointerId )
10+ import Web.DOM.Element (Element )
11+
12+ foreign import setPointerCapture :: PointerId -> Element -> Effect Unit
13+ foreign import releasePointerCapture :: PointerId -> Element -> Effect Unit
14+ foreign import hasPointerCapture :: PointerId -> Element -> Effect Boolean
Original file line number Diff line number Diff line change 1+ export function maxTouchPoints ( nav ) {
2+ return function ( ) {
3+ return nav . maxTouchPoints ;
4+ } ;
5+ }
Original file line number Diff line number Diff line change 1+ module Web.PointerEvent.Navigator where
2+
3+ import Effect (Effect )
4+ import Web.HTML.Navigator (Navigator )
5+ foreign import maxTouchPoints :: Navigator -> Effect Int
Original file line number Diff line number Diff line change @@ -52,34 +52,4 @@ export function getCoalescedEvents(ev) {
5252
5353export function getPredictedEvents ( ev ) {
5454 return ev . getPredictedEvents ( ) ;
55- }
56-
57- export function setPointerCapture ( id ) {
58- return function ( el ) {
59- return function ( ) {
60- el . setPointerCapture ( id ) ;
61- } ;
62- } ;
63- }
64-
65- export function releasePointerCapture ( id ) {
66- return function ( el ) {
67- return function ( ) {
68- el . releasePointerCapture ( id ) ;
69- } ;
70- } ;
71- }
72-
73- export function hasPointerCapture ( id ) {
74- return function ( el ) {
75- return function ( ) {
76- return el . hasPointerCapture ( id ) ;
77- } ;
78- } ;
79- }
80-
81- export function maxTouchPoints ( nav ) {
82- return function ( ) {
83- return nav . maxTouchPoints ;
84- } ;
8555}
Original file line number Diff line number Diff line change @@ -9,14 +9,11 @@ module Web.PointerEvent.PointerEvent
99 , fromUIEvent
1010 , getCoalescedEvents
1111 , getPredictedEvents
12- , hasPointerCapture
1312 , height
1413 , isPrimary
1514 , pointerId
1615 , pointerType
1716 , pressure
18- , releasePointerCapture
19- , setPointerCapture
2017 , tiltX
2118 , tiltY
2219 , toEvent
@@ -27,16 +24,12 @@ module Web.PointerEvent.PointerEvent
2724 )
2825 where
2926
30- import Prelude
3127import Data.Maybe (Maybe )
32- import Effect (Effect )
3328import Unsafe.Coerce (unsafeCoerce )
3429import Web.Event.Event (Event )
3530import Web.Internal.FFI (unsafeReadProtoTagged )
3631import Web.UIEvent.UIEvent (UIEvent )
3732import Web.UIEvent.MouseEvent (MouseEvent )
38- import Web.DOM.Element (Element )
39- import Web.HTML.Navigator (Navigator )
4033
4134foreign import data PointerEvent :: Type
4235data PointerType = Mouse | Touch | Pen
@@ -82,11 +75,4 @@ foreign import altitudeAngle :: PointerEvent -> Number
8275foreign import azimuthAngle :: PointerEvent -> Number
8376
8477foreign import getCoalescedEvents :: PointerEvent -> Array PointerEvent
85-
8678foreign import getPredictedEvents :: PointerEvent -> Array PointerEvent
87-
88- foreign import setPointerCapture :: PointerId -> Element -> Effect Unit
89- foreign import releasePointerCapture :: PointerId -> Element -> Effect Unit
90- foreign import hasPointerCapture :: PointerId -> Element -> Effect Boolean
91-
92- foreign import maxTouchPoints :: Navigator -> Effect Int
You can’t perform that action at this time.
0 commit comments