lyx_mirror/src/frontends/gtk/io_callback.C
Lars Gullik Bjønnes d9bf52e7c5 the lyxserver modifications
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8842 a592a061-630c-0410-9148-cb99ea01b6c8
2004-07-22 13:44:40 +00:00

29 lines
587 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>
#include "io_callback.h"
io_callback::io_callback(int fd, boost::function<void()> func)
: func_(func)
{
conn_ = Glib::signal_io().connect(SigC::slot(*this, &io_callback::data_received), fd, Glib::IO_IN);
}
bool io_callback::data_received(Glib::IOCondition /*condition*/)
{
func_();
return true;
}