Add Linux platform, gate usage of CVImageBuffer by macOS
This commit is contained in:
parent
ef4ef5f0e8
commit
d675abf70c
7 changed files with 265 additions and 5 deletions
|
@ -2,6 +2,8 @@ mod app_menu;
|
|||
mod keystroke;
|
||||
#[cfg(target_os = "macos")]
|
||||
mod mac;
|
||||
#[cfg(target_os = "linux")]
|
||||
mod linux;
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
mod test;
|
||||
|
||||
|
@ -35,6 +37,8 @@ pub use app_menu::*;
|
|||
pub use keystroke::*;
|
||||
#[cfg(target_os = "macos")]
|
||||
pub(crate) use mac::*;
|
||||
#[cfg(target_os = "linux")]
|
||||
pub(crate) use linux::*;
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub(crate) use test::*;
|
||||
use time::UtcOffset;
|
||||
|
@ -44,6 +48,10 @@ pub use util::SemanticVersion;
|
|||
pub(crate) fn current_platform() -> Rc<dyn Platform> {
|
||||
Rc::new(MacPlatform::new())
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
pub(crate) fn current_platform() -> Rc<dyn Platform> {
|
||||
Rc::new(LinuxPlatform::new())
|
||||
}
|
||||
|
||||
pub(crate) trait Platform: 'static {
|
||||
fn background_executor(&self) -> BackgroundExecutor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue