glibmm 2.78.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Glib::TimeoutSource Class Reference

#include <glibmm/main.h>

Inheritance diagram for Glib::TimeoutSource:
Inheritance graph

Public Types

using CppObjectType = Glib::TimeoutSource
- Public Types inherited from Glib::Source
using CppObjectType = Glib::Source
using BaseObjectType = GSource

Public Member Functions

sigc::connection connect (const sigc::slot< bool()> & slot)
- Public Member Functions inherited from Glib::Source
 Source (const Source &)=delete
Sourceoperator= (const Source &)=delete
unsigned int attach (const Glib::RefPtr< MainContext > & context)
 Adds a Source to a context so that it will be executed within that context. More...
unsigned int attach ()
 Adds a Source to a context so that it will be executed within that context. More...
void destroy ()
 Removes a source from its MainContext, if any, and marks it as destroyed. More...
void set_priority (int priority)
 Sets the priority of a source. More...
int get_priority () const
 Gets the priority of a source. More...
void set_can_recurse (bool can_recurse)
 Sets whether a source can be called recursively. More...
bool get_can_recurse () const
 Checks whether a source is allowed to be called recursively. More...
unsigned int get_id () const
 Returns the numeric ID for a particular source. More...
Glib::RefPtr< MainContextget_context ()
 Gets the MainContext with which the source is associated. More...
GSource * gobj ()
const GSource * gobj () const
GSource * gobj_copy () const
void reference () const
void unreference () const

Static Public Member Functions

static Glib::RefPtr< TimeoutSourcecreate (unsigned int interval)
- Static Public Member Functions inherited from Glib::Source
static Glib::RefPtr< Sourcecreate ()

Protected Member Functions

 TimeoutSource (unsigned int interval)
 ~TimeoutSource () noexcept override
bool prepare (int & timeout) override
bool check () override
bool dispatch (sigc::slot_base * slot) override
- Protected Member Functions inherited from Glib::Source
 Source ()
 Construct an object that uses the virtual functions prepare(), check() and dispatch(). More...
 Source (GSource * cast_item, GSourceFunc callback_func)
 Wrap an existing GSource object and install the given callback function. More...
virtual ~Source () noexcept
sigc::connection connect_generic (const sigc::slot_base & slot)
void add_poll (PollFD & poll_fd)
 Adds a file descriptor to the set of file descriptors polled for this source. More...
void remove_poll (PollFD & poll_fd)
 Removes a file descriptor from the set of file descriptors polled for this source. More...
gint64 get_time () const
 Gets the time to be used when checking this source. More...
virtual bool prepare (int & timeout)=0
virtual bool check ()=0
virtual bool dispatch (sigc::slot_base * slot)=0

Member Typedef Documentation

◆ CppObjectType

Constructor & Destructor Documentation

◆ TimeoutSource()

Glib::TimeoutSource::TimeoutSource ( unsigned int  interval)

◆ ~TimeoutSource()

Glib::TimeoutSource::~TimeoutSource ( )

Member Function Documentation

◆ check()

bool Glib::TimeoutSource::check ( )

Implements Glib::Source.

◆ connect()

sigc::connection Glib::TimeoutSource::connect ( const sigc::slot< bool()> &  slot)

◆ create()

static Glib::RefPtr< TimeoutSource > Glib::TimeoutSource::create ( unsigned int  interval)

◆ dispatch()

bool Glib::TimeoutSource::dispatch ( sigc::slot_base *  slot)

Implements Glib::Source.

◆ prepare()

bool Glib::TimeoutSource::prepare ( int &  timeout)

Implements Glib::Source.