mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
ridiculous refactor to allow enums to be dbus strings for better TS generation
This commit is contained in:
@@ -21,13 +21,41 @@ pub mod usb;
|
||||
pub const LED_MSG_LEN: usize = 17;
|
||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
pub const RED: Colour = Colour(0xff, 0x00, 0x00);
|
||||
pub const GREEN: Colour = Colour(0x00, 0xff, 0x00);
|
||||
pub const BLUE: Colour = Colour(0x00, 0x00, 0xff);
|
||||
pub const VIOLET: Colour = Colour(0x9b, 0x26, 0xb6);
|
||||
pub const TEAL: Colour = Colour(0x00, 0x7c, 0x80);
|
||||
pub const YELLOW: Colour = Colour(0xff, 0xef, 0x00);
|
||||
pub const ORANGE: Colour = Colour(0xff, 0xa4, 0x00);
|
||||
pub const RED: Colour = Colour {
|
||||
r: 0xff,
|
||||
g: 0x00,
|
||||
b: 0x00,
|
||||
};
|
||||
pub const GREEN: Colour = Colour {
|
||||
r: 0x00,
|
||||
g: 0xff,
|
||||
b: 0x00,
|
||||
};
|
||||
pub const BLUE: Colour = Colour {
|
||||
r: 0x00,
|
||||
g: 0x00,
|
||||
b: 0xff,
|
||||
};
|
||||
pub const VIOLET: Colour = Colour {
|
||||
r: 0x9b,
|
||||
g: 0x26,
|
||||
b: 0xb6,
|
||||
};
|
||||
pub const TEAL: Colour = Colour {
|
||||
r: 0x00,
|
||||
g: 0x7c,
|
||||
b: 0x80,
|
||||
};
|
||||
pub const YELLOW: Colour = Colour {
|
||||
r: 0xff,
|
||||
g: 0xef,
|
||||
b: 0x00,
|
||||
};
|
||||
pub const ORANGE: Colour = Colour {
|
||||
r: 0xff,
|
||||
g: 0xa4,
|
||||
b: 0x00,
|
||||
};
|
||||
pub const GRADIENT: [Colour; 7] = [RED, VIOLET, BLUE, TEAL, GREEN, YELLOW, ORANGE];
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Default, serde::Deserialize, serde::Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user