Don't require a Drop bound on Editor
On second thought, unless you're implementing something completely from scratch this will already be part of the library you're using.
This commit is contained in:
parent
5a84733e7e
commit
75435ecb4a
1 changed files with 2 additions and 7 deletions
|
@ -149,13 +149,8 @@ pub trait Vst3Plugin: Plugin {
|
|||
const VST3_CATEGORIES: &'static str;
|
||||
}
|
||||
|
||||
/// An editor for a [Plugin]. The [Drop] implementation gets called when the host closes the editor.
|
||||
//
|
||||
// XXX: Requiring a [Drop] bound is a bit unorthodox, but together with [Plugin::create_editor] it
|
||||
// encodes the lifecycle of an editor perfectly as you cannot have duplicate (or missing)
|
||||
// initialize and close calls. Maybe think this over again later.
|
||||
#[allow(drop_bounds)]
|
||||
pub trait Editor: Drop + Send + Sync {
|
||||
/// An editor for a [Plugin]. This object gets dropped when the host closes the editor.
|
||||
pub trait Editor: Send + Sync {
|
||||
/// Return the (currnent) size of the editor in pixels as a `(width, height)` pair.
|
||||
fn size(&self) -> (u32, u32);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue