Mouse functions are now in a separate class

This commit is contained in:
Markus Gans 2018-01-14 22:24:15 +01:00
parent 8addcbbcb7
commit afe15753f7
3 changed files with 11 additions and 5 deletions

View File

@ -236,7 +236,7 @@ class FMouseGPM : public FMouse
int stdin_no;
};
#pragma pack(pop)
#endif
//----------------------------------------------------------------------
inline bool FMouseGPM::enableGpmMouse()
@ -249,7 +249,7 @@ inline bool FMouseGPM::disableGpmMouse()
//----------------------------------------------------------------------
inline bool FMouseGPM::isGpmMouseEnabled()
{ return gpm_mouse_enabled; }
#endif
//----------------------------------------------------------------------
// class FMouseX11
@ -498,8 +498,6 @@ class FMouseControl
void drawGpmPointer();
private:
// Accessor
FMouse* getMouseWithData();
FMouse* getMouseWithEvent();

View File

@ -185,7 +185,11 @@ inline FMouse* FMouse::createMouseObject (mouse_type mt)
return 0;
case gpm:
#ifdef F_HAVE_LIBGPM
return new FMouseGPM;
#else
break;
#endif
case x11:
return new FMouseX11;
@ -1466,11 +1470,13 @@ void FMouseControl::enable()
{
if ( use_gpm_mouse )
{
#ifdef F_HAVE_LIBGPM
FMouse* mouse = mouse_protocol[FMouse::gpm];
FMouseGPM* gpm_mouse = static_cast<FMouseGPM*>(mouse);
if ( gpm_mouse )
use_gpm_mouse = gpm_mouse->enableGpmMouse();
#endif
}
if ( use_xterm_mouse )
@ -1482,11 +1488,13 @@ void FMouseControl::disable()
{
if ( use_gpm_mouse )
{
#ifdef F_HAVE_LIBGPM
FMouse* mouse = mouse_protocol[FMouse::gpm];
FMouseGPM* gpm_mouse = static_cast<FMouseGPM*>(mouse);
if ( gpm_mouse )
gpm_mouse->disableGpmMouse();
#endif
}
if ( use_xterm_mouse )

View File

@ -1533,7 +1533,7 @@ void FTerm::putstringf (const char format[], ...)
}
//----------------------------------------------------------------------
inline void FTerm::putstring (const char s[], int affcnt)
void FTerm::putstring (const char s[], int affcnt)
{
#if defined(__sun) && defined(__SVR4)
tputs (C_STR(s), affcnt, FTerm::putchar_ASCII);