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"
20 Timeout::Timeout(unsigned int msec, Type t)
21 : pimpl_(new lyx::frontend::xformsTimeout(*this)),
22 type(t), timeout_ms(msec)
32 void C_TimeoutCB(int, void * data)
34 xformsTimeout * to = static_cast<xformsTimeout *>(data);
41 xformsTimeout::xformsTimeout(Timeout & owner)
42 : Timeout::Impl(owner), timeout_id(-1)
46 void xformsTimeout::emitCB()
52 bool xformsTimeout::running() const
54 return timeout_id != -1;
58 void xformsTimeout::start()
61 lyxerr << "Timeout::start: already running!" << std::endl;
64 timeout_id = fl_add_timeout(timeout_ms(),
70 void xformsTimeout::stop()
73 fl_remove_timeout(timeout_id);
79 void xformsTimeout::reset()
84 } // namespace frontend