X11-1.9: A binding to the X11 graphics library

Copyright | (c) Haskell.org 2012 (c) Jochen Keil 2012
License | BSD3
Maintainer | Ben Boeckel <mathstuf@gmail.com> , Jochen Keil <jochen dot keil at gmail dot com>
Stability | provisional
Portability | portable
Safe Haskell | None
Language | Haskell98

Graphics.X11.Xrandr

Description

Synopsis

- data XRRScreenSize = XRRScreenSize {
  - xrr_ss_width :: !CInt
  - xrr_ss_height :: !CInt
  - xrr_ss_mwidth :: !CInt
  - xrr_ss_mheight :: !CInt
  }
- data XRRModeInfo = XRRModeInfo {
  - xrr_mi_id :: !RRMode
  - xrr_mi_width :: !CUInt
  - xrr_mi_height :: !CUInt
  - xrr_mi_dotClock :: !CUInt
  - xrr_mi_hSyncStart :: !CUInt
  - xrr_mi_hSyncEnd :: !CUInt
  - xrr_mi_hTotal :: !CUInt
  - xrr_mi_hSkew :: !CUInt
  - xrr_mi_vSyncStart :: !CUInt
  - xrr_mi_vSyncEnd :: !CUInt
  - xrr_mi_vTotal :: !CUInt
  - xrr_mi_name :: !String
  - xrr_mi_modeFlags :: !XRRModeFlags
  }
- data XRRScreenResources = XRRScreenResources {
  - xrr_sr_timestamp :: !Time
  - xrr_sr_configTimestamp :: !Time
  - xrr_sr_crtcs :: [RRCrtc]
  - xrr_sr_outputs :: [RROutput]
  - xrr_sr_modes :: [XRRModeInfo]
  }
- data XRROutputInfo = XRROutputInfo {
  - xrr_oi_timestamp :: !Time
  - xrr_oi_crtc :: !RRCrtc
  - xrr_oi_name :: !String
  - xrr_oi_mm_width :: !CULong
  - xrr_oi_mm_height :: !CULong
  - xrr_oi_connection :: !Connection
  - xrr_oi_subpixel_order :: !SubpixelOrder
  - xrr_oi_crtcs :: [RRCrtc]
  - xrr_oi_clones :: [RROutput]
  - xrr_oi_npreferred :: !CInt
  - xrr_oi_modes :: [RRMode]
  }
- data XRRCrtcInfo = XRRCrtcInfo {
  - xrr_ci_timestamp :: !Time
  - xrr_ci_x :: !CInt
  - xrr_ci_y :: !CInt
  - xrr_ci_width :: !CUInt
  - xrr_ci_height :: !CUInt
  - xrr_ci_mode :: !RRMode
  - xrr_ci_rotation :: !Rotation
  - xrr_ci_outputs :: [RROutput]
  - xrr_ci_rotations :: !Rotation
  - xrr_ci_possible :: [RROutput]
  }
- data XRRPropertyInfo = XRRPropertyInfo {
  - xrr_pi_pending :: !Bool
  - xrr_pi_range :: !Bool
  - xrr_pi_immutable :: !Bool
  - xrr_pi_values :: [CLong]
  }
- compiledWithXrandr :: Bool
- type Rotation = Word16
- type Reflection = Word16
- type SizeID = Word16
- data XRRScreenConfiguration
- xrrQueryExtension :: Display -> IO (Maybe (CInt, CInt))
- xrrQueryVersion :: Display -> IO (Maybe (CInt, CInt))
- xrrGetScreenInfo :: Display -> Drawable -> IO (Maybe XRRScreenConfiguration)
- xrrFreeScreenConfigInfo :: XRRScreenConfiguration -> IO ()
- xrrSetScreenConfig :: Display -> XRRScreenConfiguration -> Drawable -> CInt -> Rotation -> Time -> IO Status
- xrrSetScreenConfigAndRate :: Display -> XRRScreenConfiguration -> Drawable -> CInt -> Rotation -> CShort -> Time -> IO Status
- xrrConfigRotations :: XRRScreenConfiguration -> IO (Rotation, Rotation)
- xrrConfigTimes :: XRRScreenConfiguration -> IO (Time, Time)
- xrrConfigSizes :: XRRScreenConfiguration -> IO (Maybe [XRRScreenSize])
- xrrConfigRates :: XRRScreenConfiguration -> CInt -> IO (Maybe [CShort])
- xrrConfigCurrentConfiguration :: XRRScreenConfiguration -> IO (Rotation, SizeID)
- xrrConfigCurrentRate :: XRRScreenConfiguration -> IO CShort
- xrrRootToScreen :: Display -> Window -> IO CInt
- xrrSelectInput :: Display -> Window -> EventMask -> IO ()
- xrrUpdateConfiguration :: XEvent -> IO CInt
- xrrRotations :: Display -> CInt -> IO (Rotation, Rotation)
- xrrSizes :: Display -> CInt -> IO (Maybe [XRRScreenSize])
- xrrRates :: Display -> CInt -> CInt -> IO (Maybe [CShort])
- xrrTimes :: Display -> CInt -> IO (Time, Time)
- xrrGetScreenResources :: Display -> Window -> IO (Maybe XRRScreenResources)
- xrrGetOutputInfo :: Display -> XRRScreenResources -> RROutput -> IO (Maybe XRROutputInfo)
- xrrGetCrtcInfo :: Display -> XRRScreenResources -> RRCrtc -> IO (Maybe XRRCrtcInfo)
- xrrGetScreenResourcesCurrent :: Display -> Window -> IO (Maybe XRRScreenResources)
- xrrSetOutputPrimary :: Display -> Window -> RROutput -> IO ()
- xrrGetOutputPrimary :: Display -> Window -> IO RROutput
- xrrListOutputProperties :: Display -> RROutput -> IO (Maybe [Atom])
- xrrQueryOutputProperty :: Display -> RROutput -> Atom -> IO (Maybe XRRPropertyInfo)
- xrrConfigureOutputProperty :: Display -> RROutput -> Atom -> Bool -> Bool -> [CLong] -> IO ()
- xrrChangeOutputProperty :: Display -> RROutput -> Atom -> Atom -> CInt -> CInt -> [Word32] -> IO ()
- xrrGetOutputProperty :: Display -> RROutput -> Atom -> CLong -> CLong -> Bool -> Bool -> Atom -> IO (Maybe (Atom, Int, CULong, [Word32]))
- xrrDeleteOutputProperty :: Display -> RROutput -> Atom -> IO ()

# Documentation

data XRRScreenSize Source #

Representation of the XRRScreenSize struct

Constructors

XRRScreenSize |

Fields

- xrr_ss_width :: !CInt
- xrr_ss_height :: !CInt
- xrr_ss_mwidth :: !CInt
- xrr_ss_mheight :: !CInt

Instances

Show XRRScreenSize Source # |
Instance details Defined in Graphics.X11.Xrandr Methods showsPrec :: Int -> XRRScreenSize -> ShowS Source # show :: XRRScreenSize -> String Source # showList :: [XRRScreenSize] -> ShowS Source #
Storable XRRScreenSize Source # |

Instance details

Defined in Graphics.X11.Xrandr

Methods

sizeOf :: XRRScreenSize -> Int Source #

alignment :: XRRScreenSize -> Int Source #

peekElemOff :: Ptr XRRScreenSize -> Int -> IO XRRScreenSize Source #

pokeElemOff :: Ptr XRRScreenSize -> Int -> XRRScreenSize -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO XRRScreenSize Source #

pokeByteOff :: Ptr b -> Int -> XRRScreenSize -> IO () Source #

peek :: Ptr XRRScreenSize -> IO XRRScreenSize Source #

poke :: Ptr XRRScreenSize -> XRRScreenSize -> IO () Source #

data XRRModeInfo Source #

Representation of the XRRModeInfo struct

Constructors

XRRModeInfo |

Fields

- xrr_mi_id :: !RRMode
- xrr_mi_width :: !CUInt
- xrr_mi_height :: !CUInt
- xrr_mi_dotClock :: !CUInt
- xrr_mi_hSyncStart :: !CUInt
- xrr_mi_hSyncEnd :: !CUInt
- xrr_mi_hTotal :: !CUInt
- xrr_mi_hSkew :: !CUInt
- xrr_mi_vSyncStart :: !CUInt
- xrr_mi_vSyncEnd :: !CUInt
- xrr_mi_vTotal :: !CUInt
- xrr_mi_name :: !String
- xrr_mi_modeFlags :: !XRRModeFlags

Instances

Eq XRRModeInfo Source # |
Instance details Defined in Graphics.X11.Xrandr Methods (==) :: XRRModeInfo -> XRRModeInfo -> Bool Source # (/=) :: XRRModeInfo -> XRRModeInfo -> Bool Source #
Show XRRModeInfo Source # |
Instance details Defined in Graphics.X11.Xrandr Methods showsPrec :: Int -> XRRModeInfo -> ShowS Source # show :: XRRModeInfo -> String Source # showList :: [XRRModeInfo] -> ShowS Source #
Storable XRRModeInfo Source # |

Instance details

Defined in Graphics.X11.Xrandr

Methods

sizeOf :: XRRModeInfo -> Int Source #

alignment :: XRRModeInfo -> Int Source #

peekElemOff :: Ptr XRRModeInfo -> Int -> IO XRRModeInfo Source #

pokeElemOff :: Ptr XRRModeInfo -> Int -> XRRModeInfo -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO XRRModeInfo Source #

pokeByteOff :: Ptr b -> Int -> XRRModeInfo -> IO () Source #

peek :: Ptr XRRModeInfo -> IO XRRModeInfo Source #

poke :: Ptr XRRModeInfo -> XRRModeInfo -> IO () Source #

data XRRScreenResources Source #

Representation of the XRRScreenResources struct

Constructors

XRRScreenResources |

Fields

- xrr_sr_timestamp :: !Time
- xrr_sr_configTimestamp :: !Time
- xrr_sr_crtcs :: [RRCrtc]
- xrr_sr_outputs :: [RROutput]
- xrr_sr_modes :: [XRRModeInfo]

Instances

Eq XRRScreenResources Source # |
Instance details Defined in Graphics.X11.Xrandr Methods (==) :: XRRScreenResources -> XRRScreenResources -> Bool Source # (/=) :: XRRScreenResources -> XRRScreenResources -> Bool Source #
Show XRRScreenResources Source # |
Instance details Defined in Graphics.X11.Xrandr Methods showsPrec :: Int -> XRRScreenResources -> ShowS Source # show :: XRRScreenResources -> String Source # showList :: [XRRScreenResources] -> ShowS Source #
Storable XRRScreenResources Source # |

Instance details

Defined in Graphics.X11.Xrandr

Methods

sizeOf :: XRRScreenResources -> Int Source #

alignment :: XRRScreenResources -> Int Source #

peekElemOff :: Ptr XRRScreenResources -> Int -> IO XRRScreenResources Source #

pokeElemOff :: Ptr XRRScreenResources -> Int -> XRRScreenResources -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO XRRScreenResources Source #

pokeByteOff :: Ptr b -> Int -> XRRScreenResources -> IO () Source #

peek :: Ptr XRRScreenResources -> IO XRRScreenResources Source #

poke :: Ptr XRRScreenResources -> XRRScreenResources -> IO () Source #

data XRROutputInfo Source #

Representation of the XRROutputInfo struct

Constructors

XRROutputInfo |

Fields

- xrr_oi_timestamp :: !Time
- xrr_oi_crtc :: !RRCrtc
- xrr_oi_name :: !String
- xrr_oi_mm_width :: !CULong
- xrr_oi_mm_height :: !CULong
- xrr_oi_connection :: !Connection
- xrr_oi_subpixel_order :: !SubpixelOrder
- xrr_oi_crtcs :: [RRCrtc]
- xrr_oi_clones :: [RROutput]
- xrr_oi_npreferred :: !CInt
- xrr_oi_modes :: [RRMode]

Instances

Eq XRROutputInfo Source # |
Instance details Defined in Graphics.X11.Xrandr Methods (==) :: XRROutputInfo -> XRROutputInfo -> Bool Source # (/=) :: XRROutputInfo -> XRROutputInfo -> Bool Source #
Show XRROutputInfo Source # |
Instance details Defined in Graphics.X11.Xrandr Methods showsPrec :: Int -> XRROutputInfo -> ShowS Source # show :: XRROutputInfo -> String Source # showList :: [XRROutputInfo] -> ShowS Source #
Storable XRROutputInfo Source # |

Instance details

Defined in Graphics.X11.Xrandr

Methods

sizeOf :: XRROutputInfo -> Int Source #

alignment :: XRROutputInfo -> Int Source #

peekElemOff :: Ptr XRROutputInfo -> Int -> IO XRROutputInfo Source #

pokeElemOff :: Ptr XRROutputInfo -> Int -> XRROutputInfo -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO XRROutputInfo Source #

pokeByteOff :: Ptr b -> Int -> XRROutputInfo -> IO () Source #

peek :: Ptr XRROutputInfo -> IO XRROutputInfo Source #

poke :: Ptr XRROutputInfo -> XRROutputInfo -> IO () Source #

data XRRCrtcInfo Source #

Representation of the XRRCrtcInfo struct

Constructors

XRRCrtcInfo |

Fields

- xrr_ci_timestamp :: !Time
- xrr_ci_x :: !CInt
- xrr_ci_y :: !CInt
- xrr_ci_width :: !CUInt
- xrr_ci_height :: !CUInt
- xrr_ci_mode :: !RRMode
- xrr_ci_rotation :: !Rotation
- xrr_ci_outputs :: [RROutput]
- xrr_ci_rotations :: !Rotation
- xrr_ci_possible :: [RROutput]

Instances

Eq XRRCrtcInfo Source # |
Instance details Defined in Graphics.X11.Xrandr Methods (==) :: XRRCrtcInfo -> XRRCrtcInfo -> Bool Source # (/=) :: XRRCrtcInfo -> XRRCrtcInfo -> Bool Source #
Show XRRCrtcInfo Source # |
Instance details Defined in Graphics.X11.Xrandr Methods showsPrec :: Int -> XRRCrtcInfo -> ShowS Source # show :: XRRCrtcInfo -> String Source # showList :: [XRRCrtcInfo] -> ShowS Source #
Storable XRRCrtcInfo Source # |

Instance details

Defined in Graphics.X11.Xrandr

Methods

sizeOf :: XRRCrtcInfo -> Int Source #

alignment :: XRRCrtcInfo -> Int Source #

peekElemOff :: Ptr XRRCrtcInfo -> Int -> IO XRRCrtcInfo Source #

pokeElemOff :: Ptr XRRCrtcInfo -> Int -> XRRCrtcInfo -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO XRRCrtcInfo Source #

pokeByteOff :: Ptr b -> Int -> XRRCrtcInfo -> IO () Source #

peek :: Ptr XRRCrtcInfo -> IO XRRCrtcInfo Source #

poke :: Ptr XRRCrtcInfo -> XRRCrtcInfo -> IO () Source #

data XRRPropertyInfo Source #

Representation of the XRRPropertyInfo struct

Constructors

XRRPropertyInfo |

Fields

- xrr_pi_pending :: !Bool
- xrr_pi_range :: !Bool
- xrr_pi_immutable :: !Bool
- xrr_pi_values :: [CLong]

Instances

Eq XRRPropertyInfo Source # |
Instance details Defined in Graphics.X11.Xrandr Methods (==) :: XRRPropertyInfo -> XRRPropertyInfo -> Bool Source # (/=) :: XRRPropertyInfo -> XRRPropertyInfo -> Bool Source #
Show XRRPropertyInfo Source # |
Instance details Defined in Graphics.X11.Xrandr Methods showsPrec :: Int -> XRRPropertyInfo -> ShowS Source # show :: XRRPropertyInfo -> String Source # showList :: [XRRPropertyInfo] -> ShowS Source #
Storable XRRPropertyInfo Source # |

Instance details

Defined in Graphics.X11.Xrandr

Methods

sizeOf :: XRRPropertyInfo -> Int Source #

alignment :: XRRPropertyInfo -> Int Source #

peekElemOff :: Ptr XRRPropertyInfo -> Int -> IO XRRPropertyInfo Source #

pokeElemOff :: Ptr XRRPropertyInfo -> Int -> XRRPropertyInfo -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO XRRPropertyInfo Source #

pokeByteOff :: Ptr b -> Int -> XRRPropertyInfo -> IO () Source #

peek :: Ptr XRRPropertyInfo -> IO XRRPropertyInfo Source #

poke :: Ptr XRRPropertyInfo -> XRRPropertyInfo -> IO () Source #

compiledWithXrandr :: Bool Source #

type Rotation = Word16 Source #

type Reflection = Word16 Source #

type SizeID = Word16 Source #

data XRRScreenConfiguration Source #

Instances

Eq XRRScreenConfiguration Source # |
Instance details Defined in Graphics.X11.Xrandr Methods (==) :: XRRScreenConfiguration -> XRRScreenConfiguration -> Bool Source # (/=) :: XRRScreenConfiguration -> XRRScreenConfiguration -> Bool Source #
Data XRRScreenConfiguration Source # |

Instance details

Defined in Graphics.X11.Xrandr

Methods

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

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

toConstr :: XRRScreenConfiguration -> Constr Source #

dataTypeOf :: XRRScreenConfiguration -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Ord XRRScreenConfiguration Source # |

Instance details

Defined in Graphics.X11.Xrandr

Methods

compare :: XRRScreenConfiguration -> XRRScreenConfiguration -> Ordering Source #

(<) :: XRRScreenConfiguration -> XRRScreenConfiguration -> Bool Source #

(<=) :: XRRScreenConfiguration -> XRRScreenConfiguration -> Bool Source #

(>) :: XRRScreenConfiguration -> XRRScreenConfiguration -> Bool Source #

(>=) :: XRRScreenConfiguration -> XRRScreenConfiguration -> Bool Source #

max :: XRRScreenConfiguration -> XRRScreenConfiguration -> XRRScreenConfiguration Source #

min :: XRRScreenConfiguration -> XRRScreenConfiguration -> XRRScreenConfiguration Source #

Show XRRScreenConfiguration Source # |
Instance details Defined in Graphics.X11.Xrandr Methods showsPrec :: Int -> XRRScreenConfiguration -> ShowS Source # show :: XRRScreenConfiguration -> String Source # showList :: [XRRScreenConfiguration] -> ShowS Source #

xrrQueryExtension :: Display -> IO (Maybe (CInt, CInt)) Source #

xrrQueryVersion :: Display -> IO (Maybe (CInt, CInt)) Source #

xrrGetScreenInfo :: Display -> Drawable -> IO (Maybe XRRScreenConfiguration) Source #

xrrFreeScreenConfigInfo :: XRRScreenConfiguration -> IO () Source #

xrrSetScreenConfig :: Display -> XRRScreenConfiguration -> Drawable -> CInt -> Rotation -> Time -> IO Status Source #

xrrSetScreenConfigAndRate :: Display -> XRRScreenConfiguration -> Drawable -> CInt -> Rotation -> CShort -> Time -> IO Status Source #

xrrConfigRotations :: XRRScreenConfiguration -> IO (Rotation, Rotation) Source #

xrrConfigTimes :: XRRScreenConfiguration -> IO (Time, Time) Source #

xrrConfigSizes :: XRRScreenConfiguration -> IO (Maybe [XRRScreenSize]) Source #

xrrConfigRates :: XRRScreenConfiguration -> CInt -> IO (Maybe [CShort]) Source #

xrrConfigCurrentConfiguration :: XRRScreenConfiguration -> IO (Rotation, SizeID) Source #

xrrConfigCurrentRate :: XRRScreenConfiguration -> IO CShort Source #

xrrRootToScreen :: Display -> Window -> IO CInt Source #

xrrSelectInput :: Display -> Window -> EventMask -> IO () Source #

xrrUpdateConfiguration :: XEvent -> IO CInt Source #

xrrRotations :: Display -> CInt -> IO (Rotation, Rotation) Source #

xrrSizes :: Display -> CInt -> IO (Maybe [XRRScreenSize]) Source #

xrrRates :: Display -> CInt -> CInt -> IO (Maybe [CShort]) Source #

xrrTimes :: Display -> CInt -> IO (Time, Time) Source #

xrrGetScreenResources :: Display -> Window -> IO (Maybe XRRScreenResources) Source #

xrrGetOutputInfo :: Display -> XRRScreenResources -> RROutput -> IO (Maybe XRROutputInfo) Source #

xrrGetCrtcInfo :: Display -> XRRScreenResources -> RRCrtc -> IO (Maybe XRRCrtcInfo) Source #

xrrGetScreenResourcesCurrent :: Display -> Window -> IO (Maybe XRRScreenResources) Source #

xrrSetOutputPrimary :: Display -> Window -> RROutput -> IO () Source #

xrrGetOutputPrimary :: Display -> Window -> IO RROutput Source #

xrrListOutputProperties :: Display -> RROutput -> IO (Maybe [Atom]) Source #

xrrQueryOutputProperty :: Display -> RROutput -> Atom -> IO (Maybe XRRPropertyInfo) Source #

xrrConfigureOutputProperty :: Display -> RROutput -> Atom -> Bool -> Bool -> [CLong] -> IO () Source #

xrrChangeOutputProperty :: Display -> RROutput -> Atom -> Atom -> CInt -> CInt -> [Word32] -> IO () Source #

xrrGetOutputProperty :: Display -> RROutput -> Atom -> CLong -> CLong -> Bool -> Bool -> Atom -> IO (Maybe (Atom, Int, CULong, [Word32])) Source #

`xrrGetOutputProperty display output property offset length delete pending propertyType` | returns `Maybe (actualType, format, bytesAfter, data)`.

xrrDeleteOutputProperty :: Display -> RROutput -> Atom -> IO () Source #