1 unstable release

0.1.0 Jul 2, 2022

#2 in #breadx

BSL-1.0 license

13KB
222 lines

breadx-special-events

This crate implements special event queues for Displays from breadx.

License

This package is distributed under the Boost Software License Version 1.0. Consult the LICENSE file or consult the web mirror for more information.


lib.rs:

Implements the "special events" pattern for breadx.

Some extensions to X11 mandate a pattern known as "special events", where certain events are sorted into queues for libraries to process. It's only ever used in a couple of extensions, and checking for them is not idiomatic to do on the hot path for event processing. Therefore, breadx does not do it by default.

This module provides a way to process special events. The SpecialEventDisplay type is a wrapper around a Display that provides queues for special events. Queues can be registered or deregistered, and then polled or waited on, similar to regular events.

SpecialEventDisplay can be created through its universal From implementation.

Dependencies

~9.5MB
~211K SLoC