clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 552bb31f999c5dc87f39a983c02abd117af781ba
parent f91062cb9a98eaf763ebb6e8d71e38deff05c942
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Sun,  9 May 2021 01:02:14 +0200

Work on the event loop

Diffstat:
Minclude/clap/ext/draft/event-loop.h | 14++++++++------
Minclude/clap/ext/gui-cocoa.h | 6+++---
Minclude/clap/ext/gui-free-standing.h | 2+-
Minclude/clap/ext/gui-win32.h | 2+-
Minclude/clap/ext/gui-x11.h | 2+-
5 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/include/clap/ext/draft/event-loop.h b/include/clap/ext/draft/event-loop.h @@ -15,6 +15,8 @@ typedef void *clap_fd; typedef int clap_fd; #endif +typedef uint32_t clap_timer_id; + enum { CLAP_FD_READ = 1 << 0, CLAP_FD_WRITE = 1 << 1, @@ -23,7 +25,7 @@ enum { typedef struct clap_plugin_event_loop { // [main-thread] - void (*on_timer)(clap_plugin *plugin, size_t timer_id); + void (*on_timer)(clap_plugin *plugin, clap_timer_id timer_id); // [main-thread] void (*on_fd)(clap_plugin *plugin, clap_fd fd, uint32_t flags); @@ -31,13 +33,13 @@ typedef struct clap_plugin_event_loop { typedef struct clap_host_event_loop { // [main-thread] - bool (*register_timer)(clap_host * host, - clap_plugin *plugin, - uint32_t period_ms, - uint32_t * timer_id); + bool (*register_timer)(clap_host * host, + clap_plugin * plugin, + uint32_t period_ms, + clap_timer_id *timer_id); // [main-thread] - bool (*unregister_timer)(clap_host *host, clap_plugin *plugin, uint32_t timer_id); + bool (*unregister_timer)(clap_host *host, clap_plugin *plugin, clap_timer_id timer_id); // [main-thread] bool (*register_fd)(clap_host *host, clap_plugin *plugin, clap_fd fd, uint32_t flags); diff --git a/include/clap/ext/gui-cocoa.h b/include/clap/ext/gui-cocoa.h @@ -6,12 +6,12 @@ extern "C" { #include "../clap.h" -#define CLAP_EXT_GUI_COCOA "clap/gui/cocoa" +#define CLAP_EXT_GUI_COCOA "clap/gui-cocoa" -typedef struct clap_plugin_embed_cocoa { +typedef struct clap_plugin_gui_cocoa { // [main-thread] bool (*attach)(clap_plugin *plugin, void *nsView); -} clap_plugin_embed_cocoa; +} clap_plugin_gui_cocoa; #ifdef __cplusplus } diff --git a/include/clap/ext/gui-free-standing.h b/include/clap/ext/gui-free-standing.h @@ -2,7 +2,7 @@ #include "../clap.h" -#define CLAP_EXT_GUI_FREE_STANDING "clap/gui/free-standing" +#define CLAP_EXT_GUI_FREE_STANDING "clap/gui-free-standing" #ifdef __cplusplus extern "C" { diff --git a/include/clap/ext/gui-win32.h b/include/clap/ext/gui-win32.h @@ -6,7 +6,7 @@ extern "C" { #endif -#define CLAP_EXT_GUI_WIN32 "clap/gui/win32" +#define CLAP_EXT_GUI_WIN32 "clap/gui-win32" // we don't want to include windows.h from this file. typedef void *clap_hwnd; diff --git a/include/clap/ext/gui-x11.h b/include/clap/ext/gui-x11.h @@ -2,7 +2,7 @@ #include "../clap.h" -#define CLAP_EXT_GUI_X11 "clap/gui/x11" +#define CLAP_EXT_GUI_X11 "clap/gui-x11" #ifdef __cplusplus extern "C" {