|
Rapicorn - Experimental UI Toolkit - Source Code
13.07.0
|
EventLoop source for IO callbacks. More...
#include <loop.hh>
Inherits Rapicorn::EventLoop::Source.
Public Member Functions | |
| PollFDSource (const BPfdSlot &slot, int fd, const String &mode) | |
| PollFDSource (const VPfdSlot &slot, int fd, const String &mode) | |
Protected Member Functions | |
| void | construct (const String &mode) |
| virtual bool | prepare (const State &state, int64 *timeout_usecs_p) |
| Prepare the source for dispatching (true return) or polling (false). | |
| virtual bool | check (const State &state) |
| Check the source and its PollFD descriptors for dispatching (true return). | |
| virtual bool | dispatch (const State &state) |
| Dispatch source, returns if it should be kept alive. | |
| virtual void | destroy () |
Protected Attributes | |
| PollFD | pfd_ |
| uint | ignore_errors_: 1 |
| uint | ignore_hangup_: 1 |
| uint | never_close_: 1 |
EventLoop source for IO callbacks.
A PollFDSource can be used to execute a callback function from the main loop, depending on certain file descriptor states.
The modes supported for polling the file descriptor are as follows:
"w" - poll writable "r" - poll readable "p" - poll urgent redable "b" - set fd blocking "B" - set fd non-blocking "E" - ignore erros (or auto destroy) "H" - ignore hangup (or auto destroy) "C" - prevent auto close on destroy
1.7.6.1