mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-23 00:11:49 +00:00
a4276f27f7
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6230 a592a061-630c-0410-9148-cb99ea01b6c8
49 lines
999 B
C++
49 lines
999 B
C++
// -*- C++ -*-
|
|
/**
|
|
* \file gnomeTimeout.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Baruch Even
|
|
*
|
|
* Full author contact details are available in file CREDITS
|
|
*/
|
|
#ifndef GNOMETIMEOUT_H
|
|
#define GNOMETIMEOUT_H
|
|
|
|
#include "frontends/Timeout.h"
|
|
#include "glib.h" // for gint
|
|
|
|
#include <sigc++/sigc++.h>
|
|
|
|
|
|
/**
|
|
* This class executes the callback when the timeout expires
|
|
* using Gnome mechanisms
|
|
*/
|
|
struct gnomeTimeout : public SigC::Object, public Timeout::Impl {
|
|
public:
|
|
///
|
|
gnomeTimeout(Timeout * owner_);
|
|
/// start the timer
|
|
void start();
|
|
/// stop the timer
|
|
void stop();
|
|
/// reset
|
|
void reset();
|
|
/// Is the timer running?
|
|
bool running() const;
|
|
|
|
|
|
public:
|
|
/// The timeout signal, this gets called when the timeout passed.
|
|
bool timeoutEvent();
|
|
private:
|
|
/// Timer connection
|
|
SigC::Connection conn_;
|
|
/// Used for running as SigC::Connection::connected() isn't const
|
|
bool running_;
|
|
};
|
|
|
|
#endif // GNOMETIMEOUT
|