1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Miscellaneous system utility functions.
//!
//! This module provides access to various system-level functions that don't
//! belong to any specific widget or component.
use CString;
use wxdragon_sys as ffi;
/// Produces an audible beep sound using the system's default beep.
///
/// # Example
/// ```rust,no_run
/// use wxdragon::utils::bell;
///
/// // Play a system beep
/// bell();
/// ```
/// Flags for `launch_default_browser` function.
/// Opens the given URL in the default browser.
///
/// Returns `true` if the browser was successfully launched, `false` otherwise.
///
/// # Arguments
/// * `url` - The URL to open (can be a web address or a file:// URL).
///
/// # Example
/// ```rust,no_run
/// use wxdragon::utils::{launch_default_browser, BrowserLaunchFlags};
///
/// // Open a web page
/// if launch_default_browser("https://www.example.com", BrowserLaunchFlags::Default) {
/// println!("Browser launched successfully");
/// }
///
/// // Open in a new window (if supported by the browser)
/// launch_default_browser("https://www.rust-lang.org", BrowserLaunchFlags::NewWindow);
/// ```