Maintainer | Toshio Ito <debug.ito@gmail.com> |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
This module exports the Indicator
, a graphical interface that
explains the current bindings to the user. The Indicator
uses
optBindingHook
in Option
to receive the current bindings from
wild-bind.
- withNumPadIndicator :: NumPadPosition i => (Indicator s i -> IO ()) -> IO ()
- wildBindWithIndicator :: (Ord i, Enum i, Bounded i) => Indicator s i -> Binding s i -> FrontEnd s i -> IO ()
- bindingHook :: (Ord i, Enum i, Bounded i) => Indicator s1 i -> FrontEnd s2 i -> [(i, ActionDescription)] -> IO ()
- data Indicator s i
- updateDescription :: Indicator s i -> i -> ActionDescription -> IO ()
- getPresence :: Indicator s i -> IO Bool
- setPresence :: Indicator s i -> Bool -> IO ()
- togglePresence :: Indicator s i -> IO ()
- quit :: Indicator s i -> IO ()
- class NumPadPosition a where
- toNumPad :: a -> NumPadLocked
Construction
withNumPadIndicator :: NumPadPosition i => (Indicator s i -> IO ()) -> IO () Source
Initialize the indicator and run the given action. This function
should be used directly under main
function.
main :: IO () main = withNumPadIndicator $ \indicator -> ...
The executable must be compiled by ghc with -threaded
option enabled.
Otherwise, it aborts.
Execution
wildBindWithIndicator :: (Ord i, Enum i, Bounded i) => Indicator s i -> Binding s i -> FrontEnd s i -> IO () Source
Run wildBind
with the given Indicator
. ActionDescription
s
are shown by the Indicator
.
Low-level function
bindingHook :: (Ord i, Enum i, Bounded i) => Indicator s1 i -> FrontEnd s2 i -> [(i, ActionDescription)] -> IO () Source
Create an action appropriate for optBindingHook
in Option
from Indicator
and FrontEnd
.
Indicator type and its actions
updateDescription :: Indicator s i -> i -> ActionDescription -> IO () Source
Update and show the description for the current binding.
getPresence :: Indicator s i -> IO Bool Source
Get the current presence of the indicator. Returns True
if
it's present.
setPresence :: Indicator s i -> Bool -> IO () Source
Set the presence of the indicator.
togglePresence :: Indicator s i -> IO () Source
Toggle the presence of the indicator.
quit :: Indicator s i -> IO () Source
Destroy the indicator. This usually means quitting the entire application.
Generalization of number pad types
class NumPadPosition a where Source
Something that can be mapped to number pad's key positions.
toNumPad :: a -> NumPadLocked Source