Reduce include entries in the header files

This commit is contained in:
Markus Gans 2019-07-21 23:31:21 +02:00
parent 3c52e77448
commit 2b9c64a445
91 changed files with 1094 additions and 763 deletions

View File

@ -1,3 +1,6 @@
2019-07-21 Markus Gans <guru.mail@muenster.de>
* Reduce include entries in the header files
2019-07-14 Markus Gans <guru.mail@muenster.de>
* Reduces the use of raw loops
* Add a unit test for FTermOpenBSD to test the OpenBSD

View File

@ -491,11 +491,13 @@ void MouseDraw::drawCanvas()
for (int y = 0; y < y_end; y++) // line loop
{
charData* canvaschar; // canvas character
charData* winchar; // window character
finalcut::charData* canvaschar; // canvas character
finalcut::charData* winchar; // window character
canvaschar = &canvas->text[y * x_end];
winchar = &print_area->text[(ay + y) * w_line_len + ax];
std::memcpy (winchar, canvaschar, sizeof(charData) * unsigned(x_end));
std::memcpy ( winchar
, canvaschar
, sizeof(finalcut::charData) * unsigned(x_end) );
if ( int(print_area->changes[ay + y].xmin) > ax )
print_area->changes[ay + y].xmin = uInt(ax);

View File

@ -24,9 +24,14 @@
#include <string>
#include "final/fapplication.h"
#include "final/fevent.h"
#include "final/fmenu.h"
#include "final/fmenubar.h"
#include "final/fmessagebox.h"
#include "final/fmouse.h"
#include "final/fstatusbar.h"
#include "final/ftermios.h"
#include "final/fwidgetcolors.h"
#include "final/fwindow.h"
namespace finalcut

View File

@ -21,6 +21,8 @@
***********************************************************************/
#include "final/fapplication.h"
#include "final/fcolorpair.h"
#include "final/fevent.h"
#include "final/fbutton.h"
#include "final/fstatusbar.h"

View File

@ -23,6 +23,8 @@
#include "final/fapplication.h"
#include "final/fbuttongroup.h"
#include "final/fevent.h"
#include "final/fsize.h"
#include "final/fstatusbar.h"
#include "final/ftogglebutton.h"

View File

@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fc.h"
#include "final/fcheckbox.h"
namespace finalcut

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2015-2018 Markus Gans *
* Copyright 2015-2019 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 *
@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fc.h"
#include "final/fcheckmenuitem.h"
#include "final/fmenu.h"

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2018 Markus Gans *
* Copyright 2018-2019 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 *
@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fc.h"
#include "final/fcolorpalette.h"
namespace finalcut

View File

@ -24,7 +24,11 @@
#include "final/fapplication.h"
#include "final/fdialog.h"
#include "final/fevent.h"
#include "final/fmenuitem.h"
#include "final/fstatusbar.h"
#include "final/ftooltip.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2016-2018 Markus Gans *
* Copyright 2016-2019 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 *
@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fc.h"
#include "final/fdialoglistmenu.h"
namespace finalcut

View File

@ -27,6 +27,7 @@
#include <vector>
#include "final/fevent.h"
#include "final/ffiledialog.h"
namespace finalcut

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2018 Markus Gans *
* Copyright 2018-2019 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 *
@ -20,8 +20,8 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include <final/fc.h>
#include <final/fkey_map.h>
#include "final/fc.h"
#include "final/fkey_map.h"
namespace finalcut
{

View File

@ -30,9 +30,14 @@
#include "final/fkeyboard.h"
#include "final/fkey_map.h"
#include "final/fobject.h"
#include "final/fterm.h"
#include "final/ftermios.h"
#if defined(__linux__)
#include "final/ftermlinux.h"
#endif
namespace finalcut
{

View File

@ -23,6 +23,8 @@
#include <memory>
#include "final/fapplication.h"
#include "final/fcolorpair.h"
#include "final/fevent.h"
#include "final/flabel.h"
#include "final/fstatusbar.h"

View File

@ -23,8 +23,13 @@
#include <regex>
#include "final/fapplication.h"
#include "final/fevent.h"
#include "final/flabel.h"
#include "final/flineedit.h"
#include "final/fpoint.h"
#include "final/fsize.h"
#include "final/fstatusbar.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -24,9 +24,13 @@
#include <memory>
#include "final/fapplication.h"
#include "final/fcolorpair.h"
#include "final/fevent.h"
#include "final/flistbox.h"
#include "final/fscrollbar.h"
#include "final/fstring.h"
#include "final/fstatusbar.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -27,11 +27,16 @@
#include <memory>
#include <vector>
#include "final/emptyfstring.h"
#include "final/fapplication.h"
#include "final/fcolorpair.h"
#include "final/fevent.h"
#include "final/flistview.h"
#include "final/fscrollbar.h"
#include "final/fstatusbar.h"
#include "final/fstring.h"
#include "final/ftermbuffer.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -24,9 +24,14 @@
#include <vector>
#include "final/fapplication.h"
#include "final/fcolorpair.h"
#include "final/fdialog.h"
#include "final/fevent.h"
#include "final/fmenu.h"
#include "final/fmenubar.h"
#include "final/fmenuitem.h"
#include "final/fstatusbar.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -24,8 +24,12 @@
#include <vector>
#include "final/fapplication.h"
#include "final/fevent.h"
#include "final/fmenu.h"
#include "final/fmenubar.h"
#include "final/fmenuitem.h"
#include "final/fstatusbar.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -24,6 +24,7 @@
#include "final/fapplication.h"
#include "final/fdialog.h"
#include "final/fevent.h"
#include "final/fmenu.h"
#include "final/fmenubar.h"
#include "final/fmenulist.h"

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2015-2018 Markus Gans *
* Copyright 2015-2019 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 *
@ -22,7 +22,9 @@
#include <vector>
#include "final/fc.h"
#include "final/fmenulist.h"
#include "final/fmenuitem.h"
namespace finalcut
{

View File

@ -23,6 +23,7 @@
#include <algorithm>
#include "final/fapplication.h"
#include "final/fbutton.h"
#include "final/fmessagebox.h"
namespace finalcut

View File

@ -27,9 +27,13 @@
#include <stdio.h>
#include <unistd.h>
#include "final/fconfig.h"
#include "final/fkeyboard.h"
#include "final/fmouse.h"
#include "final/fobject.h"
#include "final/fterm.h"
#include "final/ftermxterminal.h"
#include "final/ftypes.h"
namespace finalcut
{

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2015-2018 Markus Gans *
* Copyright 2015-2019 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 *
@ -22,6 +22,9 @@
#include <memory>
#include "final/emptyfstring.h"
#include "final/fevent.h"
#include "final/fc.h"
#include "final/fobject.h"
namespace finalcut

View File

@ -22,6 +22,7 @@
#include <cstring>
#include "final/fc.h"
#include "final/foptiattr.h"
namespace finalcut

View File

@ -20,7 +20,11 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fevent.h"
#include "final/fcolorpair.h"
#include "final/fprogressbar.h"
#include "final/fstring.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2015-2018 Markus Gans *
* Copyright 2015-2019 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 *
@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fc.h"
#include "final/fradiomenuitem.h"
#include "final/fmenu.h"

View File

@ -22,7 +22,9 @@
#include <algorithm>
#include "final/fpoint.h"
#include "final/frect.h"
#include "final/fsize.h"
namespace finalcut
{
@ -60,6 +62,40 @@ bool FRect::isEmpty() const
return X2 == X1 - 1 && Y2 == Y1 - 1;
}
//----------------------------------------------------------------------
FPoint FRect::getPos() const
{
return FPoint(X1, Y1);
}
//----------------------------------------------------------------------
FPoint FRect::getUpperLeftPos() const
{
return FPoint(X1, Y1);
}
//----------------------------------------------------------------------
FPoint FRect::getUpperRightPos() const
{
return FPoint(X2, Y1);
}
//----------------------------------------------------------------------
FPoint FRect::getLowerLeftPos() const
{ return FPoint(X1, Y2); }
//----------------------------------------------------------------------
FPoint FRect::getLowerRightPos() const
{
return FPoint(X2, Y2);
}
//----------------------------------------------------------------------
FSize FRect::getSize() const
{
return FSize(getWidth(), getHeight());
}
//----------------------------------------------------------------------
void FRect::setX1 (int n)
{

View File

@ -22,7 +22,10 @@
#include <algorithm>
#include "final/fevent.h"
#include "final/fscrollbar.h"
#include "final/fsize.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -23,8 +23,10 @@
#include <memory>
#include "final/fevent.h"
#include "final/fscrollview.h"
#include "final/fwindow.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -22,7 +22,9 @@
#include <vector>
#include "final/fevent.h"
#include "final/fstatusbar.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -20,7 +20,10 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fcolorpair.h"
#include "final/fevent.h"
#include "final/fswitch.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -25,8 +25,37 @@
#include <string>
#include <vector>
#include "final/fterm.h"
#include "final/fc.h"
#include "final/fcharmap.h"
#include "final/fcolorpalette.h"
#include "final/fkey_map.h"
#include "final/fkeyboard.h"
#include "final/fmouse.h"
#include "final/foptiattr.h"
#include "final/foptimove.h"
#include "final/fstring.h"
#include "final/fsystem.h"
#include "final/fsystemimpl.h"
#include "final/fterm.h"
#include "final/ftermcap.h"
#include "final/ftermcapquirks.h"
#include "final/ftermdata.h"
#include "final/ftermdebugdata.h"
#include "final/ftermdetection.h"
#include "final/ftermios.h"
#include "final/ftermxterminal.h"
#if defined(UNIT_TEST)
#include "final/ftermlinux.h"
#include "final/ftermfreebsd.h"
#include "final/ftermopenbsd.h"
#elif defined(__linux__)
#include "final/ftermlinux.h"
#elif defined(__FreeBSD__) || defined(__DragonFly__)
#include "final/ftermfreebsd.h"
#elif defined(__NetBSD__) || defined(__OpenBSD__)
#include "final/ftermopenbsd.h"
#endif
namespace finalcut
{
@ -70,7 +99,6 @@ FMouseControl* FTerm::mouse = nullptr;
// function prototypes
uInt env2uint (const char*);
//----------------------------------------------------------------------
// class FTerm
//----------------------------------------------------------------------
@ -120,12 +148,414 @@ const FString FTerm::getKeyName (FKey keynum)
return keyboard->getKeyName (keynum);
}
//----------------------------------------------------------------------
charSubstitution& FTerm::getCharSubstitutionMap()
{
return data->getCharSubstitutionMap();
}
//----------------------------------------------------------------------
int FTerm::getTTYFileDescriptor()
{
return ( data ) ? data->getTTYFileDescriptor() : 0;
}
//----------------------------------------------------------------------
char* FTerm::getTermType()
{
return data->getTermType();
}
//----------------------------------------------------------------------
char* FTerm::getTermFileName()
{
return data->getTermFileName();
}
//----------------------------------------------------------------------
int FTerm::getTabstop()
{
return FTermcap::tabstop;
}
//----------------------------------------------------------------------
int FTerm::getMaxColor()
{
return FTermcap::max_color;
}
//----------------------------------------------------------------------
FTermData* FTerm::getFTermData()
{
if ( data == 0 )
{
try
{
data = new FTermData;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return data;
}
//----------------------------------------------------------------------
FSystem* FTerm::getFSystem()
{
if ( fsys == 0 )
{
try
{
fsys = new FSystemImpl;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return fsys;
}
//----------------------------------------------------------------------
FOptiMove* FTerm::getFOptiMove()
{
if ( opti_move == 0 )
{
try
{
opti_move = new FOptiMove;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return opti_move;
}
//----------------------------------------------------------------------
FOptiAttr* FTerm::getFOptiAttr()
{
if ( opti_attr == 0 )
{
try
{
opti_attr = new FOptiAttr;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return opti_attr;
}
//----------------------------------------------------------------------
FTermDetection* FTerm::getFTermDetection()
{
if ( term_detection == 0 )
{
try
{
term_detection = new FTermDetection;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return term_detection;
}
//----------------------------------------------------------------------
FTermXTerminal* FTerm::getFTermXTerminal()
{
if ( xterm == 0 )
{
try
{
xterm = new FTermXTerminal;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return xterm;
}
//----------------------------------------------------------------------
FKeyboard* FTerm::getFKeyboard()
{
if ( keyboard == 0 )
{
try
{
keyboard = new FKeyboard;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return keyboard;
}
//----------------------------------------------------------------------
FMouseControl* FTerm::getFMouseControl()
{
if ( mouse == 0 )
{
try
{
mouse = new FMouseControl;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return mouse;
}
#if defined(__linux__)
//----------------------------------------------------------------------
FTermLinux* FTerm::getFTermLinux()
{
if ( linux == 0 )
{
try
{
linux = new FTermLinux;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return linux;
}
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
//----------------------------------------------------------------------
FTermFreeBSD* FTerm::getFTermFreeBSD()
{
if ( freebsd == 0 )
{
try
{
freebsd = new FTermFreeBSD;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return freebsd;
}
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
//----------------------------------------------------------------------
FTermOpenBSD* FTerm::getFTermOpenBSD()
{
if ( openbsd == 0 )
{
try
{
openbsd = new FTermOpenBSD;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return openbsd;
}
#endif
#if DEBUG
//----------------------------------------------------------------------
FTermDebugData& FTerm::getFTermDebugData()
{
if ( debug_data == 0 )
{
try
{
debug_data = new FTermDebugData;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return *debug_data;
}
#endif // DEBUG
//----------------------------------------------------------------------
bool FTerm::isNormal (charData*& ch)
{
return opti_attr->isNormal(ch);
}
//----------------------------------------------------------------------
bool FTerm::hasUTF8()
{
return data->hasUTF8Console();
}
//----------------------------------------------------------------------
bool FTerm::isMonochron()
{
return data->isMonochron();
}
//----------------------------------------------------------------------
bool FTerm::isXTerminal()
{
return term_detection->isXTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isAnsiTerminal()
{
return term_detection->isAnsiTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isRxvtTerminal()
{
return term_detection->isRxvtTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isUrxvtTerminal()
{
return term_detection->isUrxvtTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isMltermTerminal()
{
return term_detection->isMltermTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isPuttyTerminal()
{
return term_detection->isPuttyTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isKdeTerminal()
{
return term_detection->isKdeTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isGnomeTerminal()
{
return term_detection->isGnomeTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isKtermTerminal()
{
return term_detection->isKtermTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isTeraTerm()
{
return term_detection->isTeraTerm();
}
//----------------------------------------------------------------------
bool FTerm::isSunTerminal()
{
return term_detection->isSunTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isCygwinTerminal()
{
return term_detection->isCygwinTerminal();
}
//----------------------------------------------------------------------
bool FTerm::isMinttyTerm()
{
return term_detection->isMinttyTerm();
}
//----------------------------------------------------------------------
bool FTerm::isLinuxTerm()
{
return term_detection->isLinuxTerm();
}
//----------------------------------------------------------------------
bool FTerm::isFreeBSDTerm()
{
return term_detection->isFreeBSDTerm();
}
//----------------------------------------------------------------------
bool FTerm::isNetBSDTerm()
{
return term_detection->isNetBSDTerm();
}
//----------------------------------------------------------------------
bool FTerm::isOpenBSDTerm()
{
return term_detection->isOpenBSDTerm();
}
//----------------------------------------------------------------------
bool FTerm::isScreenTerm()
{
return term_detection->isScreenTerm();
}
//----------------------------------------------------------------------
bool FTerm::isTmuxTerm()
{
return term_detection->isTmuxTerm();
}
//----------------------------------------------------------------------
bool FTerm::isNewFont()
{
return data->isNewFont();
}
//----------------------------------------------------------------------
bool FTerm::isCursorHideable()
{
@ -137,6 +567,30 @@ bool FTerm::isCursorHideable()
return false;
}
//----------------------------------------------------------------------
bool FTerm::hasChangedTermSize()
{
return data->hasTermResized();
}
//----------------------------------------------------------------------
bool FTerm::hasShadowCharacter()
{
return data->hasShadowCharacter();
}
//----------------------------------------------------------------------
bool FTerm::hasHalfBlockCharacter()
{
return data->hasHalfBlockCharacter();
}
//----------------------------------------------------------------------
bool FTerm::hasAlternateScreen()
{
return data->hasAlternateScreen();
}
//----------------------------------------------------------------------
bool FTerm::canChangeColorPalette()
{
@ -917,6 +1371,12 @@ char* FTerm::changeAttribute ( charData*& term_attr
return opti_attr->changeAttribute (term_attr, next_attr);
}
//----------------------------------------------------------------------
void FTerm::changeTermSizeFinished()
{
data->setTermResized(false);
}
//----------------------------------------------------------------------
void FTerm::exitWithMessage (const FString& message)
{
@ -1129,7 +1589,7 @@ void FTerm::init_cygwin_charmap()
}
// General encoding changes
characterSub& sub_map = data->getCharSubstitutionMap();
charSubstitution& sub_map = data->getCharSubstitutionMap();
sub_map[L''] = L'*';
sub_map[L''] = L'*';
sub_map[L''] = L'*';

View File

@ -23,7 +23,12 @@
#include <string>
#include <vector>
#include "final/fc.h"
#include "final/fcolorpair.h"
#include "final/fstring.h"
#include "final/ftermbuffer.h"
#include "final/fvterm.h"
#include "final/ftypes.h"
namespace finalcut
{

View File

@ -24,8 +24,13 @@
#include <string>
#include <vector>
#include "final/emptyfstring.h"
#include "final/fc.h"
#include "final/fkey_map.h"
#include "final/fterm.h"
#include "final/ftermdata.h"
#include "final/ftermcap.h"
#include "final/ftermdetection.h"
namespace finalcut
{

View File

@ -22,7 +22,13 @@
#include <string>
#include "final/fc.h"
#include "final/fkey_map.h"
#include "final/fterm.h"
#include "final/ftermcap.h"
#include "final/ftermcapquirks.h"
#include "final/ftermdata.h"
#include "final/ftermdetection.h"
namespace finalcut
{

View File

@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fc.h"
#include "final/fterm.h"
#include "final/ftermdata.h"
#include "final/ftermdetection.h"
@ -44,6 +45,45 @@ void FTermDebugData::init()
data = FTerm::getFTermData();
term_detection = FTerm::getFTermDetection();
}
//----------------------------------------------------------------------
const FString& FTermDebugData::getAnswerbackString()
{
return term_detection->getAnswerbackString();
}
//----------------------------------------------------------------------
const FString& FTermDebugData::getSecDAString()
{
return term_detection->getSecDAString();
}
//----------------------------------------------------------------------
const char* FTermDebugData::getTermType_256color()
{
return term_detection->getTermType_256color();
}
//----------------------------------------------------------------------
const char* FTermDebugData::getTermType_Answerback()
{
return term_detection->getTermType_Answerback();
}
//----------------------------------------------------------------------
const char* FTermDebugData::getTermType_SecDA()
{
return term_detection->getTermType_SecDA();
}
//----------------------------------------------------------------------
#if defined(__linux__)
int FTermDebugData::getFramebufferBpp()
{
return data->getFramebufferBpp();
}
#endif // defined(__linux__)
#endif // DEBUG
} // namespace finalcut

View File

@ -20,8 +20,19 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/emptyfstring.h"
#include "final/fc.h"
#include "final/fconfig.h"
#include "final/fsystem.h"
#include "final/fterm.h"
#include "final/ftermdata.h"
#include "final/ftermdetection.h"
#include "final/ftermios.h"
#include "final/ftypes.h"
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
#include "final/ftermopenbsd.h"
#endif
namespace finalcut
{
@ -85,6 +96,20 @@ FTermDetection::~FTermDetection() // destructor
// public methods of FTermDetection
//----------------------------------------------------------------------
#if DEBUG
const FString& FTermDetection::getAnswerbackString()
{
return ( answer_back ) ? *answer_back : fc::emptyFString::get();
}
//----------------------------------------------------------------------
const FString& FTermDetection::getSecDAString()
{
return ( sec_da ) ? *sec_da : fc::emptyFString::get();
}
#endif
//----------------------------------------------------------------------
void FTermDetection::setTtyTypeFileName (char ttytype_filename[])
{

View File

@ -21,8 +21,10 @@
***********************************************************************/
#include "final/fcharmap.h"
#include "final/fsystem.h"
#include "final/fterm.h"
#include "final/ftermfreebsd.h"
#include "final/ftypes.h"
namespace finalcut
{

View File

@ -20,10 +20,17 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fc.h"
#include "final/fcharmap.h"
#include "final/fsystem.h"
#include "final/fterm.h"
#include "final/ftermcap.h"
#include "final/ftermdetection.h"
#include "final/ftermlinux.h"
#include "final/ftypes.h"
#if defined(__linux__)
#include <linux/keyboard.h> // need keyboard modifiers
#include "../fonts/newfont.h"
#include "../fonts/unicodemap.h"
#include "../fonts/vgafont.h"
@ -1276,7 +1283,7 @@ void FTermLinux::characterFallback ( wchar_t ucs
, std::vector<wchar_t> fallback )
{
constexpr sInt16 NOT_FOUND = -1;
characterSub& sub_map = fterm_data->getCharSubstitutionMap();
charSubstitution& sub_map = fterm_data->getCharSubstitutionMap();
if ( fallback.size() < 2 || ucs != fallback[0] )
return;

View File

@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fsystem.h"
#include "final/fterm.h"
#include "final/ftermopenbsd.h"

View File

@ -20,9 +20,15 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fc.h"
#include "final/fstring.h"
#include "final/fterm.h"
#include "final/ftermcap.h"
#include "final/ftermdetection.h"
#include "final/ftermfreebsd.h"
#include "final/ftermios.h"
#include "final/ftermxterminal.h"
#include "final/fsize.h"
namespace finalcut
{

View File

@ -22,9 +22,15 @@
#include <memory>
#include "final/fapplication.h"
#include "final/fc.h"
#include "final/fdialog.h"
#include "final/fevent.h"
#include "final/fstring.h"
#include "final/fscrollbar.h"
#include "final/fstatusbar.h"
#include "final/ftextview.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -22,8 +22,11 @@
#include "final/fapplication.h"
#include "final/fbuttongroup.h"
#include "final/fevent.h"
#include "final/fpoint.h"
#include "final/fstatusbar.h"
#include "final/ftogglebutton.h"
#include "final/fwidget.h"
namespace finalcut
{

View File

@ -22,6 +22,7 @@
#include "final/fapplication.h"
#include "final/ftooltip.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -25,8 +25,16 @@
#include <vector>
#include "final/fapplication.h"
#include "final/fcolorpair.h"
#include "final/fkeyboard.h"
#include "final/foptiattr.h"
#include "final/foptimove.h"
#include "final/fsystem.h"
#include "final/fterm.h"
#include "final/ftermdata.h"
#include "final/ftermbuffer.h"
#include "final/ftermcap.h"
#include "final/ftypes.h"
#include "final/fvterm.h"
#include "final/fwidget.h"
#include "final/fwindow.h"
@ -56,10 +64,10 @@ FVTerm::term_area* FVTerm::vterm = nullptr;
FVTerm::term_area* FVTerm::vdesktop = nullptr;
FVTerm::term_area* FVTerm::active_area = nullptr;
FKeyboard* FVTerm::keyboard = nullptr;
FVTerm::charData FVTerm::term_attribute;
FVTerm::charData FVTerm::next_attribute;
FVTerm::charData FVTerm::s_ch;
FVTerm::charData FVTerm::i_ch;
charData FVTerm::term_attribute;
charData FVTerm::next_attribute;
charData FVTerm::s_ch;
charData FVTerm::i_ch;
//----------------------------------------------------------------------
@ -1632,7 +1640,7 @@ void FVTerm::clearArea (term_area* area, int fillchar)
}
//----------------------------------------------------------------------
FVTerm::charData FVTerm::generateCharacter (const FPoint& pos)
charData FVTerm::generateCharacter (const FPoint& pos)
{
// Generates characters for a given position considering all areas
@ -1701,7 +1709,7 @@ FVTerm::charData FVTerm::generateCharacter (const FPoint& pos)
}
//----------------------------------------------------------------------
FVTerm::charData FVTerm::getCharacter ( character_type char_type
charData FVTerm::getCharacter ( character_type char_type
, const FPoint& pos
, FVTerm* obj )
{
@ -1768,16 +1776,14 @@ FVTerm::charData FVTerm::getCharacter ( character_type char_type
}
//----------------------------------------------------------------------
FVTerm::charData FVTerm::getCoveredCharacter ( const FPoint& pos
, FVTerm* obj )
charData FVTerm::getCoveredCharacter (const FPoint& pos, FVTerm* obj)
{
// Gets the covered character for a given position
return getCharacter (covered_character, pos, obj);
}
//----------------------------------------------------------------------
FVTerm::charData FVTerm::getOverlappedCharacter ( const FPoint& pos
, FVTerm* obj )
charData FVTerm::getOverlappedCharacter (const FPoint& pos, FVTerm* obj)
{
// Gets the overlapped character for a given position
return getCharacter (overlapped_character, pos, obj);
@ -2797,7 +2803,7 @@ int FVTerm::appendLowerRight (charData*& screen_char)
//----------------------------------------------------------------------
inline void FVTerm::characterFilter (charData*& next_char)
{
FTerm::characterSub& sub_map = fterm->getCharSubstitutionMap();
charSubstitution& sub_map = fterm->getCharSubstitutionMap();
if ( sub_map.find(next_char->encoded_code) != sub_map.end() )
next_char->encoded_code = sub_map[next_char->encoded_code];

View File

@ -23,9 +23,12 @@
#include <vector>
#include "final/fapplication.h"
#include "final/fevent.h"
#include "final/fmenubar.h"
#include "final/fstatusbar.h"
#include "final/fstring.h"
#include "final/fwidget.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{
@ -47,7 +50,6 @@ bool FWidget::init_desktop;
bool FWidget::hideable;
uInt FWidget::modal_dialogs;
//----------------------------------------------------------------------
// class FWidget
//----------------------------------------------------------------------
@ -2171,7 +2173,7 @@ void FWidget::draw()
void FWidget::drawWindows()
{
// redraw windows
FOptiAttr::charData default_char;
charData default_char;
default_char.code = ' ';
default_char.fg_color = fc::Black;
default_char.bg_color = fc::Black;

View File

@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include "final/fc.h"
#include "final/fterm.h"
#include "final/fwidgetcolors.h"

View File

@ -21,6 +21,7 @@
***********************************************************************/
#include "final/fapplication.h"
#include "final/fevent.h"
#include "final/fmenubar.h"
#include "final/fstatusbar.h"
#include "final/fwindow.h"

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2013-2018 Markus Gans *
* Copyright 2013-2019 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 *
@ -66,13 +66,26 @@
#include <string>
#include <utility>
#include "final/fevent.h"
#include "final/ftypes.h"
#include "final/fwidget.h"
#include "final/fwindow.h"
namespace finalcut
{
// class forward declaration
class FEvent;
class FAccelEvent;
class FCloseEvent;
class FFocusEvent;
class FKeyEvent;
class FMouseEvent;
class FTimerEvent;
class FWheelEvent;
class FMouseControl;
class FKeyboard;
class FPoint;
class FObject;
//----------------------------------------------------------------------
// class FApplication
//----------------------------------------------------------------------

View File

@ -53,6 +53,7 @@
#endif
#include "final/fwidget.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -54,6 +54,7 @@
#endif
#include "final/fscrollview.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -35,7 +35,8 @@
#error "Only <final/final.h> can be included directly."
#endif
//#include ...
#include "final/fc.h"
#include "final/ftypes.h"
namespace finalcut
{

View File

@ -35,8 +35,6 @@
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fc.h"
namespace finalcut
{

View File

@ -50,9 +50,7 @@
#endif
/* Define to 1 if GPM mouse is enabled */
#ifndef F_HAVE_LIBGPM
#define F_HAVE_LIBGPM 1
#endif
/* #undef HAVE_LIBGPM */
/* Define to 1 if you have the <linux/fb.h> header file. */
#ifndef F_HAVE_LINUX_FB_H

View File

@ -57,13 +57,14 @@
#endif
#include "final/fmenu.h"
#include "final/fmenuitem.h"
#include "final/ftooltip.h"
#include "final/fwindow.h"
namespace finalcut
{
// class forward declaration
class FToolTip;
//----------------------------------------------------------------------
// class FDialog
//----------------------------------------------------------------------

View File

@ -65,7 +65,11 @@
*
*
*
* FTimerEvent
* FTimerEvent
*
*
*
* FUserEvent
*
*/
@ -83,6 +87,9 @@
namespace finalcut
{
// class forward declaration
class FPoint;
//----------------------------------------------------------------------
// class FEvent
//----------------------------------------------------------------------

View File

@ -63,11 +63,13 @@
#endif
#include <sys/param.h>
#include <sys/types.h>
#include <dirent.h>
#include <fnmatch.h>
#include <libgen.h>
#include <pwd.h>
#include <unistd.h>
#include <string>
#include <vector>

View File

@ -4,7 +4,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2014-2018 Markus Gans *
* Copyright 2014-2019 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 *
@ -26,15 +26,21 @@
#define USE_FINAL_H
#include <final/emptyfstring.h>
#include <final/fkey_map.h>
#include <final/fapplication.h>
#include <final/fbuttongroup.h>
#include <final/fbutton.h>
#include "final/fc.h"
#include "final/fcolorpair.h"
#include "final/fcharmap.h"
#include <final/fcheckbox.h>
#include <final/fcheckmenuitem.h>
#include <final/fdialog.h>
#include <final/fdialoglistmenu.h>
#include <final/fevent.h>
#include <final/ffiledialog.h>
#include <final/fkeyboard.h>
#include <final/flabel.h>
#include <final/flineedit.h>
#include <final/flistbox.h>
@ -43,6 +49,9 @@
#include <final/fmenu.h>
#include <final/fmenuitem.h>
#include <final/fmessagebox.h>
#include <final/fmouse.h>
#include <final/foptiattr.h>
#include <final/foptimove.h>
#include <final/fpoint.h>
#include <final/fprogressbar.h>
#include <final/fradiobutton.h>
@ -52,11 +61,31 @@
#include <final/fstatusbar.h>
#include <final/fstring.h>
#include <final/fswitch.h>
#include <final/fsystem.h>
#include <final/fterm.h>
#include <final/ftermios.h>
#include <final/ftermcap.h>
#include <final/ftermcapquirks.h>
#include <final/ftermdata.h>
#include <final/ftermdebugdata.h>
#include <final/ftermdetection.h>
#include <final/ftextview.h>
#include <final/ftooltip.h>
#include <final/ftypes.h>
#include <final/fwidget.h>
#if defined(UNIT_TEST)
#include "final/ftermlinux.h"
#include "final/ftermfreebsd.h"
#include "final/ftermopenbsd.h"
#elif defined(__linux__)
#include "final/ftermlinux.h"
#elif defined(__FreeBSD__) || defined(__DragonFly__)
#include "final/ftermfreebsd.h"
#elif defined(__NetBSD__) || defined(__OpenBSD__)
#include "final/ftermopenbsd.h"
#endif
#undef USE_FINAL_H
#endif // FINAL_H

View File

@ -35,19 +35,15 @@
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fobject.h"
#include "final/ftypes.h"
#if defined(__linux__)
#include "final/ftermlinux.h"
#endif
namespace finalcut
{
// class forward declaration
class FApplication;
class FString;
class FTermLinux;
//----------------------------------------------------------------------
// class FKeyboardCommand

View File

@ -55,6 +55,7 @@
#include <vector>
#include "final/fwidget.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{

View File

@ -53,11 +53,13 @@
#endif
#include "final/fwidget.h"
#include "final/flabel.h"
namespace finalcut
{
// class forward declaration
class FLabel;
//----------------------------------------------------------------------
// class FLineEdit
//----------------------------------------------------------------------

View File

@ -56,13 +56,15 @@ e Copyright 2014-2019 Markus Gans *
#include <memory>
#include <vector>
#include "final/fscrollbar.h"
#include "final/fstring.h"
#include "final/fwidget.h"
namespace finalcut
{
// class forward declaration
class FScrollbar;
class FString;
//----------------------------------------------------------------------
// class FListBoxItem
//----------------------------------------------------------------------

View File

@ -57,8 +57,6 @@
#include <stack>
#include <vector>
#include "final/fscrollbar.h"
#include "final/fstring.h"
#include "final/ftermbuffer.h"
#include "final/fwidget.h"
@ -67,6 +65,8 @@ namespace finalcut
// class forward declaration
class FListView;
class FScrollbar;
class FString;
//----------------------------------------------------------------------
// class FListViewItem

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2015-2018 Markus Gans *
* Copyright 2015-2019 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 *
@ -60,13 +60,15 @@
#endif
#include "final/fwindow.h"
#include "final/fmenubar.h"
#include "final/fmenulist.h"
#include "final/fmenuitem.h"
namespace finalcut
{
// class forward declaration
class FMenuBar;
class FMenuItem;
//----------------------------------------------------------------------
// class FMenu
//----------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2015-2018 Markus Gans *
* Copyright 2015-2019 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 *
@ -59,13 +59,15 @@
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fmenu.h"
#include "final/fmenulist.h"
#include "final/fwindow.h"
namespace finalcut
{
// class forward declaration
class FMenu;
//----------------------------------------------------------------------
// class FMenuBar
//----------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2014-2018 Markus Gans *
* Copyright 2014-2019 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 *
@ -64,13 +64,15 @@
#include <cstring>
#include "final/fbutton.h"
#include "final/fdialog.h"
#include "final/fterm.h"
#include "final/fwidgetcolors.h"
namespace finalcut
{
// class forward declaration
class FButton;
//----------------------------------------------------------------------
// class FMessageBox
//----------------------------------------------------------------------

View File

@ -63,10 +63,8 @@
#include <cstddef>
#include <map>
#include "final/fconfig.h"
#include "final/fkeyboard.h"
#include "final/fpoint.h"
#include "final/ftypes.h"
#if defined(__linux__)
#include <linux/keyboard.h> // need for gpm keyboard modifiers

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2015-2018 Markus Gans *
* Copyright 2015-2019 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 *
@ -48,14 +48,22 @@
#include <memory>
#include <vector>
#include "final/emptyfstring.h"
#include "final/fc.h"
#include "final/fevent.h"
#include "final/ftypes.h"
namespace finalcut
{
// class forward declaration
class FEvent;
class FKeyEvent;
class FMouseEvent;
class FWheelEvent;
class FFocusEvent;
class FAccelEvent;
class FShowEvent;
class FHideEvent;
class FCloseEvent;
class FTimerEvent;
class FUserEvent;
//----------------------------------------------------------------------
// class FObject
//----------------------------------------------------------------------

View File

@ -58,9 +58,6 @@
#include <algorithm> // need for std::swap
#include "final/fc.h"
#include "final/ftypes.h"
namespace finalcut
{
@ -74,46 +71,7 @@ namespace finalcut
class FOptiAttr final
{
public:
// Typedefs
typedef struct
{
wchar_t code; // character code
wchar_t encoded_code; // encoded output character
FColor fg_color; // foreground color
FColor bg_color; // background color
union attribute
{
struct
{
// Attribute byte #0
uInt8 bold : 1; // bold
uInt8 dim : 1; // dim
uInt8 italic : 1; // italic
uInt8 underline : 1; // underline
uInt8 blink : 1; // blink
uInt8 reverse : 1; // reverse
uInt8 standout : 1; // standout
uInt8 invisible : 1; // invisible
// Attribute byte #1
uInt8 protect : 1; // protect mode
uInt8 crossed_out : 1; // crossed out
uInt8 dbl_underline : 1; // double underline
uInt8 alt_charset : 1; // alternate character set (vt100)
uInt8 pc_charset : 1; // pc character set (CP437)
uInt8 transparent : 1; // transparent
uInt8 trans_shadow : 1; // transparent shadow
uInt8 inherit_bg : 1; // inherit background
// Attribute byte #2
uInt8 no_changes : 1; // no changes required
uInt8 printed : 1; // is printed to VTerm
uInt8 : 6; // padding bits
} bit;
uInt8 byte[3];
} attr;
} charData;
// Typedef
typedef struct
{
bool ansi_default_color;
@ -381,8 +339,8 @@ class FOptiAttr final
// FOptiAttr inline functions
//----------------------------------------------------------------------
inline bool operator == ( const FOptiAttr::charData& lhs,
const FOptiAttr::charData& rhs )
inline bool operator == ( const charData& lhs,
const charData& rhs )
{
return lhs.code == rhs.code
&& lhs.fg_color == rhs.fg_color
@ -392,8 +350,8 @@ inline bool operator == ( const FOptiAttr::charData& lhs,
}
//----------------------------------------------------------------------
inline bool operator != ( const FOptiAttr::charData& lhs,
const FOptiAttr::charData& rhs )
inline bool operator != ( const charData& lhs,
const charData& rhs )
{ return ! ( lhs == rhs ); }
//----------------------------------------------------------------------

View File

@ -63,8 +63,6 @@
#include <cstring>
#include <iostream>
#include "final/ftypes.h"
namespace finalcut
{

View File

@ -36,7 +36,6 @@
#endif
#include <iostream>
#include "final/ftypes.h"
namespace finalcut
{

View File

@ -40,12 +40,14 @@
#endif
#include <algorithm>
#include "final/fpoint.h"
#include "final/fsize.h"
namespace finalcut
{
// class forward declaration
class FPoint;
class FSize;
//----------------------------------------------------------------------
// class FRect
//----------------------------------------------------------------------
@ -186,26 +188,6 @@ inline int FRect::getX() const
inline int FRect::getY() const
{ return Y1; }
//----------------------------------------------------------------------
inline FPoint FRect::getPos() const
{ return FPoint(X1, Y1); }
//----------------------------------------------------------------------
inline FPoint FRect::getUpperLeftPos() const
{ return FPoint(X1, Y1); }
//----------------------------------------------------------------------
inline FPoint FRect::getUpperRightPos() const
{ return FPoint(X2, Y1); }
//----------------------------------------------------------------------
inline FPoint FRect::getLowerLeftPos() const
{ return FPoint(X1, Y2); }
//----------------------------------------------------------------------
inline FPoint FRect::getLowerRightPos() const
{ return FPoint(X2, Y2); }
//----------------------------------------------------------------------
inline std::size_t FRect::getWidth() const
{
@ -220,10 +202,6 @@ inline std::size_t FRect::getHeight() const
return ( h < 0 ) ? 0 : std::size_t(h);
}
//----------------------------------------------------------------------
inline FSize FRect::getSize() const
{ return FSize(getWidth(), getHeight()); }
//----------------------------------------------------------------------
inline int& FRect::x1_ref()
{ return X1; }

View File

@ -36,6 +36,7 @@
#endif
#include <iostream>
#include "final/ftypes.h"
namespace finalcut

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2014-2018 Markus Gans *
* Copyright 2014-2019 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 *
@ -61,6 +61,7 @@
#include <vector>
#include "final/fwidget.h"
#include "final/fwindow.h"
namespace finalcut

View File

@ -115,41 +115,36 @@
#include <string>
#include "final/fc.h"
#include "final/fcolorpalette.h"
#include "final/fkey_map.h"
#include "final/fkeyboard.h"
#include "final/fmouse.h"
#include "final/foptiattr.h"
#include "final/foptimove.h"
#include "final/fpoint.h"
#include "final/frect.h"
#include "final/fstring.h"
#include "final/fsystem.h"
#include "final/fsystemimpl.h"
#include "final/ftermcap.h"
#include "final/ftermcapquirks.h"
#include "final/ftermdata.h"
#include "final/ftermdebugdata.h"
#include "final/ftermdetection.h"
#if defined(UNIT_TEST)
#include "final/ftermlinux.h"
#include "final/ftermfreebsd.h"
#include "final/ftermopenbsd.h"
#elif defined(__linux__)
#include "final/ftermlinux.h"
#elif defined(__FreeBSD__) || defined(__DragonFly__)
#include "final/ftermfreebsd.h"
#elif defined(__NetBSD__) || defined(__OpenBSD__)
#include "final/ftermopenbsd.h"
#endif
#include "final/ftermios.h"
#include "final/ftermxterminal.h"
namespace finalcut
{
// class forward declaration
class FKeyboard;
class FMouseControl;
class FOptiAttr;
class FOptiMove;
class FSize;
class FString;
class FSystem;
class FTermData;
class FTermDebugData;
class FTermDetection;
class FTermXTerminal;
#if defined(UNIT_TEST)
class FTermLinux;
class FTermFreeBSD;
class FTermOpenBSD;
#elif defined(__linux__)
class FTermLinux;
#elif defined(__FreeBSD__) || defined(__DragonFly__)
class FTermFreeBSD;
#elif defined(__NetBSD__) || defined(__OpenBSD__)
class FTermOpenBSD;
#endif
//----------------------------------------------------------------------
// class FTerm
//----------------------------------------------------------------------
@ -160,10 +155,6 @@ namespace finalcut
class FTerm final
{
public:
// Typedefs
typedef FOptiAttr::charData charData;
typedef FTermData::characterSub characterSub;
struct initializationValues; // forward declaration
// Constructor
@ -189,7 +180,7 @@ class FTerm final
static int getTabstop();
static int getMaxColor();
initializationValues& getInitValues();
characterSub& getCharSubstitutionMap();
charSubstitution& getCharSubstitutionMap();
static FTermData* getFTermData();
static FSystem* getFSystem();
@ -447,369 +438,10 @@ class FTerm final
inline const char* FTerm::getClassName() const
{ return "FTerm"; }
//----------------------------------------------------------------------
inline int FTerm::getTTYFileDescriptor()
{ return ( data ) ? data->getTTYFileDescriptor() : 0; }
//----------------------------------------------------------------------
inline char* FTerm::getTermType()
{ return data->getTermType(); }
//----------------------------------------------------------------------
inline char* FTerm::getTermFileName()
{ return data->getTermFileName(); }
//----------------------------------------------------------------------
inline int FTerm::getTabstop()
{ return FTermcap::tabstop; }
//----------------------------------------------------------------------
inline int FTerm::getMaxColor()
{ return FTermcap::max_color; }
//----------------------------------------------------------------------
inline FTerm::initializationValues& FTerm::getInitValues()
{ return init_values; }
//----------------------------------------------------------------------
inline FTerm::characterSub& FTerm::getCharSubstitutionMap()
{ return data->getCharSubstitutionMap(); }
//----------------------------------------------------------------------
inline FTermData* FTerm::getFTermData()
{
if ( data == 0 )
{
try
{
data = new FTermData;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return data;
}
//----------------------------------------------------------------------
inline FSystem* FTerm::getFSystem()
{
if ( fsys == 0 )
{
try
{
fsys = new FSystemImpl;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return fsys;
}
//----------------------------------------------------------------------
inline FOptiMove* FTerm::getFOptiMove()
{
if ( opti_move == 0 )
{
try
{
opti_move = new FOptiMove;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return opti_move;
}
//----------------------------------------------------------------------
inline FOptiAttr* FTerm::getFOptiAttr()
{
if ( opti_attr == 0 )
{
try
{
opti_attr = new FOptiAttr;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return opti_attr;
}
//----------------------------------------------------------------------
inline FTermDetection* FTerm::getFTermDetection()
{
if ( term_detection == 0 )
{
try
{
term_detection = new FTermDetection;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return term_detection;
}
//----------------------------------------------------------------------
inline FTermXTerminal* FTerm::getFTermXTerminal()
{
if ( xterm == 0 )
{
try
{
xterm = new FTermXTerminal;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return xterm;
}
//----------------------------------------------------------------------
inline FKeyboard* FTerm::getFKeyboard()
{
if ( keyboard == 0 )
{
try
{
keyboard = new FKeyboard;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return keyboard;
}
//----------------------------------------------------------------------
inline FMouseControl* FTerm::getFMouseControl()
{
if ( mouse == 0 )
{
try
{
mouse = new FMouseControl;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return mouse;
}
#if defined(__linux__)
//----------------------------------------------------------------------
inline FTermLinux* FTerm::getFTermLinux()
{
if ( linux == 0 )
{
try
{
linux = new FTermLinux;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return linux;
}
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
//----------------------------------------------------------------------
inline FTermFreeBSD* FTerm::getFTermFreeBSD()
{
if ( freebsd == 0 )
{
try
{
freebsd = new FTermFreeBSD;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return freebsd;
}
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
//----------------------------------------------------------------------
inline FTermOpenBSD* FTerm::getFTermOpenBSD()
{
if ( openbsd == 0 )
{
try
{
openbsd = new FTermOpenBSD;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return openbsd;
}
#endif
#if DEBUG
//----------------------------------------------------------------------
inline FTermDebugData& FTerm::getFTermDebugData()
{
if ( debug_data == 0 )
{
try
{
debug_data = new FTermDebugData;
}
catch (const std::bad_alloc& ex)
{
std::cerr << bad_alloc_str << ex.what() << std::endl;
std::abort();
}
}
return *debug_data;
}
#endif // DEBUG
//----------------------------------------------------------------------
inline bool FTerm::hasUTF8()
{ return data->hasUTF8Console(); }
//----------------------------------------------------------------------
inline bool FTerm::isMonochron()
{ return data->isMonochron(); }
//----------------------------------------------------------------------
inline bool FTerm::isXTerminal()
{ return term_detection->isXTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isAnsiTerminal()
{ return term_detection->isAnsiTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isRxvtTerminal()
{ return term_detection->isRxvtTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isUrxvtTerminal()
{ return term_detection->isUrxvtTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isMltermTerminal()
{ return term_detection->isMltermTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isPuttyTerminal()
{ return term_detection->isPuttyTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isKdeTerminal()
{ return term_detection->isKdeTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isGnomeTerminal()
{ return term_detection->isGnomeTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isKtermTerminal()
{ return term_detection->isKtermTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isTeraTerm()
{ return term_detection->isTeraTerm(); }
//----------------------------------------------------------------------
inline bool FTerm::isSunTerminal()
{ return term_detection->isSunTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isCygwinTerminal()
{ return term_detection->isCygwinTerminal(); }
//----------------------------------------------------------------------
inline bool FTerm::isMinttyTerm()
{ return term_detection->isMinttyTerm(); }
//----------------------------------------------------------------------
inline bool FTerm::isLinuxTerm()
{ return term_detection->isLinuxTerm(); }
//----------------------------------------------------------------------
inline bool FTerm::isFreeBSDTerm()
{ return term_detection->isFreeBSDTerm(); }
//----------------------------------------------------------------------
inline bool FTerm::isNetBSDTerm()
{ return term_detection->isNetBSDTerm(); }
//----------------------------------------------------------------------
inline bool FTerm::isOpenBSDTerm()
{ return term_detection->isOpenBSDTerm(); }
//----------------------------------------------------------------------
inline bool FTerm::isScreenTerm()
{ return term_detection->isScreenTerm(); }
//----------------------------------------------------------------------
inline bool FTerm::isTmuxTerm()
{ return term_detection->isTmuxTerm(); }
//----------------------------------------------------------------------
inline bool FTerm::isNewFont()
{ return data->isNewFont(); }
//----------------------------------------------------------------------
inline bool FTerm::hasChangedTermSize()
{ return data->hasTermResized(); }
//----------------------------------------------------------------------
inline bool FTerm::hasShadowCharacter()
{ return data->hasShadowCharacter(); }
//----------------------------------------------------------------------
inline bool FTerm::hasHalfBlockCharacter()
{ return data->hasHalfBlockCharacter(); }
//----------------------------------------------------------------------
inline bool FTerm::hasAlternateScreen()
{ return data->hasAlternateScreen(); }
//----------------------------------------------------------------------
inline void FTerm::setFSystem (FSystem* fsystem)
{ fsys = fsystem; }
@ -822,10 +454,6 @@ inline bool FTerm::setUTF8()
inline bool FTerm::unsetUTF8()
{ return setUTF8(false); }
//----------------------------------------------------------------------
inline void FTerm::changeTermSizeFinished()
{ data->setTermResized(false); }
} // namespace finalcut

View File

@ -39,12 +39,12 @@
#include <string>
#include <vector>
#include "final/fvterm.h"
#include "final/fstring.h"
namespace finalcut
{
// class forward declaration
class FColorPair;
//----------------------------------------------------------------------
// class FTermBuffer
//----------------------------------------------------------------------
@ -56,7 +56,6 @@ class FTermBuffer
{
public:
// Typedef
typedef FOptiAttr::charData charData;
typedef std::vector<charData> charDataVector;
// Constructor

View File

@ -58,17 +58,16 @@
#include <string>
#include <vector>
#include "final/emptyfstring.h"
#include "final/fkey_map.h"
#include "final/ftermdetection.h"
// FTermcap string macro
#define TCAP(...) FTermcap::strings[__VA_ARGS__].string
namespace finalcut
{
// class forward declaration
class FTermData;
class FTermDetection;
//----------------------------------------------------------------------
// class FTermcap
//----------------------------------------------------------------------

View File

@ -35,15 +35,13 @@
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fc.h"
#include "final/fterm.h"
#include "final/ftermcap.h"
#include "final/ftermdata.h"
#include "final/ftermdetection.h"
namespace finalcut
{
// class forward declaration
class FTermData;
class FTermDetection;
//----------------------------------------------------------------------
// class FTermcapsQuirks
//----------------------------------------------------------------------

View File

@ -58,7 +58,6 @@ class FTermData final
public:
// Typedefs
typedef std::unordered_map<std::string, fc::encoding> encodingMap;
typedef std::unordered_map<wchar_t, wchar_t> characterSub;
// Constructors
FTermData() {}
@ -75,7 +74,7 @@ class FTermData final
// Accessors
const char* getClassName() const;
encodingMap& getEncodingList();
characterSub& getCharSubstitutionMap();
charSubstitution& getCharSubstitutionMap();
fc::encoding getTermEncoding() const;
FRect& getTermGeometry();
int getTTYFileDescriptor() const;
@ -131,7 +130,7 @@ class FTermData final
private:
// Data Members
encodingMap encoding_list{};
characterSub char_substitution_map{};
charSubstitution char_substitution_map{};
fc::encoding term_encoding{fc::UNKNOWN};
FRect term_geometry{}; // current terminal geometry
int fd_tty{-1}; // Teletype (tty) file descriptor is still undefined
@ -153,7 +152,6 @@ class FTermData final
char termfilename[256]{'\0'};
FString xterm_font{};
FString xterm_title{};
#if DEBUG
int framebuffer_bpp{-1};
#endif
@ -170,7 +168,7 @@ inline FTermData::encodingMap& FTermData::getEncodingList()
{ return encoding_list; }
//----------------------------------------------------------------------
inline FTermData::characterSub& FTermData::getCharSubstitutionMap()
inline charSubstitution& FTermData::getCharSubstitutionMap()
{ return char_substitution_map; }
//----------------------------------------------------------------------

View File

@ -40,6 +40,8 @@ namespace finalcut
// class forward declaration
class FTerm;
class FTermData;
class FTermDetection;
#if DEBUG
//----------------------------------------------------------------------
@ -79,33 +81,6 @@ class FTermDebugData final
static FTermData* data;
static FTermDetection* term_detection;
};
//----------------------------------------------------------------------
inline const FString& FTermDebugData::getAnswerbackString()
{ return term_detection->getAnswerbackString(); }
//----------------------------------------------------------------------
inline const FString& FTermDebugData::getSecDAString()
{ return term_detection->getSecDAString(); }
//----------------------------------------------------------------------
inline const char* FTermDebugData::getTermType_256color()
{ return term_detection->getTermType_256color(); }
//----------------------------------------------------------------------
inline const char* FTermDebugData::getTermType_Answerback()
{ return term_detection->getTermType_Answerback(); }
//----------------------------------------------------------------------
inline const char* FTermDebugData::getTermType_SecDA()
{ return term_detection->getTermType_SecDA(); }
//----------------------------------------------------------------------
#if defined(__linux__)
inline int FTermDebugData::getFramebufferBpp()
{ return data->getFramebufferBpp(); }
#endif // defined(__linux__)
#endif // DEBUG
} // namespace finalcut

View File

@ -41,13 +41,6 @@
#include <cstdio>
#include <cstring>
#include "final/fc.h"
#include "final/fconfig.h"
#include "final/fsystem.h"
#include "final/ftermdata.h"
#include "final/ftermios.h"
#include "final/ftypes.h"
namespace finalcut
{
@ -267,14 +260,6 @@ inline FTermDetection::terminalType& FTermDetection::getTermTypeStruct()
{ return terminal_type; }
#if DEBUG
//----------------------------------------------------------------------
inline const FString& FTermDetection::getAnswerbackString()
{ return ( answer_back ) ? *answer_back : fc::emptyFString::get(); }
//----------------------------------------------------------------------
inline const FString& FTermDetection::getSecDAString()
{ return ( sec_da ) ? *sec_da : fc::emptyFString::get(); }
//----------------------------------------------------------------------
inline const char* FTermDetection::getTermType_256color()
{ return termtype_256color; }

View File

@ -36,8 +36,6 @@
#endif
#include "final/fc.h"
#include "final/fsystem.h"
#include "final/ftypes.h"
#if defined(__FreeBSD__) || defined(__DragonFly__)
#undef mouse_info // consio.h
@ -50,6 +48,9 @@
namespace finalcut
{
// class forward declaration
class FSystem;
//----------------------------------------------------------------------
// class FTermFreeBSD
//----------------------------------------------------------------------

View File

@ -51,15 +51,16 @@
#include <cstdio> // need for sprintf
#include <cstring>
#include "final/fc.h"
#include "final/fcharmap.h"
#include "final/fsystem.h"
#include "final/ftermdetection.h"
#include "final/ftypes.h"
#include "final/ftermdata.h"
namespace finalcut
{
// class forward declaration
class FSystem;
class FTermData;
class FTermDetection;
//----------------------------------------------------------------------
// class FTermLinux
//----------------------------------------------------------------------
@ -134,8 +135,6 @@ class FTermLinux final
rgb color[16];
} ColorMap;
typedef FTermData::characterSub characterSub;
// Accessors
static int getFramebuffer_bpp();
static bool getScreenFont();

View File

@ -36,7 +36,6 @@
#endif
#include <sys/ioctl.h>
#include "final/fsystem.h"
#if defined(UNIT_TEST)
#define WSKBDIO_GETENCODING uInt32(0x4004570F)
@ -50,6 +49,9 @@
namespace finalcut
{
// class forward declaration
class FSystem;
//----------------------------------------------------------------------
// class FTermOpenBSD
//----------------------------------------------------------------------

View File

@ -35,14 +35,14 @@
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fc.h"
#include "final/fstring.h"
#include "final/ftermcap.h"
#include "final/ftermdetection.h"
namespace finalcut
{
// class forward declaration
class FString;
class FSystem;
class FTermDetection;
//----------------------------------------------------------------------
// class FTermXTerminal
//----------------------------------------------------------------------

View File

@ -55,15 +55,14 @@
#include <memory>
#include <vector>
#include "final/fapplication.h"
#include "final/fscrollbar.h"
#include "final/fstatusbar.h"
#include "final/fstring.h"
#include "final/fwidget.h"
namespace finalcut
{
// class forward declaration
class FString;
//----------------------------------------------------------------------
// class FTextView
//----------------------------------------------------------------------

View File

@ -32,6 +32,7 @@
#include <cstddef>
#include <limits>
#include <unordered_map>
#include <string>
#define null nullptr
@ -103,6 +104,51 @@ struct getPrecision
}
};
typedef std::unordered_map<wchar_t, wchar_t> charSubstitution;
#pragma pack(push)
#pragma pack(1)
typedef struct
{
wchar_t code; // character code
wchar_t encoded_code; // encoded output character
FColor fg_color; // foreground color
FColor bg_color; // background color
union attribute
{
struct
{
// Attribute byte #0
uInt8 bold : 1; // bold
uInt8 dim : 1; // dim
uInt8 italic : 1; // italic
uInt8 underline : 1; // underline
uInt8 blink : 1; // blink
uInt8 reverse : 1; // reverse
uInt8 standout : 1; // standout
uInt8 invisible : 1; // invisible
// Attribute byte #1
uInt8 protect : 1; // protect mode
uInt8 crossed_out : 1; // crossed out
uInt8 dbl_underline : 1; // double underline
uInt8 alt_charset : 1; // alternate character set (vt100)
uInt8 pc_charset : 1; // pc character set (CP437)
uInt8 transparent : 1; // transparent
uInt8 trans_shadow : 1; // transparent shadow
uInt8 inherit_bg : 1; // inherit background
// Attribute byte #2
uInt8 no_changes : 1; // no changes required
uInt8 printed : 1; // is printed to VTerm
uInt8 : 6; // padding bits
} bit;
uInt8 byte[3];
} attr;
} charData;
#pragma pack(pop)
namespace fc
{
#pragma pack(push)

View File

@ -57,9 +57,8 @@
#include <string>
#include <vector>
#include "final/fc.h"
#include "final/fterm.h"
#include "final/fcolorpair.h"
// Preprocessing handler macro
#define F_PREPROC_HANDLER(i,h) \
@ -70,10 +69,19 @@ namespace finalcut
{
// class forward declaration
class FColorPair;
class FKeyboard;
class FMouseControl;
class FPoint;
class FRect;
class FSize;
class FString;
class FSystem;
class FTerm;
class FTermBuffer;
class FTermDebugData;
class FWidget;
//----------------------------------------------------------------------
// class FVTerm
//----------------------------------------------------------------------
@ -92,7 +100,6 @@ class FVTerm
uInt trans_count; // Number of transparent characters
} line_changes;
typedef FOptiAttr::charData charData;
typedef void (FVTerm::*FPreprocessingHandler)();
struct term_area; // forward declaration
@ -420,9 +427,7 @@ class FVTerm
term_area* vwin{nullptr}; // virtual window
private:
// Typedef and Enumeration
typedef FTermcap::tcap_map termcap_map;
// Enumeration
enum exit_state
{
not_used,
@ -431,8 +436,8 @@ class FVTerm
};
// Constants
static constexpr uInt TERMINAL_OUTPUT_BUFFER_SIZE = 32768;
// Buffer size for character output on the terminal
static constexpr uInt TERMINAL_OUTPUT_BUFFER_SIZE = 32768;
// Methods
void init (bool);
@ -566,7 +571,7 @@ inline FVTerm& FVTerm::operator << (const std::string& string)
//----------------------------------------------------------------------
inline FVTerm& FVTerm::operator << \
(const std::vector<FVTerm::charData>& termString)
(const std::vector<charData>& termString)
{
print (termString);
return *this;
@ -603,7 +608,7 @@ inline FVTerm::term_area* FVTerm::getVWin() const
{ return vwin; }
//----------------------------------------------------------------------
inline FVTerm::charData FVTerm::getAttribute()
inline charData FVTerm::getAttribute()
{ return next_attribute; }
//----------------------------------------------------------------------

View File

@ -99,8 +99,11 @@
#include <vector>
#include "final/fvterm.h"
#include "final/fwidgetcolors.h"
#include "final/fobject.h"
#include "final/fpoint.h"
#include "final/frect.h"
#include "final/fsize.h"
#include "final/ftypes.h"
// Callback macros
#define F_FUNCTION_CALLBACK(h) \
@ -114,8 +117,12 @@ namespace finalcut
{
// class forward declaration
class FStatusBar;
class FMenuBar;
class FRect;
class FResizeEvent;
class FSize;
class FStatusBar;
class FWidgetColors;
//----------------------------------------------------------------------
// class FWidget

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2018 Markus Gans *
* Copyright 2018-2019 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 *
@ -121,7 +121,7 @@ void FOptiAttrTest::classNameTest()
//----------------------------------------------------------------------
void FOptiAttrTest::noArgumentTest()
{
finalcut::FOptiAttr::charData* ch = new finalcut::FOptiAttr::charData();
finalcut::charData* ch = new finalcut::charData();
finalcut::FOptiAttr oa;
oa.initialize();
@ -133,7 +133,7 @@ void FOptiAttrTest::noArgumentTest()
CPPUNIT_ASSERT ( oa.isNormal(ch) );
// Null test
finalcut::FOptiAttr::charData* ch_null = nullptr;
finalcut::charData* ch_null = nullptr;
CPPUNIT_ASSERT ( oa.changeAttribute(ch, ch) == 0 );
CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch, ch_null), C_STR("") );
CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch_null, ch), C_STR("") );
@ -207,10 +207,8 @@ void FOptiAttrTest::fakeReverseTest()
oa.set_orig_orig_colors (0);
oa.initialize();
finalcut::FOptiAttr::charData* from = \
new finalcut::FOptiAttr::charData();
finalcut::FOptiAttr::charData* to = \
new finalcut::FOptiAttr::charData();
finalcut::charData* from = new finalcut::charData();
finalcut::charData* to = new finalcut::charData();
CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 );
// Gray text on blue background
@ -304,8 +302,8 @@ void FOptiAttrTest::ansiTest()
oa.set_orig_orig_colors (0);
oa.initialize();
finalcut::FOptiAttr::charData* from = new finalcut::FOptiAttr::charData();
finalcut::FOptiAttr::charData* to = new finalcut::FOptiAttr::charData();
finalcut::charData* from = new finalcut::charData();
finalcut::charData* to = new finalcut::charData();
CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 );
// Default color + bold
@ -769,8 +767,8 @@ void FOptiAttrTest::vt100Test()
oa.set_orig_orig_colors (0);
oa.initialize();
finalcut::FOptiAttr::charData* from = new finalcut::FOptiAttr::charData();
finalcut::FOptiAttr::charData* to = new finalcut::FOptiAttr::charData();
finalcut::charData* from = new finalcut::charData();
finalcut::charData* to = new finalcut::charData();
CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 );
// Default color + bold
@ -1240,8 +1238,8 @@ void FOptiAttrTest::xtermTest()
oa.set_orig_orig_colors (0);
oa.initialize();
finalcut::FOptiAttr::charData* from = new finalcut::FOptiAttr::charData();
finalcut::FOptiAttr::charData* to = new finalcut::FOptiAttr::charData();
finalcut::charData* from = new finalcut::charData();
finalcut::charData* to = new finalcut::charData();
CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 );
// Default color + bold
@ -1711,8 +1709,8 @@ void FOptiAttrTest::rxvtTest()
oa.set_orig_orig_colors (0);
oa.initialize();
finalcut::FOptiAttr::charData* from = new finalcut::FOptiAttr::charData();
finalcut::FOptiAttr::charData* to = new finalcut::FOptiAttr::charData();
finalcut::charData* from = new finalcut::charData();
finalcut::charData* to = new finalcut::charData();
CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 );
// Default color + bold
@ -2183,8 +2181,8 @@ void FOptiAttrTest::linuxTest()
oa.set_orig_orig_colors (C_STR(OSC "R"));
oa.initialize();
finalcut::FOptiAttr::charData* from = new finalcut::FOptiAttr::charData();
finalcut::FOptiAttr::charData* to = new finalcut::FOptiAttr::charData();
finalcut::charData* from = new finalcut::charData();
finalcut::charData* to = new finalcut::charData();
CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 );
// Default color + bold
@ -2666,8 +2664,8 @@ void FOptiAttrTest::puttyTest()
oa.initialize();
finalcut::FOptiAttr::charData* from = new finalcut::FOptiAttr::charData();
finalcut::FOptiAttr::charData* to = new finalcut::FOptiAttr::charData();
finalcut::charData* from = new finalcut::charData();
finalcut::charData* to = new finalcut::charData();
CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 );
// Default color + bold
@ -3139,8 +3137,8 @@ void FOptiAttrTest::teratermTest()
oa.initialize();
finalcut::FOptiAttr::charData* from = new finalcut::FOptiAttr::charData();
finalcut::FOptiAttr::charData* to = new finalcut::FOptiAttr::charData();
finalcut::charData* from = new finalcut::charData();
finalcut::charData* to = new finalcut::charData();
CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 );
// Default color + bold
@ -3614,8 +3612,8 @@ void FOptiAttrTest::ibmColorTest()
oa.initialize();
finalcut::FOptiAttr::charData* from = new finalcut::FOptiAttr::charData();
finalcut::FOptiAttr::charData* to = new finalcut::FOptiAttr::charData();
finalcut::charData* from = new finalcut::charData();
finalcut::charData* to = new finalcut::charData();
CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 );
// Default color + bold
@ -4055,8 +4053,8 @@ void FOptiAttrTest::wyse50Test()
oa.setTermEnvironment(optiattr_env);
finalcut::FOptiAttr::charData* from = new finalcut::FOptiAttr::charData();
finalcut::FOptiAttr::charData* to = new finalcut::FOptiAttr::charData();
finalcut::charData* from = new finalcut::charData();
finalcut::charData* to = new finalcut::charData();
CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 );
// Default color + bold