Skip to main content

HostNotification

Enum HostNotification 

Source
pub enum HostNotification {
    DirtyChanged(bool),
    OpenEditorRequested {
        name: Option<String>,
    },
    GroupEditStarted,
    GroupEditFinished,
    UnitSelectionChanged {
        unit_id: i32,
    },
    ProgramListChanged {
        list_id: i32,
        program_index: Option<i32>,
    },
    UnitByBusChanged,
    ProgressStarted {
        id: u64,
        kind: ProgressKind,
        description: Option<String>,
    },
    ProgressUpdated {
        id: u64,
        value: ProgressValue,
    },
    ProgressFinished {
        id: u64,
    },
    ContextMenuRequested {
        menu_id: u64,
        parameter_id: Option<u32>,
        x: i32,
        y: i32,
        items: Vec<ContextMenuItem>,
    },
}
Expand description

A control-plane action requested by a plugin through its host callbacks.

§Ordering

Notifications keep their order relative to each other, and so do the ParameterEdits from Plugin::take_parameter_edits — but the two streams are buffered independently, so their relative order is not preserved. In particular, the GroupEditStarted / GroupEditFinished bracket cannot be correlated with the edits that fell inside it: treat it as “the plugin is currently in a grouped gesture”, not as a delimiter around specific parameter edits.

Variants§

§

DirtyChanged(bool)

The plugin changed whether its state needs saving.

§

OpenEditorRequested

The plugin asked the host to open an editor, optionally by view name.

Fields

§name: Option<String>

Requested view name, or None for the default editor.

§

GroupEditStarted

The plugin began a grouped edit.

§

GroupEditFinished

The plugin finished a grouped edit.

§

UnitSelectionChanged

The plugin selected a different unit in its own UI.

Fields

§unit_id: i32

Newly selected unit id.

§

ProgramListChanged

A program list, or one program in it, changed in the plugin.

Fields

§list_id: i32

Program-list id.

§program_index: Option<i32>

Changed program, or None when the whole list changed.

§

UnitByBusChanged

The plugin changed its bus/channel-to-unit assignments.

§

ProgressStarted

The plugin began a bounded progress operation.

Fields

§id: u64

Host-assigned progress operation id.

§kind: ProgressKind

Kind of work the plugin is performing.

§description: Option<String>

Optional plugin-provided description.

§

ProgressUpdated

The plugin updated an existing progress operation.

Fields

§id: u64

Host-assigned progress operation id.

§value: ProgressValue

Normalized progress in the inclusive 0.0..=1.0 range.

§

ProgressFinished

The plugin finished an existing progress operation.

Fields

§id: u64

Host-assigned progress operation id.

§

ContextMenuRequested

The plugin populated a context menu and asked the host to display it.

After showing the menu, call Plugin::execute_context_menu_item for the chosen entry, or Plugin::dismiss_context_menu if it was dismissed. Either call releases the plugin-owned menu targets retained for this popup.

Fields

§menu_id: u64

Host-assigned popup id.

§parameter_id: Option<u32>

Parameter the menu belongs to, or None for a view-wide menu.

§x: i32

Horizontal popup coordinate in the plugin view.

§y: i32

Vertical popup coordinate in the plugin view.

§items: Vec<ContextMenuItem>

Menu entries in display order.

Trait Implementations§

Source§

impl Clone for HostNotification

Source§

fn clone(&self) -> HostNotification

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 HostNotification

Source§

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

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

impl<'de> Deserialize<'de> for HostNotification

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for HostNotification

Source§

impl PartialEq for HostNotification

Source§

fn eq(&self, other: &HostNotification) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for HostNotification

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for HostNotification

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

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> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

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.