resolve gtk + VST threading issues
[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 (void);
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_run_editor (VSTState *, void* window_parent);
45 extern void fst_destroy_editor (VSTState *);
46 extern void fst_move_window_into_view (VSTState *);
47
48 extern VSTInfo *fst_get_info (char *dllpathname);
49 extern void fst_free_info (VSTInfo *info);
50 extern void fst_event_loop_remove_plugin (VSTState* fst);
51 extern void fst_start_threading(void);
52 extern void fst_stop_threading(void);
53 extern void fst_audio_master_idle(void);
54
55 #ifdef __cplusplus
56 }
57 #endif
58
59 #endif /* __fst_fst_h__ */