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


Xfc::G::IOSource Class Reference

A input/output GSource C++ interface. More...

#include <xfc/glib/main.hh>

Inheritance diagram for Xfc::G::IOSource:

Xfc::G::Source Xfc::Trackable List of all members.

Public Types

Public Member Functions

Methods

Detailed Description

A input/output GSource C++ interface.

IOSource is a source that's dispatched when condition is met for the io channel. For example, if condition is G::IO_IN, the source will be dispatched when there's data available for reading. If the IOSlot returns false it is automatically removed from the list of event sources and will not be called again.

See also G::IOSignal.


Member Typedef Documentation

typedef sigc::slot<bool, IOConditionField> Xfc::G::IOSource::IOSlot

Signature of the callback slot to be called when the requested condition on a IOChannel is satisfied.

Example: Method signature for IOSlot.

< bool method(IOConditionField condition);
< // condition: The condition which has been satisfied.
< // return: The slot should return false if the event source should be removed.
<


Constructor & Destructor Documentation

Xfc::G::IOSource::IOSource ( G::IOChannel channel,
G::IOConditionField  condition 
)

Constructs a new io source that can be associated with any main context.

Parameters:
channel A G::IOChannel.
condition The condition to watch for.
G::Source::attach() must be called to attach the source to a context. To set the callback slot call set_callback(). To override the default priority PRIORITY_DEFAULT you can call set_priority().

Xfc::G::IOSource::IOSource ( G::IOChannel channel,
G::IOConditionField  condition,
const IOSlot slot 
)

Constructs a new io source that can be associated with any main context.

Parameters:
channel A G::IOChannel.
condition The condition to watch for.
slot The callback slot, of type sigc::slot<bool, IOChannel&, IOConditionField>.
G::Source::attach() must be called to attach the source to a context. To override the default priority PRIORITY_DEFAULT you can call set_priority().

Xfc::G::IOSource::IOSource ( G::IOChannel channel,
G::IOConditionField  condition 
)

Constructs a new io source that can be associated with any main context.

Parameters:
channel A G::IOChannel.
condition The condition to watch for.
G::Source::attach() must be called to attach the source to a context. To set the callback slot call set_callback(). To override the default priority PRIORITY_DEFAULT you can call set_priority().

Xfc::G::IOSource::IOSource ( G::IOChannel channel,
G::IOConditionField  condition,
const IOSlot slot 
)

Constructs a new io source that can be associated with any main context.

Parameters:
channel A G::IOChannel.
condition The condition to watch for.
slot The callback slot, of type sigc::slot<bool, IOChannel&, IOConditionField>.
G::Source::attach() must be called to attach the source to a context. To override the default priority PRIORITY_DEFAULT you can call set_priority().


Member Function Documentation

sigc::connection Xfc::G::IOSource::connect ( const IOSlot slot  ) 

Connects the callback slot to the io source.

Parameters:
slot The callback slot, of type sigc::slot<bool, IOConditionField>.


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