Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
NativeMethods.cs
Go to the documentation of this file.
2
4
5internal class NativeMethods
6{
7 private const int LOGI_DEVICETYPE_MONOCHROME_ORD = 0;
8
9 private const int LOGI_DEVICETYPE_RGB_ORD = 1;
10
11 private const int LOGI_DEVICETYPE_PERKEY_RGB_ORD = 2;
12
13 public const int LOGI_DEVICETYPE_MONOCHROME = 1;
14
15 public const int LOGI_DEVICETYPE_RGB = 2;
16
17 public const int LOGI_DEVICETYPE_PERKEY_RGB = 4;
18
19 public const int LOGI_LED_BITMAP_WIDTH = 21;
20
21 public const int LOGI_LED_BITMAP_HEIGHT = 6;
22
23 public const int LOGI_LED_BITMAP_BYTES_PER_KEY = 4;
24
25 public const int LOGI_LED_BITMAP_SIZE = 504;
26
27 public const int LOGI_LED_DURATION_INFINITE = 0;
28
29 public const string DLL_NAME = "LogitechLedEnginesWrapper ";
30
31 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
32 public static extern bool LogiLedInit();
33
34 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
35 public static extern bool LogiLedGetConfigOptionNumber([MarshalAs(UnmanagedType.LPWStr)] string configPath, ref double defaultNumber);
36
37 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
38 public static extern bool LogiLedGetConfigOptionBool([MarshalAs(UnmanagedType.LPWStr)] string configPath, ref bool defaultRed);
39
40 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
41 public static extern bool LogiLedGetConfigOptionColor([MarshalAs(UnmanagedType.LPWStr)] string configPath, ref int defaultRed, ref int defaultGreen, ref int defaultBlue);
42
43 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
44 public static extern bool LogiLedSetTargetDevice(int targetDevice);
45
46 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
47 public static extern bool LogiLedGetSdkVersion(ref int majorNum, ref int minorNum, ref int buildNum);
48
49 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
50 public static extern bool LogiLedSaveCurrentLighting();
51
52 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
53 public static extern bool LogiLedSetLighting(int redPercentage, int greenPercentage, int bluePercentage);
54
55 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
56 public static extern bool LogiLedRestoreLighting();
57
58 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
59 public static extern bool LogiLedFlashLighting(int redPercentage, int greenPercentage, int bluePercentage, int milliSecondsDuration, int milliSecondsInterval);
60
61 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
62 public static extern bool LogiLedPulseLighting(int redPercentage, int greenPercentage, int bluePercentage, int milliSecondsDuration, int milliSecondsInterval);
63
64 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
65 public static extern bool LogiLedStopEffects();
66
67 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
68 public static extern bool LogiLedExcludeKeysFromBitmap(KeyName[] keyList, int listCount);
69
70 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
71 public static extern bool LogiLedSetLightingFromBitmap(byte[] bitmap);
72
73 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
74 public static extern bool LogiLedSetLightingForKeyWithScanCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage);
75
76 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
77 public static extern bool LogiLedSetLightingForKeyWithHidCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage);
78
79 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
80 public static extern bool LogiLedSetLightingForKeyWithQuartzCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage);
81
82 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
83 public static extern bool LogiLedSetLightingForKeyWithKeyName(KeyName keyCode, int redPercentage, int greenPercentage, int bluePercentage);
84
85 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
86 public static extern bool LogiLedSaveLightingForKey(KeyName keyName);
87
88 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
89 public static extern bool LogiLedRestoreLightingForKey(KeyName keyName);
90
91 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
92 public static extern bool LogiLedFlashSingleKey(KeyName keyName, int redPercentage, int greenPercentage, int bluePercentage, int msDuration, int msInterval);
93
94 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
95 public static extern bool LogiLedPulseSingleKey(KeyName keyName, int startRedPercentage, int startGreenPercentage, int startBluePercentage, int finishRedPercentage, int finishGreenPercentage, int finishBluePercentage, int msDuration, bool isInfinite);
96
97 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
98 public static extern bool LogiLedStopEffectsOnKey(KeyName keyName);
99
100 [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)]
101 public static extern void LogiLedShutdown();
102}
static bool LogiLedSaveLightingForKey(KeyName keyName)
static bool LogiLedGetSdkVersion(ref int majorNum, ref int minorNum, ref int buildNum)
static bool LogiLedStopEffectsOnKey(KeyName keyName)
static bool LogiLedGetConfigOptionColor([MarshalAs(UnmanagedType.LPWStr)] string configPath, ref int defaultRed, ref int defaultGreen, ref int defaultBlue)
static bool LogiLedFlashSingleKey(KeyName keyName, int redPercentage, int greenPercentage, int bluePercentage, int msDuration, int msInterval)
static bool LogiLedFlashLighting(int redPercentage, int greenPercentage, int bluePercentage, int milliSecondsDuration, int milliSecondsInterval)
static bool LogiLedRestoreLightingForKey(KeyName keyName)
static bool LogiLedSetLightingFromBitmap(byte[] bitmap)
static bool LogiLedGetConfigOptionNumber([MarshalAs(UnmanagedType.LPWStr)] string configPath, ref double defaultNumber)
static bool LogiLedSetTargetDevice(int targetDevice)
static bool LogiLedGetConfigOptionBool([MarshalAs(UnmanagedType.LPWStr)] string configPath, ref bool defaultRed)
static bool LogiLedSetLightingForKeyWithQuartzCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
static bool LogiLedSetLightingForKeyWithHidCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
static bool LogiLedPulseLighting(int redPercentage, int greenPercentage, int bluePercentage, int milliSecondsDuration, int milliSecondsInterval)
static bool LogiLedPulseSingleKey(KeyName keyName, int startRedPercentage, int startGreenPercentage, int startBluePercentage, int finishRedPercentage, int finishGreenPercentage, int finishBluePercentage, int msDuration, bool isInfinite)
static bool LogiLedExcludeKeysFromBitmap(KeyName[] keyList, int listCount)
static bool LogiLedSetLightingForKeyWithKeyName(KeyName keyCode, int redPercentage, int greenPercentage, int bluePercentage)
static bool LogiLedSetLighting(int redPercentage, int greenPercentage, int bluePercentage)
static bool LogiLedSetLightingForKeyWithScanCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)