mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-12-16 01:48:56 +08:00
First version of supporting extraction of the terminal id.
This commit is contained in:
35
include/ftxui/component/terminal_id.hpp
Normal file
35
include/ftxui/component/terminal_id.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// Copyright 2025 Arthur Sonzogni. All rights reserved.
|
||||
// Use of this source code is governed by the MIT license that can be found in
|
||||
// the LICENSE file.
|
||||
|
||||
#ifndef FTXUI_COMPONENT_TERMINAL_ID_HPP
|
||||
#define FTXUI_COMPONENT_TERMINAL_ID_HPP
|
||||
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
namespace ftxui {
|
||||
|
||||
std::string const TERMINAL_ID_REQUEST("\x1b[0c");
|
||||
|
||||
/// @brief A mouse event. It contains the coordinate of the mouse, the button
|
||||
/// pressed and the modifier (shift, ctrl, meta).
|
||||
/// @ingroup component
|
||||
|
||||
enum class TerminalID
|
||||
{
|
||||
UNKNOWN,
|
||||
XTERM,
|
||||
KONSOLE,
|
||||
URXVT,
|
||||
VTE,
|
||||
LINUXVC
|
||||
};
|
||||
|
||||
std::ostream& operator<<(
|
||||
std::ostream& os,
|
||||
TerminalID terminal_id);
|
||||
|
||||
} // namespace ftxui
|
||||
|
||||
#endif /* end of include guard: FTXUI_COMPONENT_TERMINAL_ID_HPP */
|
||||
Reference in New Issue
Block a user