| 
									
										
										
										
											2023-02-19 11:40:59 +08:00
										 |  |  | extern crate hbb_common;
 | 
					
						
							| 
									
										
										
										
											2023-02-19 12:01:46 +08:00
										 |  |  | #[cfg(target_os = "linux")]
 | 
					
						
							|  |  |  | use hbb_common::platform::linux;
 | 
					
						
							|  |  |  | #[cfg(target_os = "macos")]
 | 
					
						
							|  |  |  | use hbb_common::platform::macos;
 | 
					
						
							| 
									
										
										
										
											2023-02-19 11:40:59 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | fn main() {
 | 
					
						
							|  |  |  |     #[cfg(target_os = "linux")]
 | 
					
						
							| 
									
										
										
										
											2023-02-19 21:11:17 +08:00
										 |  |  |     let res = linux::system_message("test title", "test message", true);
 | 
					
						
							| 
									
										
										
										
											2023-02-19 11:40:59 +08:00
										 |  |  |     #[cfg(target_os = "macos")]
 | 
					
						
							| 
									
										
										
										
											2023-02-19 21:11:17 +08:00
										 |  |  |     let res = macos::alert(
 | 
					
						
							|  |  |  |         "System Preferences".to_owned(),
 | 
					
						
							| 
									
										
										
										
											2023-02-19 12:01:46 +08:00
										 |  |  |         "warning".to_owned(),
 | 
					
						
							| 
									
										
										
										
											2023-02-19 11:40:59 +08:00
										 |  |  |         "test title".to_owned(),
 | 
					
						
							|  |  |  |         "test message".to_owned(),
 | 
					
						
							|  |  |  |         ["Ok".to_owned()].to_vec(),
 | 
					
						
							| 
									
										
										
										
											2023-02-19 21:11:17 +08:00
										 |  |  |     );
 | 
					
						
							|  |  |  |     #[cfg(any(target_os = "linux", target_os = "macos"))]
 | 
					
						
							|  |  |  |     println!("result {:?}", &res);
 | 
					
						
							| 
									
										
										
										
											2023-02-19 11:40:59 +08:00
										 |  |  | }
 |