mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +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)
|
RawServoAnimationValueBorrowed)
|
||||||
-> f32;
|
-> f32;
|
||||||
}
|
}
|
||||||
|
extern "C" {
|
||||||
|
pub fn Servo_AnimationValue_Opacity(arg1: f32)
|
||||||
|
-> RawServoAnimationValueStrong;
|
||||||
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Servo_AnimationValue_GetTransform(value:
|
pub fn Servo_AnimationValue_GetTransform(value:
|
||||||
RawServoAnimationValueBorrowed,
|
RawServoAnimationValueBorrowed,
|
||||||
|
|
|
@ -634,9 +634,9 @@ pub extern "C" fn Servo_Shorthand_AnimationValues_Serialize(shorthand_property:
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_AnimationValue_GetOpacity(value: RawServoAnimationValueBorrowed)
|
pub extern "C" fn Servo_AnimationValue_GetOpacity(
|
||||||
-> f32
|
value: RawServoAnimationValueBorrowed
|
||||||
{
|
) -> f32 {
|
||||||
let value = AnimationValue::as_arc(&value);
|
let value = AnimationValue::as_arc(&value);
|
||||||
if let AnimationValue::Opacity(opacity) = **value {
|
if let AnimationValue::Opacity(opacity) = **value {
|
||||||
opacity
|
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]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_AnimationValue_GetTransform(value: RawServoAnimationValueBorrowed,
|
pub extern "C" fn Servo_AnimationValue_GetTransform(value: RawServoAnimationValueBorrowed,
|
||||||
list: *mut structs::RefPtr<nsCSSValueSharedList>)
|
list: *mut structs::RefPtr<nsCSSValueSharedList>)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue