{-# 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(..), RequestClass(..), 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) instance RequestClass Request data Event = EvGeometry Geometry | EvMode Mode | EvScale Int | EvName String | EvDescription String | EvDone