mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-11 04:56:44 +00:00
Added tons of xml-comments.
This commit is contained in:
1 parent
57ad0f30e2
commit
6de1087c1f
23 files changed
+422
-51
No files matched your search
+28
-8
@@ -10,6 +10,9 @@ namespace CUE.NET.Native
|
||||
{
|
||||
#region Libary Management
|
||||
|
||||
/// <summary>
|
||||
/// Gets the loaded architecture (x64/x86).
|
||||
/// </summary>
|
||||
internal static string LoadedArchitecture { get; private set; }
|
||||
|
||||
static _CUESDK()
|
||||
@@ -25,8 +28,10 @@ namespace CUE.NET.Native
|
||||
|
||||
#region SDK-IMPORTS
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: set specified leds to some colors. The color is retained until changed by successive calls. This function does not take logical layout into account
|
||||
/// </summary>
|
||||
[DllImport("CUESDK_2013.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
// set specified leds to some colors. The color is retained until changed by successive calls. This function does not take logical layout into account
|
||||
internal static extern bool CorsairSetLedsColors(int size, IntPtr ledsColors);
|
||||
|
||||
//#if WIN64
|
||||
@@ -36,32 +41,47 @@ namespace CUE.NET.Native
|
||||
//#endif
|
||||
//internal static extern bool CorsairSetLedsColorsAsync(int size, CorsairLedColor* ledsColors, void(*CallbackType)(void*, bool, CorsairError), void* context);
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: returns number of connected Corsair devices that support lighting control.
|
||||
/// </summary>
|
||||
[DllImport("CUESDK_2013.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
// returns number of connected Corsair devices that support lighting control.
|
||||
internal static extern int CorsairGetDeviceCount();
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: returns information about device at provided index
|
||||
/// </summary>
|
||||
[DllImport("CUESDK_2013.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
// returns information about device at provided index
|
||||
internal static extern IntPtr CorsairGetDeviceInfo(int deviceIndex);
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: provides list of keyboard LEDs with their physical positions.
|
||||
/// </summary>
|
||||
[DllImport("CUESDK_2013.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
// provides list of keyboard LEDs with their physical positions.
|
||||
internal static extern IntPtr CorsairGetLedPositions();
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: retrieves led id for key name taking logical layout into account.
|
||||
/// </summary>
|
||||
[DllImport("CUESDK_2013.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
// retrieves led id for key name taking logical layout into account.
|
||||
internal static extern CorsairKeyboardKeyId CorsairGetLedIdForKeyName(char keyName);
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: requestes control using specified access mode.
|
||||
/// By default client has shared control over lighting so there is no need to call CorsairRequestControl unless client requires exclusive control
|
||||
/// </summary>
|
||||
[DllImport("CUESDK_2013.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
// requestes control using specified access mode. By default client has shared control over lighting so there is no need to call CorsairRequestControl unless client requires exclusive control
|
||||
internal static extern bool CorsairRequestControl(CorsairAccessMode accessMode);
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: checks file and protocol version of CUE to understand which of SDK functions can be used with this version of CUE
|
||||
/// </summary>
|
||||
[DllImport("CUESDK_2013.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
// checks file and protocol version of CUE to understand which of SDK functions can be used with this version of CUE
|
||||
internal static extern _CorsairProtocolDetails CorsairPerformProtocolHandshake();
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: returns last error that occured while using any of Corsair* functions
|
||||
/// </summary>
|
||||
[DllImport("CUESDK_2013.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
// returns last error that occured while using any of Corsair* functions
|
||||
internal static extern CorsairError CorsairGetLastError();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -9,13 +9,35 @@ using CUE.NET.Devices.Generic.Enums;
|
||||
namespace CUE.NET.Native
|
||||
{
|
||||
// ReSharper disable once InconsistentNaming
|
||||
/// <summary>
|
||||
/// CUE-SDK: contains information about device
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class _CorsairDeviceInfo // contains information about device
|
||||
internal class _CorsairDeviceInfo
|
||||
{
|
||||
internal CorsairDeviceType type; // enum describing device type
|
||||
internal IntPtr model; // null - terminated device model(like “K95RGB”)
|
||||
internal int physicalLayout; // enum describing physical layout of the keyboard or mouse
|
||||
internal int logicalLayout; // enum describing logical layout of the keyboard as set in CUE settings
|
||||
internal int capsMask; // mask that describes device capabilities, formed as logical “or” of CorsairDeviceCaps enum values
|
||||
/// <summary>
|
||||
/// CUE-SDK: enum describing device type
|
||||
/// </summary>
|
||||
internal CorsairDeviceType type;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: null - terminated device model(like “K95RGB”)
|
||||
/// </summary>
|
||||
internal IntPtr model;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: enum describing physical layout of the keyboard or mouse
|
||||
/// </summary>
|
||||
internal int physicalLayout;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: enum describing logical layout of the keyboard as set in CUE settings
|
||||
/// </summary>
|
||||
internal int logicalLayout;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: mask that describes device capabilities, formed as logical “or” of CorsairDeviceCaps enum values
|
||||
/// </summary>
|
||||
internal int capsMask;
|
||||
}
|
||||
}
|
||||
@@ -6,14 +6,31 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace CUE.NET.Native
|
||||
{
|
||||
// ReSharper disable once InconsistentNaming
|
||||
// ReSharper disable once InconsistentNaming
|
||||
/// <summary>
|
||||
/// CUE-SDK: contains information about led and its color
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class _CorsairLedColor // contains information about led and its color
|
||||
internal class _CorsairLedColor
|
||||
{
|
||||
/// <summary>
|
||||
/// CUE-SDK: identifier of LED to set
|
||||
/// </summary>
|
||||
internal int ledId;
|
||||
|
||||
internal int ledId; // identifier of LED to set
|
||||
internal int r; // red brightness[0..255]
|
||||
internal int g; // green brightness[0..255]
|
||||
internal int b; // blue brightness[0..255]
|
||||
/// <summary>
|
||||
/// CUE-SDK: red brightness[0..255]
|
||||
/// </summary>
|
||||
internal int r;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: green brightness[0..255]
|
||||
/// </summary>
|
||||
internal int g;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: blue brightness[0..255]
|
||||
/// </summary>
|
||||
internal int b;
|
||||
};
|
||||
}
|
||||
@@ -8,13 +8,36 @@ using CUE.NET.Devices.Keyboard.Enums;
|
||||
namespace CUE.NET.Native
|
||||
{
|
||||
// ReSharper disable once InconsistentNaming
|
||||
/// <summary>
|
||||
/// CUE-SDK: contains led id and position of led rectangle.Most of the keys are rectangular.
|
||||
/// In case if key is not rectangular(like Enter in ISO / UK layout) it returns the smallest rectangle that fully contains the key
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class _CorsairLedPosition // contains led id and position of led rectangle.Most of the keys are rectangular. In case if key is not rectangular(like Enter in ISO / UK layout) it returns the smallest rectangle that fully contains the key
|
||||
internal class _CorsairLedPosition
|
||||
{
|
||||
internal CorsairKeyboardKeyId ledId; // identifier of led
|
||||
/// <summary>
|
||||
/// CUE-SDK: identifier of led
|
||||
/// </summary>
|
||||
internal CorsairKeyboardKeyId ledId;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: values in mm
|
||||
/// </summary>
|
||||
internal double top;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: values in mm
|
||||
/// </summary>
|
||||
internal double left;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: values in mm
|
||||
/// </summary>
|
||||
internal double height;
|
||||
internal double width; // values in mm
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: values in mm
|
||||
/// </summary>
|
||||
internal double width;
|
||||
}
|
||||
}
|
||||
@@ -8,10 +8,20 @@ using System.Runtime.InteropServices;
|
||||
namespace CUE.NET.Native
|
||||
{
|
||||
// ReSharper disable once InconsistentNaming
|
||||
/// <summary>
|
||||
/// CUE-SDK: contains number of leds and arrays with their positions
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class _CorsairLedPositions // contains number of leds and arrays with their positions
|
||||
internal class _CorsairLedPositions
|
||||
{
|
||||
internal int numberOfLed; // integer value.Number of elements in following array
|
||||
internal IntPtr pLedPosition; // array of led positions
|
||||
/// <summary>
|
||||
/// CUE-SDK: integer value.Number of elements in following array
|
||||
/// </summary>
|
||||
internal int numberOfLed;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: array of led positions
|
||||
/// </summary>
|
||||
internal IntPtr pLedPosition;
|
||||
}
|
||||
}
|
||||
@@ -8,13 +8,37 @@ using System.Runtime.InteropServices;
|
||||
namespace CUE.NET.Native
|
||||
{
|
||||
// ReSharper disable once InconsistentNaming
|
||||
/// <summary>
|
||||
/// CUE-SDK: contains information about SDK and CUE versions
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct _CorsairProtocolDetails // contains information about SDK and CUE versions
|
||||
internal struct _CorsairProtocolDetails
|
||||
{
|
||||
internal IntPtr sdkVersion; // null - terminated string containing version of SDK(like “1.0.0.1”). Always contains valid value even if there was no CUE found
|
||||
internal IntPtr serverVersion; // null - terminated string containing version of CUE(like “1.0.0.1”) or NULL if CUE was not found.
|
||||
internal int sdkProtocolVersion; // integer number that specifies version of protocol that is implemented by current SDK. Numbering starts from 1. Always contains valid value even if there was no CUE found
|
||||
internal int serverProtocolVersion; // integer number that specifies version of protocol that is implemented by CUE. Numbering starts from 1. If CUE was not found then this value will be 0
|
||||
internal byte breakingChanges; // boolean value that specifies if there were breaking changes between version of protocol implemented by server and client
|
||||
/// <summary>
|
||||
/// CUE-SDK: null - terminated string containing version of SDK(like “1.0.0.1”). Always contains valid value even if there was no CUE found
|
||||
/// </summary>
|
||||
internal IntPtr sdkVersion;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: null - terminated string containing version of CUE(like “1.0.0.1”) or NULL if CUE was not found.
|
||||
/// </summary>
|
||||
internal IntPtr serverVersion;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: integer number that specifies version of protocol that is implemented by current SDK.
|
||||
/// Numbering starts from 1. Always contains valid value even if there was no CUE found
|
||||
/// </summary>
|
||||
internal int sdkProtocolVersion;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: integer number that specifies version of protocol that is implemented by CUE.
|
||||
/// Numbering starts from 1. If CUE was not found then this value will be 0
|
||||
/// </summary>
|
||||
internal int serverProtocolVersion;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: boolean value that specifies if there were breaking changes between version of protocol implemented by server and client
|
||||
/// </summary>
|
||||
internal byte breakingChanges;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user