-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8149bf0
commit a2f6f42
Showing
6 changed files
with
196 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
termbox2-bindings-hs/src/Termbox2/Bindings/Hs/Internal/Color.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
module Termbox2.Bindings.Hs.Internal.Color | ||
( Tb_color | ||
( Tb_color, | ||
TB_DEFAULT, | ||
TB_BLACK, | ||
TB_BLUE, | ||
TB_CYAN, | ||
TB_GREEN, | ||
TB_HI_BLACK, | ||
TB_MAGENTA, | ||
TB_RED, | ||
TB_WHITE, | ||
TB_YELLOW | ||
), | ||
) | ||
where | ||
|
||
import Data.Word (Word64) | ||
import Termbox2.Bindings.C | ||
|
||
-- | A color. | ||
newtype Tb_color | ||
= Tb_color Word64 | ||
deriving stock (Eq, Ord) | ||
deriving newtype (Num, Show) | ||
|
||
pattern TB_DEFAULT :: Tb_color | ||
pattern TB_DEFAULT <- | ||
((== Tb_color _TB_DEFAULT) -> True) | ||
where | ||
TB_DEFAULT = Tb_color _TB_DEFAULT | ||
|
||
pattern TB_BLACK :: Tb_color | ||
pattern TB_BLACK <- | ||
((== Tb_color _TB_BLACK) -> True) | ||
where | ||
TB_BLACK = Tb_color _TB_BLACK | ||
|
||
pattern TB_BLUE :: Tb_color | ||
pattern TB_BLUE <- | ||
((== Tb_color _TB_BLUE) -> True) | ||
where | ||
TB_BLUE = Tb_color _TB_BLUE | ||
|
||
pattern TB_CYAN :: Tb_color | ||
pattern TB_CYAN <- | ||
((== Tb_color _TB_CYAN) -> True) | ||
where | ||
TB_CYAN = Tb_color _TB_CYAN | ||
|
||
pattern TB_GREEN :: Tb_color | ||
pattern TB_GREEN <- | ||
((== Tb_color _TB_GREEN) -> True) | ||
where | ||
TB_GREEN = Tb_color _TB_GREEN | ||
|
||
pattern TB_HI_BLACK :: Tb_color | ||
pattern TB_HI_BLACK <- | ||
((== Tb_color _TB_HI_BLACK) -> True) | ||
where | ||
TB_HI_BLACK = Tb_color _TB_HI_BLACK | ||
|
||
pattern TB_MAGENTA :: Tb_color | ||
pattern TB_MAGENTA <- | ||
((== Tb_color _TB_MAGENTA) -> True) | ||
where | ||
TB_MAGENTA = Tb_color _TB_MAGENTA | ||
|
||
pattern TB_RED :: Tb_color | ||
pattern TB_RED <- | ||
((== Tb_color _TB_RED) -> True) | ||
where | ||
TB_RED = Tb_color _TB_RED | ||
|
||
pattern TB_WHITE :: Tb_color | ||
pattern TB_WHITE <- | ||
((== Tb_color _TB_WHITE) -> True) | ||
where | ||
TB_WHITE = Tb_color _TB_WHITE | ||
|
||
pattern TB_YELLOW :: Tb_color | ||
pattern TB_YELLOW <- | ||
((== Tb_color _TB_YELLOW) -> True) | ||
where | ||
TB_YELLOW = Tb_color _TB_YELLOW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.