mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
5f21ba1f56
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9542 a592a061-630c-0410-9148-cb99ea01b6c8
39 lines
789 B
C
39 lines
789 B
C
/**
|
|
* \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ão Luis M. Assirati
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
// Too hard to make concept checks work with this file
|
|
#ifdef _GLIBCXX_CONCEPT_CHECKS
|
|
#undef _GLIBCXX_CONCEPT_CHECKS
|
|
#endif
|
|
#ifdef _GLIBCPP_CONCEPT_CHECKS
|
|
#undef _GLIBCPP_CONCEPT_CHECKS
|
|
#endif
|
|
|
|
#include "io_callback.h"
|
|
|
|
|
|
io_callback::io_callback(int fd, boost::function<void()> func)
|
|
: func_(func)
|
|
{
|
|
conn_ = Glib::signal_io().connect(
|
|
sigc::mem_fun(*this, &io_callback::data_received),
|
|
fd, Glib::IO_IN);
|
|
}
|
|
|
|
|
|
bool io_callback::data_received(Glib::IOCondition /*condition*/)
|
|
{
|
|
func_();
|
|
return true;
|
|
}
|