NativeBindings
Inherits from:
MagicLeapNativeBindings
Public Methods
MLResult.Code MLInputGetConnectedDevices
Gets the device IDs of all connected devices.
public MLResult.Code MLInputGetConnectedDevices(
ulong Handle,
IntPtr InoutDevices
)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | Handle | |
| IntPtr | InoutDevices |
MLResult.Code MLInputReleaseConnectedDevicesList
Releases the contents of #MLInputConnectedDevicesList populated by #MLInputGetConnectedDevices.
public MLResult.Code MLInputReleaseConnectedDevicesList(
ulong Handle,
IntPtr Devices
)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | Handle | |
| IntPtr | Devices |
MLResult.Code MLInputSetControllerCallbacksEx
Sets the callbacks for controller input events.
public MLResult.Code MLInputSetControllerCallbacksEx(
ulong Handle,
ref MLInputControllerCallbacksEx Callbacks,
IntPtr UserData
)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | Handle | |
| ref MLInputControllerCallbacksEx | Callbacks | A structure containing callbacks for input controller events. The final parameter to all the callbacks is a void *, which will point to whatever payload data the user provides in MLInputSetControllerCallbacksEx. Individual callbacks which are not required by the client can be NULL. This structure must be initialized by calling MLInputControllerCallbacksExInit() before use. |
| IntPtr | UserData |
delegate void OnButtonClickDelegate
Callback structure for NativeBindings.OnButtonClick.
public delegate void OnButtonClickDelegate(
ushort controllerId,
MLInputControllerButton button,
IntPtr data
)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | controllerId | |
| MLInputControllerButton | button | |
| IntPtr | data |
delegate void OnButtonDownDelegate
Callback structure for NativeBindings.OnButtonDown.
public delegate void OnButtonDownDelegate(
ushort controllerId,
MLInputControllerButton button,
IntPtr data
)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | controllerId | |
| MLInputControllerButton | button | |
| IntPtr | data |
delegate void OnButtonUpDelegate
Callback structure for NativeBindings.OnButtonUp.
public delegate void OnButtonUpDelegate(
ushort controllerId,
MLInputControllerButton button,
IntPtr data
)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | controllerId | |
| MLInputControllerButton | button | |
| IntPtr | data |
delegate void OnConnectDelegate
Callback structure for NativeBindings.OnConnect.
public delegate void OnConnectDelegate(
ushort controllerId,
IntPtr data
)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | controllerId | |
| IntPtr | data |
delegate void OnDisconnectDelegate
Callback structure for NativeBindings.OnDisconnect.
public delegate void OnDisconnectDelegate(
ushort controllerId,
IntPtr data
)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | controllerId | |
| IntPtr | data |
delegate void OnTouchpadGestureContinueDelegate
Callback structure for NativeBindings.OnTouchpadGestureContinue.
public delegate void OnTouchpadGestureContinueDelegate(
ushort controllerId,
IntPtr touchpadGesture,
IntPtr data
)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | controllerId | |
| IntPtr | touchpadGesture | |
| IntPtr | data |
delegate void OnTouchpadGestureDelegate
Callback structure for NativeBindings.OnTouchpadGesture.
public delegate void OnTouchpadGestureDelegate(
ushort controllerId,
IntPtr touchpadGesture,
IntPtr data
)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | controllerId | |
| IntPtr | touchpadGesture | |
| IntPtr | data |
delegate void OnTouchpadGestureEndDelegate
Callback structure for NativeBindings.OnTouchpadGestureEnd.
public delegate void OnTouchpadGestureEndDelegate(
ushort controllerId,
IntPtr touchpadGesture,
IntPtr data
)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | controllerId | |
| IntPtr | touchpadGesture | |
| IntPtr | data |
delegate void OnTriggerDelegate
Callback structure for NativeBindings.OnTrigger.
public delegate void OnTriggerDelegate(
ushort controllerId,
MLInputControllerTriggerEvent @ event,
float depth,
IntPtr data
)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | controllerId | |
| MLInputControllerTriggerEvent @ | event | Trigger events types. |
| float | depth | |
| IntPtr | data |