glibmm  2.33.12
Public Member Functions
Glib::SignalIO Class Reference

#include <glibmm/main.h>

List of all members.

Public Member Functions

sigc::connection connect (const sigc::slot< bool, IOCondition >& slot, int fd, IOCondition condition, int priority=PRIORITY_DEFAULT)
 Connects an I/O handler that watches a file descriptor.
sigc::connection connect (const sigc::slot< bool, IOCondition >& slot, const Glib::RefPtr< IOChannel >& channel, IOCondition condition, int priority=PRIORITY_DEFAULT)
 Connects an I/O handler that watches an I/O channel.

Member Function Documentation

sigc::connection Glib::SignalIO::connect ( const sigc::slot< bool, IOCondition >&  slot,
int  fd,
IOCondition  condition,
int  priority = PRIORITY_DEFAULT 
)

Connects an I/O handler that watches a file descriptor.

bool io_handler(Glib::IOCondition io_condition) { ... }

is equivalent to:

bool io_handler(Glib::IOCondition io_condition) { ... }
io_source->connect(sigc::ptr_fun(&io_handler));
Parameters:
slotA slot to call when polling fd results in an event that matches condition. The event will be passed as a parameter to slot. If io_handler() returns false the handler is disconnected.
fdThe file descriptor (or a HANDLE on Win32 systems) to watch.
conditionThe conditions to watch for.
priorityThe priority of the new event source.
Returns:
A connection handle, which can be used to disconnect the handler.
sigc::connection Glib::SignalIO::connect ( const sigc::slot< bool, IOCondition >&  slot,
const Glib::RefPtr< IOChannel >&  channel,
IOCondition  condition,
int  priority = PRIORITY_DEFAULT 
)

Connects an I/O handler that watches an I/O channel.

bool io_handler(Glib::IOCondition io_condition) { ... }

is equivalent to:

bool io_handler(Glib::IOCondition io_condition) { ... }
io_source->connect(sigc::ptr_fun(&io_handler));
Parameters:
slotA slot to call when polling channel results in an event that matches condition. The event will be passed as a parameter to slot. If io_handler() returns false the handler is disconnected.
channelThe IOChannel object to watch.
conditionThe conditions to watch for.
priorityThe priority of the new event source.
Returns:
A connection handle, which can be used to disconnect the handler.