mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-25 02:42:28 +03:00
Rename appMakeVtyEvent to appLiftVtyEvent
This commit is contained in:
parent
5fa5f387d9
commit
962e7c83df
@ -55,7 +55,7 @@ app =
|
||||
, appStartEvent = return
|
||||
, appAttrMap = const theMap
|
||||
, appChooseCursor = neverShowCursor
|
||||
, appMakeVtyEvent = id
|
||||
, appLiftVtyEvent = id
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
|
@ -61,7 +61,7 @@ theApp =
|
||||
, appHandleEvent = appEvent
|
||||
, appStartEvent = return
|
||||
, appAttrMap = def
|
||||
, appMakeVtyEvent = VtyEvent
|
||||
, appLiftVtyEvent = VtyEvent
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
|
@ -54,7 +54,7 @@ theApp =
|
||||
, M.appHandleEvent = appEvent
|
||||
, M.appStartEvent = return
|
||||
, M.appAttrMap = const theMap
|
||||
, M.appMakeVtyEvent = id
|
||||
, M.appLiftVtyEvent = id
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
|
@ -44,7 +44,7 @@ theApp =
|
||||
, M.appHandleEvent = appEvent
|
||||
, M.appStartEvent = return
|
||||
, M.appAttrMap = const theMap
|
||||
, M.appMakeVtyEvent = id
|
||||
, M.appLiftVtyEvent = id
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ theApp =
|
||||
, M.appHandleEvent = appEvent
|
||||
, M.appStartEvent = return
|
||||
, M.appAttrMap = const theMap
|
||||
, M.appMakeVtyEvent = id
|
||||
, M.appLiftVtyEvent = id
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
|
@ -146,7 +146,7 @@ theApp =
|
||||
, appStartEvent = return
|
||||
, appHandleEvent = appEvent
|
||||
, appAttrMap = const theAttrMap
|
||||
, appMakeVtyEvent = id
|
||||
, appLiftVtyEvent = id
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
|
@ -33,7 +33,7 @@ app =
|
||||
, appAttrMap = const theMap
|
||||
, appStartEvent = return
|
||||
, appChooseCursor = neverShowCursor
|
||||
, appMakeVtyEvent = id
|
||||
, appLiftVtyEvent = id
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
|
@ -50,7 +50,7 @@ app =
|
||||
, appStartEvent = return
|
||||
, appAttrMap = const def
|
||||
, appChooseCursor = neverShowCursor
|
||||
, appMakeVtyEvent = id
|
||||
, appLiftVtyEvent = id
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
|
@ -55,7 +55,7 @@ theApp =
|
||||
, appHandleEvent = appEvent
|
||||
, appStartEvent = return
|
||||
, appAttrMap = const def
|
||||
, appMakeVtyEvent = id
|
||||
, appLiftVtyEvent = id
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user