NetSurf
Data Structures | Macros | Functions | Variables
schedule.cpp File Reference
#include <stdlib.h>
#include <stdbool.h>
#include <OS.h>
#include <List.h>
#include "utils/errors.h"
#include "beos/schedule.h"
#include "netsurf/content_type.h"
#include "netsurf/browser_window.h"
#include "utils/log.h"
Include dependency graph for schedule.cpp:

Go to the source code of this file.

Data Structures

struct  _nsbeos_callback_t
 Killable callback closure embodiment. More...
 

Macros

#define __STDBOOL_H__   1
 

Functions

static bool nsbeos_schedule_kill_callback (void *_target, void *_match)
 
static void schedule_remove (void(*callback)(void *p), void *p)
 
nserror beos_schedule (int t, void(*callback)(void *p), void *p)
 
bool schedule_run (void)
 Process events up to current time. More...
 

Variables

static BList * callbacks = NULL
 List of all callbacks. More...
 
bigtime_t earliest_callback_timeout = B_INFINITE_TIMEOUT
 earliest deadline. More...
 

Macro Definition Documentation

◆ __STDBOOL_H__

#define __STDBOOL_H__   1

Definition at line 19 of file schedule.cpp.

Function Documentation

◆ beos_schedule()

nserror beos_schedule ( int  t,
void(*)(void *p)  callback,
void *  p 
)

Definition at line 83 of file schedule.cpp.

References _nsbeos_callback_t::callback, _nsbeos_callback_t::callback_fired, _nsbeos_callback_t::callback_killed, callbacks, _nsbeos_callback_t::context, earliest_callback_timeout, NSERROR_OK, NSLOG, schedule_remove(), and _nsbeos_callback_t::timeout.

Referenced by gui_window_start_throbber(), gui_window_stop_throbber(), and nsbeos_throb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsbeos_schedule_kill_callback()

static bool nsbeos_schedule_kill_callback ( void *  _target,
void *  _match 
)
static

Definition at line 51 of file schedule.cpp.

References _nsbeos_callback_t::callback, _nsbeos_callback_t::callback_killed, _nsbeos_callback_t::context, and NSLOG.

Referenced by schedule_remove().

Here is the caller graph for this function:

◆ schedule_remove()

static void schedule_remove ( void(*)(void *p)  callback,
void *  p 
)
static

Definition at line 69 of file schedule.cpp.

References _nsbeos_callback_t::callback, callbacks, _nsbeos_callback_t::context, nsbeos_schedule_kill_callback(), and NSLOG.

Referenced by beos_schedule().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ schedule_run()

bool schedule_run ( void  )

Process events up to current time.

Process scheduled callbacks up to current time.

Returns
The number of miliseconds until the next scheduled event.

Definition at line 113 of file schedule.cpp.

References _nsbeos_callback_t::callback, _nsbeos_callback_t::callback_killed, callbacks, _nsbeos_callback_t::context, earliest_callback_timeout, NSLOG, and _nsbeos_callback_t::timeout.

Variable Documentation

◆ callbacks

BList* callbacks = NULL
static

List of all callbacks.

Definition at line 44 of file schedule.cpp.

Referenced by atari_treeview_create(), beos_schedule(), ro_toolbar_create(), schedule_remove(), schedule_run(), and treeview_create().

◆ earliest_callback_timeout

bigtime_t earliest_callback_timeout = B_INFINITE_TIMEOUT

earliest deadline.

It's used for select() in gui_poll()

Definition at line 47 of file schedule.cpp.

Referenced by beos_schedule(), nsbeos_gui_poll(), and schedule_run().