mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-23 08:39:07 +00:00
e978fa42e3
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9044 a592a061-630c-0410-9148-cb99ea01b6c8
42 lines
895 B
C++
42 lines
895 B
C++
// -*- C++ -*-
|
|
/**
|
|
* \file io_callback.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author John Levon
|
|
* \author João Luis M. Assirati
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef IO_CALLBACK_H
|
|
#define IO_CALLBACK_H
|
|
|
|
|
|
#include <gtkmm.h>
|
|
|
|
#include <boost/function.hpp>
|
|
|
|
|
|
/**
|
|
* io_callback - a simple wrapper for asynchronous socket notification
|
|
*
|
|
* This is used by the lyxsocket to notice the socket is ready to be
|
|
* connected/read.
|
|
*
|
|
*/
|
|
class io_callback : public sigc::trackable {
|
|
public:
|
|
/// connect a connection notification from the LyXServerSocket
|
|
io_callback(int fd, boost::function<void()> func);
|
|
private:
|
|
bool data_received(Glib::IOCondition);
|
|
/// our notifier
|
|
sigc::connection conn_;
|
|
/// The callback function
|
|
boost::function<void()> func_;
|
|
};
|
|
|
|
#endif // IO_CALLBACK_H
|