#include <cpp-terminal/private/sigwinch.hpp>
|
static std::int32_t | m_fd {-1} |
|
Definition at line 19 of file sigwinch.hpp.
◆ blockSigwinch()
void Term::Private::Sigwinch::blockSigwinch |
( |
| ) |
|
|
static |
Definition at line 65 of file sigwinch.cpp.
66{
67#if !defined(_WIN32)
68 ::sigset_t windows_event = {};
72#endif
73}
void throw_exception(const std::string &str={}) const
Errno & check_if(const bool &ret) noexcept
◆ get()
std::int32_t Term::Private::Sigwinch::get |
( |
| ) |
|
|
staticnoexcept |
Definition at line 38 of file sigwinch.cpp.
39{
40#if defined(__APPLE__) || defined(__wasm__) || defined(__wasm) || defined(__EMSCRIPTEN__)
42#else
44#endif
45}
volatile std::sig_atomic_t m_signalStatus
◆ isSigwinch()
bool Term::Private::Sigwinch::isSigwinch |
( |
const std::int32_t & | file_descriptor = -1 | ) |
|
|
staticnoexcept |
Definition at line 85 of file sigwinch.cpp.
86{
87#if defined(__APPLE__) || defined(__wasm__) || defined(__wasm) || defined(__EMSCRIPTEN__)
89 {
90 static_cast<void>(file_descriptor);
92 return true;
93 }
94 return false;
95#elif defined(__linux__)
96 if(
m_fd == file_descriptor)
97 {
98
99 ::signalfd_siginfo fdsi = {};
100 ::read(
m_fd, &fdsi,
sizeof(fdsi));
101 return true;
102 }
103 return false;
104#else
105 static_cast<void>(file_descriptor);
106 return false;
107#endif
108}
◆ registerSigwinch()
void Term::Private::Sigwinch::registerSigwinch |
( |
| ) |
|
|
static |
Definition at line 49 of file sigwinch.cpp.
50{
51#if defined(__APPLE__) || defined(__wasm__) || defined(__wasm) || defined(__EMSCRIPTEN__)
52 struct sigaction sa;
54 sa.sa_flags = {0};
55 sa.sa_handler = {Term::Private::sigwinchHandler};
57#elif defined(__linux__)
58 ::sigset_t windows_event = {};
62#endif
63}
◆ unblockSigwinch()
void Term::Private::Sigwinch::unblockSigwinch |
( |
| ) |
|
|
static |
Definition at line 75 of file sigwinch.cpp.
76{
77#if !defined(_WIN32)
78 ::sigset_t windows_event = {};
82#endif
83}
◆ m_fd
std::int32_t Term::Private::Sigwinch::m_fd {-1} |
|
staticprivate |
The documentation for this class was generated from the following files: