@@ -80,8 +80,7 @@ import Data.Typeable
8080import Foreign
8181import Foreign.C
8282import GHC.Generics (Generic )
83- import Linear
84- import Linear.Affine (Point (P ))
83+ import SDL.Vect
8584import SDL.Input.Keyboard
8685import SDL.Input.Mouse
8786import SDL.Internal.Numbered
@@ -170,7 +169,7 @@ data WindowExposedEventData =
170169data WindowMovedEventData =
171170 WindowMovedEventData { windowMovedEventWindow :: Window
172171 -- ^ The associated 'Window'.
173- ,windowMovedEventPosition :: Point V2 Int32
172+ ,windowMovedEventPosition :: V2 Int32
174173 -- ^ The new position of the 'Window'.
175174 }
176175 deriving (Eq ,Ord ,Generic ,Show ,Typeable )
@@ -290,7 +289,7 @@ data MouseMotionEventData =
290289 -- ^ The 'MouseDevice' that was moved.
291290 ,mouseMotionEventState :: [MouseButton ]
292291 -- ^ A collection of 'MouseButton's that are currently held down.
293- ,mouseMotionEventPos :: Point V2 Int32
292+ ,mouseMotionEventPos :: V2 Int32
294293 -- ^ The new position of the mouse.
295294 ,mouseMotionEventRelMotion :: V2 Int32
296295 -- ^ The relative mouse motion of the mouse.
@@ -309,7 +308,7 @@ data MouseButtonEventData =
309308 -- ^ The button that was pressed or released.
310309 ,mouseButtonEventClicks :: Word8
311310 -- ^ The amount of clicks. 1 for a single-click, 2 for a double-click, etc.
312- ,mouseButtonEventPos :: Point V2 Int32
311+ ,mouseButtonEventPos :: V2 Int32
313312 -- ^ The coordinates of the mouse click.
314313 }
315314 deriving (Eq ,Ord ,Generic ,Show ,Typeable )
@@ -429,7 +428,7 @@ data TouchFingerEventData =
429428 -- ^ The touch device index.
430429 ,touchFingerEventFingerID :: Raw. FingerID
431430 -- ^ The finger index.
432- ,touchFingerEventPos :: Point V2 CFloat
431+ ,touchFingerEventPos :: V2 CFloat
433432 -- ^ The location of the touch event, normalized between 0 and 1.
434433 ,touchFingerEventRelMotion :: V2 CFloat
435434 -- ^ The distance moved, normalized between -1 and 1.
@@ -446,7 +445,7 @@ data MultiGestureEventData =
446445 -- ^ The amount that the fingers rotated during this motion.
447446 ,multiGestureEventDDist :: CFloat
448447 -- ^ The amount that the fingers pinched during this motion.
449- ,multiGestureEventPos :: Point V2 CFloat
448+ ,multiGestureEventPos :: V2 CFloat
450449 -- ^ The normalized center of the gesture.
451450 ,multiGestureEventNumFingers :: Word16
452451 -- ^ The number of fingers used in this gesture.
@@ -463,7 +462,7 @@ data DollarGestureEventData =
463462 -- ^ The number of fingers used to draw the stroke.
464463 ,dollarGestureEventError :: CFloat
465464 -- ^ The difference between the gesture template and the actual performed gesture (lower errors correspond to closer matches).
466- ,dollarGestureEventPos :: Point V2 CFloat
465+ ,dollarGestureEventPos :: V2 CFloat
467466 -- ^ The normalized center of the gesture.
468467 }
469468 deriving (Eq ,Ord ,Generic ,Show ,Typeable )
@@ -514,7 +513,7 @@ convertRaw (Raw.WindowEvent t ts a b c d) =
514513 Raw. SDL_WINDOWEVENT_MOVED ->
515514 WindowMovedEvent
516515 (WindowMovedEventData w'
517- (P (V2 c d)))
516+ ((V2 c d)))
518517 Raw. SDL_WINDOWEVENT_RESIZED ->
519518 WindowResizedEvent
520519 (WindowResizedEventData w'
@@ -583,7 +582,7 @@ convertRaw (Raw.MouseMotionEvent _ ts a b c d e f g) =
583582 (MouseMotionEventData w'
584583 (fromNumber b)
585584 buttons
586- (P (V2 d e))
585+ ((V2 d e))
587586 (V2 f g))))
588587 where mask `test` x =
589588 if mask .&. x /= 0
@@ -609,7 +608,7 @@ convertRaw (Raw.MouseButtonEvent t ts a b c _ e f g) =
609608 (fromNumber b)
610609 button
611610 e
612- (P (V2 f g)))))
611+ ((V2 f g)))))
613612convertRaw (Raw. MouseWheelEvent _ ts a b c d) =
614613 do w' <- fmap Window (Raw. getWindowFromID a)
615614 return (Event ts
@@ -649,7 +648,7 @@ convertRaw (Raw.TouchFingerEvent _ ts a b c d e f g) =
649648 (TouchFingerEvent
650649 (TouchFingerEventData a
651650 b
652- (P (V2 c d))
651+ ((V2 c d))
653652 (V2 e f)
654653 g)))
655654convertRaw (Raw. MultiGestureEvent _ ts a b c d e f) =
@@ -658,7 +657,7 @@ convertRaw (Raw.MultiGestureEvent _ ts a b c d e f) =
658657 (MultiGestureEventData a
659658 b
660659 c
661- (P (V2 d e))
660+ ((V2 d e))
662661 f)))
663662convertRaw (Raw. DollarGestureEvent _ ts a b c d e f) =
664663 return (Event ts
@@ -667,7 +666,7 @@ convertRaw (Raw.DollarGestureEvent _ ts a b c d e f) =
667666 b
668667 c
669668 d
670- (P (V2 e f)))))
669+ ((V2 e f)))))
671670convertRaw (Raw. DropEvent _ ts a) =
672671 return (Event ts (DropEvent (DropEventData a)))
673672convertRaw (Raw. ClipboardUpdateEvent _ ts) =
0 commit comments