mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-02-16 02:20:43 +00:00
5
examples/config.rs
Normal file
5
examples/config.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
extern crate hbb_common;
|
||||
|
||||
fn main() {
|
||||
println!("{:?}", hbb_common::config::PeerConfig::load("455058072"));
|
||||
}
|
||||
20
examples/system_message.rs
Normal file
20
examples/system_message.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
extern crate hbb_common;
|
||||
#[cfg(target_os = "linux")]
|
||||
use hbb_common::platform::linux;
|
||||
#[cfg(target_os = "macos")]
|
||||
use hbb_common::platform::macos;
|
||||
|
||||
fn main() {
|
||||
#[cfg(target_os = "linux")]
|
||||
let res = linux::system_message("test title", "test message", true);
|
||||
#[cfg(target_os = "macos")]
|
||||
let res = macos::alert(
|
||||
"System Preferences".to_owned(),
|
||||
"warning".to_owned(),
|
||||
"test title".to_owned(),
|
||||
"test message".to_owned(),
|
||||
["Ok".to_owned()].to_vec(),
|
||||
);
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
println!("result {:?}", &res);
|
||||
}
|
||||
Reference in New Issue
Block a user