1
0
Fork 0
forked from wry/wry

feat: add window animations

This commit is contained in:
atagen 2026-05-21 15:20:46 +10:00 committed by kossLAN
parent eece44a59c
commit 2a079ed800
No known key found for this signature in database
29 changed files with 6957 additions and 114 deletions

View file

@ -1023,6 +1023,26 @@ impl ConfigClient {
self.send(&ClientMessage::SetUiDragThreshold { threshold });
}
pub fn set_animations_enabled(&self, enabled: bool) {
self.send(&ClientMessage::SetAnimationsEnabled { enabled });
}
pub fn set_animation_duration_ms(&self, duration_ms: u32) {
self.send(&ClientMessage::SetAnimationDurationMs { duration_ms });
}
pub fn set_animation_curve(&self, curve: u32) {
self.send(&ClientMessage::SetAnimationCurve { curve });
}
pub fn set_animation_style(&self, style: u32) {
self.send(&ClientMessage::SetAnimationStyle { style });
}
pub fn set_animation_cubic_bezier(&self, x1: f32, y1: f32, x2: f32, y2: f32) {
self.send(&ClientMessage::SetAnimationCubicBezier { x1, y1, x2, y2 });
}
pub fn set_color_management_enabled(&self, enabled: bool) {
self.send(&ClientMessage::SetColorManagementEnabled { enabled });
}

View file

@ -551,6 +551,24 @@ pub enum ClientMessage<'a> {
SetUiDragThreshold {
threshold: i32,
},
SetAnimationsEnabled {
enabled: bool,
},
SetAnimationDurationMs {
duration_ms: u32,
},
SetAnimationCurve {
curve: u32,
},
SetAnimationStyle {
style: u32,
},
SetAnimationCubicBezier {
x1: f32,
y1: f32,
x2: f32,
y2: f32,
},
SetXScalingMode {
mode: XScalingMode,
},