FINAL CUT
ftermcapquirks.h
1 /***********************************************************************
2 * ftermcapquirks.h - Termcap quirks for some well-known terminals *
3 * *
4 * This file is part of the FINAL CUT widget toolkit *
5 * *
6 * Copyright 2018-2024 Markus Gans *
7 * *
8 * FINAL CUT is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as *
10 * published by the Free Software Foundation; either version 3 of *
11 * the License, or (at your option) any later version. *
12 * *
13 * FINAL CUT is distributed in the hope that it will be useful, but *
14 * WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this program. If not, see *
20 * <http://www.gnu.org/licenses/>. *
21 ***********************************************************************/
22 
23 /* Standalone class
24  * ════════════════
25  *
26  * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏
27  * ▕ FTermcapQuirks ▏
28  * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏
29  */
30 
31 #ifndef FTERMCAPQUIRKS_H
32 #define FTERMCAPQUIRKS_H
33 
34 #if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
35  #error "Only <final/final.h> can be included directly."
36 #endif
37 
38 #include "final/util/fstring.h"
39 
40 namespace finalcut
41 {
42 
43 //----------------------------------------------------------------------
44 // class FTermcapsQuirks
45 //----------------------------------------------------------------------
46 
47 class FTermcapQuirks final
48 {
49  public:
50  // Constructors
51  FTermcapQuirks() = default;
52 
53  // Accessor
54  auto getClassName() const -> FString;
55 
56  // Methods
57  static void terminalFixup();
58 
59  private:
60  // Methods
61 #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
62  static void freebsd();
63 #endif
64  static void cygwin();
65 #ifdef linux
66  #undef linux
67 #endif
68  static void linux();
69  static void xterm();
70  static void rxvt();
71  static void vte();
72  static void kitty();
73  static void putty();
74  static void teraterm();
75  static void sunConsole();
76  static void screen();
77  static void general();
78  static void caModeExtension();
79  static void repeatLastChar();
80  static void ecma48();
81 };
82 
83 // FTermcapQuirks inline functions
84 //----------------------------------------------------------------------
85 inline auto FTermcapQuirks::getClassName() const -> FString
86 { return "FTermcapQuirks"; }
87 
88 } // namespace finalcut
89 
90 #endif // FTERMCAPQUIRKS_H
Definition: class_template.cpp:25
Definition: fstring.h:79
Definition: ftermcapquirks.h:47