Google

logo top
Main Page   Widgets   Namespaces   Book  

Glib::SignalIO Class Reference
[The Main Event Loop]

List of all members.

Public Methods

SigC::Connection connect (const SigC::Slot1<bool, IOCondition>& slot, int fd, IOCondition condition, int priority=PRIORITY_DEFAULT)
 Connects an I/O handler.

SigC::Connection connect (const SigC::Slot1<bool, IOCondition>& slot, const Glib::RefPtr<IOChannel>& channel, IOCondition condition, int priority=PRIORITY_DEFAULT)
 Connects an I/O channel.


Member Function Documentation

SigC::Connection Glib::SignalIO::connect ( const SigC::Slot1<bool, IOCondition>&    slot,
const Glib::RefPtr<IOChannel>&    channel,
IOCondition    condition,
int    priority = PRIORITY_DEFAULT
 

Connects an I/O channel.

 Glib::signal_io().connect(SigC::slot(&io_handler), channel, Glib::IO_IN | Glib::IO_HUP);
 
is equivalent to:
 const Glib::RefPtr<Glib::IOSource> io_source = Glib::IOSource::create(channel, Glib::IO_IN | Glib::IO_HUP);
 io_source->connect(SigC::slot(&io_handler));
 io_source->attach(Glib::MainContext::get_default());
 
Parameters:
slot A 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 signal is disconnected.
channel The IOChannel object to watch.
condition The conditions to watch for.
priority The 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::Slot1<bool, IOCondition>&    slot,
int    fd,
IOCondition    condition,
int    priority = PRIORITY_DEFAULT
 

Connects an I/O handler.

 Glib::signal_io().connect(SigC::slot(&io_handler), fd, Glib::IO_IN | Glib::IO_HUP);
 
is equivalent to:
 const Glib::RefPtr<Glib::IOSource> io_source = Glib::IOSource::create(fd, Glib::IO_IN | Glib::IO_HUP);
 io_source->connect(SigC::slot(&io_handler));
 io_source->attach(Glib::MainContext::get_default());
 
Parameters:
slot A 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 signal is disconnected.
fd The file descriptor (or a HANDLE on Win32 systems) to watch.
condition The conditions to watch for.
priority The priority of the new event source.
Returns:
A connection handle, which can be used to disconnect the handler.


The documentation for this class was generated from the following file:
Generated for gtkmm by Doxygen 1.3-rc1 © 1997-2001