]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/io_callback.C
the lyxserver modifications
[lyx.git] / src / frontends / gtk / io_callback.C
1 /**
2  * \file io_callback.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  * \author João Luis M. Assirati
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "io_callback.h"
15
16
17 io_callback::io_callback(int fd, boost::function<void()> func)
18         : func_(func)
19 {
20         conn_ = Glib::signal_io().connect(SigC::slot(*this, &io_callback::data_received), fd, Glib::IO_IN);
21 }
22
23
24 bool io_callback::data_received(Glib::IOCondition /*condition*/)
25 {
26         func_();
27         return true;
28 }