forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAndroidInput.bindings.cs
More file actions
65 lines (52 loc) · 1.98 KB
/
Copy pathAndroidInput.bindings.cs
File metadata and controls
65 lines (52 loc) · 1.98 KB
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
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using UnityEngine.Bindings;
using System;
namespace UnityEngine
{
// AndroidInput provides support for off-screen touch input, such as a touchpad.
[NativeHeader("Runtime/Input/GetInput.h")]
public class AndroidInput
{
// Hide constructor
private AndroidInput() {}
// Returns object representing status of a specific touch on a secondary touchpad (Does not allocate temporary variables).
public static Touch GetSecondaryTouch(int index)
{
return new Touch();
}
// Number of secondary touches. Guaranteed not to change throughout the frame. (RO).
public static int touchCountSecondary
{
get { return GetTouchCount_Bindings(); }
}
[FreeFunction]
[NativeConditional("PLATFORM_ANDROID")]
internal static extern int GetTouchCount_Bindings();
// Property indicating whether the system provides secondary touch input.
public static bool secondaryTouchEnabled
{
get { return IsInputDeviceEnabled_Bindings(); }
}
[FreeFunction]
[NativeConditional("PLATFORM_ANDROID")]
internal static extern bool IsInputDeviceEnabled_Bindings();
// Property indicating the width of the secondary touchpad.
public static int secondaryTouchWidth
{
get { return GetTouchpadWidth(); }
}
[FreeFunction]
[NativeConditional("PLATFORM_ANDROID")]
internal static extern int GetTouchpadWidth();
// Property indicating the height of the secondary touchpad.
public static int secondaryTouchHeight
{
get { return GetTouchpadHeight(); }
}
[FreeFunction]
[NativeConditional("PLATFORM_ANDROID")]
internal static extern int GetTouchpadHeight();
}
}