Require static lifetimes on GUI contexts
This commit is contained in:
parent
3c867f9305
commit
d35957db65
|
@ -65,7 +65,7 @@ pub trait ProcessContext {
|
|||
//
|
||||
// The implementing wrapper can assume that everything is being called from the main thread. Since
|
||||
// NIH-plug doesn't own the GUI event loop, this invariant cannot be part of the interface.
|
||||
pub trait GuiContext: Send + Sync {
|
||||
pub trait GuiContext: Send + Sync + 'static {
|
||||
/// Retrieve a safe setter for updating the plugin's parameters. Modifying parameters here will
|
||||
/// broadcast the changes both to the host and to your plugin's
|
||||
/// [crate::param::internals::Params] object.
|
||||
|
|
|
@ -81,11 +81,11 @@ pub trait Plugin: Default + Send + Sync + 'static {
|
|||
// otherwise be basically impossible to have this still be GUI-framework agnostic. Any
|
||||
// callback that deos involve actual GUI operations will still be spooled to the IRunLoop
|
||||
// instance.
|
||||
fn create_editor<'a, 'context: 'a>(
|
||||
&'a self,
|
||||
fn create_editor(
|
||||
&self,
|
||||
parent: EditorWindowHandle,
|
||||
context: Arc<dyn GuiContext + 'context>,
|
||||
) -> Option<Box<dyn Editor + 'context>> {
|
||||
context: Arc<dyn GuiContext>,
|
||||
) -> Option<Box<dyn Editor>> {
|
||||
None
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue