2018-05-02 12:31:21 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* ftermcapquirks.h - Termcap quirks for some well-known terminals *
|
|
|
|
* *
|
2020-07-08 21:32:47 +02:00
|
|
|
* This file is part of the FINAL CUT widget toolkit *
|
2018-05-02 12:31:21 +02:00
|
|
|
* *
|
2020-10-04 00:59:21 +02:00
|
|
|
* Copyright 2018-2020 Markus Gans *
|
2018-05-02 12:31:21 +02:00
|
|
|
* *
|
2020-07-08 21:32:47 +02:00
|
|
|
* FINAL CUT is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Lesser General Public License as *
|
|
|
|
* published by the Free Software Foundation; either version 3 of *
|
2018-05-02 12:31:21 +02:00
|
|
|
* the License, or (at your option) any later version. *
|
|
|
|
* *
|
2020-07-08 21:32:47 +02:00
|
|
|
* FINAL CUT is distributed in the hope that it will be useful, but *
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
2018-05-02 12:31:21 +02:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU Lesser General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Lesser General Public *
|
|
|
|
* License along with this program. If not, see *
|
|
|
|
* <http://www.gnu.org/licenses/>. *
|
|
|
|
***********************************************************************/
|
|
|
|
|
|
|
|
/* Standalone class
|
|
|
|
* ════════════════
|
|
|
|
*
|
|
|
|
* ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* ▕ FTermcapQuirks ▏
|
|
|
|
* ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FTERMCAPQUIRKS_H
|
|
|
|
#define FTERMCAPQUIRKS_H
|
|
|
|
|
|
|
|
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
|
|
|
|
#error "Only <final/final.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2018-09-20 23:59:01 +02:00
|
|
|
namespace finalcut
|
|
|
|
{
|
2018-05-02 12:31:21 +02:00
|
|
|
|
2019-07-21 23:31:21 +02:00
|
|
|
// class forward declaration
|
|
|
|
class FTermData;
|
|
|
|
class FTermDetection;
|
|
|
|
|
2018-05-02 12:31:21 +02:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// class FTermcapsQuirks
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
|
2019-01-04 02:18:54 +01:00
|
|
|
class FTermcapQuirks final
|
2018-05-02 12:31:21 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Constructors
|
|
|
|
FTermcapQuirks();
|
|
|
|
|
|
|
|
// Destructor
|
2020-04-04 20:58:47 +02:00
|
|
|
~FTermcapQuirks();
|
2018-05-02 12:31:21 +02:00
|
|
|
|
2018-08-09 00:04:00 +02:00
|
|
|
// Accessor
|
2020-10-04 00:59:21 +02:00
|
|
|
FString getClassName() const;
|
2018-08-09 00:04:00 +02:00
|
|
|
|
2018-05-02 12:31:21 +02:00
|
|
|
// Methods
|
|
|
|
static void terminalFixup();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Methods
|
2019-07-28 23:12:01 +02:00
|
|
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
2018-10-08 04:14:20 +02:00
|
|
|
static void freebsd();
|
2018-05-02 12:31:21 +02:00
|
|
|
#endif
|
2018-10-08 04:14:20 +02:00
|
|
|
static void cygwin();
|
|
|
|
static void linux();
|
|
|
|
static void xterm();
|
|
|
|
static void rxvt();
|
|
|
|
static void vte();
|
|
|
|
static void putty();
|
|
|
|
static void teraterm();
|
2018-10-09 00:33:26 +02:00
|
|
|
static void sunConsole();
|
2018-10-08 04:14:20 +02:00
|
|
|
static void screen();
|
|
|
|
static void general();
|
2019-01-03 20:56:09 +01:00
|
|
|
static void ecma48();
|
2018-05-02 12:31:21 +02:00
|
|
|
|
2019-09-04 23:57:31 +02:00
|
|
|
// Data members
|
2018-10-01 22:27:54 +02:00
|
|
|
static FTermData* fterm_data;
|
2018-05-02 12:31:21 +02:00
|
|
|
static FTermDetection* term_detection;
|
|
|
|
};
|
|
|
|
|
2018-08-09 00:04:00 +02:00
|
|
|
// FTermcapQuirks inline functions
|
|
|
|
//----------------------------------------------------------------------
|
2020-10-04 00:59:21 +02:00
|
|
|
inline FString FTermcapQuirks::getClassName() const
|
2018-08-09 00:04:00 +02:00
|
|
|
{ return "FTermcapQuirks"; }
|
|
|
|
|
2018-09-20 23:59:01 +02:00
|
|
|
} // namespace finalcut
|
|
|
|
|
2018-05-02 12:31:21 +02:00
|
|
|
#endif // FTERMCAPQUIRKS_H
|