summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>1999-04-17 01:02:30 +0000
committerBill Spitzak <spitzak@gmail.com>1999-04-17 01:02:30 +0000
commit0e29799dda01961603e5dbd790681b0e0303f485 (patch)
tree39a464e73d39a660f5b7a93ee85340115dbd8b93 /FL
parent677604187378f4d3a85433963f97c4de34eea659 (diff)
Fl::add_fd() structures are dynamically allocated so you can listen to
as many connections as you want (up to the maximum number handled by select()). Fl::remove_fd(fd, when) added. This allows you to remove the read, write, and error callbacks individually. Fl::remove_fd(fd) does Fl::remove_fd(fd,-1). Fl::add_fd() calls Fl::remove_fd(), so it can be used safely to replace callbacks with new ones for the same file descriptor. Fl::add_timeout() also dynamically allocates it's array so there is no limit on the number of pending timeouts. I cut/pasted the changes into the Windoze version but this is UNTESTED! Somebody please do a test compile. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@544 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl.H7
1 files changed, 4 insertions, 3 deletions
diff --git a/FL/Fl.H b/FL/Fl.H
index b972c0aae..8eed4224b 100644
--- a/FL/Fl.H
+++ b/FL/Fl.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.H,v 1.8 1999/02/23 22:12:38 mike Exp $"
+// "$Id: Fl.H,v 1.8.2.1 1999/04/17 01:02:27 bill Exp $"
//
// Main header file for the Fast Light Tool Kit (FLTK).
//
@@ -89,8 +89,9 @@ public:
static FL_EXPORT Fl_Widget* readqueue();
static FL_EXPORT void add_timeout(double t,void (*cb)(void*),void* = 0);
static FL_EXPORT void remove_timeout(void (*cb)(void*), void* = 0);
- static FL_EXPORT void add_fd(int fd, int when, void (*cb)(int, void*), void* = 0);
+ static FL_EXPORT void add_fd(int fd, int when, void (*cb)(int,void*),void* =0);
static FL_EXPORT void add_fd(int fd, void (*cb)(int, void*), void* = 0);
+ static FL_EXPORT void remove_fd(int, int when);
static FL_EXPORT void remove_fd(int);
static FL_EXPORT void add_idle(void (*cb)(void*), void* = 0);
static FL_EXPORT void remove_idle(void (*cb)(void*), void* = 0);
@@ -204,5 +205,5 @@ public:
#endif
//
-// End of "$Id: Fl.H,v 1.8 1999/02/23 22:12:38 mike Exp $".
+// End of "$Id: Fl.H,v 1.8.2.1 1999/04/17 01:02:27 bill Exp $".
//