// Platform-specific cursor handling // Windows implementation #[cfg(windows)] mod windows; // macOS implementation #[cfg(target_os = "macos")] mod macos; // Linux implementation #[cfg(target_os = "linux")] mod linux; // Unsupported platforms #[cfg(not(any(windows, target_os = "macos", target_os = "linux")))] mod unsupported; // --- Platform-independent types --- // Define a cross-platform cursor handle type #[cfg(windows)] pub use windows::types::SyncHCURSOR; #[cfg(not(windows))] #[derive(Copy, Clone, Debug)] pub struct SyncHCURSOR(pub usize); #[cfg(not(windows))] unsafe impl Send for SyncHCURSOR {} #[cfg(not(windows))] unsafe impl Sync for SyncHCURSOR {} // --- Public Exports --- // Export the platform-specific functions #[cfg(windows)] pub use windows::{hide_system_cursor, update_cursor_info, restore_cursor}; // Re-export CursorInfo for platform-specific implementations pub use crate::app::CursorInfo; #[cfg(target_os = "macos")] pub use macos::{hide_system_cursor, update_cursor_info, restore_cursor, render_cursor}; #[cfg(target_os = "linux")] pub use linux::{hide_system_cursor, update_cursor_info, restore_cursor, render_cursor}; // Default implementation for other platforms #[cfg(not(any(windows, target_os = "macos", target_os = "linux")))] pub use unsupported::{hide_system_cursor, update_cursor_info, restore_cursor, render_cursor};