/***********************************************************************
* fterm.h - Base class for terminal detection and control *
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2012-2018 Markus Gans *
* *
* The 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 *
* the License, or (at your option) any later version. *
* *
* The Final Cut is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* 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 *
* . *
***********************************************************************/
/* Base class
* ══════════
*
* ▕▔▔▔▔▔▔▔▏1 1▕▔▔▔▔▔▔▔▔▔▔▔▏
* ▕ FTerm ▏-┬- - - -▕ FOptiMove ▏
* ▕▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▁▁▁▏
* :
* : 1▕▔▔▔▔▔▔▔▔▔▔▔▏
* :- - - -▕ FOptiAttr ▏
* : ▕▁▁▁▁▁▁▁▁▁▁▁▏
* :
* : *▕▔▔▔▔▔▔▔▔▔▏
* :- - - -▕ FString ▏
* : ▕▁▁▁▁▁▁▁▁▁▏
* :
* : *▕▔▔▔▔▔▔▔▔▏
* :- - - -▕ FPoint ▏
* : ▕▁▁▁▁▁▁▁▁▏
* :
* : *▕▔▔▔▔▔▔▔▏
* └- - - -▕ FRect ▏
* ▕▁▁▁▁▁▁▁▏
*/
#ifndef FTERM_H
#define FTERM_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only can be included directly."
#endif
#include "final/fconfig.h"
#if defined(__linux__)
#include // Linux framebuffer console
#if defined(__x86_64__) || defined(__i386) || defined(__arm__)
#include // is deprecated
#endif
#include
#endif
#if defined(__FreeBSD__) || defined(__DragonFly__)
#include
#include
#endif
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include
#include
#endif
#include
#include
#include
#include
#include
#if defined(__sun) && defined(__SVR4)
#include
typedef struct termio SGTTY;
typedef struct termios SGTTYS;
#ifdef _LP64
typedef unsigned int chtype;
#else
typedef unsigned long chtype;
#endif
#include // termcap
#else
#include // termcap
#endif
#ifdef F_HAVE_LIBGPM
#undef buttons // from term.h
#endif
#if F_HAVE_GETTTYNAM && F_HAVE_TTYENT_H
#include
#endif
#include
#include
#include
#include
#include