Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Ui.UiMsg

Description

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

Synopsis

Documentation

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.

Constructors

UiMsg Context Msg 

Instances

Instances details
Show UiMsg Source # 
Instance details

Defined in Ui.UiMsg

Methods

showsPrec :: Int -> UiMsg -> ShowS #

show :: UiMsg -> String #

showList :: [UiMsg] -> ShowS #

CStorable UiMsg Source # 
Instance details

Defined in Ui.UiMsgC

Methods

sizeOf :: UiMsg -> Int #

alignment :: UiMsg -> Int #

peekElemOff :: Ptr UiMsg -> Int -> IO UiMsg #

pokeElemOff :: Ptr UiMsg -> Int -> UiMsg -> IO () #

peekByteOff :: Ptr b -> Int -> IO UiMsg #

pokeByteOff :: Ptr b -> Int -> UiMsg -> IO () #

peek :: Ptr UiMsg -> IO UiMsg #

poke :: Ptr UiMsg -> UiMsg -> IO () #

Pretty UiMsg Source # 
Instance details

Defined in Ui.UiMsg

data Context Source #

Constructors

Context 

Fields

Instances

Instances details
Show Context Source # 
Instance details

Defined in Ui.UiMsg

Pretty Context Source # 
Instance details

Defined in Ui.UiMsg

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.

Instances

Instances details
Read Track Source # 
Instance details

Defined in Ui.UiMsg

Show Track Source # 
Instance details

Defined in Ui.UiMsg

Methods

showsPrec :: Int -> Track -> ShowS #

show :: Track -> String #

showList :: [Track] -> ShowS #

Eq Track Source # 
Instance details

Defined in Ui.UiMsg

Methods

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

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

Ord Track Source # 
Instance details

Defined in Ui.UiMsg

Methods

compare :: Track -> Track -> Ordering #

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

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

(>) :: Track -> Track -> Bool #

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

max :: Track -> Track -> Track #

min :: Track -> Track -> Track #

Pretty Track Source # 
Instance details

Defined in Ui.UiMsg

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.

Constructors

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.

Instances

Instances details
Show Msg Source # 
Instance details

Defined in Ui.UiMsg

Methods

showsPrec :: Int -> Msg -> ShowS #

show :: Msg -> String #

showList :: [Msg] -> ShowS #

Eq Msg Source # 
Instance details

Defined in Ui.UiMsg

Methods

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

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

Ord Msg Source # 
Instance details

Defined in Ui.UiMsg

Methods

compare :: Msg -> Msg -> Ordering #

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

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

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

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

max :: Msg -> Msg -> Msg #

min :: Msg -> Msg -> Msg #

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.

Constructors

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 !Types.Width

TrackWidth.width, TrackWidth.suggested_width

UpdateClose

The given view was closed.

Instances

Instances details
Show UiUpdate Source # 
Instance details

Defined in Ui.UiMsg

Eq UiUpdate Source # 
Instance details

Defined in Ui.UiMsg

Ord UiUpdate Source # 
Instance details

Defined in Ui.UiMsg

data MsgEvent Source #

MsgType.msg_event, which is a fltk event.

Constructors

Mouse !MouseEvent 
Kbd KbdState [Key.Modifier] Key.Key (Maybe Char)

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

AuxMsg AuxMsg 
Unhandled Int 

Instances

Instances details
Show MsgEvent Source # 
Instance details

Defined in Ui.UiMsg

Eq MsgEvent Source # 
Instance details

Defined in Ui.UiMsg

Ord MsgEvent Source # 
Instance details

Defined in Ui.UiMsg

data MouseEvent Source #

Constructors

MouseEvent 

Fields

Instances

Instances details
Show MouseEvent Source # 
Instance details

Defined in Ui.UiMsg

Eq MouseEvent Source # 
Instance details

Defined in Ui.UiMsg

Ord MouseEvent Source # 
Instance details

Defined in Ui.UiMsg

Pretty MouseEvent Source # 
Instance details

Defined in Ui.UiMsg

data AuxMsg Source #

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

Instances

Instances details
Show AuxMsg Source # 
Instance details

Defined in Ui.UiMsg

Eq AuxMsg Source # 
Instance details

Defined in Ui.UiMsg

Methods

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

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

Ord AuxMsg Source # 
Instance details

Defined in Ui.UiMsg

data KbdState Source #

Constructors

KeyDown 
KeyRepeat 
KeyUp 

Instances

Instances details
Show KbdState Source # 
Instance details

Defined in Ui.UiMsg

Eq KbdState Source # 
Instance details

Defined in Ui.UiMsg

Ord KbdState Source # 
Instance details

Defined in Ui.UiMsg

Pretty KbdState Source # 
Instance details

Defined in Ui.UiMsg

show_short :: UiMsg -> Text Source #

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