Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data JoystickMessage
- = MsgJoystickAxis {
- msgJAWhen :: Double
- msgJAWhich :: Int32
- msgJAAxis :: Word8
- msgJAValue :: Int16
- | MsgJoystickBall {
- msgJBWhen :: Double
- msgJBWhich :: Int32
- msgJBBall :: Word8
- msgJBRelMotion :: V2 Int16
- | MsgJoystickHat { }
- | MsgJoystickButton { }
- | MsgJoystickDevice { }
- = MsgJoystickAxis {
- data V2 a
- data JoyHatPosition
- data JoyButtonState
- data JoyDeviceConnection
- data Word8
- data Int16
- data Int32
Documentation
data JoystickMessage Source #
Datatype for handling all possible joystick events handed over from sdl2
MsgJoystickAxis | Movement of a Joystick axis |
| |
MsgJoystickBall | Movement of a joystick ball controller |
| |
MsgJoystickHat | Movement of joystick hat controller |
| |
MsgJoystickButton | Joystick button event |
| |
MsgJoystickDevice | Joystick device event |
|
Instances
Show JoystickMessage Source # | |
Defined in Affection.MessageBus.Message.JoystickMessage showsPrec :: Int -> JoystickMessage -> ShowS # show :: JoystickMessage -> String # showList :: [JoystickMessage] -> ShowS # | |
Message JoystickMessage Source # | |
Defined in Affection.MessageBus.Message.JoystickMessage msgTime :: JoystickMessage -> Double Source # |
Vector export
A 2-dimensional vector
>>>
pure 1 :: V2 Int
V2 1 1
>>>
V2 1 2 + V2 3 4
V2 4 6
>>>
V2 1 2 * V2 3 4
V2 3 8
>>>
sum (V2 1 2)
3
Instances
Monad V2 | |
Functor V2 | |
MonadFix V2 | |
Applicative V2 | |
Foldable V2 | |
Defined in Linear.V2 fold :: Monoid m => V2 m -> m # foldMap :: Monoid m => (a -> m) -> V2 a -> m # foldr :: (a -> b -> b) -> b -> V2 a -> b # foldr' :: (a -> b -> b) -> b -> V2 a -> b # foldl :: (b -> a -> b) -> b -> V2 a -> b # foldl' :: (b -> a -> b) -> b -> V2 a -> b # foldr1 :: (a -> a -> a) -> V2 a -> a # foldl1 :: (a -> a -> a) -> V2 a -> a # elem :: Eq a => a -> V2 a -> Bool # maximum :: Ord a => V2 a -> a # | |
Traversable V2 | |
Distributive V2 | |
Representable V2 | |
Eq1 V2 | |
Ord1 V2 | |
Read1 V2 | |
Show1 V2 | |
MonadZip V2 | |
Serial1 V2 | |
Defined in Linear.V2 serializeWith :: MonadPut m => (a -> m ()) -> V2 a -> m () # deserializeWith :: MonadGet m => m a -> m (V2 a) # | |
Hashable1 V2 | |
Apply V2 | |
Traversable1 V2 | |
Affine V2 | |
R2 V2 | |
R1 V2 | |
Finite V2 | |
Metric V2 | |
Additive V2 | |
Foldable1 V2 | |
Bind V2 | |
Unbox a => Vector Vector (V2 a) | |
Defined in Linear.V2 basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V2 a) -> m (Vector (V2 a)) # basicUnsafeThaw :: PrimMonad m => Vector (V2 a) -> m (Mutable Vector (PrimState m) (V2 a)) # basicLength :: Vector (V2 a) -> Int # basicUnsafeSlice :: Int -> Int -> Vector (V2 a) -> Vector (V2 a) # basicUnsafeIndexM :: Monad m => Vector (V2 a) -> Int -> m (V2 a) # basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V2 a) -> Vector (V2 a) -> m () # | |
Unbox a => MVector MVector (V2 a) | |
Defined in Linear.V2 basicLength :: MVector s (V2 a) -> Int # basicUnsafeSlice :: Int -> Int -> MVector s (V2 a) -> MVector s (V2 a) # basicOverlaps :: MVector s (V2 a) -> MVector s (V2 a) -> Bool # basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V2 a)) # basicInitialize :: PrimMonad m => MVector (PrimState m) (V2 a) -> m () # basicUnsafeReplicate :: PrimMonad m => Int -> V2 a -> m (MVector (PrimState m) (V2 a)) # basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> m (V2 a) # basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> V2 a -> m () # basicClear :: PrimMonad m => MVector (PrimState m) (V2 a) -> m () # basicSet :: PrimMonad m => MVector (PrimState m) (V2 a) -> V2 a -> m () # basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V2 a) -> MVector (PrimState m) (V2 a) -> m () # basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V2 a) -> MVector (PrimState m) (V2 a) -> m () # basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> m (MVector (PrimState m) (V2 a)) # | |
Bounded a => Bounded (V2 a) | |
Eq a => Eq (V2 a) | |
Floating a => Floating (V2 a) | |
Fractional a => Fractional (V2 a) | |
Data a => Data (V2 a) | |
Defined in Linear.V2 gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V2 a -> c (V2 a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V2 a) # dataTypeOf :: V2 a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (V2 a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V2 a)) # gmapT :: (forall b. Data b => b -> b) -> V2 a -> V2 a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r # gmapQ :: (forall d. Data d => d -> u) -> V2 a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> V2 a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> V2 a -> m (V2 a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V2 a -> m (V2 a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V2 a -> m (V2 a) # | |
Num a => Num (V2 a) | |
Ord a => Ord (V2 a) | |
Read a => Read (V2 a) | |
Show a => Show (V2 a) | |
Ix a => Ix (V2 a) | |
Generic (V2 a) | |
Storable a => Storable (V2 a) | |
Binary a => Binary (V2 a) | |
Serial a => Serial (V2 a) | |
Serialize a => Serialize (V2 a) | |
NFData a => NFData (V2 a) | |
Hashable a => Hashable (V2 a) | |
Unbox a => Unbox (V2 a) | |
Defined in Linear.V2 | |
Ixed (V2 a) | |
Epsilon a => Epsilon (V2 a) | |
Generic1 V2 | |
FunctorWithIndex (E V2) V2 | |
FoldableWithIndex (E V2) V2 | |
Defined in Linear.V2 ifoldMap :: Monoid m => (E V2 -> a -> m) -> V2 a -> m # ifolded :: (Indexable (E V2) p, Contravariant f, Applicative f) => p a (f a) -> V2 a -> f (V2 a) # ifoldr :: (E V2 -> a -> b -> b) -> b -> V2 a -> b # ifoldl :: (E V2 -> b -> a -> b) -> b -> V2 a -> b # | |
TraversableWithIndex (E V2) V2 | |
Each (V2 a) (V2 b) a b | |
Field1 (V2 a) (V2 a) a a | |
Field2 (V2 a) (V2 a) a a | |
type Rep V2 | |
type Diff V2 | |
Defined in Linear.Affine | |
type Size V2 | |
data MVector s (V2 a) | |
type Rep (V2 a) | |
Defined in Linear.V2 type Rep (V2 a) = D1 (MetaData "V2" "Linear.V2" "linear-1.20.8-A6yXxZoEVLi6H8lbxuIFKk" False) (C1 (MetaCons "V2" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a))) | |
data Vector (V2 a) | |
type Index (V2 a) | |
type IxValue (V2 a) | |
type Rep1 V2 | |
Defined in Linear.V2 type Rep1 V2 = D1 (MetaData "V2" "Linear.V2" "linear-1.20.8-A6yXxZoEVLi6H8lbxuIFKk" False) (C1 (MetaCons "V2" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) Par1 :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) Par1)) |
SDL exports
data JoyHatPosition #
Identifies the state of the POV hat on a joystick.
Instances
data JoyButtonState #
Identifies the state of a joystick button.
Instances
data JoyDeviceConnection #
Identifies whether a joystick has been connected or disconnected.
Instances
Number exports
8-bit unsigned integer type
Instances
16-bit signed integer type
Instances
32-bit signed integer type