@@ -169,7 +169,7 @@ data WindowExposedEventData =
169169data WindowMovedEventData =
170170 WindowMovedEventData { windowMovedEventWindow :: Window
171171 -- ^ The associated 'Window'.
172- ,windowMovedEventPosition :: V2 Int32
172+ ,windowMovedEventPosition :: Point V2 Int32
173173 -- ^ The new position of the 'Window'.
174174 }
175175 deriving (Eq ,Ord ,Generic ,Show ,Typeable )
@@ -289,7 +289,7 @@ data MouseMotionEventData =
289289 -- ^ The 'MouseDevice' that was moved.
290290 ,mouseMotionEventState :: [MouseButton ]
291291 -- ^ A collection of 'MouseButton's that are currently held down.
292- ,mouseMotionEventPos :: V2 Int32
292+ ,mouseMotionEventPos :: Point V2 Int32
293293 -- ^ The new position of the mouse.
294294 ,mouseMotionEventRelMotion :: V2 Int32
295295 -- ^ The relative mouse motion of the mouse.
@@ -308,7 +308,7 @@ data MouseButtonEventData =
308308 -- ^ The button that was pressed or released.
309309 ,mouseButtonEventClicks :: Word8
310310 -- ^ The amount of clicks. 1 for a single-click, 2 for a double-click, etc.
311- ,mouseButtonEventPos :: V2 Int32
311+ ,mouseButtonEventPos :: Point V2 Int32
312312 -- ^ The coordinates of the mouse click.
313313 }
314314 deriving (Eq ,Ord ,Generic ,Show ,Typeable )
@@ -428,7 +428,7 @@ data TouchFingerEventData =
428428 -- ^ The touch device index.
429429 ,touchFingerEventFingerID :: Raw. FingerID
430430 -- ^ The finger index.
431- ,touchFingerEventPos :: V2 CFloat
431+ ,touchFingerEventPos :: Point V2 CFloat
432432 -- ^ The location of the touch event, normalized between 0 and 1.
433433 ,touchFingerEventRelMotion :: V2 CFloat
434434 -- ^ The distance moved, normalized between -1 and 1.
@@ -445,7 +445,7 @@ data MultiGestureEventData =
445445 -- ^ The amount that the fingers rotated during this motion.
446446 ,multiGestureEventDDist :: CFloat
447447 -- ^ The amount that the fingers pinched during this motion.
448- ,multiGestureEventPos :: V2 CFloat
448+ ,multiGestureEventPos :: Point V2 CFloat
449449 -- ^ The normalized center of the gesture.
450450 ,multiGestureEventNumFingers :: Word16
451451 -- ^ The number of fingers used in this gesture.
@@ -462,7 +462,7 @@ data DollarGestureEventData =
462462 -- ^ The number of fingers used to draw the stroke.
463463 ,dollarGestureEventError :: CFloat
464464 -- ^ The difference between the gesture template and the actual performed gesture (lower errors correspond to closer matches).
465- ,dollarGestureEventPos :: V2 CFloat
465+ ,dollarGestureEventPos :: Point V2 CFloat
466466 -- ^ The normalized center of the gesture.
467467 }
468468 deriving (Eq ,Ord ,Generic ,Show ,Typeable )
@@ -513,7 +513,7 @@ convertRaw (Raw.WindowEvent t ts a b c d) =
513513 Raw. SDL_WINDOWEVENT_MOVED ->
514514 WindowMovedEvent
515515 (WindowMovedEventData w'
516- ((V2 c d)))
516+ (P (V2 c d)))
517517 Raw. SDL_WINDOWEVENT_RESIZED ->
518518 WindowResizedEvent
519519 (WindowResizedEventData w'
@@ -582,7 +582,7 @@ convertRaw (Raw.MouseMotionEvent _ ts a b c d e f g) =
582582 (MouseMotionEventData w'
583583 (fromNumber b)
584584 buttons
585- ((V2 d e))
585+ (P (V2 d e))
586586 (V2 f g))))
587587 where mask `test` x =
588588 if mask .&. x /= 0
@@ -608,7 +608,7 @@ convertRaw (Raw.MouseButtonEvent t ts a b c _ e f g) =
608608 (fromNumber b)
609609 button
610610 e
611- ((V2 f g)))))
611+ (P (V2 f g)))))
612612convertRaw (Raw. MouseWheelEvent _ ts a b c d) =
613613 do w' <- fmap Window (Raw. getWindowFromID a)
614614 return (Event ts
@@ -648,7 +648,7 @@ convertRaw (Raw.TouchFingerEvent _ ts a b c d e f g) =
648648 (TouchFingerEvent
649649 (TouchFingerEventData a
650650 b
651- ((V2 c d))
651+ (P (V2 c d))
652652 (V2 e f)
653653 g)))
654654convertRaw (Raw. MultiGestureEvent _ ts a b c d e f) =
@@ -657,7 +657,7 @@ convertRaw (Raw.MultiGestureEvent _ ts a b c d e f) =
657657 (MultiGestureEventData a
658658 b
659659 c
660- ((V2 d e))
660+ (P (V2 d e))
661661 f)))
662662convertRaw (Raw. DollarGestureEvent _ ts a b c d e f) =
663663 return (Event ts
@@ -666,7 +666,7 @@ convertRaw (Raw.DollarGestureEvent _ ts a b c d e f) =
666666 b
667667 c
668668 d
669- ((V2 e f)))))
669+ (P (V2 e f)))))
670670convertRaw (Raw. DropEvent _ ts a) =
671671 return (Event ts (DropEvent (DropEventData a)))
672672convertRaw (Raw. ClipboardUpdateEvent _ ts) =
0 commit comments