Reorganize codebase into modular structure
This commit is contained in:
@@ -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};
|
||||
Reference in New Issue
Block a user