Logo Search packages:      
Sourcecode: abgate version File versions  Download package

void(* _LV2UI_Descriptor::port_event)(LV2UI_Handle ui, uint32_t port_index, uint32_t buffer_size, uint32_t format, const void *buffer)

Tell the UI that something interesting has happened at a plugin port. What is interesting and how it is written to the buffer passed to this function is defined by the format parameter, which has the same meaning as in LV2UI_Write_Function. The only exception is ports of the class lv2:ControlPort, for which this function should be called when the port value changes (it does not have to be called for every single change if the host's UI thread has problems keeping up with the thread the plugin is running in), buffer_size should be 4, the buffer should contain a single IEEE-754 float, and format should be 0.

By default, the host should only call this function for input ports of the lv2:ControlPort class. However, the default setting can be modified by using the following URIs in the UI's RDF data:


For example, if you want the UI with uri <http://my.pluginui> for the plugin with URI <http://my.plugin> to get notified when the value of the output control port with index 4 changes, you would use the following in the RDF for your UI:

      <http://my.pluginui> uiext:portNotification [ uiext:plugin <http://my.plugin> ;
                                                    uiext:portIndex 4 ] .

and similarly with uiext:noPortNotification if you wanted to prevent notifications for a port for which it would be on by default otherwise. The UI is not allowed to request notifications for ports of types for which no transfer mechanism is specified, if it does it should be considered broken and the host should not load it.

The buffer is only valid during the time of this function call, so if the UI wants to keep it for later use it has to copy the contents to an internal buffer.

This member may be set to NULL if the UI is not interested in any port events.

Definition at line 196 of file ui.h.

Generated by  Doxygen 1.6.0   Back to index