Skip to main content

ARAEditorViewInterface

Struct ARAEditorViewInterface 

Source
#[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

Source§

fn clone(&self) -> ARAEditorViewInterface

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ARAEditorViewInterface

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for ARAEditorViewInterface

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.