2 * \file xformsTimeout.C
3 * Copyright 2001 LyX Team
6 * \author Lars Gullik Bjønnes
8 * \author Angus Leeming
13 #include "xformsTimeout.h"
16 #include FORMS_H_LOCATION
19 Timeout::Timeout(unsigned int msec, Type t)
20 : pimpl_(new xformsTimeout(*this)), type(t), timeout_ms(msec)
27 void C_TimeoutCB(int, void * data)
29 xformsTimeout * to = static_cast<xformsTimeout *>(data);
36 xformsTimeout::xformsTimeout(Timeout & owner)
37 : Timeout::Impl(owner), timeout_id(-1)
41 void xformsTimeout::emitCB()
47 bool xformsTimeout::running() const
49 return timeout_id != -1;
53 void xformsTimeout::start()
56 lyxerr << "Timeout::start: already running!" << std::endl;
59 timeout_id = fl_add_timeout(timeout_ms(),
65 void xformsTimeout::stop()
68 fl_remove_timeout(timeout_id);
74 void xformsTimeout::reset()