2module Graphics.Input where
5import Native.Graphics.Input as N
9buttons : a -> { button : a -> String -> Element, events : Signal a }
11button : String -> (Element, Signal ())
13 let pool = N.buttons ()
14 in (pool.button () txt, pool.events)
16customButtons : a -> { button : a -> Element -> Element -> Element -> Element,
19customButton : Element -> Element -> Element -> (Element, Signal ())
20customButton up hover down =
21 let pool = N.customButtons ()
22 in (pool.button () up hover down, pool.events)
24checkboxes : a -> { box : (Bool -> a) -> Bool -> Element, events : Signal a }
26checkbox : Bool -> (Signal Element, Signal Bool)
28 let cbs = N.checkboxes b
29 in (lift (cbs.box id) cbs.events, cbs.events)
31type FieldState = { string:String, start:Int, end:Int }
33fields : a -> { field : (FieldState -> a) -> String -> FieldState -> Element,
36empty = { string="", start=0, end=0 }
38field : String -> (Signal Element, Signal FieldState)
40 let tfs = N.fields empty
41 in (lift (tfs.field id placeHolder) tfs.events, tfs.events)
43password : String -> (Signal Element, Signal FieldState)
45 let tfs = N.passwords empty
46 in (lift (tfs.field id placeHolder) tfs.events, tfs.events)
48email : String -> (Signal Element, Signal FieldState)
50 let tfs = N.emails empty
51 in (lift (tfs.field id placeHolder) tfs.events, tfs.events)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list