// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; namespace SharpDX.RawInput { /// /// Defines the raw input data coming from the specified Human Interface Device (HID). /// public class HidInfo : DeviceInfo { /// /// Initializes a new instance of the class. /// public HidInfo() { } /// /// Initializes a new instance of the class. /// /// The raw device info. /// Name of the device. /// The device handle. internal HidInfo(ref RawDeviceInformation rawDeviceInfo, string deviceName, IntPtr deviceHandle) : base(ref rawDeviceInfo, deviceName, deviceHandle) { VendorId = rawDeviceInfo.Hid.VendorId; ProductId = rawDeviceInfo.Hid.ProductId; VersionNumber = rawDeviceInfo.Hid.VersionNumber; UsagePage = rawDeviceInfo.Hid.UsagePage; Usage = rawDeviceInfo.Hid.Usage; } /// /// Gets or sets the vendor id. /// /// /// The vendor id. /// /// unsigned int dwVendorId public int VendorId { get; set; } /// /// Gets or sets the product id. /// /// /// The product id. /// /// unsigned int dwProductId public int ProductId { get; set; } /// /// Gets or sets the version number. /// /// /// The version number. /// /// unsigned int dwVersionNumber public int VersionNumber { get; set; } /// /// Gets or sets the usage page. /// /// /// The usage page. /// /// HID_USAGE_PAGE usUsagePage public SharpDX.Multimedia.UsagePage UsagePage { get; set; } /// /// Gets or sets the usage. /// /// /// The usage. /// /// HID_USAGE_ID usUsage public SharpDX.Multimedia.UsageId Usage { get; set; } } }