-
Notifications
You must be signed in to change notification settings - Fork 0
/
LogitechGSDK.cs
80 lines (61 loc) · 3.42 KB
/
LogitechGSDK.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System.Collections;
using System.Runtime.InteropServices;
using System.Collections.Specialized;
using System;
namespace LogiWiz
{
public class LogitechGSDK
{
//LCD SDK
public const int LOGI_LCD_COLOR_BUTTON_LEFT = (0x00000100);
public const int LOGI_LCD_COLOR_BUTTON_RIGHT = (0x00000200);
public const int LOGI_LCD_COLOR_BUTTON_OK = (0x00000400);
public const int LOGI_LCD_COLOR_BUTTON_CANCEL = (0x00000800);
public const int LOGI_LCD_COLOR_BUTTON_UP = (0x00001000);
public const int LOGI_LCD_COLOR_BUTTON_DOWN = (0x00002000);
public const int LOGI_LCD_COLOR_BUTTON_MENU = (0x00004000);
public const int LOGI_LCD_MONO_BUTTON_0 = (0x00000001);
public const int LOGI_LCD_MONO_BUTTON_1 = (0x00000002);
public const int LOGI_LCD_MONO_BUTTON_2 = (0x00000004);
public const int LOGI_LCD_MONO_BUTTON_3 = (0x00000008);
public const int LOGI_LCD_MONO_WIDTH = 160;
public const int LOGI_LCD_MONO_HEIGHT = 43;
public const int LOGI_LCD_COLOR_WIDTH = 320;
public const int LOGI_LCD_COLOR_HEIGHT = 240;
public const int LOGI_LCD_TYPE_MONO = (0x00000001);
public const int LOGI_LCD_TYPE_COLOR = (0x00000002);
[DllImport("LogitechLcdEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
public static extern bool LogiLcdInit(String friendlyName, int lcdType);
[DllImport("LogitechLcdEnginesWrapper ", CharSet = CharSet.Unicode,
CallingConvention = CallingConvention.Cdecl)]
public static extern bool LogiLcdIsConnected(int lcdType);
[DllImport("LogitechLcdEnginesWrapper ", CharSet = CharSet.Unicode,
CallingConvention = CallingConvention.Cdecl)]
public static extern bool LogiLcdIsButtonPressed(int button);
[DllImport("LogitechLcdEnginesWrapper ", CharSet = CharSet.Unicode,
CallingConvention = CallingConvention.Cdecl)]
public static extern void LogiLcdUpdate();
[DllImport("LogitechLcdEnginesWrapper ", CharSet = CharSet.Unicode,
CallingConvention = CallingConvention.Cdecl)]
public static extern void LogiLcdShutdown();
// Monochrome LCD functions
[DllImport("LogitechLcdEnginesWrapper ", CharSet = CharSet.Unicode,
CallingConvention = CallingConvention.Cdecl)]
public static extern bool LogiLcdMonoSetBackground(byte[] monoBitmap);
[DllImport("LogitechLcdEnginesWrapper ", CharSet = CharSet.Unicode,
CallingConvention = CallingConvention.Cdecl)]
public static extern bool LogiLcdMonoSetText(int lineNumber, String text);
// Color LCD functions
[DllImport("LogitechLcdEnginesWrapper ", CharSet = CharSet.Unicode,
CallingConvention = CallingConvention.Cdecl)]
public static extern bool LogiLcdColorSetBackground(byte[] colorBitmap);
[DllImport("LogitechLcdEnginesWrapper ", CharSet = CharSet.Unicode,
CallingConvention = CallingConvention.Cdecl)]
public static extern bool LogiLcdColorSetTitle(String text, int red, int green,
int blue);
[DllImport("LogitechLcdEnginesWrapper ", CharSet = CharSet.Unicode,
CallingConvention = CallingConvention.Cdecl)]
public static extern bool LogiLcdColorSetText(int lineNumber, String text, int red,
int green, int blue);
}
}