Files
Xune/UIX.RenderApi.Skia/Microsoft/Iris/Render/Animation/AnimationInputProvider.cs
T

101 lines
4.0 KiB
C#
Raw Normal View History

2021-07-11 22:59:29 -05:00
// Decompiled with JetBrains decompiler
// Type: Microsoft.Iris.Render.Animation.AnimationInputProvider
// Assembly: UIX.RenderApi, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
// MVID: D47658B8-A8EA-43D6-8837-ECE823BFFFC1
// Assembly location: C:\Program Files\Zune\UIX.RenderApi.dll
using Microsoft.Iris.Render.Common;
using Microsoft.Iris.Render.Internal;
using Microsoft.Iris.Render.Protocol;
using Microsoft.Iris.Render.Protocols.Splash.Rendering;
using System;
namespace Microsoft.Iris.Render.Animation
{
2021-07-11 23:04:40 -05:00
internal class AnimationInputProvider :
SharedRenderObject,
IAnimationInputProvider,
IAnimatable,
ISharedRenderObject,
IRenderHandleOwner
2021-07-11 22:59:29 -05:00
{
2021-07-11 23:04:40 -05:00
private RemoteAnimationInputProvider m_remoteObject;
private ExternalAnimationInput m_externalInput;
internal AnimationInputProvider(
object objUser,
RenderSession session,
ExternalAnimationInput externalInput)
{
Debug2.Validate(externalInput != null, typeof(ArgumentNullException), nameof(externalInput));
this.m_remoteObject = session.BuildRemoteAnimationInputProvider(this, externalInput.UniqueId);
this.m_externalInput = externalInput;
this.RegisterUsage(objUser);
}
protected override void Dispose(bool inDispose)
{
try
{
if (inDispose && this.m_remoteObject != null)
this.m_remoteObject.Dispose();
2021-07-11 23:07:04 -05:00
this.m_remoteObject = null;
this.m_externalInput = null;
2021-07-11 23:04:40 -05:00
}
finally
{
base.Dispose(inDispose);
}
}
RENDERHANDLE IRenderHandleOwner.RenderHandle => this.m_remoteObject.RenderHandle;
2021-07-11 23:07:04 -05:00
void IRenderHandleOwner.OnDisconnect() => this.m_remoteObject = null;
2021-07-11 23:04:40 -05:00
void IAnimationInputProvider.PublishFloat(
string propertyName,
float value)
{
this.m_remoteObject.SendPublishFloat(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName), value);
}
void IAnimationInputProvider.PublishVector2(
string propertyName,
Vector2 value)
{
this.m_remoteObject.SendPublishVector2(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName), value);
}
void IAnimationInputProvider.PublishVector3(
string propertyName,
Vector3 value)
{
this.m_remoteObject.SendPublishVector3(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName), value);
}
void IAnimationInputProvider.PublishVector4(
string propertyName,
Vector4 value)
{
this.m_remoteObject.SendPublishVector4(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName), value);
}
void IAnimationInputProvider.PublishQuaternion(
string propertyName,
Quaternion value)
{
this.m_remoteObject.SendPublishQuaternion(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName), value);
}
void IAnimationInputProvider.RevokeFloat(string propertyName) => this.m_remoteObject.SendRevokeFloat(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName));
void IAnimationInputProvider.RevokeVector2(string propertyName) => this.m_remoteObject.SendRevokeVector2(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName));
void IAnimationInputProvider.RevokeVector3(string propertyName) => this.m_remoteObject.SendRevokeVector3(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName));
void IAnimationInputProvider.RevokeVector4(string propertyName) => this.m_remoteObject.SendRevokeVector4(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName));
void IAnimationInputProvider.RevokeQuaternion(string propertyName) => this.m_remoteObject.SendRevokeQuaternion(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName));
2021-07-11 22:59:29 -05:00
}
}