fixed signature of some structs
This commit is contained in:
parent
d44ceb9abe
commit
5427fd80ac
@ -52,8 +52,70 @@ using System;
|
||||
|
||||
namespace ANX.Framework.Audio
|
||||
{
|
||||
public struct AudioCategory
|
||||
public struct AudioCategory : IEquatable<AudioCategory>
|
||||
{
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SetVolume(float volume)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Stop(AudioStopOptions options)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != null && obj.GetType() == this.GetType())
|
||||
{
|
||||
return this == (AudioCategory)obj;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool Equals(AudioCategory other)
|
||||
{
|
||||
return this == other;
|
||||
}
|
||||
|
||||
public static bool operator ==(AudioCategory lhs, AudioCategory rhs)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public static bool operator !=(AudioCategory lhs, AudioCategory rhs)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,5 +55,50 @@ namespace ANX.Framework.Audio
|
||||
public struct RendererDetail
|
||||
{
|
||||
|
||||
public string FriendlyName
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string RendererId
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != null && obj.GetType() == this.GetType())
|
||||
{
|
||||
return this == (RendererDetail)obj;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(RendererDetail lhs, RendererDetail rhs)
|
||||
{
|
||||
return lhs.FriendlyName.Equals(rhs.FriendlyName) && lhs.RendererId.Equals(rhs.RendererId);
|
||||
}
|
||||
|
||||
public static bool operator !=(RendererDetail lhs, RendererDetail rhs)
|
||||
{
|
||||
return !lhs.FriendlyName.Equals(rhs.FriendlyName) || !lhs.RendererId.Equals(rhs.RendererId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,6 +55,14 @@ namespace ANX.Framework.GamerServices
|
||||
{
|
||||
public struct AvatarExpression
|
||||
{
|
||||
public AvatarEye LeftEye { get; set; }
|
||||
|
||||
public AvatarEyebrow LeftEyebrow { get; set; }
|
||||
|
||||
public AvatarMouth Mouth { get; set; }
|
||||
|
||||
public AvatarEye RightEye { get; set; }
|
||||
|
||||
public AvatarEyebrow RightEyebrow { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,26 @@ namespace ANX.Framework.GamerServices
|
||||
{
|
||||
public struct LeaderboardIdentity
|
||||
{
|
||||
public static LeaderboardIdentity Create(LeaderboardKey key)
|
||||
{
|
||||
throw new NotSupportedException("Games for Windows LIVE is not supported in ANX");
|
||||
}
|
||||
|
||||
public static LeaderboardIdentity Create(LeaderboardKey key, int gameMode)
|
||||
{
|
||||
throw new NotSupportedException("Games for Windows LIVE is not supported in ANX");
|
||||
}
|
||||
|
||||
public int GameMode
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Key
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,10 +54,13 @@ namespace ANX.Framework.Graphics
|
||||
{
|
||||
public struct VertexElement
|
||||
{
|
||||
#region Private Members
|
||||
private int offset;
|
||||
private VertexElementFormat elementFormat;
|
||||
private VertexElementUsage elementUsage;
|
||||
private int usageIndex;
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
public VertexElement(int offset, VertexElementFormat elementFormat, VertexElementUsage elementUsage, int usageIndex)
|
||||
{
|
||||
@ -114,5 +117,35 @@ namespace ANX.Framework.Graphics
|
||||
this.usageIndex = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{{Offset:{0} Format:{1} Usage:{2} UsageIndex:{3}}}", this.offset, this.elementFormat, this.elementUsage, this.usageIndex);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != null && obj.GetType() == this.GetType())
|
||||
{
|
||||
return this == (VertexElement)obj;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(VertexElement lhs, VertexElement rhs)
|
||||
{
|
||||
return lhs.offset == rhs.offset && lhs.elementFormat == rhs.elementFormat && lhs.elementUsage == rhs.elementUsage && lhs.usageIndex == rhs.usageIndex;
|
||||
}
|
||||
|
||||
public static bool operator !=(VertexElement lhs, VertexElement rhs)
|
||||
{
|
||||
return lhs.offset != rhs.offset || lhs.elementFormat != rhs.elementFormat || lhs.elementUsage != rhs.elementUsage || lhs.usageIndex == rhs.usageIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,72 @@ namespace ANX.Framework.Input.Touch
|
||||
{
|
||||
public struct GestureSample
|
||||
{
|
||||
#region Private Members
|
||||
private GestureType gestureType;
|
||||
private TimeSpan timestamp;
|
||||
private Vector2 position;
|
||||
private Vector2 position2;
|
||||
private Vector2 delta;
|
||||
private Vector2 delta2;
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
public GestureSample(GestureType gestureType, TimeSpan timestamp, Vector2 position, Vector2 position2, Vector2 delta, Vector2 delta2)
|
||||
{
|
||||
this.gestureType = gestureType;
|
||||
this.timestamp = timestamp;
|
||||
this.position = position;
|
||||
this.position2 = position2;
|
||||
this.delta = delta;
|
||||
this.delta2 = delta2;
|
||||
}
|
||||
|
||||
public Vector2 Delta
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.delta;
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 Delta2
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.delta2;
|
||||
}
|
||||
}
|
||||
|
||||
public GestureType GestureType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.gestureType;
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.position;
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 Position2
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.position2;
|
||||
}
|
||||
}
|
||||
|
||||
public TimeSpan Timestamp
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.timestamp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +56,10 @@ namespace ANX.Framework.Input.Touch
|
||||
{
|
||||
public struct TouchCollection : IList<TouchLocation>, ICollection<TouchLocation>, IEnumerable<TouchLocation>, IEnumerable
|
||||
{
|
||||
public TouchCollection(TouchLocation[] touches)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public int IndexOf(TouchLocation item)
|
||||
{
|
||||
@ -104,11 +108,24 @@ namespace ANX.Framework.Input.Touch
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool FindById(int id, out TouchLocation touchLocation)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
@ -119,7 +136,12 @@ namespace ANX.Framework.Input.Touch
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerator<TouchLocation> GetEnumerator()
|
||||
public Enumerator GetEnumerator()
|
||||
{
|
||||
return new Enumerator(this);
|
||||
}
|
||||
|
||||
IEnumerator<TouchLocation> IEnumerable<TouchLocation>.GetEnumerator()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
@ -128,5 +150,52 @@ namespace ANX.Framework.Input.Touch
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public struct Enumerator : IEnumerator<TouchLocation>, IDisposable, IEnumerator
|
||||
{
|
||||
private TouchCollection collection;
|
||||
private int position;
|
||||
internal Enumerator(TouchCollection collection)
|
||||
{
|
||||
this.collection = collection;
|
||||
this.position = -1;
|
||||
}
|
||||
|
||||
public TouchLocation Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.collection[this.position];
|
||||
}
|
||||
}
|
||||
public bool MoveNext()
|
||||
{
|
||||
this.position++;
|
||||
if (this.position >= this.collection.Count)
|
||||
{
|
||||
this.position = this.collection.Count;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
this.position = -1;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Current;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -54,10 +54,112 @@ namespace ANX.Framework.Input.Touch
|
||||
{
|
||||
public struct TouchLocation : IEquatable<TouchLocation>
|
||||
{
|
||||
#region Private members
|
||||
private int id;
|
||||
private TouchLocationState prevState;
|
||||
private Vector2 prevPos;
|
||||
private TouchLocationState state;
|
||||
private Vector2 pos;
|
||||
|
||||
#endregion // Private members
|
||||
|
||||
public TouchLocation(int id, TouchLocationState state, Vector2 position)
|
||||
{
|
||||
this.id = id;
|
||||
this.state = state;
|
||||
this.pos = position;
|
||||
this.prevState = TouchLocationState.Invalid;
|
||||
this.prevPos = Vector2.Zero;
|
||||
}
|
||||
|
||||
public TouchLocation(int id, TouchLocationState state, Vector2 position, TouchLocationState previousState, Vector2 previousPosition)
|
||||
{
|
||||
this.id = id;
|
||||
this.state = state;
|
||||
this.pos = position;
|
||||
this.prevState = previousState;
|
||||
this.prevPos = previousPosition;
|
||||
}
|
||||
|
||||
public bool TryGetPreviousLocation(out TouchLocation previousLocation)
|
||||
{
|
||||
if (this.prevState == TouchLocationState.Invalid)
|
||||
{
|
||||
previousLocation.id = -1;
|
||||
previousLocation.state = TouchLocationState.Invalid;
|
||||
previousLocation.pos = Vector2.Zero;
|
||||
previousLocation.prevState = TouchLocationState.Invalid;
|
||||
previousLocation.prevPos = Vector2.Zero;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
previousLocation.id = this.id;
|
||||
previousLocation.state = this.prevState;
|
||||
previousLocation.pos = this.pos;
|
||||
previousLocation.prevState = TouchLocationState.Invalid;
|
||||
previousLocation.prevPos = this.prevPos;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{{Position:{0}}}", this.pos);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.id.GetHashCode() + this.pos.X.GetHashCode() + this.pos.Y.GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(Object other)
|
||||
{
|
||||
if (other != null && other.GetType() == this.GetType())
|
||||
{
|
||||
return this == (TouchLocation)other;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool Equals(TouchLocation other)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return this.id == other.id && this.pos == other.pos && this.prevPos == other.prevPos;
|
||||
}
|
||||
|
||||
public static bool operator ==(TouchLocation lhs, TouchLocation rhs)
|
||||
{
|
||||
return lhs.id == rhs.id && lhs.pos == rhs.pos && lhs.prevPos == rhs.prevPos;
|
||||
}
|
||||
|
||||
public static bool operator !=(TouchLocation lhs, TouchLocation rhs)
|
||||
{
|
||||
return lhs.id != rhs.id || lhs.pos != rhs.pos || lhs.prevPos != rhs.prevPos;
|
||||
}
|
||||
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.pos;
|
||||
}
|
||||
}
|
||||
|
||||
public TouchLocationState State
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.state;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,5 +55,17 @@ namespace ANX.Framework.Input.Touch
|
||||
public struct TouchPanelCapabilities
|
||||
{
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int MaximumTouchCount
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user