mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Add Servo_AnimationValue_Opacity which creates an AnimationValue of opacity.
This commit is contained in:
parent
d0213b2111
commit
f02bd01add
2 changed files with 14 additions and 3 deletions
|
@ -2618,6 +2618,10 @@ extern "C" {
|
|||
RawServoAnimationValueBorrowed)
|
||||
-> f32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_AnimationValue_Opacity(arg1: f32)
|
||||
-> RawServoAnimationValueStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_AnimationValue_GetTransform(value:
|
||||
RawServoAnimationValueBorrowed,
|
||||
|
|
|
@ -634,9 +634,9 @@ pub extern "C" fn Servo_Shorthand_AnimationValues_Serialize(shorthand_property:
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_AnimationValue_GetOpacity(value: RawServoAnimationValueBorrowed)
|
||||
-> f32
|
||||
{
|
||||
pub extern "C" fn Servo_AnimationValue_GetOpacity(
|
||||
value: RawServoAnimationValueBorrowed
|
||||
) -> f32 {
|
||||
let value = AnimationValue::as_arc(&value);
|
||||
if let AnimationValue::Opacity(opacity) = **value {
|
||||
opacity
|
||||
|
@ -645,6 +645,13 @@ pub extern "C" fn Servo_AnimationValue_GetOpacity(value: RawServoAnimationValueB
|
|||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_AnimationValue_Opacity(
|
||||
opacity: f32
|
||||
) -> RawServoAnimationValueStrong {
|
||||
Arc::new(AnimationValue::Opacity(opacity)).into_strong()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_AnimationValue_GetTransform(value: RawServoAnimationValueBorrowed,
|
||||
list: *mut structs::RefPtr<nsCSSValueSharedList>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue