commit f4d51fe22183963a4bf26b7ebc9b71c26d8e38d0 parent a03b7f0dc0839ec5a2e27f7c435533c42ba560d0 Author: Alexandre BIQUE <bique.alexandre@gmail.com> Date: Wed, 2 Jun 2021 22:15:23 +0200 Add check_for_update extension Diffstat:
A | include/clap/ext/draft/check-for-update.h | | | 32 | ++++++++++++++++++++++++++++++++ |
1 file changed, 32 insertions(+), 0 deletions(-)
diff --git a/include/clap/ext/draft/check-for-update.h b/include/clap/ext/draft/check-for-update.h @@ -0,0 +1,31 @@ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include "../../clap.h" + +#define CLAP_EXT_CHECK_FOR_UPDATE "clap/draft/check_for_update" + +typedef struct clap_check_for_update_info { + const char *version; + const char *release_date; // YYYY-MM-DD + const char *url; + + bool is_stable; +} clap_check_for_update_info; + +typedef struct clap_plugin_check_for_update { + // [main-thread] + void (*check)(const clap_host *host, bool include_beta); +} clap_plugin_check_for_update; + +typedef struct clap_host_check_for_update { + // [main-thread] + void (*on_new_version)(const clap_host *host, const clap_check_for_update_info *update_info); +} clap_host_check_for_update; + +#ifdef __cplusplus +} +#endif +\ No newline at end of file