2 * \file xformsTimeout.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
15 #include "xformsTimeout.h"
18 #include "lyx_forms.h"
21 Timeout::Timeout(unsigned int msec, Type t)
22 : pimpl_(new xformsTimeout(*this)), type(t), timeout_ms(msec)
29 void C_TimeoutCB(int, void * data)
31 xformsTimeout * to = static_cast<xformsTimeout *>(data);
38 xformsTimeout::xformsTimeout(Timeout & owner)
39 : Timeout::Impl(owner), timeout_id(-1)
43 void xformsTimeout::emitCB()
49 bool xformsTimeout::running() const
51 return timeout_id != -1;
55 void xformsTimeout::start()
58 lyxerr << "Timeout::start: already running!" << std::endl;
61 timeout_id = fl_add_timeout(timeout_ms(),
67 void xformsTimeout::stop()
70 fl_remove_timeout(timeout_id);
76 void xformsTimeout::reset()