101 lines
3.0 KiB
C#
101 lines
3.0 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using UnityEngine;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngineInternal.Input
|
|
{
|
|
// Token: 0x020003A0 RID: 928
|
|
public sealed class NativeInputSystem
|
|
{
|
|
// Token: 0x06003666 RID: 13926 RVA: 0x0005B250 File Offset: 0x00059450
|
|
[RequiredByNativeCode]
|
|
internal static void NotifyUpdate(NativeInputUpdateType updateType)
|
|
{
|
|
NativeUpdateCallback nativeUpdateCallback = NativeInputSystem.onUpdate;
|
|
if (nativeUpdateCallback != null)
|
|
{
|
|
nativeUpdateCallback(updateType);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06003667 RID: 13927 RVA: 0x0005B274 File Offset: 0x00059474
|
|
[RequiredByNativeCode]
|
|
internal static void NotifyEvents(int eventCount, IntPtr eventData)
|
|
{
|
|
NativeEventCallback nativeEventCallback = NativeInputSystem.onEvents;
|
|
if (nativeEventCallback != null)
|
|
{
|
|
nativeEventCallback(eventCount, eventData);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06003668 RID: 13928 RVA: 0x0005B298 File Offset: 0x00059498
|
|
[RequiredByNativeCode]
|
|
internal static bool HasDeviceDiscoveredHandler()
|
|
{
|
|
return NativeInputSystem.onDeviceDiscovered != null;
|
|
}
|
|
|
|
// Token: 0x06003669 RID: 13929 RVA: 0x0005B2B8 File Offset: 0x000594B8
|
|
[RequiredByNativeCode]
|
|
internal static void NotifyDeviceDiscovered(NativeInputDeviceInfo deviceInfo)
|
|
{
|
|
NativeDeviceDiscoveredCallback nativeDeviceDiscoveredCallback = NativeInputSystem.onDeviceDiscovered;
|
|
if (nativeDeviceDiscoveredCallback != null)
|
|
{
|
|
nativeDeviceDiscoveredCallback(deviceInfo);
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000C92 RID: 3218
|
|
// (get) Token: 0x0600366A RID: 13930
|
|
public static extern double zeroEventTime
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
}
|
|
|
|
// Token: 0x0600366B RID: 13931
|
|
[ThreadAndSerializationSafe]
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public static extern void SendInput(ref NativeInputEvent inputEvent);
|
|
|
|
// Token: 0x0600366C RID: 13932
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public static extern string GetDeviceConfiguration(int deviceId);
|
|
|
|
// Token: 0x0600366D RID: 13933
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public static extern string GetControlConfiguration(int deviceId, int controlIndex);
|
|
|
|
// Token: 0x0600366E RID: 13934 RVA: 0x0005B2DC File Offset: 0x000594DC
|
|
public static void SetPollingFrequency(float hertz)
|
|
{
|
|
if (hertz < 1f)
|
|
{
|
|
throw new ArgumentException("Polling frequency cannot be less than 1Hz");
|
|
}
|
|
NativeInputSystem.SetPollingFrequencyInternal(hertz);
|
|
}
|
|
|
|
// Token: 0x0600366F RID: 13935
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void SetPollingFrequencyInternal(float hertz);
|
|
|
|
// Token: 0x04000C6E RID: 3182
|
|
public static NativeUpdateCallback onUpdate;
|
|
|
|
// Token: 0x04000C6F RID: 3183
|
|
public static NativeEventCallback onEvents;
|
|
|
|
// Token: 0x04000C70 RID: 3184
|
|
public static NativeDeviceDiscoveredCallback onDeviceDiscovered;
|
|
}
|
|
}
|