2 * \file Timeout_pimpl.C
3 * Copyright 2001 LyX Team
6 * \author Lars Gullik Bjønnes
12 #include FORMS_H_LOCATION
15 #pragma implementation
18 #include "Timeout_pimpl.h"
28 void C_intern_timeout_cb(int, void * data)
30 Timeout * to = static_cast<Timeout *>(data);
39 Timeout::Pimpl::Pimpl(Timeout * owner)
40 : owner_(owner), timeout_id(-1)
45 void Timeout::Pimpl::reset()
51 bool Timeout::Pimpl::running() const
53 return timeout_id != -1;
57 void Timeout::Pimpl::start()
60 lyxerr << "Timeout::start: already running!" << endl;
61 timeout_id = fl_add_timeout(owner_->timeout_ms,
62 C_intern_timeout_cb, owner_);
66 void Timeout::Pimpl::stop()
68 if (timeout_id != -1) {
69 fl_remove_timeout(timeout_id);