diff options
| author | Bill Spitzak <spitzak@gmail.com> | 2000-06-16 07:28:03 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 2000-06-16 07:28:03 +0000 |
| commit | 4dd096e7b52301663ddaa002984e10cb83d97b9a (patch) | |
| tree | cf147534bff0f11532f289c7650c9b797457d7c9 /src/Fl.cxx | |
| parent | 084b19e305eccead76c2322d1533af526684ed6b (diff) | |
Added has_timeout() and has_idle() calls as suggested by Eric Sven Ristad.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1214 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 73fa187bb..4792db339 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.25 2000/06/10 21:30:59 bill Exp $" +// "$Id: Fl.cxx,v 1.24.2.26 2000/06/16 07:28:02 bill Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -102,6 +102,12 @@ void Fl::add_timeout(double t, Fl_Timeout_Handler cb, void *v) { numtimeouts++; } +int Fl::has_timeout(void (*cb)(void *), void *v) { + for (int i=0; i<numtimeouts; i++) + if (timeout[i].cb == cb && timeout[i].arg==v) return 1; + return 0; +} + void Fl::remove_timeout(Fl_Timeout_Handler cb, void *v) { int i,j; for (i=j=0; i<numtimeouts; i++) { @@ -721,5 +727,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.25 2000/06/10 21:30:59 bill Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.26 2000/06/16 07:28:02 bill Exp $". // |
