aboutsummaryrefslogtreecommitdiff
path: root/src/Lazymail/Types.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-09-09 16:13:53 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-09-09 16:13:53 -0300
commitd5c39015fb75662f5ae572aa04cdf20d5b8baac7 (patch)
tree1e4db9af341a1565c241fb380467bdfd00b6c775 /src/Lazymail/Types.hs
parent41b16df2db3920b59d1c13a468e848e68111058b (diff)
Compose mode
Diffstat (limited to 'src/Lazymail/Types.hs')
-rw-r--r--src/Lazymail/Types.hs23
1 files changed, 22 insertions, 1 deletions
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
nihil fit ex nihilo