diff options
author | David Robillard <d@drobilla.net> | 2022-08-10 14:26:06 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-17 13:51:06 -0400 |
commit | 53812b2fc4aa809bf8156faee88b59cc69d1b9ec (patch) | |
tree | d3973385b33dcac5ff23d8fca280bbc10d863960 /src/jalv_internal.h | |
parent | 8e5bf419f1938fb2b97cd984641e51727a7673aa (diff) | |
download | jalv-53812b2fc4aa809bf8156faee88b59cc69d1b9ec.tar.gz jalv-53812b2fc4aa809bf8156faee88b59cc69d1b9ec.tar.bz2 jalv-53812b2fc4aa809bf8156faee88b59cc69d1b9ec.zip |
Factor out jalv_write_event()
Diffstat (limited to 'src/jalv_internal.h')
-rw-r--r-- | src/jalv_internal.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/jalv_internal.h b/src/jalv_internal.h index df03379..8028bcc 100644 --- a/src/jalv_internal.h +++ b/src/jalv_internal.h @@ -175,12 +175,26 @@ jalv_ui_port_event(Jalv* jalv, uint32_t protocol, const void* buffer); -bool -jalv_send_to_ui(Jalv* jalv, - uint32_t port_index, - uint32_t type, - uint32_t size, - const void* body); +/** + Write a port event using the atom:eventTransfer protocol. + + This is used to transfer atoms between the plugin and UI via sequence ports. + + @param jalv Jalv instance. + @param target Communication ring (jalv->plugin_to_ui or jalv->ui_to_plugin). + @param port_index Index of the port this change is for. + @param size Size of body in bytes. + @param type Atom type URID. + @param body Atom body. + @return 0 on success, non-zero on failure (overflow). +*/ +int +jalv_write_event(Jalv* jalv, + ZixRing* target, + uint32_t port_index, + uint32_t size, + LV2_URID type, + const void* body); /** Write a control port change using the default (0) protocol. |