/// <summary> /// Converts the native TabletDeviceStatesListNative structure into an array of TabletState structures. /// </summary> /// <param name="deviceStatesNative">The retrieved TabletDeviceStatesListNative structure.</param> /// <returns>Returns an array of TabletState structures.</returns> public static MLInput.TabletState[] DeviceStatesToArray(TabletDeviceStatesListNative deviceStatesNative) { MLInput.TabletState[] deviceStates = new MLInput.TabletState[deviceStatesNative.Count]; for (int i = 0; i < (int)deviceStatesNative.Count; i++) { deviceStates[i] = Marshal.PtrToStructure <NativeBindings.TabletDeviceStateNative>(deviceStatesNative.Data + (i * Marshal.SizeOf(typeof(NativeBindings.TabletDeviceStateNative)))).Data; } return(deviceStates); }
public static extern MLResult.Code MLInputReleaseTabletDeviceStates(ulong handle, ref TabletDeviceStatesListNative tablet_device_states);
public static extern MLResult.Code MLInputGetTabletDeviceStates(ulong handle, byte tablet_device_id, ref TabletDeviceStatesListNative out_tablet_device_states);