Dillo v3.2.0-143-gabad1053
Loading...
Searching...
No Matches
timeout.cc
Go to the documentation of this file.
1/*
2 * File: timeout.cc
3 *
4 * Copyright (C) 2005-2007 Jorge Arellano Cid <jcid@dillo.org>
5 * Copyright (C) 2025 Rodrigo Arias Mallo <rodarima@gmail.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 */
12
17#include <FL/Fl.H>
18#include "timeout.hh"
19
20// C++ functions with C linkage ----------------------------------------------
21
26void a_Timeout_add(float t, TimeoutCb_t cb, void *cbdata)
27{
28 Fl::add_timeout(t, cb, cbdata);
29}
30
34void a_Timeout_repeat(float t, TimeoutCb_t cb, void *cbdata)
35{
36 Fl::add_timeout(t, cb, cbdata);
37}
38
43{
44 /* in FLTK, timeouts run one time by default */
45 /* WTF? FIXME */
46}
47
48/* Remove timeout, data == NULL removes all matching cb only */
50{
51 Fl::remove_timeout(cb, data);
52}
void a_Timeout_repeat(float t, TimeoutCb_t cb, void *cbdata)
To be called from inside the 'cb' function when it wants to keep running.
Definition timeout.cc:34
void a_Timeout_add(float t, TimeoutCb_t cb, void *cbdata)
Hook a one-time timeout function 'cb' after 't' seconds with 'cbdata" as its data.
Definition timeout.cc:26
void a_Timeout_remove()
Stop running a timeout function.
Definition timeout.cc:42
void a_Timeout_actually_remove(TimeoutCb_t cb, void *data)
Definition timeout.cc:49
void(* TimeoutCb_t)(void *data)
Definition timeout.hh:20