diff options
Diffstat (limited to 'protocols/Wayland/Protocols/Core')
| -rw-r--r-- | protocols/Wayland/Protocols/Core/WLOutput.hs | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/protocols/Wayland/Protocols/Core/WLOutput.hs b/protocols/Wayland/Protocols/Core/WLOutput.hs new file mode 100644 index 0000000..f943169 --- /dev/null +++ b/protocols/Wayland/Protocols/Core/WLOutput.hs @@ -0,0 +1,68 @@ +{-# LANGUAGE DuplicateRecordFields #-} +{-# LANGUAGE TypeFamilies #-} + +module Wayland.Protocols.Core.WLOutput + ( Subpixel(..) + , Transform(..) + , Mode(..) + , Geometry(..) + , Request(..) + , Event(..) + , Handle(..) + ) where + +import Data.Data (Typeable) +import Wayland.Server (ResourceClass(..), ObjectID) + +newtype Handle = Handle ObjectID + deriving (Show, Eq, Ord) + +instance ResourceClass Handle where + type ResourceEvent Handle = Event + type ResourceRequest Handle = Request + objectID (Handle h) = h + interface _ = undefined + +data Subpixel + = SubpixelUnknown + | SubpixelNone + | SubpixelHorizontalRgb + | SubpixelHorizontalBgr + | SubpixelVerticalRgb + | SubpixelVerticalBgr + +data Transform + = TransformNormal + | TransformNormal90 + | TransformNormal180 + | TransformNormal270 + | TransformFlipped + | TransformFlipped90 + | TransformFlipped180 + | TransformFlipped270 + +data Mode + = Mode { current :: Bool + , preferred :: Bool } + +data Geometry + = Geometry { x :: Int + , y :: Int + , physicalWidth :: Int + , physicalHeight :: Int + , subpixel :: Subpixel + , make :: String + , model :: String + , transform :: Transform } + +data Request + = ReqRelease Handle + deriving (Typeable, Show) + +data Event + = EvGeometry Geometry + | EvMode Mode + | EvScale Int + | EvName String + | EvDescription String + | EvDone |
