summaryrefslogtreecommitdiff
path: root/Assembly_Firstpass/Steamworks/ScreenshotHandle.cs
blob: 6e32e4456b17458085ae7fce88619e3733c2452d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;

namespace Steamworks;

[Serializable]
public struct ScreenshotHandle : IEquatable<ScreenshotHandle>, IComparable<ScreenshotHandle>
{
	public static readonly ScreenshotHandle Invalid = new ScreenshotHandle(0u);

	public uint m_ScreenshotHandle;

	public ScreenshotHandle(uint value)
	{
		m_ScreenshotHandle = value;
	}

	public override string ToString()
	{
		return m_ScreenshotHandle.ToString();
	}

	public override bool Equals(object other)
	{
		if (other is ScreenshotHandle)
		{
			return this == (ScreenshotHandle)other;
		}
		return false;
	}

	public override int GetHashCode()
	{
		return m_ScreenshotHandle.GetHashCode();
	}

	public static bool operator ==(ScreenshotHandle x, ScreenshotHandle y)
	{
		return x.m_ScreenshotHandle == y.m_ScreenshotHandle;
	}

	public static bool operator !=(ScreenshotHandle x, ScreenshotHandle y)
	{
		return !(x == y);
	}

	public static explicit operator ScreenshotHandle(uint value)
	{
		return new ScreenshotHandle(value);
	}

	public static explicit operator uint(ScreenshotHandle that)
	{
		return that.m_ScreenshotHandle;
	}

	public bool Equals(ScreenshotHandle other)
	{
		return m_ScreenshotHandle == other.m_ScreenshotHandle;
	}

	public int CompareTo(ScreenshotHandle other)
	{
		return m_ScreenshotHandle.CompareTo(other.m_ScreenshotHandle);
	}
}