Skip to content

Latest commit

 

History

History
242 lines (158 loc) · 8.06 KB

File metadata and controls

242 lines (158 loc) · 8.06 KB

Changelog

v0.5.0

Breaking Changes

  • EffectKind no longer implements Eq.
  • Effect::kind() now returns EffectKind instead of Option<EffectKind>.
  • ForceFeedbackEvent::code() now returns ForceFeedbackCode instead of Option<ForceFeedbackCode>.
  • EventKind::Other has been renamed and hidden, and is no longer part of the public API.
  • UnknownVariant error type is now called ParseVariantError.
    • The From<UnknownVariant> for io::Error implementation has been removed.
  • Effect::direction() now uses a Direction wrapper type.
  • The log functionality is now hidden behind a "log" Cargo feature (enabled by default).
  • Evdev::set_X_mask now accepts an impl IntoIterator argument rather than a &BitSet<V>.
  • Previously deprecated APIs have been removed.

Other Changes

  • Condition-based force-feedback effects (Spring, Friction, …) now have explicit constructors in addition to the From implementations.
  • Added new Bus and InputProp constants from upstream.

v0.4.6

Fixes

  • Fix the return value of BitSet::insert to match the documentation.
  • Make validation of values to be inserted into a BitSet less strict, to permit the same set of BitSets that the kernel will produce.

v0.4.5

Deprecations

  • The Evdev::write method was deprecated in favor of a new Evdev::write_events method, to align the naming with read_events.
    • Similar deprecations have been performed for other types.

Other Changes

  • No longer map ENODEV to ErrorKind::NotFound when opening an Evdev (instead of ErrorKind::Uncategorized).
    • This reverts a change was previously introduced in v0.4.3.
    • Users of Evdev::open already had to handle ENODEV regardless of this mapping, so nothing changes for correct applications. Both types of errors were possible before, and remain possible after the change.

v0.4.4

Improvements

  • Add new event codes from upstream.
  • Depend on serde_core instead of serde when the "serde" feature is enabled.
  • Don't report ENODEV errors to callers when enumerating devices that disappeared.
  • Document the possible error types when opening a device.

v0.4.3

Improvements

  • Add EffectId::{from_raw, raw} to allow conversion from/to raw integers.
  • Map ENODEV to ErrorKind::NotFound when opening an Evdev (instead of ErrorKind::Uncategorized).

v0.4.2

Improvements

  • Add UinputDevice::async_events for asynchronously reading from a uinput device.
  • Add UinputDevice::read_events to mirror Evdev::read_events.
  • Minor documentation improvements.

v0.4.1

Fixes

  • Don't clamp the value of absolute axes in EventReader.
    • This fixes usage with certain drivers that deliberately send out-of-range axis values.

v0.4.0

Breaking Changes

  • Removed FromRawFd implementation of UinputDevice.
    • Replaced with UinputDevice::from_owned_fd.
  • Removed Evdev::path (Evdev no longer stores the path it was opened from).
    • enumerate and enumerate_hotplug now yield (PathBuf, Evdev).
  • Removed all MAX and CNT constants from event code types.
  • Shortened lifetime of Effects returned by ForceFeedbackUpload to be tied to &self.
  • Remove all name methods from event code types.
    • Codes can instead be formatted via Debug or serialized with serde to obtain the name.
  • Removed all deprecated functionality.

Improvements

  • Added raw and from_raw functions to all types that wrap an integer and didn't already have them.
  • Added Switch::USB_INSERT.
  • Yield paths alongside devices when enumerating.
  • Document more clearly that new enumeration constants can be added in minor releases.
  • Document the evdev device lifecycle.
  • Add a few missing setters to force-feedback types.
  • EventReader::valid_slots now returns a real iterator type instead of impl Iterator.

Fixes

  • Limit number of reports processed by EventReader::update, to prevent getting stuck in there forever.
  • Made enumerate_hotplug() more robust, avoiding duplicate devices.
  • Don't wrap ENODEV in a custom error, making it easier to detect unplugged devices.

v0.3.5

Fixes

  • Fix a panic in examples/keymap.rs.
  • Fix all-zero Scancodes being printed as the empty string.

Improvements

  • Include the /dev/uinput path in the io::Error when opening the device fails.
  • Run the unit tests on Big Endian emulation in CI.

v0.3.4

Improvements

  • Add a few missing getters for force-feedback types.
  • Derive PartialOrd and Ord for EffectId.
  • Rename with_device_id to with_input_id (with deprecation).
  • Rename the ForceFeedbackEvent constructors to more evocative names (with deprecation).
  • Add #[inline] to more functions.

Fixes

  • Fix a bug where uninitialized bytes would be unsoundly reinterpreted as &[u8] when reading events from a UinputDevice.
  • Fix the PartialEq implementation of Periodic not comparing custom waveform data.

Other changes

  • Improved documentation a bit.
  • Deduplicated the internal implementation so that all event I/O happens in two root functions.
  • Audited the crate for Undefined Behavior.
  • Run CI on aarch64 Linux (GNU and musl).
  • Add the crate to the os::freebsd-apis category on crates.io.

v0.3.3

  • Try to fix the docs.rs render.

v0.3.2

  • Try to fix the docs.rs render.

v0.3.1

  • Try to fix the docs.rs render.

v0.3.0

Breaking Changes

  • HotplugMonitor no longer implements Iterator, but now implements IntoIterator.
  • HotplugMonitor now yields HotplugEvents instead of already-opened Evdevs.
    • Call HotplugEvent::open to open the device.
  • hotplug::enumerate has moved to enumerate_hotplug in the crate root.

New Features

Async

EventReader now allows reading events and reports via async. This functionality requires enabling either the "tokio" or "async-io" Cargo features.

Note that a lot of evdev functionality cannot be made async and will always block. Only reading events asynchronously via the EventReader is supported for now.

Other Changes

  • FreeBSD: sleep after connecting to devd to ensure no events go missing.
  • Mark some methods #[inline] for more efficient code generation.
  • Don't redundantly invoke fcntl if the non-blocking status is already what we want.
  • Implement AsFd and IntoRawFd for HotplugMonitor.
  • Include device path in error message if opening fails.
  • Add Report::len, returning the number of events in the Report.
  • Device enumeration iterators have been made real types instead of impl Iterator and moved to the enumerate module.

v0.2.3

  • Update from linux-ioctl to uoctl 1.0.

v0.2.2

  • Support FreeBSD, and test it in CI.
  • Improve error messages when some ioctls fail.

v0.2.1

Fixes

  • Fix InvalidInput error when creating EventReaders for most devices.

v0.2.0

Breaking Changes

  • Remove previously deprecated items.
  • Change Evdev::path to return &Path instead of Option<&Path>.
  • Replace Iterator impl of Report with IntoIterator impls.
  • Change InputEvent::kind to return EventKind instead of Option<EventKind>.

New Features

  • Implement AsFd, AsRawFd, and IntoRawFd for EventReader to mirror Evdev.
  • Make most AbsInfo methods const.

v0.1.4

  • Add EventReader::reports for iterating over Reports.
  • Deprecate EventReader::next_report in favor of EventReader::reports.
  • Generate synthetic multitouch events when EventReader is created or events are dropped.
  • Fall back to write-only mode if opening an Evdev in read-only mode fails due to lack of permission.

v0.1.3

  • Add EventReader::next_report for fetching whole Reports from the device rather than events.

v0.1.2

  • Add serde feature that implements Serialize and Deserialize for some of the event code wrapper types like Key, Rel, Abs, etc.

v0.1.1

  • Renamed Evdev::can_read and UinputDevice::can_read to Evdev::is_readable and UinputDevice::is_readable, respectively (with can_read becoming a deprecated alias).
  • Added Evdev::block_until_readable and UinputDevice::block_until_readable.

v0.1.0

Initial release.