This commit is contained in:
Moritz Ruth 2024-02-05 00:13:03 +01:00
parent 66c86df2a4
commit 6b4ea3f4ae
Signed by: moritzruth
GPG key ID: C9BBAB79405EE56D
13 changed files with 819 additions and 375 deletions

View file

@ -5,12 +5,14 @@ use crate::path::{KeyPath, KnobPath};
use crate::style::{KeyStyle, KnobStyle};
#[derive(Debug, Eq, PartialEq, Copy, Clone, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub enum RotationDirection {
Clockwise,
Counterclockwise,
}
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
#[serde(tag = "type", rename_all = "kebab-case")]
pub enum KnobEvent {
Press,
ButtonDown,
@ -20,6 +22,7 @@ pub enum KnobEvent {
}
#[derive(Debug, PartialEq, Clone, Copy, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub enum KeyTouchEventKind {
Start,
Move,
@ -27,6 +30,7 @@ pub enum KeyTouchEventKind {
}
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
#[serde(tag = "type", rename_all = "kebab-case")]
pub enum KeyEvent {
Press,
Touch { touch_id: u8, x: u16, y: u16, kind: KeyTouchEventKind },

View file

@ -42,7 +42,7 @@ pub enum PaEntityMetadata {
},
}
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq)]
pub struct PaEntityState {
id: PaEntityId,
channel_volumes: ChannelVolumes,