NetSurf
|
#include <glib.h>
#include <stdlib.h>
#include <stdbool.h>
#include "utils/errors.h"
#include "utils/log.h"
#include "gtk/schedule.h"
Go to the source code of this file.
Data Structures | |
struct | _nsgtk_callback_t |
Killable callback closure embodiment. More... | |
Functions | |
static gboolean | nsgtk_schedule_generic_callback (gpointer data) |
static void | nsgtk_schedule_kill_callback (void *_target, void *_match) |
static nserror | schedule_remove (void(*callback)(void *p), void *cbctx) |
remove a matching callback and context tuple from all lists More... | |
nserror | nsgtk_schedule (int t, void(*callback)(void *p), void *cbctx) |
bool | schedule_run (void) |
Process events up to current time. More... | |
Variables | |
static GList * | pending_callbacks = NULL |
List of callbacks which have occurred and are pending running. More... | |
static GList * | queued_callbacks = NULL |
List of callbacks which are queued to occur in the future. More... | |
static GList * | this_run = NULL |
List of callbacks which are about to be run in this schedule_run. More... | |
nserror nsgtk_schedule | ( | int | t, |
void(*)(void *p) | callback, | ||
void * | cbctx | ||
) |
Definition at line 103 of file schedule.c.
References _nsgtk_callback_t::callback, _nsgtk_callback_t::callback_killed, _nsgtk_callback_t::context, NSERROR_OK, nsgtk_schedule_generic_callback(), queued_callbacks, and schedule_remove().
Referenced by gui_window_destroy(), next_throbber_frame(), nsgtk_toolbar_throbber(), throbber(), and toolbar_destroy_cb().
|
static |
Definition at line 44 of file schedule.c.
References _nsgtk_callback_t::callback_killed, NSLOG, pending_callbacks, and queued_callbacks.
Referenced by nsgtk_schedule().
|
static |
Definition at line 57 of file schedule.c.
References _nsgtk_callback_t::callback, _nsgtk_callback_t::callback_killed, _nsgtk_callback_t::context, and NSLOG.
Referenced by schedule_remove().
|
static |
remove a matching callback and context tuple from all lists
callback | The callback to match |
cbctx | The callback context to match |
Definition at line 81 of file schedule.c.
References _nsgtk_callback_t::callback, _nsgtk_callback_t::callback_killed, NSERROR_NOT_FOUND, NSERROR_OK, nsgtk_schedule_kill_callback(), pending_callbacks, queued_callbacks, and this_run.
Referenced by nsgtk_schedule().
bool schedule_run | ( | void | ) |
Process events up to current time.
Process scheduled callbacks up to current time.
Definition at line 128 of file schedule.c.
References _nsgtk_callback_t::callback, _nsgtk_callback_t::callback_killed, _nsgtk_callback_t::context, NSLOG, pending_callbacks, and this_run.
|
static |
List of callbacks which have occurred and are pending running.
Definition at line 37 of file schedule.c.
Referenced by nsgtk_schedule_generic_callback(), schedule_remove(), and schedule_run().
|
static |
List of callbacks which are queued to occur in the future.
Definition at line 39 of file schedule.c.
Referenced by nsgtk_schedule(), nsgtk_schedule_generic_callback(), and schedule_remove().
|
static |
List of callbacks which are about to be run in this schedule_run.
Definition at line 41 of file schedule.c.
Referenced by schedule_remove(), and schedule_run().