-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make event loop a runtime config instead of a Cargo feature (#838)
* Make event loop a runtime config instead of a Cargo feature * `experimental-event-loop` -> `event-loop` * Add another CHANGELOG entry
- Loading branch information
1 parent
96a7951
commit 71dabb5
Showing
20 changed files
with
101 additions
and
82 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use std::ops::{Deref, DerefMut}; | ||
|
||
#[derive(Default)] | ||
/// A configuration for the Javy plugin API. | ||
pub struct Config { | ||
/// The runtime config. | ||
pub(crate) runtime_config: javy::Config, | ||
/// Whether to enable the event loop. | ||
pub(crate) event_loop: bool, | ||
} | ||
|
||
impl Config { | ||
/// Whether to enable the event loop. | ||
pub fn event_loop(&mut self, enabled: bool) -> &mut Self { | ||
self.event_loop = enabled; | ||
self | ||
} | ||
} | ||
|
||
impl Deref for Config { | ||
type Target = javy::Config; | ||
|
||
fn deref(&self) -> &Self::Target { | ||
&self.runtime_config | ||
} | ||
} | ||
|
||
impl DerefMut for Config { | ||
fn deref_mut(&mut self) -> &mut Self::Target { | ||
&mut self.runtime_config | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.