macOS build fix
This commit is contained in:
parent
460dff3291
commit
2d9103c102
|
@ -112,6 +112,7 @@ class FMouse
|
|||
// Mutators
|
||||
void setMaxWidth (short);
|
||||
void setMaxHeight (short);
|
||||
void setDblclickInterval (const long);
|
||||
|
||||
// Inquiries
|
||||
virtual bool hasData() = 0;
|
||||
|
@ -464,6 +465,7 @@ class FMouseControl
|
|||
void setStdinNo (int);
|
||||
void setMaxWidth (short);
|
||||
void setMaxHeight (short);
|
||||
void setDblclickInterval (const long);
|
||||
void useGpmMouse (bool = true);
|
||||
void useXtermMouse (bool = true);
|
||||
|
||||
|
@ -499,9 +501,9 @@ class FMouseControl
|
|||
|
||||
private:
|
||||
// Accessor
|
||||
FMouse* getMouseWithData();
|
||||
FMouse* getMouseWithEvent();
|
||||
void putstring (const char[], int = 1);
|
||||
FMouse* getMouseWithData();
|
||||
FMouse* getMouseWithEvent();
|
||||
void putstring (const char[], int = 1);
|
||||
|
||||
// Data Member
|
||||
std::map<FMouse::mouse_type, FMouse*> mouse_protocol;
|
||||
|
|
|
@ -580,7 +580,6 @@ class FTerm
|
|||
static int fd_tty;
|
||||
static uInt baudrate;
|
||||
static long key_timeout;
|
||||
static long dblclick_interval;
|
||||
static bool resize_term;
|
||||
|
||||
static struct termios term_init;
|
||||
|
@ -798,10 +797,6 @@ inline void FTerm::setXTermDefaultColors (bool on)
|
|||
inline void FTerm::setKeypressTimeout (const long timeout)
|
||||
{ key_timeout = timeout; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline void FTerm::setDblclickInterval (const long timeout)
|
||||
{ dblclick_interval = timeout; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline bool FTerm::setRawMode()
|
||||
{ return setRawMode(true); }
|
||||
|
|
|
@ -74,8 +74,11 @@ FApplication::FApplication ( const int& _argc
|
|||
// Set the keyboard keypress timeout
|
||||
setKeypressTimeout (key_timeout);
|
||||
|
||||
// Set the double click interval
|
||||
setDblclickInterval (dblclick_interval);
|
||||
// Set the default double click interval
|
||||
FMouseControl* mouse = getMouseControl();
|
||||
|
||||
if ( mouse )
|
||||
mouse->setDblclickInterval (dblclick_interval);
|
||||
|
||||
if ( ! (_argc && _argv) )
|
||||
{
|
||||
|
|
|
@ -87,6 +87,12 @@ inline void FMouse::setMaxHeight (short y_max)
|
|||
max_height = y_max;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline void FMouse::setDblclickInterval (const long timeout)
|
||||
{
|
||||
dblclick_interval = timeout;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline bool FMouse::hasEvent()
|
||||
{
|
||||
|
@ -1253,6 +1259,20 @@ void FMouseControl::setMaxHeight (short y_max)
|
|||
mouse_protocol[FMouse::urxvt]->setMaxHeight(y_max);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FMouseControl::setDblclickInterval (const long timeout)
|
||||
{
|
||||
iter = mouse_protocol.begin();
|
||||
|
||||
while ( iter != mouse_protocol.end() )
|
||||
{
|
||||
if ( iter->second )
|
||||
return iter->second->setDblclickInterval(timeout);
|
||||
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FMouseControl::useGpmMouse (bool on)
|
||||
{
|
||||
|
|
|
@ -58,7 +58,6 @@ int FTerm::clr_eol_length;
|
|||
int FTerm::cursor_addres_lengths;
|
||||
uInt FTerm::baudrate;
|
||||
long FTerm::key_timeout;
|
||||
long FTerm::dblclick_interval;
|
||||
bool FTerm::resize_term;
|
||||
bool FTerm::decscusr_support;
|
||||
bool FTerm::terminal_detection;
|
||||
|
@ -324,6 +323,12 @@ void FTerm::setFreeBSDConsoleCursorStyle ( fc::freebsdConsoleCursorStyle style
|
|||
}
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FTerm::setDblclickInterval (const long timeout)
|
||||
{
|
||||
mouse->setDblclickInterval(timeout);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FTerm::setTTY (const termios& t)
|
||||
{
|
||||
|
@ -2523,9 +2528,6 @@ void FTerm::init_global_values()
|
|||
// Set default timeout for keypress
|
||||
key_timeout = 100000; // 100 ms
|
||||
|
||||
// Set the default double click interval
|
||||
dblclick_interval = 500000; // 500 ms
|
||||
|
||||
// Preset to false
|
||||
utf8_console = \
|
||||
utf8_input = \
|
||||
|
@ -3588,38 +3590,15 @@ void FTerm::init_termcaps_cygwin_quirks()
|
|||
// Set background color erase for cygwin terminal
|
||||
FTermcap::background_color_erase = true;
|
||||
|
||||
// Set ansi foreground and background color
|
||||
if ( FTermcap::max_color > 8 )
|
||||
{
|
||||
TCAP(fc::t_set_a_foreground) = \
|
||||
C_STR(CSI "3%p1%{8}%m%d%?%p1%{7}%>%t;1%e;21%;m");
|
||||
TCAP(fc::t_set_a_background) = \
|
||||
C_STR(CSI "4%p1%{8}%m%d%?%p1%{7}%>%t;5%e;25%;m");
|
||||
}
|
||||
else
|
||||
{
|
||||
TCAP(fc::t_set_a_foreground) = \
|
||||
C_STR(CSI "3%p1%dm");
|
||||
TCAP(fc::t_set_a_background) = \
|
||||
C_STR(CSI "4%p1%dm");
|
||||
}
|
||||
|
||||
TCAP(fc::t_orig_pair) = \
|
||||
C_STR(CSI "39;49;25m");
|
||||
|
||||
// Avoid dim + underline
|
||||
TCAP(fc::t_enter_dim_mode) = 0;
|
||||
TCAP(fc::t_exit_dim_mode) = 0;
|
||||
TCAP(fc::t_enter_underline_mode) = 0;
|
||||
TCAP(fc::t_exit_underline_mode) = 0;
|
||||
FTermcap::attr_without_color = 18;
|
||||
init_termcaps_linux_quirks();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FTerm::init_termcaps_linux_quirks()
|
||||
{
|
||||
// Set ansi foreground and background color
|
||||
/* Same settings are used by cygwin */
|
||||
|
||||
// Set ansi foreground and background color
|
||||
if ( FTermcap::max_color > 8 )
|
||||
{
|
||||
TCAP(fc::t_set_a_foreground) = \
|
||||
|
@ -4305,6 +4284,7 @@ void FTerm::enableMouse()
|
|||
bool gpm_mouse = false;
|
||||
bool xterm_mouse = false;
|
||||
|
||||
#if defined(__linux__)
|
||||
if ( linux_terminal && openConsole() == 0 )
|
||||
{
|
||||
if ( isLinuxConsole() )
|
||||
|
@ -4312,6 +4292,7 @@ void FTerm::enableMouse()
|
|||
|
||||
closeConsole();
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( TCAP(fc::t_key_mouse) && ! linux_terminal )
|
||||
xterm_mouse = true;
|
||||
|
|
Loading…
Reference in New Issue