Rename appMakeVtyEvent to appLiftVtyEvent

This commit is contained in:
Jonathan Daugherty 2015-07-10 13:53:21 -07:00
parent 5fa5f387d9
commit 962e7c83df
12 changed files with 14 additions and 14 deletions

View File

@ -55,7 +55,7 @@ app =
, appStartEvent = return
, appAttrMap = const theMap
, appChooseCursor = neverShowCursor
, appMakeVtyEvent = id
, appLiftVtyEvent = id
}
main :: IO ()

View File

@ -61,7 +61,7 @@ theApp =
, appHandleEvent = appEvent
, appStartEvent = return
, appAttrMap = def
, appMakeVtyEvent = VtyEvent
, appLiftVtyEvent = VtyEvent
}
main :: IO ()

View File

@ -54,7 +54,7 @@ theApp =
, M.appHandleEvent = appEvent
, M.appStartEvent = return
, M.appAttrMap = const theMap
, M.appMakeVtyEvent = id
, M.appLiftVtyEvent = id
}
main :: IO ()

View File

@ -44,7 +44,7 @@ theApp =
, M.appHandleEvent = appEvent
, M.appStartEvent = return
, M.appAttrMap = const theMap
, M.appMakeVtyEvent = id
, M.appLiftVtyEvent = id
}
main :: IO ()

View File

@ -59,7 +59,7 @@ app =
, M.appStartEvent = return
, M.appHandleEvent = appEvent
, M.appAttrMap = const def
, M.appMakeVtyEvent = id
, M.appLiftVtyEvent = id
, M.appChooseCursor = M.neverShowCursor
}

View File

@ -84,7 +84,7 @@ theApp =
, M.appHandleEvent = appEvent
, M.appStartEvent = return
, M.appAttrMap = const theMap
, M.appMakeVtyEvent = id
, M.appLiftVtyEvent = id
}
main :: IO ()

View File

@ -146,7 +146,7 @@ theApp =
, appStartEvent = return
, appHandleEvent = appEvent
, appAttrMap = const theAttrMap
, appMakeVtyEvent = id
, appLiftVtyEvent = id
}
main :: IO ()

View File

@ -33,7 +33,7 @@ app =
, appAttrMap = const theMap
, appStartEvent = return
, appChooseCursor = neverShowCursor
, appMakeVtyEvent = id
, appLiftVtyEvent = id
}
main :: IO ()

View File

@ -50,7 +50,7 @@ app =
, appStartEvent = return
, appAttrMap = const def
, appChooseCursor = neverShowCursor
, appMakeVtyEvent = id
, appLiftVtyEvent = id
}
main :: IO ()

View File

@ -55,7 +55,7 @@ theApp =
, appHandleEvent = appEvent
, appStartEvent = return
, appAttrMap = const def
, appMakeVtyEvent = id
, appLiftVtyEvent = id
}
main :: IO ()

View File

@ -65,7 +65,7 @@ app =
, M.appStartEvent = return
, M.appHandleEvent = appEvent
, M.appAttrMap = const def
, M.appMakeVtyEvent = id
, M.appLiftVtyEvent = id
, M.appChooseCursor = M.neverShowCursor
}

View File

@ -87,7 +87,7 @@ data App s e =
-- initial scrolling requests, for example.
, appAttrMap :: s -> AttrMap
-- ^ The attribute map that should be used during rendering.
, appMakeVtyEvent :: Event -> e
, appLiftVtyEvent :: Event -> e
-- ^ The event constructor to use to wrap Vty events in your own
-- event type. For example, if the application's event type is
-- 'Event', this is just 'id'.
@ -121,7 +121,7 @@ simpleMain w =
, appHandleEvent = resizeOrQuit
, appStartEvent = return
, appAttrMap = def
, appMakeVtyEvent = id
, appLiftVtyEvent = id
, appChooseCursor = neverShowCursor
}
in defaultMain app ()
@ -141,7 +141,7 @@ data InternalNext a = InternalSuspendAndResume RenderState (IO a)
runWithNewVty :: IO Vty -> Chan e -> App s e -> RenderState -> s -> IO (InternalNext s)
runWithNewVty buildVty chan app initialRS initialSt = do
withVty buildVty $ \vty -> do
pid <- forkIO $ supplyVtyEvents vty (appMakeVtyEvent app) chan
pid <- forkIO $ supplyVtyEvents vty (appLiftVtyEvent app) chan
let runInner rs st = do
(result, newRS) <- runVty vty chan app st rs
case result of