-- |Codec data type for @vim_get_windows@.
module Ribosome.Data.WindowConfig where

import Ribosome.Host.Class.Msgpack.Decode (MsgpackDecode)
import Ribosome.Host.Class.Msgpack.Encode (MsgpackEncode)

-- |Codec data type for @vim_get_windows@.
data WindowConfig =
  WindowConfig {
     WindowConfig -> Text
relative :: Text,
     WindowConfig -> Bool
focusable :: Bool,
     WindowConfig -> Bool
external :: Bool
  }
  deriving stock (WindowConfig -> WindowConfig -> Bool
(WindowConfig -> WindowConfig -> Bool)
-> (WindowConfig -> WindowConfig -> Bool) -> Eq WindowConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WindowConfig -> WindowConfig -> Bool
$c/= :: WindowConfig -> WindowConfig -> Bool
== :: WindowConfig -> WindowConfig -> Bool
$c== :: WindowConfig -> WindowConfig -> Bool
Eq, Int -> WindowConfig -> ShowS
[WindowConfig] -> ShowS
WindowConfig -> String
(Int -> WindowConfig -> ShowS)
-> (WindowConfig -> String)
-> ([WindowConfig] -> ShowS)
-> Show WindowConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WindowConfig] -> ShowS
$cshowList :: [WindowConfig] -> ShowS
show :: WindowConfig -> String
$cshow :: WindowConfig -> String
showsPrec :: Int -> WindowConfig -> ShowS
$cshowsPrec :: Int -> WindowConfig -> ShowS
Show, (forall x. WindowConfig -> Rep WindowConfig x)
-> (forall x. Rep WindowConfig x -> WindowConfig)
-> Generic WindowConfig
forall x. Rep WindowConfig x -> WindowConfig
forall x. WindowConfig -> Rep WindowConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WindowConfig x -> WindowConfig
$cfrom :: forall x. WindowConfig -> Rep WindowConfig x
Generic)
  deriving anyclass (WindowConfig -> Object
(WindowConfig -> Object) -> MsgpackEncode WindowConfig
forall a. (a -> Object) -> MsgpackEncode a
toMsgpack :: WindowConfig -> Object
$ctoMsgpack :: WindowConfig -> Object
MsgpackEncode, Object -> Either DecodeError WindowConfig
(Object -> Either DecodeError WindowConfig)
-> MsgpackDecode WindowConfig
forall a. (Object -> Either DecodeError a) -> MsgpackDecode a
fromMsgpack :: Object -> Either DecodeError WindowConfig
$cfromMsgpack :: Object -> Either DecodeError WindowConfig
MsgpackDecode)