module Graphics.XHB.Requests.Internal.Instances.DPMS () where
import Graphics.XHB.Gen.DPMS
import Graphics.XHB.Requests.Internal.Classes
import Prelude (fmap)
import Data.Bifunctor (second)
import Graphics.XHB (getReply)
instance RequestWithReply GetVersion GetVersionReply where
requestWithReplyIO (MkGetVersion a b) conn
= fmap getReply (getVersion conn a b)
instance RequestWithReply Capable CapableReply where
requestWithReplyIO (MkCapable) conn
= fmap (fmap (second MkCapableReply))
(fmap getReply (capable conn))
instance RequestWithReply GetTimeouts GetTimeoutsReply where
requestWithReplyIO (MkGetTimeouts) conn
= fmap getReply (getTimeouts conn)
instance Request SetTimeouts where
requestIO req conn = setTimeouts conn req
instance Request Enable where
requestIO (MkEnable) conn = enable conn
instance Request Disable where
requestIO (MkDisable) conn = disable conn
instance Request ForceLevel where
requestIO (MkForceLevel a) conn = forceLevel conn a
instance RequestWithReply Info InfoReply where
requestWithReplyIO (MkInfo) conn = fmap getReply (info conn)