diff options
author | David Robillard <d@drobilla.net> | 2011-12-16 20:15:21 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-12-16 20:15:21 +0000 |
commit | 102ba23f77650bbeaceca98c3a6539f1e637b4f7 (patch) | |
tree | 88d7032347b31ab8e79e992e2b5ab0c002aa6ccd /src/jalv_internal.h | |
parent | 1849c5d7f96db8f2dfed04208e0c49685c50d4a4 (diff) | |
download | jalv-102ba23f77650bbeaceca98c3a6539f1e637b4f7.tar.gz jalv-102ba23f77650bbeaceca98c3a6539f1e637b4f7.tar.bz2 jalv-102ba23f77650bbeaceca98c3a6539f1e637b4f7.zip |
Support presets in Gtk UI.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3878 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/jalv_internal.h')
-rw-r--r-- | src/jalv_internal.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/jalv_internal.h b/src/jalv_internal.h index 8ecb44c..d44b5c5 100644 --- a/src/jalv_internal.h +++ b/src/jalv_internal.h @@ -55,8 +55,9 @@ struct Port { enum PortType type; enum PortFlow flow; jack_port_t* jack_port; /**< For audio/MIDI ports, otherwise NULL */ - float control; /**< For control ports, otherwise 0.0f */ LV2_Evbuf* evbuf; /**< For MIDI ports, otherwise NULL */ + uint32_t index; /**< Port index */ + float control; /**< For control ports, otherwise 0.0f */ bool old_api; /**< True for event, false for atom */ }; @@ -105,6 +106,8 @@ typedef struct { LilvNode* event_class; /**< Event port class (URI) */ LilvNode* aevent_class; /**< Atom event port class (URI) */ LilvNode* midi_class; /**< MIDI event class (URI) */ + LilvNode* preset_class; /**< Preset class (URI) */ + LilvNode* label_pred; /**< rdfs:label */ LilvNode* optional; /**< lv2:connectionOptional port property */ uint32_t midi_event_id; /**< MIDI event class ID */ uint32_t atom_prot_id; /**< Atom protocol ID */ @@ -128,12 +131,30 @@ int jalv_open_ui(Jalv* jalv, SuilInstance* instance); +void +jalv_ui_write(SuilController controller, + uint32_t port_index, + uint32_t buffer_size, + uint32_t protocol, + const void* buffer); + bool jalv_emit_ui_events(Jalv* jalv); int jalv_ui_resize(Jalv* jalv, int width, int height); +typedef int (*PresetSink)(Jalv* jalv, + const LilvNode* node, + const LilvNode* title, + void* data); + +int +jalv_load_presets(Jalv* jalv, PresetSink sink, void* data); + +int +jalv_apply_preset(Jalv* jalv, LilvNode* preset); + void jalv_save(Jalv* jalv, const char* dir); |