haskus-system-0.6.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.Arch.Linux.Graphics.Config

Description

Graphics configuration

DRM now has a single entry-point for changing the configuration: the atomic ioctl. We can test and commit a whole configuration without going through intermediate states. Legacy object properties are accessible through object properties. An atomic modification is a list of (object, property, value) tuples.

Synopsis

Documentation

data ConfigM m a Source #

Configuration monad

Instances

MonadTrans ConfigM Source # 

Methods

lift :: Monad m => m a -> ConfigM m a #

Monad m => Monad (ConfigM m) Source # 

Methods

(>>=) :: ConfigM m a -> (a -> ConfigM m b) -> ConfigM m b #

(>>) :: ConfigM m a -> ConfigM m b -> ConfigM m b #

return :: a -> ConfigM m a #

fail :: String -> ConfigM m a #

Functor m => Functor (ConfigM m) Source # 

Methods

fmap :: (a -> b) -> ConfigM m a -> ConfigM m b #

(<$) :: a -> ConfigM m b -> ConfigM m a #

Monad m => Applicative (ConfigM m) Source # 

Methods

pure :: a -> ConfigM m a #

(<*>) :: ConfigM m (a -> b) -> ConfigM m a -> ConfigM m b #

(*>) :: ConfigM m a -> ConfigM m b -> ConfigM m b #

(<*) :: ConfigM m a -> ConfigM m b -> ConfigM m a #

MonadIO m => MonadIO (ConfigM m) Source # 

Methods

liftIO :: IO a -> ConfigM m a #

MonadInIO m => MonadInIO (ConfigM m) Source # 

Methods

liftWith :: (forall c. (a -> IO c) -> IO c) -> (a -> ConfigM m b) -> ConfigM m b Source #

liftWith2 :: (forall c. (a -> b -> IO c) -> IO c) -> (a -> b -> ConfigM m e) -> ConfigM m e Source #

data Atomic Source #

Constructors

Atomic 
NonAtomic 

data CommitOrTest Source #

Test the configuration or commit it

Constructors

TestOnly

Test only

Commit

Test and commit

data AsyncMode Source #

Asynchronous commit?

Constructors

Synchronous

Synchronous commit

Asynchronous

Asynchronous commit (may not be supported)

data ModesetMode Source #

Do we allow full mode-setting

This flag is useful for devices such as tablets whose screen is often shutdown: we can use a degraded mode (scaled, etc.) for a while to save power and only perform the full modeset when the screen is reactivated.

Constructors

AllowFullModeset

Allow full mode-setting

DisallowFullModeset

Don't allow full mode-setting

graphicsConfig :: MonadInIO m => Handle -> ConfigM m a -> m a Source #

Configure a graphics device (atomically if supported)

setPropertyM :: (MonadInIO m, Object o) => o -> PropID -> PropValue -> ConfigM m () Source #

Set property

getPropertyM :: (MonadInIO m, Object o, MonadState ConfigState (ConfigM m)) => o -> ConfigM m (Variant '[[Property], ObjectNotFound, InvalidParam]) Source #

Get properties