byte-engine 0.1.0

A composable Rust game engine focused on graphics, input, audio, physics, and retained UI.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Input device layouts shared by concrete devices.
//!
//! Register classes and their triggers before creating devices. Most
//! applications use the predefined layouts in [`crate::input::utils`]; custom
//! hardware integrations can register a class directly through
//! [`crate::input::InputManager`].

/// The [`DeviceClass`] struct groups the trigger layout shared by one category of
/// input devices.
pub(super) struct DeviceClass {
	/// The name of the device class.
	pub(super) name: String,
}

#[derive(Copy, Clone, PartialEq, Eq)]
/// The [`DeviceClassHandle`] struct identifies a registered layout when adding
/// triggers or creating concrete devices.
pub struct DeviceClassHandle(pub(super) u32);