2004-07-22 13:44:40 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file io_callback.C
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author John Levon
|
|
|
|
|
* \author Jo<EFBFBD>o Luis M. Assirati
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
2004-11-16 23:18:46 +00:00
|
|
|
|
// Too hard to make concept checks work with this file
|
|
|
|
|
#ifdef _GLIBCPP_CONCEPT_CHECKS
|
|
|
|
|
#undef _GLIBCPP_CONCEPT_CHECKS
|
|
|
|
|
#endif
|
|
|
|
|
|
2004-07-22 13:44:40 +00:00
|
|
|
|
#include "io_callback.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_callback::io_callback(int fd, boost::function<void()> func)
|
|
|
|
|
: func_(func)
|
|
|
|
|
{
|
2004-09-26 13:18:29 +00:00
|
|
|
|
conn_ = Glib::signal_io().connect(
|
2004-09-26 16:48:30 +00:00
|
|
|
|
sigc::mem_fun(*this, &io_callback::data_received),
|
2004-09-26 13:18:29 +00:00
|
|
|
|
fd, Glib::IO_IN);
|
2004-07-22 13:44:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool io_callback::data_received(Glib::IOCondition /*condition*/)
|
|
|
|
|
{
|
|
|
|
|
func_();
|
|
|
|
|
return true;
|
|
|
|
|
}
|