mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-25 10:52:15 +03:00
Rename appMakeVtyEvent to appLiftVtyEvent
This commit is contained in:
parent
5fa5f387d9
commit
962e7c83df
@ -55,7 +55,7 @@ app =
|
|||||||
, appStartEvent = return
|
, appStartEvent = return
|
||||||
, appAttrMap = const theMap
|
, appAttrMap = const theMap
|
||||||
, appChooseCursor = neverShowCursor
|
, appChooseCursor = neverShowCursor
|
||||||
, appMakeVtyEvent = id
|
, appLiftVtyEvent = id
|
||||||
}
|
}
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -61,7 +61,7 @@ theApp =
|
|||||||
, appHandleEvent = appEvent
|
, appHandleEvent = appEvent
|
||||||
, appStartEvent = return
|
, appStartEvent = return
|
||||||
, appAttrMap = def
|
, appAttrMap = def
|
||||||
, appMakeVtyEvent = VtyEvent
|
, appLiftVtyEvent = VtyEvent
|
||||||
}
|
}
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -54,7 +54,7 @@ theApp =
|
|||||||
, M.appHandleEvent = appEvent
|
, M.appHandleEvent = appEvent
|
||||||
, M.appStartEvent = return
|
, M.appStartEvent = return
|
||||||
, M.appAttrMap = const theMap
|
, M.appAttrMap = const theMap
|
||||||
, M.appMakeVtyEvent = id
|
, M.appLiftVtyEvent = id
|
||||||
}
|
}
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -44,7 +44,7 @@ theApp =
|
|||||||
, M.appHandleEvent = appEvent
|
, M.appHandleEvent = appEvent
|
||||||
, M.appStartEvent = return
|
, M.appStartEvent = return
|
||||||
, M.appAttrMap = const theMap
|
, M.appAttrMap = const theMap
|
||||||
, M.appMakeVtyEvent = id
|
, M.appLiftVtyEvent = id
|
||||||
}
|
}
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -59,7 +59,7 @@ app =
|
|||||||
, M.appStartEvent = return
|
, M.appStartEvent = return
|
||||||
, M.appHandleEvent = appEvent
|
, M.appHandleEvent = appEvent
|
||||||
, M.appAttrMap = const def
|
, M.appAttrMap = const def
|
||||||
, M.appMakeVtyEvent = id
|
, M.appLiftVtyEvent = id
|
||||||
, M.appChooseCursor = M.neverShowCursor
|
, M.appChooseCursor = M.neverShowCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ theApp =
|
|||||||
, M.appHandleEvent = appEvent
|
, M.appHandleEvent = appEvent
|
||||||
, M.appStartEvent = return
|
, M.appStartEvent = return
|
||||||
, M.appAttrMap = const theMap
|
, M.appAttrMap = const theMap
|
||||||
, M.appMakeVtyEvent = id
|
, M.appLiftVtyEvent = id
|
||||||
}
|
}
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -146,7 +146,7 @@ theApp =
|
|||||||
, appStartEvent = return
|
, appStartEvent = return
|
||||||
, appHandleEvent = appEvent
|
, appHandleEvent = appEvent
|
||||||
, appAttrMap = const theAttrMap
|
, appAttrMap = const theAttrMap
|
||||||
, appMakeVtyEvent = id
|
, appLiftVtyEvent = id
|
||||||
}
|
}
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -33,7 +33,7 @@ app =
|
|||||||
, appAttrMap = const theMap
|
, appAttrMap = const theMap
|
||||||
, appStartEvent = return
|
, appStartEvent = return
|
||||||
, appChooseCursor = neverShowCursor
|
, appChooseCursor = neverShowCursor
|
||||||
, appMakeVtyEvent = id
|
, appLiftVtyEvent = id
|
||||||
}
|
}
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -50,7 +50,7 @@ app =
|
|||||||
, appStartEvent = return
|
, appStartEvent = return
|
||||||
, appAttrMap = const def
|
, appAttrMap = const def
|
||||||
, appChooseCursor = neverShowCursor
|
, appChooseCursor = neverShowCursor
|
||||||
, appMakeVtyEvent = id
|
, appLiftVtyEvent = id
|
||||||
}
|
}
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -55,7 +55,7 @@ theApp =
|
|||||||
, appHandleEvent = appEvent
|
, appHandleEvent = appEvent
|
||||||
, appStartEvent = return
|
, appStartEvent = return
|
||||||
, appAttrMap = const def
|
, appAttrMap = const def
|
||||||
, appMakeVtyEvent = id
|
, appLiftVtyEvent = id
|
||||||
}
|
}
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -65,7 +65,7 @@ app =
|
|||||||
, M.appStartEvent = return
|
, M.appStartEvent = return
|
||||||
, M.appHandleEvent = appEvent
|
, M.appHandleEvent = appEvent
|
||||||
, M.appAttrMap = const def
|
, M.appAttrMap = const def
|
||||||
, M.appMakeVtyEvent = id
|
, M.appLiftVtyEvent = id
|
||||||
, M.appChooseCursor = M.neverShowCursor
|
, M.appChooseCursor = M.neverShowCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ data App s e =
|
|||||||
-- initial scrolling requests, for example.
|
-- initial scrolling requests, for example.
|
||||||
, appAttrMap :: s -> AttrMap
|
, appAttrMap :: s -> AttrMap
|
||||||
-- ^ The attribute map that should be used during rendering.
|
-- ^ 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
|
-- ^ The event constructor to use to wrap Vty events in your own
|
||||||
-- event type. For example, if the application's event type is
|
-- event type. For example, if the application's event type is
|
||||||
-- 'Event', this is just 'id'.
|
-- 'Event', this is just 'id'.
|
||||||
@ -121,7 +121,7 @@ simpleMain w =
|
|||||||
, appHandleEvent = resizeOrQuit
|
, appHandleEvent = resizeOrQuit
|
||||||
, appStartEvent = return
|
, appStartEvent = return
|
||||||
, appAttrMap = def
|
, appAttrMap = def
|
||||||
, appMakeVtyEvent = id
|
, appLiftVtyEvent = id
|
||||||
, appChooseCursor = neverShowCursor
|
, appChooseCursor = neverShowCursor
|
||||||
}
|
}
|
||||||
in defaultMain app ()
|
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 :: IO Vty -> Chan e -> App s e -> RenderState -> s -> IO (InternalNext s)
|
||||||
runWithNewVty buildVty chan app initialRS initialSt = do
|
runWithNewVty buildVty chan app initialRS initialSt = do
|
||||||
withVty buildVty $ \vty -> do
|
withVty buildVty $ \vty -> do
|
||||||
pid <- forkIO $ supplyVtyEvents vty (appMakeVtyEvent app) chan
|
pid <- forkIO $ supplyVtyEvents vty (appLiftVtyEvent app) chan
|
||||||
let runInner rs st = do
|
let runInner rs st = do
|
||||||
(result, newRS) <- runVty vty chan app st rs
|
(result, newRS) <- runVty vty chan app st rs
|
||||||
case result of
|
case result of
|
||||||
|
Loading…
Reference in New Issue
Block a user