mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
fdm: use the FDM's poll loop
This commit is contained in:
parent
293adbb295
commit
5fefb950b3
5 changed files with 409 additions and 202 deletions
15
fdm.h
Normal file
15
fdm.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
struct fdm;
|
||||
|
||||
typedef bool (*fdm_handler_t)(struct fdm *fdm, int fd, int events, void *data);
|
||||
|
||||
struct fdm *fdm_init(void);
|
||||
void fdm_destroy(struct fdm *fdm);
|
||||
|
||||
bool fdm_add(struct fdm *fdm, int fd, int events, fdm_handler_t handler, void *data);
|
||||
bool fdm_del(struct fdm *fdm, int fd);
|
||||
|
||||
bool fdm_poll(struct fdm *fdm);
|
||||
Loading…
Add table
Add a link
Reference in a new issue