]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/io_callback.C
Change glob() API to accept a dir parameter.
[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 _GLIBCPP_CONCEPT_CHECKS
16 #undef _GLIBCPP_CONCEPT_CHECKS
17 #endif
18
19 #include "io_callback.h"
20
21
22 io_callback::io_callback(int fd, boost::function<void()> func)
23         : func_(func)
24 {
25         conn_ = Glib::signal_io().connect(
26                 sigc::mem_fun(*this, &io_callback::data_received),
27                 fd, Glib::IO_IN);
28 }
29
30
31 bool io_callback::data_received(Glib::IOCondition /*condition*/)
32 {
33         func_();
34         return true;
35 }