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
//! Cursor style metadata for views.
//!
//! This module provides cursor style customization for views on platforms
//! that support pointer cursors (macOS, iPadOS with trackpad, Android API 24+).
//!
//! # Example
//!
//! ```rust
//! use waterui::prelude::*;
//! use waterui::cursor::CursorStyle;
//!
//! // Static cursor
//! let clickable = text!("Click me").cursor(CursorStyle::PointingHand);
//!
//! // Reactive cursor based on state
//! let is_dragging = binding::<bool>(false);
//! let draggable = text!("Drag me").cursor(is_dragging.map(|dragging| if dragging {
//! CursorStyle::ClosedHand
//! } else {
//! CursorStyle::OpenHand
//! }));
//! ```
use ;
use MetadataKey;
/// Cursor styles that can be displayed when hovering over a view.
///
/// The cursor style is automatically reset when the cursor exits the view's bounds.
/// Not all styles may be available on all platforms - unavailable styles typically
/// fall back to the default arrow cursor.
impl_constant!;
/// Metadata to set the cursor style when hovering over a view.
///
/// The cursor style is scoped to the view's bounds - when the cursor exits
/// the view, the cursor automatically reverts to the parent view's cursor
/// or the system default.
///
/// # Platform Support
///
/// - **macOS**: Full support via `NSCursor`
/// - **iOS**: Not applicable (no visible cursor)
/// - **iPadOS**: Supported with external trackpad via `UIPointerStyle`
/// - **Android**: Supported on API 24+ via `View.pointerIcon`