mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-27 11:51:29 +01:00
24 lines
546 B
Rust
24 lines
546 B
Rust
mod commands;
|
|
|
|
#[cfg(target_os = "macos")]
|
|
mod mac;
|
|
|
|
use crate::commands::{set_theme, set_title};
|
|
use tauri::{
|
|
Runtime, generate_handler,
|
|
plugin::{Builder, TauriPlugin},
|
|
};
|
|
|
|
pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
|
#[allow(unused)]
|
|
Builder::new("yaak-mac-window")
|
|
.invoke_handler(generate_handler![set_title, set_theme])
|
|
.on_window_ready(|window| {
|
|
#[cfg(target_os = "macos")]
|
|
{
|
|
mac::setup_traffic_light_positioner(&window);
|
|
}
|
|
})
|
|
.build()
|
|
}
|