ttx 0.1.0
Loading...
Searching...
No Matches
focus_event_io.h
Go to the documentation of this file.
1#pragma once
2
3#include "di/reflect/prelude.h"
5#include "ttx/focus_event.h"
6
7// Focus event reference: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-FocusIn_FocusOut
8namespace ttx {
9// Focus tracking. When enabled, we send focus events to the application.
14
15constexpr auto tag_invoke(di::Tag<di::reflect>, di::InPlaceType<FocusEventMode>) {
16 using enum FocusEventMode;
17 return di::make_enumerators<"FocusEventMode">(di::enumerator<"Disabled", Disabled>,
18 di::enumerator<"Enabled", Enabled>);
19}
20
21auto serialize_focus_event(FocusEvent const& focus_event, FocusEventMode mode) -> di::Optional<di::String>;
22auto focus_event_from_csi(CSI const& csi) -> di::Optional<FocusEvent>;
23}
Definition cursor_style.h:5
auto serialize_focus_event(FocusEvent const &focus_event, FocusEventMode mode) -> di::Optional< di::String >
Definition focus_event_io.cpp:7
constexpr auto tag_invoke(di::Tag< di::reflect >, di::InPlaceType< CursorStyle >)
Definition cursor_style.h:16
auto focus_event_from_csi(CSI const &csi) -> di::Optional< FocusEvent >
Definition focus_event_io.cpp:17
FocusEventMode
Definition focus_event_io.h:10
@ Enabled
Definition focus_event_io.h:12
@ Disabled
Definition focus_event_io.h:11