From b1bb7bfab65b6076f46eed4fc239877e9f93d022 Mon Sep 17 00:00:00 2001 From: Paolo Marrone Date: Thu, 29 Aug 2024 16:57:41 +0200 Subject: [PATCH] remove old callbacks.h usages --- templates/android/tibia-index.js | 1 - templates/cmd/tibia-index.js | 1 - templates/common/callbacks.h | 24 ------------------------ templates/common/src/plugin_api.h | 24 ++++++++++++++---------- templates/daisy-seed/tibia-index.js | 1 - templates/ios/tibia-index.js | 1 - templates/lv2/tibia-index.js | 1 - templates/vst3/tibia-index.js | 1 - templates/web/tibia-index.js | 1 - 9 files changed, 14 insertions(+), 41 deletions(-) delete mode 100644 templates/common/callbacks.h diff --git a/templates/android/tibia-index.js b/templates/android/tibia-index.js index 9e394fe..fedbe9e 100644 --- a/templates/android/tibia-index.js +++ b/templates/android/tibia-index.js @@ -28,5 +28,4 @@ module.exports = function (data, api) { api.generateFileFromTemplateFile(`src${sep}MainActivity.java`, `src${sep}MainActivity.java`, data); api.generateFileFromTemplateFile(`src${sep}index.html`, `src${sep}index.html`, data); api.copyFile(`..${sep}common${sep}fatica.h`, `src${sep}fatica.h`); - api.copyFile(`..${sep}common${sep}callbacks.h`, `src${sep}callbacks.h`); }; diff --git a/templates/cmd/tibia-index.js b/templates/cmd/tibia-index.js index 3e057b7..aecdbbc 100644 --- a/templates/cmd/tibia-index.js +++ b/templates/cmd/tibia-index.js @@ -24,5 +24,4 @@ var sep = path.sep; module.exports = function (data, api) { api.generateFileFromTemplateFile(`src${sep}data.h`, `src${sep}data.h`, data); api.copyFile(`src${sep}main.c`, `src${sep}main.c`); - api.copyFile(`..${sep}common${sep}callbacks.h`, `src${sep}callbacks.h`); }; diff --git a/templates/common/callbacks.h b/templates/common/callbacks.h deleted file mode 100644 index d48e47b..0000000 --- a/templates/common/callbacks.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef TIBIA_CALLBACKS_H -#define TIBIA_CALLBACKS_H - -#include - -typedef struct { - void *handle; - const char *format; - const char *(*get_bindir)(void *handle); - const char *(*get_datadir)(void *handle); -} plugin_callbacks; - -typedef struct { - void *handle; - const char *format; - - const char *(*get_bindir) (void *handle); - const char *(*get_datadir) (void *handle); - void (*set_parameter_begin)(void *handle, size_t index); - void (*set_parameter) (void *handle, size_t index, float value); - void (*set_parameter_end) (void *handle, size_t index); -} plugin_ui_callbacks; - -#endif diff --git a/templates/common/src/plugin_api.h b/templates/common/src/plugin_api.h index dcd696b..28f7ca2 100644 --- a/templates/common/src/plugin_api.h +++ b/templates/common/src/plugin_api.h @@ -21,21 +21,25 @@ #ifndef PLUGIN_API_H #define PLUGIN_API_H +#include + typedef struct { - void * handle; - const char * format; - const char * (*get_bindir)(void *handle); + void *handle; + const char *format; + + const char * (*get_bindir) (void *handle); const char * (*get_datadir)(void *handle); } plugin_callbacks; typedef struct { - void * handle; - const char * format; - const char * (*get_bindir)(void *handle); - const char * (*get_datadir)(void *handle); - void (*set_parameter_begin)(void *handle, size_t index); - void (*set_parameter)(void *handle, size_t index, float value); - void (*set_parameter_end)(void *handle, size_t index); + void *handle; + const char *format; + + const char * (*get_bindir) (void *handle); + const char * (*get_datadir) (void *handle); + void (*set_parameter_begin)(void *handle, size_t index); + void (*set_parameter) (void *handle, size_t index, float value); + void (*set_parameter_end) (void *handle, size_t index); } plugin_ui_callbacks; {{?it.product.parameters.length > 0}} diff --git a/templates/daisy-seed/tibia-index.js b/templates/daisy-seed/tibia-index.js index 3d5dc9c..7826d36 100644 --- a/templates/daisy-seed/tibia-index.js +++ b/templates/daisy-seed/tibia-index.js @@ -24,5 +24,4 @@ var sep = path.sep; module.exports = function (data, api) { api.generateFileFromTemplateFile(`src${sep}data.h`, `src${sep}data.h`, data); api.copyFile(`src${sep}main.cpp`, `src${sep}main.cpp`); - api.copyFile(`..${sep}common${sep}callbacks.h`, `src${sep}callbacks.h`); }; diff --git a/templates/ios/tibia-index.js b/templates/ios/tibia-index.js index 771aaba..093fb72 100644 --- a/templates/ios/tibia-index.js +++ b/templates/ios/tibia-index.js @@ -28,5 +28,4 @@ module.exports = function (data, api) { api.copyFile(`src${sep}app-Bridging-Header.h`, `src${sep}app-Bridging-Header.h`); api.copyFile(`src${sep}app.swift`, `src${sep}app.swift`, data); api.copyFile(`..${sep}common${sep}fatica.h`, `src${sep}fatica.h`); - api.copyFile(`..${sep}common${sep}callbacks.h`, `src${sep}callbacks.h`); }; diff --git a/templates/lv2/tibia-index.js b/templates/lv2/tibia-index.js index 10fa359..5dd3a3a 100644 --- a/templates/lv2/tibia-index.js +++ b/templates/lv2/tibia-index.js @@ -123,5 +123,4 @@ module.exports = function (data, api, outputCommon, outputData) { api.copyFile(`src${sep}lv2.c`, `src${sep}lv2.c`); api.generateFileFromTemplateFile(`src${sep}data.h`, `src${sep}data.h`, data); api.copyFile(`..${sep}common${sep}fatica.h`, `src${sep}fatica.h`); - api.copyFile(`..${sep}common${sep}callbacks.h`, `src${sep}callbacks.h`); }; diff --git a/templates/vst3/tibia-index.js b/templates/vst3/tibia-index.js index 40f4956..edf0284 100644 --- a/templates/vst3/tibia-index.js +++ b/templates/vst3/tibia-index.js @@ -68,5 +68,4 @@ module.exports = function (data, api, outputCommon, outputData) { api.copyFile(`src${sep}vst3.c`, `src${sep}vst3.c`); api.generateFileFromTemplateFile(`src${sep}data.h`, `src${sep}data.h`, data); api.copyFile(`..${sep}common${sep}fatica.h`, `src${sep}fatica.h`); - api.copyFile(`..${sep}common${sep}callbacks.h`, `src${sep}callbacks.h`); }; diff --git a/templates/web/tibia-index.js b/templates/web/tibia-index.js index 775c97e..6428f42 100644 --- a/templates/web/tibia-index.js +++ b/templates/web/tibia-index.js @@ -31,5 +31,4 @@ module.exports = function (data, api) { api.generateFileFromTemplateFile(`src${sep}data.h`, `src${sep}data.h`, data); api.generateFileFromTemplateFile(`src${sep}processor.js`, `src${sep}processor.js`, data); api.generateFileFromTemplateFile(`src${sep}module.js`, `src${sep}module.js`, data); - api.copyFile(`..${sep}common${sep}callbacks.h`, `src${sep}callbacks.h`); };