]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/io_callback.C
Add ShowFile dialog
[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(
21                 sigc::mem_fun(*this, &io_callback::data_received),
22                 fd, Glib::IO_IN);
23 }
24
25
26 bool io_callback::data_received(Glib::IOCondition /*condition*/)
27 {
28         func_();
29         return true;
30 }