mirror of
https://github.com/neovim/neovim.git
synced 2026-04-04 22:59:36 +00:00
`lib/queue.h` implements a basic queue. `event/queue.c` implements a specialized data structure on top of lib/queue.h; it is not a "normal" queue. Rename the specialized multi-level queue implemented in event/queue.c to "multiqueue", to avoid confusion when reading the code. Before this change one can eventually notice that "macros (uppercase symbols) are for the normal queue, lowercase operations are for the multi-level queue", but that is unnecessary friction for new developers (or existing developers just visiting this part of the codebase).
23 lines
433 B
C
23 lines
433 B
C
#ifndef NVIM_EVENT_TIME_H
|
|
#define NVIM_EVENT_TIME_H
|
|
|
|
#include <uv.h>
|
|
|
|
#include "nvim/event/loop.h"
|
|
|
|
typedef struct time_watcher TimeWatcher;
|
|
typedef void (*time_cb)(TimeWatcher *watcher, void *data);
|
|
|
|
struct time_watcher {
|
|
uv_timer_t uv;
|
|
void *data;
|
|
time_cb cb, close_cb;
|
|
MultiQueue *events;
|
|
bool blockable;
|
|
};
|
|
|
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
|
# include "event/time.h.generated.h"
|
|
#endif
|
|
#endif // NVIM_EVENT_TIME_H
|