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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//! TaskBarIcon event types and data structures
//!
//! **Note**: This module is only available on Windows and Linux platforms where TaskBarIcon events are supported.
//!
//! ## Platform Support
//!
//! TaskBarIcon events have different levels of support across platforms:
//!
//! - **Windows**: Full support for all events including mouse movements, clicks, double-clicks, and balloon tooltips
//! - **Linux**: Limited support - tray activation is available, but GTK does not provide a
//! distinct native double-click event for status icons
//! - **macOS**: ❌ Not supported - macOS uses menu-based interaction only
//!
//! ## Usage
//!
//! For maximum cross-platform compatibility, use the `popup_menu()` method to show context menus
//! rather than relying on mouse events. `on_left_down()` is available on Windows and Linux,
//! and `on_left_double_click()` is available on both platforms, although on Linux it is
//! synthesized from repeated tray activations rather than delivered as a native GTK event.
//!
//! ## Example
//!
//! ```rust,no_run
//! use wxdragon::prelude::*;
//!
//! let taskbar = TaskBarIcon::builder().build();
//!
//! // Cross-platform events (Windows and Linux)
//! taskbar.on_left_down(|_| {
//! println!("Left click on taskbar icon");
//! });
//!
//! // Windows-only events (conditional compilation)
//! #[cfg(target_os = "windows")]
//! taskbar.on_balloon_click(|_| {
//! println!("Balloon tooltip clicked");
//! });
//! ```
//!
//! # Platform Support
//!
//! TaskBarIcon events have different levels of support across platforms:
//!
//! ## Windows
//! - Full support for all mouse events (move, up/down, double-click)
//! - Balloon tooltip events (timeout, click)
//!
//! ## Linux/GTK
//! - Reliable support for click/activation and popup menu
//! - No distinct native double-click event for tray icons in wxGTK
//! - `on_left_double_click()` is synthesized from two close `on_left_down()` activations
//! - No mouse up/move events, no balloon events
//!
//! ## macOS
//! - No mouse events (uses menu-based approach)
//! - Events may not fire on macOS - use `CreatePopupMenu` instead
//!
//! For maximum compatibility, use `CreatePopupMenu` for menu handling rather than relying on mouse events.
use crateEvent;
use crateMouseEventData;
use cratePoint;
/// Event types specific to TaskBarIcon widgets
// Event conversion methods are handled by the implement_widget_local_event_handlers macro
/// Data associated with TaskBarIcon events