Class GorgonRawHID
Provides state for human interface data returned from Raw Input.
Implements
Inherited Members
Namespace: Gorgon.Input
Assembly: Gorgon.Input.dll
Syntax
public class GorgonRawHID : IGorgonRawHID, IGorgonRawInputDevice, IGorgonRawInputDeviceData<GorgonRawHIDData>, IDisposable
Remarks
This allows a user to read, and parse human interface device data from an aribtrary device. It is recommended that this object be wrapped by an actual object that will be used to present the data in an easy to manipulate format.
This object implements IDisposable because it manipulates native memory. It is necessary to call the Dispose() method in order to ensure there is no memory leak when finished with this object.
Constructors
| Edit this page View SourceGorgonRawHID(GorgonRawHIDInfo)
Initializes a new instance of the GorgonRawHID class.
Declaration
public GorgonRawHID(GorgonRawHIDInfo hidInfo)
Parameters
Type | Name | Description |
---|---|---|
GorgonRawHIDInfo | hidInfo | The human interface device information used to determine which keyboard to use. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
Properties
| Edit this page View SourceCount
Property to return the number of inputs in the Data.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
Data
Property to return a pointer to the block of memory that stores the HID data.
Declaration
public GorgonPtr<byte> Data { get; }
Property Value
Type | Description |
---|---|
GorgonPtr<byte> |
DeviceType
Property to return the type of device.
Declaration
public RawInputType DeviceType { get; }
Property Value
Type | Description |
---|---|
RawInputType |
HIDSize
Property to return the size of an individual HID input, in bytes.
Declaration
public int HIDSize { get; }
Property Value
Type | Description |
---|---|
int |
Handle
Property to return the handle for the device.
Declaration
public nint Handle { get; }
Property Value
Type | Description |
---|---|
nint |
Info
Property to return information about the Raw Input Human Interface Device.
Declaration
public IGorgonRawHIDInfo Info { get; }
Property Value
Type | Description |
---|---|
IGorgonRawHIDInfo |
PreParsedData
Property to return the pre-parsed data for this HID.
Declaration
public GorgonPtr<byte> PreParsedData { get; }
Property Value
Type | Description |
---|---|
GorgonPtr<byte> |
Methods
| Edit this page View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Events
| Edit this page View SourceDataReceived
Event triggered when Raw Input receives data from the device.
Declaration
public event EventHandler<GorgonHIDEventArgs> DataReceived
Event Type
Type | Description |
---|---|
EventHandler<GorgonHIDEventArgs> |