module Graphics.XHB.Requests.Internal.Instances.XvMC () where
import Graphics.XHB.Gen.XvMC
import Graphics.XHB.Requests.Internal.Classes
import Prelude (fmap)
import Data.Bifunctor (second)
import Graphics.XHB (getReply)
instance RequestWithReply QueryVersion QueryVersionReply where
requestWithReplyIO (MkQueryVersion) conn
= fmap getReply (queryVersion conn)
instance RequestWithReply ListSurfaceTypes ListSurfaceTypesReply
where
requestWithReplyIO (MkListSurfaceTypes a) conn
= fmap getReply (listSurfaceTypes conn a)
instance RequestWithReply CreateContext CreateContextReply where
requestWithReplyIO req conn
= fmap getReply (createContext conn req)
instance Request DestroyContext where
requestIO (MkDestroyContext a) conn = destroyContext conn a
instance RequestWithReply CreateSurface CreateSurfaceReply where
requestWithReplyIO (MkCreateSurface a b) conn
= fmap (fmap (second MkCreateSurfaceReply))
(fmap getReply (createSurface conn a b))
instance Request DestroySurface where
requestIO (MkDestroySurface a) conn = destroySurface conn a
instance RequestWithReply CreateSubpicture CreateSubpictureReply
where
requestWithReplyIO req conn
= fmap getReply (createSubpicture conn req)
instance Request DestroySubpicture where
requestIO (MkDestroySubpicture a) conn = destroySubpicture conn a
instance RequestWithReply ListSubpictureTypes
ListSubpictureTypesReply where
requestWithReplyIO (MkListSubpictureTypes a b) conn
= fmap getReply (listSubpictureTypes conn a b)