summaryrefslogtreecommitdiff
path: root/FL/Fl.H
diff options
context:
space:
mode:
authorIan MacArthur <imacarthur@gmail.com>2016-01-28 17:16:32 +0000
committerIan MacArthur <imacarthur@gmail.com>2016-01-28 17:16:32 +0000
commit5aefd057d18c7ab21c62c876045fd11230b2c20a (patch)
tree9e990f35bcb922f40799496f4f587fe591263fc3 /FL/Fl.H
parented9ac2aba32892ea6b22b394c9670d860e6ed58b (diff)
Non-changing changes... Attempting to keep the porting branch somehwat in-sync with doc changes in main 1.3.x
None of these changes alter the actual code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11076 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl.H')
-rw-r--r--FL/Fl.H22
1 files changed, 13 insertions, 9 deletions
diff --git a/FL/Fl.H b/FL/Fl.H
index 79a6fcfe0..d882159db 100644
--- a/FL/Fl.H
+++ b/FL/Fl.H
@@ -434,15 +434,19 @@ public:
stdout with a fair degree of accuracy:
\code
- void callback(void*) {
- puts("TICK");
- Fl::repeat_timeout(1.0, callback);
- }
-
- int main() {
- Fl::add_timeout(1.0, callback);
- return Fl::run();
- }
+#include <stdio.h>
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+void callback(void*) {
+ printf("TICK\n");
+ Fl::repeat_timeout(1.0, callback); // retrigger timeout
+}
+int main() {
+ Fl_Window win(100,100);
+ win.show();
+ Fl::add_timeout(1.0, callback); // set up first timeout
+ return Fl::run();
+}
\endcode
*/
static void add_timeout(double t, Fl_Timeout_Handler,void* = 0); // platform dependent