Share main VSTFX / FST struct between windows / linux VSTs.
[ardour.git] / libs / fst / fst.h
1 #ifndef __fst_fst_h__
2 #define __fst_fst_h__
3
4 #include <setjmp.h>
5 #include <signal.h>
6 #include <pthread.h>
7
8 #include "ardour/vst_types.h"
9 #include "ardour/vestige/aeffectx.h"
10
11 /**
12  * Display FST error message.
13  *
14  * Set via fst_set_error_function(), otherwise a FST-provided
15  * default will print @a msg (plus a newline) to stderr.
16  *
17  * @param msg error message text (no newline at end).
18  */
19 extern void (*fst_error_callback)(const char *msg);
20
21 /**
22  * Set the @ref fst_error_callback for error message display.
23  *
24  * The FST library provides two built-in callbacks for this purpose:
25  * default_fst_error_callback() and silent_fst_error_callback().
26  */
27 void fst_set_error_function (void (*func)(const char *));
28
29 void  fst_error (const char *fmt, ...);
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 extern int        fst_init (void* possible_hmodule);
36 extern void       fst_exit ();
37
38 extern VSTHandle* fst_load (const char*);
39 extern int        fst_unload (VSTHandle*);
40
41 extern VSTState * fst_instantiate (VSTHandle *, audioMasterCallback amc, void* userptr);
42 extern void       fst_close (VSTState *);
43
44 extern int  fst_create_editor (VSTState* fst);
45 extern int  fst_run_editor (VSTState *);
46 extern void fst_destroy_editor (VSTState *);
47 extern int  fst_get_XID (VSTState *);
48 extern void fst_move_window_into_view (VSTState *);
49
50 extern VSTInfo *fst_get_info (char *dllpathname);
51 extern void fst_free_info (VSTInfo *info);
52 extern void fst_event_loop_remove_plugin (VSTState* fst);
53 extern int fst_call_dispatcher (VSTState *, int, int, int, void *, float);
54
55 /**
56  * Load a plugin state from a file.
57  */
58 extern int fst_load_state (VSTState *, char *);
59
60 /**
61  * Save a plugin state to a file.
62  */
63 extern int fst_save_state (VSTState *, char *);
64
65 extern int wine_pthread_create (pthread_t* thread_id, const pthread_attr_t* attr, void *(*function)(void*), void* arg);
66
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif /* __fst_fst_h__ */