module Chiasma.Codec.Data.Window where

import Chiasma.Codec (TmuxCodec)
import Chiasma.Data.TmuxId (WindowId)

data Window =
  Window {
    Window -> WindowId
windowId :: WindowId,
    Window -> Int
windowWidth :: Int,
    Window -> Int
windowHeight :: Int
  }
  deriving stock (Window -> Window -> Bool
(Window -> Window -> Bool)
-> (Window -> Window -> Bool) -> Eq Window
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Window -> Window -> Bool
== :: Window -> Window -> Bool
$c/= :: Window -> Window -> Bool
/= :: Window -> Window -> Bool
Eq, Int -> Window -> ShowS
[Window] -> ShowS
Window -> String
(Int -> Window -> ShowS)
-> (Window -> String) -> ([Window] -> ShowS) -> Show Window
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Window -> ShowS
showsPrec :: Int -> Window -> ShowS
$cshow :: Window -> String
show :: Window -> String
$cshowList :: [Window] -> ShowS
showList :: [Window] -> ShowS
Show, (forall x. Window -> Rep Window x)
-> (forall x. Rep Window x -> Window) -> Generic Window
forall x. Rep Window x -> Window
forall x. Window -> Rep Window x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Window -> Rep Window x
from :: forall x. Window -> Rep Window x
$cto :: forall x. Rep Window x -> Window
to :: forall x. Rep Window x -> Window
Generic)
  deriving anyclass (TmuxQuery
Text -> Either DecodeError Window
(Text -> Either DecodeError Window)
-> TmuxQuery -> TmuxCodec Window
forall a.
(Text -> Either DecodeError a) -> TmuxQuery -> TmuxCodec a
$cdecode :: Text -> Either DecodeError Window
decode :: Text -> Either DecodeError Window
$cquery :: TmuxQuery
query :: TmuxQuery
TmuxCodec)