]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/io_callback.C
some tabular fixes for the problems reported by Helge
[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 // Too hard to make concept checks work with this file
15 #ifdef _GLIBCXX_CONCEPT_CHECKS
16 #undef _GLIBCXX_CONCEPT_CHECKS
17 #endif
18 #ifdef _GLIBCPP_CONCEPT_CHECKS
19 #undef _GLIBCPP_CONCEPT_CHECKS
20 #endif
21
22 #include "io_callback.h"
23
24
25 io_callback::io_callback(int fd, boost::function<void()> func)
26         : func_(func)
27 {
28         conn_ = Glib::signal_io().connect(
29                 sigc::mem_fun(*this, &io_callback::data_received),
30                 fd, Glib::IO_IN);
31 }
32
33
34 bool io_callback::data_received(Glib::IOCondition /*condition*/)
35 {
36         func_();
37         return true;
38 }