glfw-group-0.1.0.0: GLFW package with window groups destroyed together
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.UI.GlfwG.Joystick

Synopsis

Documentation

data Joystick #

For use with the Joystick Input system.

Instances

Instances details
Data Joystick 
Instance details

Defined in Graphics.UI.GLFW.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Joystick -> c Joystick #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Joystick #

toConstr :: Joystick -> Constr #

dataTypeOf :: Joystick -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Joystick) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Joystick) #

gmapT :: (forall b. Data b => b -> b) -> Joystick -> Joystick #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Joystick -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Joystick -> r #

gmapQ :: (forall d. Data d => d -> u) -> Joystick -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Joystick -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Joystick -> m Joystick #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Joystick -> m Joystick #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Joystick -> m Joystick #

Bounded Joystick 
Instance details

Defined in Graphics.UI.GLFW.Types

Enum Joystick 
Instance details

Defined in Graphics.UI.GLFW.Types

Generic Joystick 
Instance details

Defined in Graphics.UI.GLFW.Types

Associated Types

type Rep Joystick :: Type -> Type #

Methods

from :: Joystick -> Rep Joystick x #

to :: Rep Joystick x -> Joystick #

Read Joystick 
Instance details

Defined in Graphics.UI.GLFW.Types

Show Joystick 
Instance details

Defined in Graphics.UI.GLFW.Types

NFData Joystick 
Instance details

Defined in Graphics.UI.GLFW.Types

Methods

rnf :: Joystick -> () #

Eq Joystick 
Instance details

Defined in Graphics.UI.GLFW.Types

Ord Joystick 
Instance details

Defined in Graphics.UI.GLFW.Types

type Rep Joystick 
Instance details

Defined in Graphics.UI.GLFW.Types

type Rep Joystick = D1 ('MetaData "Joystick" "Graphics.UI.GLFW.Types" "GLFW-b-3.3.9.1-CbbIOqvtyyzkbPgJI2V5g" 'False) ((((C1 ('MetaCons "Joystick'1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'2" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Joystick'3" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'4" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Joystick'5" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'6" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Joystick'7" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'8" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Joystick'9" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'10" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Joystick'11" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'12" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Joystick'13" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'14" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Joystick'15" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'16" 'PrefixI 'False) (U1 :: Type -> Type)))))

data JoystickState #

Part of the JoystickCallback, for when a monitor gets connected or disconnected.

Instances

Instances details
Data JoystickState 
Instance details

Defined in Graphics.UI.GLFW.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> JoystickState -> c JoystickState #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c JoystickState #

toConstr :: JoystickState -> Constr #

dataTypeOf :: JoystickState -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c JoystickState) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JoystickState) #

gmapT :: (forall b. Data b => b -> b) -> JoystickState -> JoystickState #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> JoystickState -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> JoystickState -> r #

gmapQ :: (forall d. Data d => d -> u) -> JoystickState -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> JoystickState -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> JoystickState -> m JoystickState #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> JoystickState -> m JoystickState #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> JoystickState -> m JoystickState #

Bounded JoystickState 
Instance details

Defined in Graphics.UI.GLFW.Types

Enum JoystickState 
Instance details

Defined in Graphics.UI.GLFW.Types

Generic JoystickState 
Instance details

Defined in Graphics.UI.GLFW.Types

Associated Types

type Rep JoystickState :: Type -> Type #

Read JoystickState 
Instance details

Defined in Graphics.UI.GLFW.Types

Show JoystickState 
Instance details

Defined in Graphics.UI.GLFW.Types

NFData JoystickState 
Instance details

Defined in Graphics.UI.GLFW.Types

Methods

rnf :: JoystickState -> () #

Eq JoystickState 
Instance details

Defined in Graphics.UI.GLFW.Types

Ord JoystickState 
Instance details

Defined in Graphics.UI.GLFW.Types

type Rep JoystickState 
Instance details

Defined in Graphics.UI.GLFW.Types

type Rep JoystickState = D1 ('MetaData "JoystickState" "Graphics.UI.GLFW.Types" "GLFW-b-3.3.9.1-CbbIOqvtyyzkbPgJI2V5g" 'False) (C1 ('MetaCons "JoystickState'Connected" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JoystickState'Disconnected" 'PrefixI 'False) (U1 :: Type -> Type))

data JoystickButtonState #

If a given joystick button is pressed or not when getJoystickButtons is called.

Instances

Instances details
Data JoystickButtonState 
Instance details

Defined in Graphics.UI.GLFW.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> JoystickButtonState -> c JoystickButtonState #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c JoystickButtonState #

toConstr :: JoystickButtonState -> Constr #

dataTypeOf :: JoystickButtonState -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c JoystickButtonState) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JoystickButtonState) #

gmapT :: (forall b. Data b => b -> b) -> JoystickButtonState -> JoystickButtonState #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> JoystickButtonState -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> JoystickButtonState -> r #

gmapQ :: (forall d. Data d => d -> u) -> JoystickButtonState -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> JoystickButtonState -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> JoystickButtonState -> m JoystickButtonState #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> JoystickButtonState -> m JoystickButtonState #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> JoystickButtonState -> m JoystickButtonState #

Bounded JoystickButtonState 
Instance details

Defined in Graphics.UI.GLFW.Types

Enum JoystickButtonState 
Instance details

Defined in Graphics.UI.GLFW.Types

Generic JoystickButtonState 
Instance details

Defined in Graphics.UI.GLFW.Types

Associated Types

type Rep JoystickButtonState :: Type -> Type #

Read JoystickButtonState 
Instance details

Defined in Graphics.UI.GLFW.Types

Show JoystickButtonState 
Instance details

Defined in Graphics.UI.GLFW.Types

NFData JoystickButtonState 
Instance details

Defined in Graphics.UI.GLFW.Types

Methods

rnf :: JoystickButtonState -> () #

Eq JoystickButtonState 
Instance details

Defined in Graphics.UI.GLFW.Types

Ord JoystickButtonState 
Instance details

Defined in Graphics.UI.GLFW.Types

type Rep JoystickButtonState 
Instance details

Defined in Graphics.UI.GLFW.Types

type Rep JoystickButtonState = D1 ('MetaData "JoystickButtonState" "Graphics.UI.GLFW.Types" "GLFW-b-3.3.9.1-CbbIOqvtyyzkbPgJI2V5g" 'False) (C1 ('MetaCons "JoystickButtonState'Pressed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JoystickButtonState'Released" 'PrefixI 'False) (U1 :: Type -> Type))

joystickPresent :: Joystick -> IO Bool #

Tests if the joystick is present at all See glfwJoystickPresent

joystickIsGamepad :: Joystick -> IO Bool #

This function returns whether the specified joystick is both present and has a gamepad mapping. See glfwJoystickIsGamepad

getJoystickAxes :: Joystick -> IO (Maybe [Double]) #

Returns the values of all axes of the specified joystick, normalized to between -1.0 and 1.0 See glfwGetJoystickAxes

getJoystickButtons :: Joystick -> IO (Maybe [JoystickButtonState]) #

Returns a list of all joystick button states for the specified joystick. See glfwGetJoystickButtons

getJoystickHats :: Joystick -> IO (Maybe [JoystickHatState]) #

Returns a list of all hats of the specified joystick. See glfwGetJoystickHats

data JoystickHatState #

The valid hat states of a joystick. Part of the joystick hat system.

Instances

Instances details
Data JoystickHatState 
Instance details

Defined in Graphics.UI.GLFW.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> JoystickHatState -> c JoystickHatState #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c JoystickHatState #

toConstr :: JoystickHatState -> Constr #

dataTypeOf :: JoystickHatState -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c JoystickHatState) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JoystickHatState) #

gmapT :: (forall b. Data b => b -> b) -> JoystickHatState -> JoystickHatState #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> JoystickHatState -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> JoystickHatState -> r #

gmapQ :: (forall d. Data d => d -> u) -> JoystickHatState -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> JoystickHatState -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> JoystickHatState -> m JoystickHatState #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> JoystickHatState -> m JoystickHatState #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> JoystickHatState -> m JoystickHatState #

Bounded JoystickHatState 
Instance details

Defined in Graphics.UI.GLFW.Types

Enum JoystickHatState 
Instance details

Defined in Graphics.UI.GLFW.Types

Generic JoystickHatState 
Instance details

Defined in Graphics.UI.GLFW.Types

Associated Types

type Rep JoystickHatState :: Type -> Type #

Read JoystickHatState 
Instance details

Defined in Graphics.UI.GLFW.Types

Show JoystickHatState 
Instance details

Defined in Graphics.UI.GLFW.Types

NFData JoystickHatState 
Instance details

Defined in Graphics.UI.GLFW.Types

Methods

rnf :: JoystickHatState -> () #

Eq JoystickHatState 
Instance details

Defined in Graphics.UI.GLFW.Types

Ord JoystickHatState 
Instance details

Defined in Graphics.UI.GLFW.Types

type Rep JoystickHatState 
Instance details

Defined in Graphics.UI.GLFW.Types

type Rep JoystickHatState = D1 ('MetaData "JoystickHatState" "Graphics.UI.GLFW.Types" "GLFW-b-3.3.9.1-CbbIOqvtyyzkbPgJI2V5g" 'False) (((C1 ('MetaCons "JoystickHatState'Centered" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JoystickHatState'Up" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JoystickHatState'Right" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JoystickHatState'Down" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "JoystickHatState'Left" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JoystickHatState'RightUp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JoystickHatState'RightDown" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JoystickHatState'LeftUp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JoystickHatState'LeftDown" 'PrefixI 'False) (U1 :: Type -> Type)))))

getJoystickName :: Joystick -> IO (Maybe String) #

A human-readable name for a Joystick. Not guranteed to be unique. See glfwGetJoystickName

getJoystickGUID :: Joystick -> IO (Maybe String) #

This function returns the SDL compatible GUID of the specified joystick. See glfwGetJoystickGUID

setJoystickCallback :: Maybe JoystickCallback -> IO () #

Sets a callback for when a joystick is connected or disconnected. See glfwSetJoystickCallback

type JoystickCallback = Joystick -> JoystickState -> IO () #

Fires when a joystick is connected or disconnected.