MacOsIoKitIdleSource class

Reads the Idle duration on macOS through IOKit — the HID system service's HIDIdleTime property — via dart:ffi (ADR-0004).

One of two candidates; the other is MacOsCoreGraphicsIdleSource. This one walks the same path the retired Swift plugin walked, which is why it is first in resolution order: whatever the measurement in #22 shows, its values cannot disagree with the implementation being replaced. The cost is the walk itself — service lookup, iterator, property dictionary, dictionary lookup, number unboxing — where Swift's bridging did the work implicitly.

Inheritance

Constructors

MacOsIoKitIdleSource()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isSupported bool
Whether this source can actually read the OS on the current platform.
no setteroverride
name String
Human-readable identifier, e.g. windows/GetLastInputInfo. Shown in the example's parity screen and used to label parity-test failures, so it must identify which binding a failure came from.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

idleMilliseconds() int
The Idle duration in milliseconds.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

idleFromNanoseconds({required bool succeeded, required int nanoseconds}) int
The Idle duration implied by one HIDIdleTime reading, including what to report when the walk did not complete.