From d5c39015fb75662f5ae572aa04cdf20d5b8baac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Mon, 9 Sep 2013 16:13:53 -0300 Subject: Compose mode --- src/Lazymail/Types.hs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/Lazymail/Types.hs') diff --git a/src/Lazymail/Types.hs b/src/Lazymail/Types.hs index ce46f65..6ef4f5b 100644 --- a/src/Lazymail/Types.hs +++ b/src/Lazymail/Types.hs @@ -39,6 +39,8 @@ data LazymailConfig = LazymailConfig { , indexModeKeymap :: [Keymap] , emailModeKeymap :: [Keymap] , composeModeKeymap :: [Keymap] + , textEditor :: FilePath + , sendmailCommand :: [String] } data Email = Email { @@ -84,6 +86,7 @@ data LazymailState = LazymailState { , indexState :: IndexState , emailState :: EmailState , composeState :: ComposeState + , inputState :: InputState , colorStyle :: ColorStyle } @@ -107,9 +110,20 @@ data IndexState = IndexState { } data ComposeState = ComposeState { - composition :: Maybe String + composeFields :: ComposeFields + , bodyFileName :: Maybe FilePath + , bodyReady :: Bool } +data ComposeFields = ComposeFields { + fromField :: Maybe String + , toField :: Maybe String + , ccField :: Maybe String + , bccField :: Maybe String + , subjectField :: Maybe String + , replyToField :: Maybe String +} + data EmailState = EmailState { scrollRowEm :: Int , bodyStartRow :: Int @@ -125,4 +139,11 @@ data ColorStyle = ColorStyle { , newEmailColorID :: ColorID } +data InputState = InputState { + inputRequested :: Bool + , prompt :: Maybe String + , currentInput :: String + , postInputActions :: LazymailCurses () +} + type Keymap = ([Event], LazymailCurses ()) \ No newline at end of file -- cgit v1.2.3