Class: Charming::Events::FocusEvent
- Inherits:
-
Data
- Object
- Data
- Charming::Events::FocusEvent
- Defined in:
- lib/charming/events/focus_event.rb
Overview
FocusEvent reports the terminal window gaining or losing focus (focus reporting mode ‘e[?1004h`, markers `e[I` / `e[O`). Controllers opt in by defining a `focus_changed` action; apps can use it to pause timers or dim the UI.
Instance Attribute Summary collapse
-
#focused ⇒ Object
readonly
Returns the value of attribute focused.
Instance Method Summary collapse
Instance Attribute Details
#focused ⇒ Object (readonly)
Returns the value of attribute focused
8 9 10 |
# File 'lib/charming/events/focus_event.rb', line 8 def focused @focused end |
Instance Method Details
#focused? ⇒ Boolean
9 |
# File 'lib/charming/events/focus_event.rb', line 9 def focused? = focused |