callback definitions are now in common
This commit is contained in:
parent
91049ee490
commit
76e1b4bd8a
@ -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"
|
||||
|
@ -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`);
|
||||
};
|
||||
|
@ -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"
|
||||
|
@ -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`);
|
||||
};
|
||||
|
22
templates/common/callbacks.h
Normal file
22
templates/common/callbacks.h
Normal 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
|
@ -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"
|
||||
|
@ -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`);
|
||||
};
|
||||
|
@ -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"
|
||||
|
@ -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`);
|
||||
};
|
||||
|
@ -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
|
||||
|
@ -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`);
|
||||
};
|
||||
|
@ -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"
|
||||
|
@ -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`);
|
||||
};
|
||||
|
@ -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"
|
||||
|
@ -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`);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user