Reorganize codebase into modular structure

This commit is contained in:
2025-05-09 21:37:15 -05:00
parent f4c83e31c0
commit cf1c90856f
24 changed files with 2008 additions and 817 deletions
+33
View File
@@ -0,0 +1,33 @@
// 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;
// --- Public Exports ---
// Export the platform-specific functions
#[cfg(windows)]
pub use windows::{hide_system_cursor, update_cursor_image, restore_cursor};
#[cfg(target_os = "macos")]
pub use macos::{hide_system_cursor, update_cursor_image, restore_cursor, render_cursor};
#[cfg(target_os = "linux")]
pub use linux::{hide_system_cursor, update_cursor_image, 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_image, restore_cursor, render_cursor};