Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::G::TimeoutSignal Class Reference

A Timeout signal class. More...

#include <xfc/main.hh>

List of all members.

Public Types

Public Member Functions


Detailed Description

A Timeout signal class.

Timeout signal is a convenience class that lets you connect a callback slot to the default main context. If your using a different context, for example, inside a thread, you should use TimeoutSource instead. If the slot returns false the timeout source will be removed.


Member Function Documentation

sigc::connection Xfc::G::TimeoutSignal::connect const SlotType slot,
unsigned int  interval,
int  priority = PRIORITY_DEFAULT
 

Sets a callback slot to be called at regular intervals, with the given priority.

Parameters:
slot The sigc::slot to call periodically.
interval The time between calls to the function, in milliseconds.
priority The priority of the timeout source.
Returns:
A sigc::connection object that can be used to break or alter the connection.
The slot is called repeatedly until it returns false, at which point the timeout is automatically destroyed and the function will not be called again. Note that timeout functions may be delayed, due to the processing of other event sources. Thus they should not be relied on for precise timing. After each call to the timeout function, the time of the next timeout is recalculated based on the current time and the given interval (it does not try to 'catch up' time lost in delays).


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3