commit 3635053539feb212e20ddd7a4b9e17fd26ff3114
parent c028842acdba8daf766b5a0b9722c5659f803ec5
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Wed, 14 Jul 2021 10:19:15 +0200
Add clap_fd_flags for consistency
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/clap/ext/event-loop.h b/include/clap/ext/event-loop.h
@@ -17,17 +17,19 @@ typedef int clap_fd;
#endif
enum {
+ // IO events
CLAP_FD_READ = 1 << 0,
CLAP_FD_WRITE = 1 << 1,
CLAP_FD_ERROR = 1 << 2,
};
+typedef uint32_t clap_fd_flags;
typedef struct clap_plugin_event_loop {
// [main-thread]
void (*on_timer)(const clap_plugin *plugin, clap_id timer_id);
// [main-thread]
- void (*on_fd)(const clap_plugin *plugin, clap_fd fd, uint32_t flags);
+ void (*on_fd)(const clap_plugin *plugin, clap_fd fd, clap_fd_flags flags);
} clap_plugin_event_loop;
typedef struct clap_host_event_loop {
@@ -41,10 +43,10 @@ typedef struct clap_host_event_loop {
bool (*unregister_timer)(const clap_host *host, clap_id timer_id);
// [main-thread]
- bool (*register_fd)(const clap_host *host, clap_fd fd, uint32_t flags);
+ bool (*register_fd)(const clap_host *host, clap_fd fd, clap_fd_flags flags);
// [main-thread]
- bool (*modify_fd)(const clap_host *host, clap_fd fd, uint32_t flags);
+ bool (*modify_fd)(const clap_host *host, clap_fd fd, clap_fd_flags flags);
// [main-thread]
bool (*unregister_fd)(const clap_host *host, clap_fd fd);