Copyright and namespace.
1.1 --- a/AssemblyInfo.cs Sun Mar 15 14:07:17 2015 +0100
1.2 +++ b/AssemblyInfo.cs Sun Mar 15 14:39:21 2015 +0100
1.3 @@ -1,3 +1,22 @@
1.4 +//
1.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
1.6 +//
1.7 +// This file is part of SharpLibHid.
1.8 +//
1.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
1.10 +// it under the terms of the GNU General Public License as published by
1.11 +// the Free Software Foundation, either version 3 of the License, or
1.12 +// (at your option) any later version.
1.13 +//
1.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
1.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.17 +// GNU General Public License for more details.
1.18 +//
1.19 +// You should have received a copy of the GNU General Public License
1.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
1.21 +//
1.22 +
1.23 using System.Reflection;
1.24 using System.Runtime.CompilerServices;
1.25
2.1 --- a/HidDevice.cs Sun Mar 15 14:07:17 2015 +0100
2.2 +++ b/HidDevice.cs Sun Mar 15 14:39:21 2015 +0100
2.3 @@ -1,3 +1,23 @@
2.4 +//
2.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
2.6 +//
2.7 +// This file is part of SharpLibHid.
2.8 +//
2.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
2.10 +// it under the terms of the GNU General Public License as published by
2.11 +// the Free Software Foundation, either version 3 of the License, or
2.12 +// (at your option) any later version.
2.13 +//
2.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
2.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2.17 +// GNU General Public License for more details.
2.18 +//
2.19 +// You should have received a copy of the GNU General Public License
2.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
2.21 +//
2.22 +
2.23 +
2.24 using System;
2.25 using System.Windows.Forms;
2.26 using System.Runtime.InteropServices;
2.27 @@ -6,7 +26,7 @@
2.28 using Microsoft.Win32.SafeHandles;
2.29 using Win32;
2.30
2.31 -namespace Hid
2.32 +namespace SharpLibHid
2.33 {
2.34 /// <summary>
2.35 /// Represent a HID device.
2.36 @@ -224,12 +244,12 @@
2.37 if (Info.dwType == RawInputDeviceType.RIM_TYPEHID)
2.38 {
2.39 //Process usage page
2.40 - if (Enum.IsDefined(typeof(Hid.UsagePage), Info.hid.usUsagePage))
2.41 + if (Enum.IsDefined(typeof(UsagePage), Info.hid.usUsagePage))
2.42 {
2.43 //We know this usage page, add its name
2.44 - Hid.UsagePage usagePage = (Hid.UsagePage)Info.hid.usUsagePage;
2.45 + UsagePage usagePage = (UsagePage)Info.hid.usUsagePage;
2.46 suffix += " ( " + usagePage.ToString() + ", ";
2.47 - usageCollectionType = Hid.Utils.UsageCollectionType(usagePage);
2.48 + usageCollectionType = Utils.UsageCollectionType(usagePage);
2.49 }
2.50 else
2.51 {
3.1 --- a/HidEvent.cs Sun Mar 15 14:07:17 2015 +0100
3.2 +++ b/HidEvent.cs Sun Mar 15 14:39:21 2015 +0100
3.3 @@ -1,3 +1,23 @@
3.4 +//
3.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
3.6 +//
3.7 +// This file is part of SharpLibHid.
3.8 +//
3.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
3.10 +// it under the terms of the GNU General Public License as published by
3.11 +// the Free Software Foundation, either version 3 of the License, or
3.12 +// (at your option) any later version.
3.13 +//
3.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
3.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
3.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3.17 +// GNU General Public License for more details.
3.18 +//
3.19 +// You should have received a copy of the GNU General Public License
3.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
3.21 +//
3.22 +
3.23 +
3.24 using System;
3.25 using System.Windows.Forms;
3.26 using System.Runtime.InteropServices;
3.27 @@ -7,9 +27,10 @@
3.28 using Win32;
3.29 using System.Collections.Generic;
3.30 using System.Timers;
3.31 +using SharpLibHid.Usage;
3.32
3.33
3.34 -namespace Hid
3.35 +namespace SharpLibHid
3.36 {
3.37 /// <summary>
3.38 /// We provide utility functions to interpret gamepad dpad state.
3.39 @@ -142,7 +163,7 @@
3.40 if (RawInput.header.hDevice != IntPtr.Zero)
3.41 {
3.42 //Get various information about this HID device
3.43 - Device = new Hid.HidDevice(RawInput.header.hDevice);
3.44 + Device = new HidDevice(RawInput.header.hDevice);
3.45 }
3.46
3.47 if (RawInput.header.dwType == Win32.RawInputDeviceType.RIM_TYPEHID) //Check that our raw input is HID
3.48 @@ -412,7 +433,7 @@
3.49 /// <returns></returns>
3.50 public DirectionPadState GetDirectionPadState()
3.51 {
3.52 - int index=GetValueCapabilitiesIndex((ushort)Hid.UsagePage.GenericDesktopControls, (ushort)Hid.Usage.GenericDesktop.HatSwitch);
3.53 + int index=GetValueCapabilitiesIndex((ushort)SharpLibHid.UsagePage.GenericDesktopControls, (ushort)GenericDesktop.HatSwitch);
3.54 if (index < 0)
3.55 {
3.56 //No hat switch found
3.57 @@ -508,12 +529,12 @@
3.58 UsagePage usagePage = (UsagePage)UsagePage;
3.59 switch (usagePage)
3.60 {
3.61 - case Hid.UsagePage.Consumer:
3.62 - usageText += ((Hid.Usage.ConsumerControl)usage).ToString();
3.63 + case SharpLibHid.UsagePage.Consumer:
3.64 + usageText += ((ConsumerControl)usage).ToString();
3.65 break;
3.66
3.67 - case Hid.UsagePage.WindowsMediaCenterRemoteControl:
3.68 - usageText += ((Hid.Usage.WindowsMediaCenterRemoteControl)usage).ToString();
3.69 + case SharpLibHid.UsagePage.WindowsMediaCenterRemoteControl:
3.70 + usageText += ((WindowsMediaCenterRemoteControl)usage).ToString();
3.71 break;
3.72
3.73 default:
4.1 --- a/HidHandler.cs Sun Mar 15 14:07:17 2015 +0100
4.2 +++ b/HidHandler.cs Sun Mar 15 14:39:21 2015 +0100
4.3 @@ -1,3 +1,23 @@
4.4 +//
4.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
4.6 +//
4.7 +// This file is part of SharpLibHid.
4.8 +//
4.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
4.10 +// it under the terms of the GNU General Public License as published by
4.11 +// the Free Software Foundation, either version 3 of the License, or
4.12 +// (at your option) any later version.
4.13 +//
4.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
4.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
4.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4.17 +// GNU General Public License for more details.
4.18 +//
4.19 +// You should have received a copy of the GNU General Public License
4.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
4.21 +//
4.22 +
4.23 +
4.24 using System;
4.25 using System.Windows.Forms;
4.26 using System.Runtime.InteropServices;
4.27 @@ -8,7 +28,7 @@
4.28 using System.Collections.Generic;
4.29
4.30
4.31 -namespace Hid
4.32 +namespace SharpLibHid
4.33 {
4.34 /// <summary>
4.35 /// Our HID handler manages raw input registrations, processes WM_INPUT messages and broadcasts HID events in return.
4.36 @@ -30,7 +50,7 @@
4.37
4.38 public void ProcessInput(Message aMessage)
4.39 {
4.40 - Hid.HidEvent hidEvent = new Hid.HidEvent(aMessage, OnHidEventRepeat);
4.41 + HidEvent hidEvent = new HidEvent(aMessage, OnHidEventRepeat);
4.42 hidEvent.DebugWrite();
4.43
4.44 if (!hidEvent.IsValid || !hidEvent.IsGeneric)
5.1 --- a/HidUsageTables.cs Sun Mar 15 14:07:17 2015 +0100
5.2 +++ b/HidUsageTables.cs Sun Mar 15 14:39:21 2015 +0100
5.3 @@ -1,8 +1,23 @@
5.4 //
5.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
5.6 //
5.7 +// This file is part of SharpLibHid.
5.8 +//
5.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
5.10 +// it under the terms of the GNU General Public License as published by
5.11 +// the Free Software Foundation, either version 3 of the License, or
5.12 +// (at your option) any later version.
5.13 +//
5.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
5.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
5.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5.17 +// GNU General Public License for more details.
5.18 +//
5.19 +// You should have received a copy of the GNU General Public License
5.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
5.21 //
5.22
5.23 -namespace Hid
5.24 +namespace SharpLibHid
5.25 {
5.26 /// <summary>
5.27 /// From USB HID usage tables.
6.1 --- a/HidUtils.cs Sun Mar 15 14:07:17 2015 +0100
6.2 +++ b/HidUtils.cs Sun Mar 15 14:39:21 2015 +0100
6.3 @@ -1,8 +1,27 @@
6.4 -using System;
6.5 +//
6.6 +// Copyright (C) 2014-2015 Stéphane Lenclud.
6.7 +//
6.8 +// This file is part of SharpLibHid.
6.9 +//
6.10 +// SharpDisplayManager is free software: you can redistribute it and/or modify
6.11 +// it under the terms of the GNU General Public License as published by
6.12 +// the Free Software Foundation, either version 3 of the License, or
6.13 +// (at your option) any later version.
6.14 +//
6.15 +// SharpDisplayManager is distributed in the hope that it will be useful,
6.16 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
6.17 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6.18 +// GNU General Public License for more details.
6.19 +//
6.20 +// You should have received a copy of the GNU General Public License
6.21 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
6.22 +//
6.23 +
6.24 +using System;
6.25 using System.Collections.Generic;
6.26 using System.Text;
6.27
6.28 -namespace Hid
6.29 +namespace SharpLibHid
6.30 {
6.31 static class Utils
6.32 {
7.1 --- a/MainForm.Designer.cs Sun Mar 15 14:07:17 2015 +0100
7.2 +++ b/MainForm.Designer.cs Sun Mar 15 14:39:21 2015 +0100
7.3 @@ -1,4 +1,23 @@
7.4 -using System;
7.5 +//
7.6 +// Copyright (C) 2014-2015 Stéphane Lenclud.
7.7 +//
7.8 +// This file is part of SharpLibHid.
7.9 +//
7.10 +// SharpDisplayManager is free software: you can redistribute it and/or modify
7.11 +// it under the terms of the GNU General Public License as published by
7.12 +// the Free Software Foundation, either version 3 of the License, or
7.13 +// (at your option) any later version.
7.14 +//
7.15 +// SharpDisplayManager is distributed in the hope that it will be useful,
7.16 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
7.17 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7.18 +// GNU General Public License for more details.
7.19 +//
7.20 +// You should have received a copy of the GNU General Public License
7.21 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
7.22 +//
7.23 +
7.24 +using System;
7.25 using System.Collections.Generic;
7.26 using System.Text;
7.27
8.1 --- a/MainForm.cs Sun Mar 15 14:07:17 2015 +0100
8.2 +++ b/MainForm.cs Sun Mar 15 14:39:21 2015 +0100
8.3 @@ -1,3 +1,22 @@
8.4 +//
8.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
8.6 +//
8.7 +// This file is part of SharpLibHid.
8.8 +//
8.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
8.10 +// it under the terms of the GNU General Public License as published by
8.11 +// the Free Software Foundation, either version 3 of the License, or
8.12 +// (at your option) any later version.
8.13 +//
8.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
8.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8.17 +// GNU General Public License for more details.
8.18 +//
8.19 +// You should have received a copy of the GNU General Public License
8.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
8.21 +//
8.22 +
8.23 using System;
8.24 using System.Drawing;
8.25 using System.Collections;
8.26 @@ -34,7 +53,7 @@
8.27 private TreeView treeViewDevices;
8.28 private Timer _timer;
8.29
8.30 - public delegate void OnHidEventDelegate(object aSender, Hid.HidEvent aHidEvent);
8.31 + public delegate void OnHidEventDelegate(object aSender, SharpLibHid.HidEvent aHidEvent);
8.32
8.33 public MainForm()
8.34 {
8.35 @@ -86,7 +105,7 @@
8.36
8.37 }
8.38
8.39 - public void HandleHidEventThreadSafe(object aSender, Hid.HidEvent aHidEvent)
8.40 + public void HandleHidEventThreadSafe(object aSender, SharpLibHid.HidEvent aHidEvent)
8.41 {
8.42 if (aHidEvent.IsStray)
8.43 {
8.44 @@ -128,12 +147,12 @@
8.45 //labelButtonName.Text = e.Button.ToString();
8.46 processed = true;
8.47 }
8.48 - else if (e.MceButton != Hid.Usage.WindowsMediaCenterRemoteControl.Null)
8.49 + else if (e.MceButton != SharpLibHid.Usage.WindowsMediaCenterRemoteControl.Null)
8.50 {
8.51 //Display MCE button name
8.52 //labelButtonName.Text = e.MceButton.ToString();
8.53 //Check if this is an HP extension
8.54 - if (Enum.IsDefined(typeof(Hid.Usage.HpWindowsMediaCenterRemoteControl), (ushort)e.MceButton))
8.55 + if (Enum.IsDefined(typeof(SharpLibHid.Usage.HpWindowsMediaCenterRemoteControl), (ushort)e.MceButton))
8.56 {
8.57 //Also display HP button name
8.58 //labelButtonName.Text += " / HP:" + ((Hid.UsageTables.HpWindowsMediaCenterRemoteControl)e.MceButton).ToString();
8.59 @@ -141,7 +160,7 @@
8.60
8.61 processed = true;
8.62 }
8.63 - else if (e.ConsumerControl != Hid.Usage.ConsumerControl.Null)
8.64 + else if (e.ConsumerControl != SharpLibHid.Usage.ConsumerControl.Null)
8.65 {
8.66 //Display consumer control name
8.67 //labelButtonName.Text = e.ConsumerControl.ToString();
9.1 --- a/Properties/AssemblyInfo.cs Sun Mar 15 14:07:17 2015 +0100
9.2 +++ b/Properties/AssemblyInfo.cs Sun Mar 15 14:39:21 2015 +0100
9.3 @@ -1,4 +1,23 @@
9.4 -using System.Reflection;
9.5 +//
9.6 +// Copyright (C) 2014-2015 Stéphane Lenclud.
9.7 +//
9.8 +// This file is part of SharpLibHid.
9.9 +//
9.10 +// SharpDisplayManager is free software: you can redistribute it and/or modify
9.11 +// it under the terms of the GNU General Public License as published by
9.12 +// the Free Software Foundation, either version 3 of the License, or
9.13 +// (at your option) any later version.
9.14 +//
9.15 +// SharpDisplayManager is distributed in the hope that it will be useful,
9.16 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
9.17 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9.18 +// GNU General Public License for more details.
9.19 +//
9.20 +// You should have received a copy of the GNU General Public License
9.21 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
9.22 +//
9.23 +
9.24 +using System.Reflection;
9.25 using System.Runtime.CompilerServices;
9.26 using System.Runtime.InteropServices;
9.27
10.1 --- a/RawInput.cs Sun Mar 15 14:07:17 2015 +0100
10.2 +++ b/RawInput.cs Sun Mar 15 14:39:21 2015 +0100
10.3 @@ -1,9 +1,27 @@
10.4 +//
10.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
10.6 +//
10.7 +// This file is part of SharpLibHid.
10.8 +//
10.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
10.10 +// it under the terms of the GNU General Public License as published by
10.11 +// the Free Software Foundation, either version 3 of the License, or
10.12 +// (at your option) any later version.
10.13 +//
10.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
10.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
10.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10.17 +// GNU General Public License for more details.
10.18 +//
10.19 +// You should have received a copy of the GNU General Public License
10.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
10.21 +//
10.22 +
10.23 using System;
10.24 using System.Runtime.InteropServices;
10.25 using System.Diagnostics;
10.26 using System.Windows.Forms;
10.27
10.28 -
10.29 namespace Win32
10.30 {
10.31 /// <summary>
10.32 @@ -178,7 +196,7 @@
10.33 //For each our device add a node to our treeview
10.34 foreach (RAWINPUTDEVICELIST device in ridList)
10.35 {
10.36 - Hid.HidDevice hidDevice=new Hid.HidDevice(device.hDevice);
10.37 + SharpLibHid.HidDevice hidDevice=new SharpLibHid.HidDevice(device.hDevice);
10.38
10.39 TreeNode node = null;
10.40 if (hidDevice.Product != null && hidDevice.Product.Length > 1)
10.41 @@ -215,7 +233,7 @@
10.42 {
10.43 foreach (HIDP_VALUE_CAPS caps in hidDevice.InputValueCapabilities)
10.44 {
10.45 - string des = Hid.HidDevice.InputValueCapabilityDescription(caps);
10.46 + string des = SharpLibHid.HidDevice.InputValueCapabilityDescription(caps);
10.47 if (des != null)
10.48 {
10.49 node.Nodes.Add(des);
11.1 --- a/Rebracer.xml Sun Mar 15 14:07:17 2015 +0100
11.2 +++ b/Rebracer.xml Sun Mar 15 14:39:21 2015 +0100
11.3 @@ -106,13 +106,70 @@
11.4 <PropertyValue name="ShowSyntaxErrors">true</PropertyValue>
11.5 </ToolsOptionsSubCategory>
11.6 <ToolsOptionsSubCategory name="C/C++ Specific">
11.7 + <PropertyValue name="AddSemicolonForClassTypes">true</PropertyValue>
11.8 + <PropertyValue name="AlignParameters">false</PropertyValue>
11.9 <PropertyValue name="AlwaysUseFallbackLocation">false</PropertyValue>
11.10 + <PropertyValue name="AutoFormatOnBraceCompletion">true</PropertyValue>
11.11 + <PropertyValue name="AutoFormatOnClosingBrace">true</PropertyValue>
11.12 + <PropertyValue name="AutoFormatOnPaste">true</PropertyValue>
11.13 + <PropertyValue name="AutoFormatOnSemicolon">true</PropertyValue>
11.14 <PropertyValue name="AutoIndentOnTab">false</PropertyValue>
11.15 <PropertyValue name="ColorizeInactiveBlocksDifferently">true</PropertyValue>
11.16 + <PropertyValue name="DisableBrowsingUpToDateCheck">true</PropertyValue>
11.17 <PropertyValue name="DisableErrorReporting">false</PropertyValue>
11.18 <PropertyValue name="EnumerateCommentTasks">true</PropertyValue>
11.19 + <PropertyValue name="GroupBrackets">true</PropertyValue>
11.20 <PropertyValue name="HighlightMatchingTokens">true</PropertyValue>
11.21 + <PropertyValue name="IndentAccessSpecifiers">false</PropertyValue>
11.22 + <PropertyValue name="IndentBlockContents">true</PropertyValue>
11.23 <PropertyValue name="IndentBraces">false</PropertyValue>
11.24 + <PropertyValue name="IndentCaseBraces">false</PropertyValue>
11.25 + <PropertyValue name="IndentCaseContents">true</PropertyValue>
11.26 + <PropertyValue name="IndentCaseLabels">false</PropertyValue>
11.27 + <PropertyValue name="IndentGotoLabels">1</PropertyValue>
11.28 + <PropertyValue name="IndentNamespaceContents">true</PropertyValue>
11.29 + <PropertyValue name="NewlineControlBlockBrace">0</PropertyValue>
11.30 + <PropertyValue name="NewlineEmptyFunctionCloseBrace">true</PropertyValue>
11.31 + <PropertyValue name="NewlineEmptyTypeCloseBrace">true</PropertyValue>
11.32 + <PropertyValue name="NewlineFunctionBrace">0</PropertyValue>
11.33 + <PropertyValue name="NewlineInitListBrace">0</PropertyValue>
11.34 + <PropertyValue name="NewlineKeywordCatch">true</PropertyValue>
11.35 + <PropertyValue name="NewlineKeywordElse">true</PropertyValue>
11.36 + <PropertyValue name="NewlineKeywordWhile">false</PropertyValue>
11.37 + <PropertyValue name="NewlineLambdaBrace">0</PropertyValue>
11.38 + <PropertyValue name="NewlineNamespaceBrace">0</PropertyValue>
11.39 + <PropertyValue name="NewlineTypeBrace">0</PropertyValue>
11.40 + <PropertyValue name="PreserveBlock">1</PropertyValue>
11.41 + <PropertyValue name="PreserveParameterIndentation">false</PropertyValue>
11.42 + <PropertyValue name="RemoveSpaceBeforeSemicolon">true</PropertyValue>
11.43 + <PropertyValue name="SpaceAfterCastParenthesis">false</PropertyValue>
11.44 + <PropertyValue name="SpaceAfterComma">true</PropertyValue>
11.45 + <PropertyValue name="SpaceAfterSemicolon">true</PropertyValue>
11.46 + <PropertyValue name="SpaceAroundAssignmentOperator">2</PropertyValue>
11.47 + <PropertyValue name="SpaceAroundBinaryOperator">2</PropertyValue>
11.48 + <PropertyValue name="SpaceAroundConditionalOperator">2</PropertyValue>
11.49 + <PropertyValue name="SpaceBeforeBracket">false</PropertyValue>
11.50 + <PropertyValue name="SpaceBeforeComma">false</PropertyValue>
11.51 + <PropertyValue name="SpaceBeforeConstructorColon">true</PropertyValue>
11.52 + <PropertyValue name="SpaceBeforeControlBlockParenthesis">true</PropertyValue>
11.53 + <PropertyValue name="SpaceBeforeEmptyBracket">false</PropertyValue>
11.54 + <PropertyValue name="SpaceBeforeFunctionParenthesis">false</PropertyValue>
11.55 + <PropertyValue name="SpaceBeforeInheritanceColon">true</PropertyValue>
11.56 + <PropertyValue name="SpaceBeforeInitListBrace">false</PropertyValue>
11.57 + <PropertyValue name="SpaceBeforeLambdaParenthesis">false</PropertyValue>
11.58 + <PropertyValue name="SpaceBetweenEmptyBraces">false</PropertyValue>
11.59 + <PropertyValue name="SpaceBetweenEmptyBrackets">false</PropertyValue>
11.60 + <PropertyValue name="SpaceBetweenEmptyFunctionParentheses">false</PropertyValue>
11.61 + <PropertyValue name="SpaceBetweenEmptyLambdaBrackets">false</PropertyValue>
11.62 + <PropertyValue name="SpaceWithinBrackets">false</PropertyValue>
11.63 + <PropertyValue name="SpaceWithinCastParentheses">false</PropertyValue>
11.64 + <PropertyValue name="SpaceWithinControlBlockParentheses">false</PropertyValue>
11.65 + <PropertyValue name="SpaceWithinExpressionParentheses">false</PropertyValue>
11.66 + <PropertyValue name="SpaceWithinFunctionParentheses">false</PropertyValue>
11.67 + <PropertyValue name="SpaceWithinInitListBraces">true</PropertyValue>
11.68 + <PropertyValue name="SpaceWithinLambdaBrackets">false</PropertyValue>
11.69 + <PropertyValue name="TrimSpaceAroundScope">true</PropertyValue>
11.70 + <PropertyValue name="TrimSpaceUnaryOperator">true</PropertyValue>
11.71 </ToolsOptionsSubCategory>
11.72 </ToolsOptionsCategory>
11.73 </ToolsOptions>
12.1 --- a/RemoteControlDevice.cs Sun Mar 15 14:07:17 2015 +0100
12.2 +++ b/RemoteControlDevice.cs Sun Mar 15 14:39:21 2015 +0100
12.3 @@ -1,3 +1,22 @@
12.4 +//
12.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
12.6 +//
12.7 +// This file is part of SharpLibHid.
12.8 +//
12.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
12.10 +// it under the terms of the GNU General Public License as published by
12.11 +// the Free Software Foundation, either version 3 of the License, or
12.12 +// (at your option) any later version.
12.13 +//
12.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
12.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
12.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.17 +// GNU General Public License for more details.
12.18 +//
12.19 +// You should have received a copy of the GNU General Public License
12.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
12.21 +//
12.22 +
12.23 using System;
12.24 using System.Windows.Forms;
12.25 using System.Runtime.InteropServices;
12.26 @@ -5,7 +24,7 @@
12.27 using System.Text;
12.28 using Microsoft.Win32.SafeHandles;
12.29
12.30 -using Hid.Usage;
12.31 +using SharpLibHid.Usage;
12.32 using Win32;
12.33
12.34
12.35 @@ -166,7 +185,7 @@
12.36 /// <returns></returns>
12.37 public delegate bool HidUsageHandler(ushort aUsage);
12.38
12.39 - public Hid.HidHandler iHidHandler;
12.40 + public SharpLibHid.HidHandler iHidHandler;
12.41
12.42
12.43 //-------------------------------------------------------------
12.44 @@ -182,38 +201,38 @@
12.45 RAWINPUTDEVICE[] rid = new RAWINPUTDEVICE[6];
12.46
12.47 int i = 0;
12.48 - rid[i].usUsagePage = (ushort)Hid.UsagePage.WindowsMediaCenterRemoteControl;
12.49 - rid[i].usUsage = (ushort)Hid.UsageCollection.WindowsMediaCenter.WindowsMediaCenterRemoteControl;
12.50 + rid[i].usUsagePage = (ushort)SharpLibHid.UsagePage.WindowsMediaCenterRemoteControl;
12.51 + rid[i].usUsage = (ushort)SharpLibHid.UsageCollection.WindowsMediaCenter.WindowsMediaCenterRemoteControl;
12.52 rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
12.53 rid[i].hwndTarget = aHWND;
12.54
12.55 i++;
12.56 - rid[i].usUsagePage = (ushort)Hid.UsagePage.Consumer;
12.57 - rid[i].usUsage = (ushort)Hid.UsageCollection.Consumer.ConsumerControl;
12.58 + rid[i].usUsagePage = (ushort)SharpLibHid.UsagePage.Consumer;
12.59 + rid[i].usUsage = (ushort)SharpLibHid.UsageCollection.Consumer.ConsumerControl;
12.60 rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
12.61 rid[i].hwndTarget = aHWND;
12.62
12.63 i++;
12.64 - rid[i].usUsagePage = (ushort)Hid.UsagePage.Consumer;
12.65 - rid[i].usUsage = (ushort)Hid.UsageCollection.Consumer.Selection;
12.66 + rid[i].usUsagePage = (ushort)SharpLibHid.UsagePage.Consumer;
12.67 + rid[i].usUsage = (ushort)SharpLibHid.UsageCollection.Consumer.Selection;
12.68 rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
12.69 rid[i].hwndTarget = aHWND;
12.70
12.71 i++;
12.72 - rid[i].usUsagePage = (ushort)Hid.UsagePage.GenericDesktopControls;
12.73 - rid[i].usUsage = (ushort)Hid.UsageCollection.GenericDesktop.SystemControl;
12.74 + rid[i].usUsagePage = (ushort)SharpLibHid.UsagePage.GenericDesktopControls;
12.75 + rid[i].usUsage = (ushort)SharpLibHid.UsageCollection.GenericDesktop.SystemControl;
12.76 rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
12.77 rid[i].hwndTarget = aHWND;
12.78
12.79 i++;
12.80 - rid[i].usUsagePage = (ushort)Hid.UsagePage.GenericDesktopControls;
12.81 - rid[i].usUsage = (ushort)Hid.UsageCollection.GenericDesktop.GamePad;
12.82 + rid[i].usUsagePage = (ushort)SharpLibHid.UsagePage.GenericDesktopControls;
12.83 + rid[i].usUsage = (ushort)SharpLibHid.UsageCollection.GenericDesktop.GamePad;
12.84 rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
12.85 rid[i].hwndTarget = aHWND;
12.86
12.87 i++;
12.88 - rid[i].usUsagePage = (ushort)Hid.UsagePage.GenericDesktopControls;
12.89 - rid[i].usUsage = (ushort)Hid.UsageCollection.GenericDesktop.Keyboard;
12.90 + rid[i].usUsagePage = (ushort)SharpLibHid.UsagePage.GenericDesktopControls;
12.91 + rid[i].usUsage = (ushort)SharpLibHid.UsageCollection.GenericDesktop.Keyboard;
12.92 //rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
12.93 rid[i].hwndTarget = aHWND;
12.94
12.95 @@ -224,7 +243,7 @@
12.96 //rid[i].hwndTarget = aHWND;
12.97
12.98
12.99 - iHidHandler = new Hid.HidHandler(rid);
12.100 + iHidHandler = new SharpLibHid.HidHandler(rid);
12.101 if (!iHidHandler.IsRegistered)
12.102 {
12.103 Debug.WriteLine("Failed to register raw input devices: " + Marshal.GetLastWin32Error().ToString());
12.104 @@ -395,17 +414,17 @@
12.105 /// </summary>
12.106 /// <param name="aSender"></param>
12.107 /// <param name="aHidEvent"></param>
12.108 - void HandleHidEvent(object aSender, Hid.HidEvent aHidEvent)
12.109 + void HandleHidEvent(object aSender, SharpLibHid.HidEvent aHidEvent)
12.110 {
12.111 HidUsageHandler usagePageHandler = null;
12.112
12.113 //Check if this an MCE remote HID message
12.114 - if (aHidEvent.UsagePage == (ushort)Hid.UsagePage.WindowsMediaCenterRemoteControl && aHidEvent.UsageCollection == (ushort)Hid.UsageCollection.WindowsMediaCenter.WindowsMediaCenterRemoteControl)
12.115 + if (aHidEvent.UsagePage == (ushort)SharpLibHid.UsagePage.WindowsMediaCenterRemoteControl && aHidEvent.UsageCollection == (ushort)SharpLibHid.UsageCollection.WindowsMediaCenter.WindowsMediaCenterRemoteControl)
12.116 {
12.117 usagePageHandler = HidMceRemoteHandler;
12.118 }
12.119 //Check if this is a consumer control HID message
12.120 - else if (aHidEvent.UsagePage == (ushort)Hid.UsagePage.Consumer && aHidEvent.UsageCollection == (ushort)Hid.UsageCollection.Consumer.ConsumerControl)
12.121 + else if (aHidEvent.UsagePage == (ushort)SharpLibHid.UsagePage.Consumer && aHidEvent.UsageCollection == (ushort)SharpLibHid.UsageCollection.Consumer.ConsumerControl)
12.122 {
12.123 usagePageHandler = HidConsumerDeviceHandler;
12.124 }
13.1 --- a/SharpLibHid.sln Sun Mar 15 14:07:17 2015 +0100
13.2 +++ b/SharpLibHid.sln Sun Mar 15 14:39:21 2015 +0100
13.3 @@ -1,8 +1,6 @@
13.4 
13.5 Microsoft Visual Studio Solution File, Format Version 12.00
13.6 # Visual Studio 2012
13.7 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RemoteControlSample", "RemoteControlSample.csproj", "{F676C5E5-266C-439A-98C4-EF21CB9957F2}"
13.8 -EndProject
13.9 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E70B5E73-7045-4EA7-968D-06BB68773DAB}"
13.10 ProjectSection(SolutionItems) = preProject
13.11 Rebracer.xml = Rebracer.xml
13.12 @@ -22,18 +20,6 @@
13.13 Release|x86 = Release|x86
13.14 EndGlobalSection
13.15 GlobalSection(ProjectConfigurationPlatforms) = postSolution
13.16 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13.17 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
13.18 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
13.19 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Debug|Mixed Platforms.Build.0 = Debug|x86
13.20 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Debug|x86.ActiveCfg = Debug|x86
13.21 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Debug|x86.Build.0 = Debug|x86
13.22 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
13.23 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Release|Any CPU.Build.0 = Release|Any CPU
13.24 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Release|Mixed Platforms.ActiveCfg = Release|x86
13.25 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Release|Mixed Platforms.Build.0 = Release|x86
13.26 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Release|x86.ActiveCfg = Release|x86
13.27 - {F676C5E5-266C-439A-98C4-EF21CB9957F2}.Release|x86.Build.0 = Release|x86
13.28 {4F3F96E6-668A-488E-BA0C-ED249AFACE9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13.29 {4F3F96E6-668A-488E-BA0C-ED249AFACE9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
13.30 {4F3F96E6-668A-488E-BA0C-ED249AFACE9E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
14.1 --- a/Win32AppCommand.cs Sun Mar 15 14:07:17 2015 +0100
14.2 +++ b/Win32AppCommand.cs Sun Mar 15 14:39:21 2015 +0100
14.3 @@ -1,3 +1,22 @@
14.4 +//
14.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
14.6 +//
14.7 +// This file is part of SharpLibHid.
14.8 +//
14.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
14.10 +// it under the terms of the GNU General Public License as published by
14.11 +// the Free Software Foundation, either version 3 of the License, or
14.12 +// (at your option) any later version.
14.13 +//
14.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
14.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
14.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14.17 +// GNU General Public License for more details.
14.18 +//
14.19 +// You should have received a copy of the GNU General Public License
14.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
14.21 +//
14.22 +
14.23 using System;
14.24 using System.Runtime.InteropServices;
14.25
15.1 --- a/Win32CreateFile.cs Sun Mar 15 14:07:17 2015 +0100
15.2 +++ b/Win32CreateFile.cs Sun Mar 15 14:39:21 2015 +0100
15.3 @@ -1,3 +1,22 @@
15.4 +//
15.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
15.6 +//
15.7 +// This file is part of SharpLibHid.
15.8 +//
15.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
15.10 +// it under the terms of the GNU General Public License as published by
15.11 +// the Free Software Foundation, either version 3 of the License, or
15.12 +// (at your option) any later version.
15.13 +//
15.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
15.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
15.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15.17 +// GNU General Public License for more details.
15.18 +//
15.19 +// You should have received a copy of the GNU General Public License
15.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
15.21 +//
15.22 +
15.23 using System;
15.24 using System.Runtime.InteropServices;
15.25 using Microsoft.Win32.SafeHandles;
16.1 --- a/Win32Hid.cs Sun Mar 15 14:07:17 2015 +0100
16.2 +++ b/Win32Hid.cs Sun Mar 15 14:39:21 2015 +0100
16.3 @@ -1,3 +1,22 @@
16.4 +//
16.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
16.6 +//
16.7 +// This file is part of SharpLibHid.
16.8 +//
16.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
16.10 +// it under the terms of the GNU General Public License as published by
16.11 +// the Free Software Foundation, either version 3 of the License, or
16.12 +// (at your option) any later version.
16.13 +//
16.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
16.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
16.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16.17 +// GNU General Public License for more details.
16.18 +//
16.19 +// You should have received a copy of the GNU General Public License
16.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
16.21 +//
16.22 +
16.23 using System;
16.24 using System.Runtime.InteropServices;
16.25 using Microsoft.Win32.SafeHandles;
17.1 --- a/Win32RawInput.cs Sun Mar 15 14:07:17 2015 +0100
17.2 +++ b/Win32RawInput.cs Sun Mar 15 14:39:21 2015 +0100
17.3 @@ -1,3 +1,22 @@
17.4 +//
17.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
17.6 +//
17.7 +// This file is part of SharpLibHid.
17.8 +//
17.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
17.10 +// it under the terms of the GNU General Public License as published by
17.11 +// the Free Software Foundation, either version 3 of the License, or
17.12 +// (at your option) any later version.
17.13 +//
17.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
17.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
17.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17.17 +// GNU General Public License for more details.
17.18 +//
17.19 +// You should have received a copy of the GNU General Public License
17.20 +// along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
17.21 +//
17.22 +
17.23 using System;
17.24 using System.Runtime.InteropServices;
17.25