Karya, built on 2018-03-16T03:22:32 (patch df7306861219887e676081746f4a4edfe05eb0b5)

Safe HaskellNone



Receive events from the C++ UI layer, package them up nicely, and forward them on to the event handling mechanism (the responder).



data UiMsg Source #

Technically not all UiMsgs have a Context, but it's easier to give everyone a Context since it can be all Nothing anyway.


UiMsg Context Msg 

data Context Source #




data Track Source #

Whether the context is on the track itself or the skeleton display above the track.

There are a few cases where there is a track but no position and it *doesn't* mean SkeletonDisplay, namely UpdateTrackWidth and UpdateInput. However, those cases are handled in a specific place while Track goes on to become a mouse Modifier, so I don't mind if the former is a little awkward for the benefit of the latter.

data Msg Source #

Corresponds to UiMsg::MsgType enum.

Each UiUpdate has a ViewId which is separate from the focus. This is because they can happen to an unfocused view, e.g. on OS X UpdateViewResize and UpdateClose.


MsgEvent MsgEvent 
UiUpdate Id.ViewId UiUpdate 
UpdateScreenSize Int Int Rect.Rect

Give screen dimensions: screen number, total screens, rect. This is a UiUpdate but it doesn't have a ViewId.


Eq Msg # 


(==) :: Msg -> Msg -> Bool #

(/=) :: Msg -> Msg -> Bool #

Ord Msg # 


compare :: Msg -> Msg -> Ordering #

(<) :: Msg -> Msg -> Bool #

(<=) :: Msg -> Msg -> Bool #

(>) :: Msg -> Msg -> Bool #

(>=) :: Msg -> Msg -> Bool #

max :: Msg -> Msg -> Msg #

min :: Msg -> Msg -> Msg #

Show Msg # 


showsPrec :: Int -> Msg -> ShowS #

show :: Msg -> String #

showList :: [Msg] -> ShowS #

data UiUpdate Source #

These are generated when the UI is manipulated directly and makes changes to its own state. They are like Ui.Update except in the opposide direction: fltk telling haskell what changes occurred.


UpdateInput !(Maybe Text)

Nothing means the text didn't change, but a msg is being sent anyway since that's the only way I know the floating edit input has closed.

UpdateTrackScroll !Types.Width 
UpdateTimeScroll !ScoreTime 
UpdateViewResize !Rect.Rect !Block.Padding

Size of entire block window, and padding.

UpdateTrackWidth !Types.Width 

The given view was closed.

data MsgEvent Source #

MsgType.msg_event, which is a fltk event.




Kbd KbdState [Key.Modifier] Key.Key (Maybe Char)

The Char is the text that this key wants to enter, if any. They Key is just the keycap, without taking shift into account.

AuxMsg AuxMsg 
Unhandled Int 

data AuxMsg Source #

Most of these are unused, but are included here for completeness.


show_short :: UiMsg -> Text Source #

Like pretty, but more compact. Only show the most important bits.