module Chiasma.Codec.Data.Pane where import Chiasma.Codec (TmuxCodec) import Chiasma.Data.TmuxId (HasPaneId, PaneId) import qualified Chiasma.Data.TmuxId as HasPaneId (HasPaneId(..)) data Pane = Pane { Pane -> PaneId paneId :: PaneId, Pane -> Int paneWidth :: Int, Pane -> Int paneHeight :: Int } deriving (Pane -> Pane -> Bool (Pane -> Pane -> Bool) -> (Pane -> Pane -> Bool) -> Eq Pane forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: Pane -> Pane -> Bool $c/= :: Pane -> Pane -> Bool == :: Pane -> Pane -> Bool $c== :: Pane -> Pane -> Bool Eq, Int -> Pane -> ShowS [Pane] -> ShowS Pane -> String (Int -> Pane -> ShowS) -> (Pane -> String) -> ([Pane] -> ShowS) -> Show Pane forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [Pane] -> ShowS $cshowList :: [Pane] -> ShowS show :: Pane -> String $cshow :: Pane -> String showsPrec :: Int -> Pane -> ShowS $cshowsPrec :: Int -> Pane -> ShowS Show, (forall x. Pane -> Rep Pane x) -> (forall x. Rep Pane x -> Pane) -> Generic Pane forall x. Rep Pane x -> Pane forall x. Pane -> Rep Pane x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cto :: forall x. Rep Pane x -> Pane $cfrom :: forall x. Pane -> Rep Pane x Generic, TmuxQuery Text -> Either TmuxDecodeError Pane (Text -> Either TmuxDecodeError Pane) -> TmuxQuery -> TmuxCodec Pane forall a. (Text -> Either TmuxDecodeError a) -> TmuxQuery -> TmuxCodec a query :: TmuxQuery $cquery :: TmuxQuery decode :: Text -> Either TmuxDecodeError Pane $cdecode :: Text -> Either TmuxDecodeError Pane TmuxCodec) instance HasPaneId Pane where paneId :: Pane -> PaneId paneId = Pane -> PaneId paneId