Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Graphics.Vty.DisplayAttributes
Synopsis
- data DisplayAttrDiff = DisplayAttrDiff {}
- data StyleStateChange
- data DisplayColorDiff
- data URLDiff
- fixDisplayAttr :: FixedAttr -> Attr -> FixedAttr
- displayAttrDiffs :: FixedAttr -> FixedAttr -> DisplayAttrDiff
Documentation
data DisplayAttrDiff Source #
difference between two display attributes. Used in the calculation of the operations required to go from one display attribute to the next.
Previously, vty would reset display attributes to default then apply the new display attributes. This turned out to be very expensive: A *lot* more data would be sent to the terminal than required.
Constructors
DisplayAttrDiff | |
Fields |
Instances
Monoid DisplayAttrDiff Source # | |
Defined in Graphics.Vty.DisplayAttributes Methods mappend :: DisplayAttrDiff -> DisplayAttrDiff -> DisplayAttrDiff # mconcat :: [DisplayAttrDiff] -> DisplayAttrDiff # | |
Semigroup DisplayAttrDiff Source # | |
Defined in Graphics.Vty.DisplayAttributes Methods (<>) :: DisplayAttrDiff -> DisplayAttrDiff -> DisplayAttrDiff # sconcat :: NonEmpty DisplayAttrDiff -> DisplayAttrDiff # stimes :: Integral b => b -> DisplayAttrDiff -> DisplayAttrDiff # | |
Show DisplayAttrDiff Source # | |
Defined in Graphics.Vty.DisplayAttributes Methods showsPrec :: Int -> DisplayAttrDiff -> ShowS # show :: DisplayAttrDiff -> String # showList :: [DisplayAttrDiff] -> ShowS # |
data StyleStateChange Source #
Style attribute changes are transformed into a sequence of apply/removes of the individual attributes.
Constructors
Instances
Show StyleStateChange Source # | |
Defined in Graphics.Vty.DisplayAttributes Methods showsPrec :: Int -> StyleStateChange -> ShowS # show :: StyleStateChange -> String # showList :: [StyleStateChange] -> ShowS # | |
Eq StyleStateChange Source # | |
Defined in Graphics.Vty.DisplayAttributes Methods (==) :: StyleStateChange -> StyleStateChange -> Bool # (/=) :: StyleStateChange -> StyleStateChange -> Bool # |
data DisplayColorDiff Source #
Difference between two display color attribute changes.
Constructors
ColorToDefault | |
NoColorChange | |
SetColor !Color |
Instances
Show DisplayColorDiff Source # | |
Defined in Graphics.Vty.DisplayAttributes Methods showsPrec :: Int -> DisplayColorDiff -> ShowS # show :: DisplayColorDiff -> String # showList :: [DisplayColorDiff] -> ShowS # | |
Eq DisplayColorDiff Source # | |
Defined in Graphics.Vty.DisplayAttributes Methods (==) :: DisplayColorDiff -> DisplayColorDiff -> Bool # (/=) :: DisplayColorDiff -> DisplayColorDiff -> Bool # |
Constructors
LinkTo !ByteString | |
NoLinkChange | |
EndLink |
fixDisplayAttr :: FixedAttr -> Attr -> FixedAttr Source #
Given the previously applied display attributes as a FixedAttr and the current display attributes as an Attr produces a FixedAttr that represents the current display attributes. This is done by using the previously applied display attributes to remove the KeepCurrent abstraction.
displayAttrDiffs :: FixedAttr -> FixedAttr -> DisplayAttrDiff Source #
Determines the diff between two display&color attributes. This diff determines the operations that actually get output to the terminal.