openlogi-hook 0.6.21

OS-level mouse-event hook for OpenLogi. macOS via CGEventTap; Linux via evdev+uinput; Windows via WH_MOUSE_LL.
Documentation
[package]
name = "openlogi-hook"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
description = "OS-level mouse-event hook for OpenLogi. macOS via CGEventTap; Linux via evdev+uinput; Windows via WH_MOUSE_LL."

[dependencies]
openlogi-core = { path = "../openlogi-core", version = "0.6.21" }
openlogi-inject = { path = "../openlogi-inject", version = "0.6.21" }
thiserror = { workspace = true }
tracing = { workspace = true }

[target.'cfg(target_os = "linux")'.dependencies]
evdev = { workspace = true }
libc = "0.2"
x11rb = "0.13"

[target.'cfg(target_os = "linux")'.dev-dependencies]
ctrlc = "3"

# CGEventTap stays on core-graphics/core-foundation (the freeze-hazard run-loop
# machinery). The frontmost-app read uses objc2 (NSWorkspace) so no raw `objc`.
[target.'cfg(target_os = "macos")'.dependencies]
core-graphics = { workspace = true }
core-foundation = { workspace = true }
# For `ForeignType::as_ptr` on `CGEvent` (to reach the raw `CGEventRef` for the
# device-of-origin lookup). Matches the version core-graphics already resolves.
foreign-types-shared = "0.3"
objc2 = { workspace = true }
objc2-foundation = { workspace = true, features = ["NSString"] }
objc2-app-kit = { workspace = true, features = ["NSWorkspace", "NSRunningApplication"] }

# WH_MOUSE_LL low-level mouse hook + foreground-process path (GetForegroundWindow
# / QueryFullProcessImageNameW).
[target.'cfg(target_os = "windows")'.dependencies]
windows-sys = { workspace = true, features = [
    "Win32_Foundation",
    "Win32_System_Threading",
    "Win32_UI_Input_KeyboardAndMouse",
    "Win32_UI_WindowsAndMessaging",
] }

[lints.rust]
unsafe_code = "allow"

[lints.clippy]
pedantic = { level = "warn", priority = -1 }
unwrap_used = "warn"
expect_used = "warn"
missing_errors_doc = "allow"
doc_markdown = "allow"