]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/io_callback.h
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / io_callback.h
1 // -*- C++ -*-
2 /**
3  * \file io_callback.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  * \author João Luis M. Assirati
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef IO_CALLBACK_H
14 #define IO_CALLBACK_H
15
16
17 #include <gtkmm.h>
18
19 #include <boost/function.hpp>
20
21
22 /**
23  * io_callback - a simple wrapper for asynchronous socket notification
24  *
25  * This is used by the lyxsocket to notice the socket is ready to be
26  * connected/read.
27  *
28  */
29 class io_callback : public sigc::trackable {
30 public:
31         /// connect a connection notification from the LyXServerSocket
32         io_callback(int fd, boost::function<void()> func);
33 private:
34         bool data_received(Glib::IOCondition);
35         /// our notifier
36         sigc::connection conn_;
37         /// The callback function
38         boost::function<void()> func_;
39 };
40
41 #endif // IO_CALLBACK_H