ttx 0.1.0
Loading...
Searching...
No Matches
paste_event_io.h
Go to the documentation of this file.
1#pragma once
2
3#include "di/container/string/string_view.h"
4#include "di/reflect/prelude.h"
6#include "ttx/paste_event.h"
7
8// Bracketed paste reference: https://invisible-island.net/xterm/xterm-paste64.html
9namespace ttx {
10// Bracketed paste mode. When enabled, we send focus events to the application.
15
16constexpr auto bracketed_paste_end = "\033[201~"_sv;
17
18constexpr auto tag_invoke(di::Tag<di::reflect>, di::InPlaceType<BracketedPasteMode>) {
19 using enum BracketedPasteMode;
20 return di::make_enumerators<"BracketedPasteMode">(di::enumerator<"Disabled", Disabled>,
21 di::enumerator<"Enabled", Enabled>);
22}
23
24auto serialize_paste_event(PasteEvent const& event, BracketedPasteMode mode) -> di::String;
25
26auto is_bracketed_paste_begin(CSI const& csi) -> bool;
27}
Definition clipboard.h:10
constexpr auto bracketed_paste_end
Definition paste_event_io.h:16
constexpr auto tag_invoke(di::Tag< di::reflect >, di::InPlaceType< ClipboardMode >)
Definition clipboard.h:21
auto serialize_paste_event(PasteEvent const &event, BracketedPasteMode mode) -> di::String
Definition paste_event_io.cpp:8
auto is_bracketed_paste_begin(CSI const &csi) -> bool
Definition paste_event_io.cpp:18
BracketedPasteMode
Definition paste_event_io.h:11
@ Disabled
Disallow read/writing the clipboard.
Definition clipboard.h:18
@ Enabled
Definition focus_event_io.h:12