31 #ifndef FTERMFREEBSD_H 32 #define FTERMFREEBSD_H 34 #if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT) 35 #error "Only <final/final.h> can be included directly." 38 #if defined(UNIT_TEST) 39 #define CONS_CURSORTYPE 0x80046307 40 #define GIO_KEYMAP 0x20006b06 41 #define PIO_KEYMAP 0x20006b07 42 #define META 0x84 // Meta key 43 #define NUM_KEYS 256 // Number of keys in table 44 #define NUM_STATES 8 // States per key 56 struct keyent_t key[NUM_KEYS];
58 #elif defined(__FreeBSD__) || defined(__DragonFly__) 59 #undef mouse_info // consio.h 60 #undef buttons // consio.h 62 #include <sys/consio.h> 67 #include "final/util/fstring.h" 83 using CursorStyle = FreeBSDConsoleCursorStyle;
86 auto getClassName()
const ->
FString;
88 static auto getCursorStyle() -> CursorStyle;
91 static auto isFreeBSDConsole() -> bool;
94 static auto setCursorStyle (CursorStyle) -> bool;
95 static void enableChangeCursorStyle() noexcept;
96 static void disableChangeCursorStyle() noexcept;
97 static void enableMetaSendsEscape() noexcept;
98 static void disableMetaSendsEscape() noexcept;
99 static void setBeep (
int,
int);
100 static void resetBeep();
104 static void initCharMap();
105 static void finish();
109 static void warnNotInitialized();
110 static auto saveFreeBSDAltKey() -> bool;
111 static auto setFreeBSDAltKey (uInt) -> bool;
112 static auto setFreeBSDAlt2Meta() -> bool;
113 static auto resetFreeBSDAlt2Meta() -> bool;
114 static auto setFreeBSDCursorStyle (CursorStyle) -> bool;
117 static uInt bsd_alt_keymap;
118 static CursorStyle cursor_style;
119 static bool change_cursorstyle;
120 static bool meta_sends_escape;
126 inline auto FTermFreeBSD::getClassName()
const ->
FString 127 {
return "FTermFreeBSD"; }
130 #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST) 131 inline void FTermFreeBSD::enableChangeCursorStyle() noexcept
132 { change_cursorstyle =
true; }
135 inline void FTermFreeBSD::disableChangeCursorStyle() noexcept
136 { change_cursorstyle =
false; }
139 inline void FTermFreeBSD::enableMetaSendsEscape() noexcept
140 { meta_sends_escape =
true; }
143 inline void FTermFreeBSD::disableMetaSendsEscape() noexcept
144 { meta_sends_escape =
false; }
146 #endif // defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST) 150 #endif // FTERMFREEBSD_H Definition: ftermfreebsd.h:79
Definition: class_template.cpp:25