callback definitions are now in common

This commit is contained in:
Paolo Marrone 2024-07-26 10:57:51 +02:00
parent 91049ee490
commit 76e1b4bd8a
15 changed files with 38 additions and 65 deletions

View File

@ -21,12 +21,7 @@
#include <stdlib.h>
#include <stdint.h>
typedef struct {
void *handle;
const char *format;
const char *(*get_bindir)(void *handle);
const char *(*get_datadir)(void *handle);
} plugin_callbacks;
#include "callbacks.h"
#include "data.h"
#include "plugin.h"

View File

@ -28,4 +28,5 @@ 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`);
};

View File

@ -21,12 +21,7 @@
#include <stdlib.h>
#include <stdint.h>
typedef struct {
void * handle;
const char * format;
const char * (*get_bindir)(void *handle);
const char * (*get_datadir)(void *handle);
} plugin_callbacks;
#include "callbacks.h"
#include "data.h"
#include "plugin.h"

View File

@ -24,4 +24,5 @@ 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`);
};

View File

@ -0,0 +1,22 @@
#ifndef TIBIA_CALLBACKS_H
#define TIBIA_CALLBACKS_H
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

View File

@ -21,12 +21,7 @@
#include <stdlib.h>
#include <stdint.h>
typedef struct {
void * handle;
const char * format;
const char * (*get_bindir)(void *handle);
const char * (*get_datadir)(void *handle);
} plugin_callbacks;
#include "callbacks.h"
#include "data.h"
#include "plugin.h"

View File

@ -24,4 +24,5 @@ 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`);
};

View File

@ -21,12 +21,7 @@
#include <stdlib.h>
#include <stdint.h>
typedef struct {
void *handle;
const char *format;
const char *(*get_bindir)(void *handle);
const char *(*get_datadir)(void *handle);
} plugin_callbacks;
#include "callbacks.h"
#include "data.h"
#include "plugin.h"

View File

@ -28,4 +28,5 @@ 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`);
};

View File

@ -21,23 +21,7 @@
#include <stdlib.h>
#include <stdint.h>
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;
#include "callbacks.h"
#include "data.h"
#pragma GCC diagnostic push

View File

@ -121,6 +121,7 @@ module.exports = function (data, api, outputCommon, outputData) {
api.generateFileFromTemplateFile(`data${sep}manifest.ttl.in`, `data${sep}manifest.ttl.in`, data);
api.copyFile(`src${sep}lv2.c`, `src${sep}lv2.c`);
api.copyFile(`..${sep}common${sep}fatica.h`, `src${sep}fatica.h`);
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`);
};

View File

@ -21,22 +21,7 @@
#include <stdlib.h>
#include <stdint.h>
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;
#include "callbacks.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"

View File

@ -66,6 +66,7 @@ module.exports = function (data, api, outputCommon, outputData) {
api.copyFile(`data${sep}PkgInfo`, `data${sep}PkgInfo`);
api.generateFileFromTemplateFile(`data${sep}Info.plist`, `data${sep}Info.plist`, data);
api.copyFile(`src${sep}vst3.c`, `src${sep}vst3.c`);
api.copyFile(`..${sep}common${sep}fatica.h`, `src${sep}fatica.h`);
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`);
};

View File

@ -21,12 +21,7 @@
#include <stddef.h>
#include <stdint.h>
typedef struct {
void *handle;
const char *format;
const char *(*get_bindir)(void *handle);
const char *(*get_datadir)(void *handle);
} plugin_callbacks;
#include "callbacks.h"
#include "data.h"
#include "plugin.h"

View File

@ -31,4 +31,5 @@ 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`);
};