Consolidate timeout handling across platforms (#379)

Add Fl_Timeout class

Move platform independent code of Fl::wait() to main part

- basic timeout handling
- Fl::run_checks()
- Fl::run_idle()
- Fl::idle()
- waiting time calculation (next timeout)
- remove platform dependent "screen driver" stuff
This commit is contained in:
Albrecht Schlosser
2022-01-31 22:27:17 +01:00
committed by GitHub
parent cf4a832e6a
commit 29d9e31c51
16 changed files with 719 additions and 500 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
//
// Main header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2021 by Bill Spitzak and others.
// Copyright 1998-2022 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -510,6 +510,7 @@ int main() {
static int has_check(Fl_Timeout_Handler, void* = 0);
static void remove_check(Fl_Timeout_Handler, void* = 0);
// private
static void run_idle();
static void run_checks();
static void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); // platform dependent
static void add_fd(int fd, Fl_FD_Handler cb, void* = 0); // platform dependent