#[repr(C, packed(1))]pub struct ARAEditorViewInterface {
pub structSize: ARASize,
pub notifySelection: Option<unsafe extern "C" fn(editorViewRef: ARAEditorViewRef, selection: *const ARAViewSelection)>,
pub notifyHideRegionSequences: Option<unsafe extern "C" fn(editorViewRef: ARAEditorViewRef, regionSequenceRefsCount: ARASize, regionSequenceRefs: *const ARARegionSequenceRef)>,
}Expand description
! Plug-in interface: view controller. ! The function pointers in this struct must remain valid until the document controller is ! destroyed by the host.
Fields§
§structSize: ARASize! @see_Versioned_Structs_
notifySelection: Option<unsafe extern "C" fn(editorViewRef: ARAEditorViewRef, selection: *const ARAViewSelection)>! Apply the given host selection to all associated views. ! This ARA 2.0 addition allows hosts to translate the effects of their selection implementation ! to a selection of ARA objects that can be interpreted by the plug-in. ! The command is not strict a setter for the given selection state, it rather notifies the ! plug-in about relevant user interaction in the host so that it can adopt in whatever way ! provides the best user experience within the context of the given plug-in design. ! A plug-in may e.g. implement scrolling to relevant positions, select the playback regions in ! its inspector(s), or filter the provided objects further depending on user settings. ! The plug-in also remains free to modify its internal selection at any time through its ! build-in UI behavior. ! For example, a plug-in may design its UI around individual regions being edited, or around ! entire region sequences. Melodyne features both modes, switchable by the user. When editing ! an individual region, it will always pick the “most suitable” region from the selection, ! and ignore the other selected regions. ! Melodyne also implements various ways to switch the editable region sequence(s) or playback ! region at any time independently from the host selection, as well as a user option to ! temporarily ignore host selection changes to “pin” the current selection. ! The same “loose” coupling applies on the host side: the selection sent by the host is not ! necessarily equal to its actual selection, but rather the best representation of the ! users’ intent. For example, the user may be able to select entities that are not directly ! represented in the ARA API, but relate to a set of playback regions in some meaningful way. ! In that case, those regions may be sent as selection. ! The selection command includes various optional entities that describe the selection on the ! host side, such as playback regions or region sequences. Host will only explicitly provide ! those objects that best describe their current selection, but plug-ins can often derive other ! selections from that, such as calculating a region selection based on sequence selection and ! time range. ! Most hosts offer both an object-based selection which typically centers around selected ! arrange events (playback regions) and tracks (region sequences) versus a time-range based ! selection that is independent of the arrange events but typically also includes track selection. ! Both modes shall be distinguished by providing a time range only in the latter case. ! Some hosts even allow to select multiple time ranges, this should be expressed by sending ! their union range across the API. ! For an object-based selection, the time range remains NULL, and plug-ins can calculate an ! implicit time range from the selected playback regions if desired. ! Arrange event selection may linked to track selection in a variety of ways. For example, ! selecting a track may select its events (often filter by playback cycle range), and selecting ! an event may select its associated track as well. The ARA selection must be always updated ! to reflect any such linking accordingly. ! In each object list, objects are ordered by importance, with the most relevant, “focused” ! object being first. So if a plug-in supports only a single region selection, it should use ! the first region. If it can only show a single region sequence at a time, it should use the ! first selected sequence, or if no sequences are included in the selection fall back to the ! sequence of the first selected region, etc. ! Each new selection call describes a full selection, i.e. replaces the previous selection. ! An empty selection is valid and should be communicated by the host, since some plug-ins may ! need to evaluate this in special cases. ! Being selected does not affect the life time of the objects - selected objects may be deleted ! without updating the selection status first. ! Note that a pointer to this struct and all pointers contained therein are only valid for the ! duration of the current call receiving the pointer - the data must be evaluated/copied inside ! the call, and the pointers must not be stored anywhere.
notifyHideRegionSequences: Option<unsafe extern "C" fn(editorViewRef: ARAEditorViewRef, regionSequenceRefsCount: ARASize, regionSequenceRefs: *const ARARegionSequenceRef)>! Reflect hiding of region sequences in all associated views. ! Some hosts offer the option to hide arrange tracks from view, so that they are no longer ! visible, while still being played back regularly. This can be communicated to the plug-in ! so that it follows suite. ! Each call implicitly unhides all previously hidden region sequences, so calling this with ! an empty list makes all sequences visible. ! The regionSequenceRefs pointer is only valid for the duration of the call, it must be evaluated ! inside the call, and the pointer must not be stored anywhere. ! It should be NULL if regionSequenceRefsCount is 0.
Trait Implementations§
Source§impl Clone for ARAEditorViewInterface
impl Clone for ARAEditorViewInterface
Source§fn clone(&self) -> ARAEditorViewInterface
fn clone(&self) -> ARAEditorViewInterface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more