]> O.S.I.I.S - jp/crow.git/commitdiff
win32 backend 43/head 44/head
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 11 Dec 2018 22:15:42 +0000 (23:15 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 11 Dec 2018 22:15:42 +0000 (23:15 +0100)
124 files changed:
.gitignore
Crow.dll.config [deleted file]
Crow.sln
Crow/Crow.NetStd.csproj
Crow/Crow.csproj
Crow/Crow.dll.config [new file with mode: 0644]
Crow/obj/Crow.NetStd.csproj.nuget.cache [deleted file]
Crow/obj/Crow.NetStd.csproj.nuget.g.props [deleted file]
Crow/obj/Crow.NetStd.csproj.nuget.g.targets [deleted file]
Crow/obj/project.assets.json [deleted file]
Crow/src/GraphicObjects/ScrollingObject.cs
Crow/src/GraphicObjects/TextBox.cs
Crow/src/GraphicObjects/Window.cs
Crow/src/Interface.cs
Crow/src/Mono.Cairo/NativeMethods.cs
Crow/src/backends/IBackend.cs
Crow/src/backends/win32/User32/Cursor.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Delegates/TimerProc.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Delegates/WindowProc.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Device.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/DeviceContext.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/ChangeDisplaySettingsResult.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/CursorName.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/DeviceBroadcastType.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/DeviceModeFieldFlags.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/DeviceNotification.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/DisplayDeviceStateFlags.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/DisplayFixedOutputType.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/DisplayFlags.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/DisplayModeSetting.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/DisplayOrientation.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/DisplaySettingsChanges.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/EnumDisplayModes.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/ExtendedWindowStyles.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/GetMouseMovePointsResolution.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/GetRawInputDataCommand.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/GetRawInputDeviceInfoEnum.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/GetWindowLongIndex.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/IconName.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/MapVirtualKeyType.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/MonitorFromDefaultValue.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PeekMessageActions.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterColor.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterDefaultSource.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterDitherType.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterDuplex.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterIcmIntent.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterIcmMethod.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterMediaType.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterNupHandling.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterPaperOrientation.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterPaperSize.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterPrintQuality.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/PrinterTrueTypeOption.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/QueueMessageTypes.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/RawInputDeviceFlags.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/RawInputDeviceType.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/RawKeyboardScanCodeFlags.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/RawMouseButtonFlags.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/RawMouseFlags.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/SetWindowPosFlags.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/SetWindowPosHwndEnum.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/ShowWindowCommand.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/TrackMouseEvents.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/VirtualKey.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/WindowClassStyles.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/WindowMessage.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/WindowMessageSizeType.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Enums/WindowStyles.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Icon.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Keyboard.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Message.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Monitor.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Mouse.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/RawInput.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/BroadcastDeviceInterface.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/CreateStruct.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/DeviceMode.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/DisplayDevice.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/ExtendedWindowClass.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/IconInfo.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/MonitorInfo.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/MouseMovePoint.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/Msg.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/Point.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawHid.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawInput.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawInputData.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawInputDevice.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawInputDeviceInfo.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawInputDeviceInfoHid.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawInputDeviceInfoKeyboard.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawInputDeviceInfoMouse.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawInputDeviceList.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawInputHeader.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawKeyboard.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/RawMouse.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/Rect.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/StyleStruct.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/TrackMouseEvent.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/WindowClass.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/WindowInfo.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Structs/WindowPosition.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Timer.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/User32.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/Window.cs [new file with mode: 0644]
Crow/src/backends/win32/User32/WindowClass.cs [new file with mode: 0644]
Crow/src/backends/win32/WinBackend.cs [new file with mode: 0755]
Crow/src/backends/xcb/XCBBackend.cs
Crow/src/backends/xcb/XCBKeyboard.cs
Crow/src/backends/xlib/X11Keyboard.cs
Crow/src/backends/xlib/XLibBackend.cs
Crow/src/debug/DbgLogViewer.cs
Crow/src/win32/Win32.cs [deleted file]
Crow/src/win32/winApi.cs [deleted file]
CrowIDE/CrowIDE.NetStd.csproj
CrowIDE/CrowIDE.csproj
CrowIDE/src/CrowIDE.cs
CrowIDE/src/Editors/CodeBuffer/TextEditor.cs
CrowIDE/src/Editors/SourceEditor.cs
CrowIDE/ui/editors/SvgEdit.itemp
Tests/BasicTests.cs
Tests/Showcase.cs
Tests/Tests.csproj

index 51107512c04ab7d53d4bc1887e105c24b1d16805..b43159a219433a9eb7e89c3be041da59cf2a0cbc 100644 (file)
@@ -12,7 +12,8 @@ packages
 /obj/*
 /GOLib.userprefs
 /Tests/obj/*
-/OTKCrow/obj
+CrowIDE/obj
+Crow/obj
 /Tests/bin/*
 /UnitTest/obj
 /UnitTest/bin
diff --git a/Crow.dll.config b/Crow.dll.config
deleted file mode 100644 (file)
index 6341771..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-  <dllmap os="!windows,osx" dll="libgio-2.0-0.dll" target="libgio-2.0.so.0"/>
-  <dllmap os="!windows,osx" dll="libglib-2.0-0.dll" target="libglib-2.0.so.0"/>
-  <dllmap os="!windows,osx" dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/>
-  <dllmap os="!windows,osx" dll="libgdk-3-0.dll" target="libgdk-3.so.0"/>
-  <dllmap os="!windows,osx" dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.so.0"/>
-  <dllmap os="!windows,osx" dll="rsvg-2" target="librsvg-2.so.2"/>
-  <dllmap os="!windows,osx" dll="libinput" target="libinput.so.10"/>
-
-  
-  <dllmap os="windows" dll="rsvg-2" target="librsvg-2-2.dll"/>
-  
-  <dllmap os="osx" dll="libgio-2.0-0.dll" target="libgio-2.0.0.dylib"/>
-  <dllmap os="osx" dll="libgio-2.0-0.dll" target="libgio-2.0.0.dylib"/>
-  <dllmap os="osx" dll="libglib-2.0-0.dll" target="libglib-2.0.0.dylib"/>
-  <dllmap os="osx" dll="libgobject-2.0-0.dll" target="libgobject-2.0.0.dylib"/>
-  <dllmap os="osx" dll="libgdk-3.0.dll" target="libgdk-quartz-3.0.0.dylib"/>
-  <dllmap os="osx" dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.0.dylib"/>
-</configuration>
index 97889f08f72fdb34119343445f010159251e839f..a992af3454c542766c959b3fac853d119990c68c 100644 (file)
--- a/Crow.sln
+++ b/Crow.sln
@@ -55,6 +55,6 @@ Global
                $6.Wrap = False
                $5.inheritsSet = Mono
                description = @C.R.O.W. c# Rapid Open Widgets\n\nCrow is a pure c# widget toolkit with XML definition of interface, bindings, styling...\n
-               version = 0.5
+               version = 0.8.0
        EndGlobalSection
 EndGlobal
index 9df6667a8616ec17e3c6d948fbf7058178373475..3bbd24087bdda967e70d1d1cbe4a9901ed788f5a 100644 (file)
@@ -2,24 +2,37 @@
 
   <PropertyGroup>
     <RootNamespace>Crow</RootNamespace>
-    <Description>C# Rapid Open Widget</Description>        
+    <Description>C.R.O.W. is a widget toolkit and rendering engine entirely developed in C# with templates, styles, compositing, and bindings.</Description>        
         
-    <TargetFramework>netstandard2.0</TargetFramework>
+<!--    <TargetFramework>netstandard2.0</TargetFramework>-->
+    <TargetFramework>netcoreapp2.0</TargetFramework>
         
     <OutputPath>$(SolutionDir)build/$(Configuration)</OutputPath>
     <IntermediateOutputPath>$(SolutionDir)build/obj/$(Configuration)</IntermediateOutputPath>  
 
-    <DefineConstants>NETSTANDARD2_0;DESIGN_MODE</DefineConstants>
+    <DefineConstants>DESIGN_MODE</DefineConstants>
     
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>        
     <EnableDefaultItems>false</EnableDefaultItems>
     <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
+    <PackOnBuild>true</PackOnBuild>
+    <PackageId>Crow</PackageId>
+    <PackageVersion>0.8</PackageVersion>
+    <Authors>JP Bruyère</Authors>
+    <Title>C# Rapid Open Widget Toolkit</Title>
+    <PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
+    <PackageIconUrl>https://jpbruyere.github.io/Crow/images/crow.png</PackageIconUrl>
+    <PackageProjectUrl>https://github.com/jpbruyere/Crow/wiki</PackageProjectUrl>
+    <PackageTags>Crow Widget Interface GUI C# .Net Mono</PackageTags>
+    <PackageCopyright>Copyright 2013-2018</PackageCopyright>
+    <Owners>JP Bruyère</Owners>
   </PropertyGroup>
    
   
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DefineConstants>TRACE;DEBUG;NETSTANDARD2_0;DESIGN_MODE</DefineConstants>
+    <DefineConstants>TRACE;DESIGN_MODE;DEBUG</DefineConstants>
   </PropertyGroup>
+  
   <ItemGroup>
     <PackageReference Include="System.Reflection.Emit.ILGeneration" Version="4.3.0" />
     <PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.3.0" />
     
     <EmbeddedResource Include="Default.style" />
     <EmbeddedResource Include="Icons\*.*" />
-    <!--<EmbeddedResource Include="Icons\checkbox.svg" />
-    <EmbeddedResource Include="Icons\radiobutton.svg" />-->
         
+    <PackageReference Include="NuGet.Build.Packaging" Version="0.2.2" />
   </ItemGroup>  
+  <ItemGroup>
+    <Folder Include="src\backends\win32\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Remove="src\backends\win32\User32\Structs\RawInputDevice.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="src\backends\win32\User32\Structs\RawInputDevice.cs" />
+  </ItemGroup>
 </Project>
index b74c159c737f4c312c5c9089c52a9d3b94ac42d7..656c9da9d176b82ad07540d091deecb0ecf9765f 100644 (file)
     <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
     <WarningLevel>4</WarningLevel>
     <NoWin32Manifest>False</NoWin32Manifest>
-    <SignAssembly>true</SignAssembly>
+    <SignAssembly>false</SignAssembly>
     <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
     <Description>C# Rapid Open Widget</Description>
     <BaseAddress>4194304</BaseAddress>
     <OutputPath>$(SolutionDir)build\$(Configuration)</OutputPath>
     <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)</IntermediateOutputPath>
     <AssemblyOriginatorKeyFile>crow.key</AssemblyOriginatorKeyFile>
-    <ReleaseVersion>0.5</ReleaseVersion>
+    <ReleaseVersion>0.8.0</ReleaseVersion>
     <ProductVersion>8.0.30703</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -44,7 +45,7 @@
     <OutputPath>$(SolutionDir)build\Release</OutputPath>
   </PropertyGroup>
   <ItemGroup>
-       <Compile Include="src\**\*.cs" Exclude="src\Mono.Cairo\NativeMethods-internal.cs"/>
+    <Compile Include="src\**\*.cs" Exclude="src\Mono.Cairo\NativeMethods-internal.cs;src\backends\win32\User32\Structs\RawInputDevice.cs" />
   </ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <EmbeddedResource Include="Templates\ToolWindow.template">
       <LogicalName>Crow.ToolWindow.template</LogicalName>
     </EmbeddedResource>
-    <EmbeddedResource Include="Templates\FileItems.template" />
+    <EmbeddedResource Include="Templates\FileItems.template">
+      <LogicalName>Crow.FileItems.template</LogicalName>
+    </EmbeddedResource>
     <EmbeddedResource Include="Templates\DefaultItem.template">
       <LogicalName>Crow.DefaultItem.template</LogicalName>
     </EmbeddedResource>
       <LogicalName>Crow.ArrowBut.template</LogicalName>
     </EmbeddedResource>
     <EmbeddedResource Include="Templates\treeList.template" />
-    <EmbeddedResource Include="Templates\CheckBox2.template" />
+    <EmbeddedResource Include="Templates\CheckBox2.template">
+      <LogicalName>Crow.CheckBox2.template</LogicalName>
+    </EmbeddedResource>
     <EmbeddedResource Include="Templates\Tooltip.template">
       <LogicalName>Crow.Tooltip.template</LogicalName>
     </EmbeddedResource>
     <EmbeddedResource Include="Templates\ContextMenu.template">
       <LogicalName>Crow.ContextMenu.template</LogicalName>
     </EmbeddedResource>
-
     <EmbeddedResource Include="Templates\DockWindow.template">
       <LogicalName>Crow.DockWindow.template</LogicalName>
     </EmbeddedResource>
     <EmbeddedResource Include="Templates\HScrollBar.template">
       <LogicalName>Crow.HScrollBar.template</LogicalName>
     </EmbeddedResource>
+    <None Include="Crow.dll.config">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
   </ItemGroup>
 </Project>
diff --git a/Crow/Crow.dll.config b/Crow/Crow.dll.config
new file mode 100644 (file)
index 0000000..4300476
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <dllmap os="!windows,osx" dll="libgio-2.0-0.dll" target="libgio-2.0.so.0"/>
+  <dllmap os="!windows,osx" dll="libglib-2.0-0.dll" target="libglib-2.0.so.0"/>
+  <dllmap os="!windows,osx" dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/>
+  <dllmap os="!windows,osx" dll="libgdk-3-0.dll" target="libgdk-3.so.0"/>
+  <dllmap os="!windows,osx" dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.so.0"/>
+  <dllmap os="!windows,osx" dll="rsvg-2" target="librsvg-2.so.2"/>
+  <dllmap os="!windows,osx" dll="libinput" target="libinput.so.10"/>
+
+  
+  <dllmap os="windows" dll="rsvg-2" target="librsvg-2-2.dll"/>
+  <dllmap os="windows" dll="cairo" target="libcairo-2.dll"/>
+  
+  <dllmap os="osx" dll="libgio-2.0-0.dll" target="libgio-2.0.0.dylib"/>
+  <dllmap os="osx" dll="libgio-2.0-0.dll" target="libgio-2.0.0.dylib"/>
+  <dllmap os="osx" dll="libglib-2.0-0.dll" target="libglib-2.0.0.dylib"/>
+  <dllmap os="osx" dll="libgobject-2.0-0.dll" target="libgobject-2.0.0.dylib"/>
+  <dllmap os="osx" dll="libgdk-3.0.dll" target="libgdk-quartz-3.0.0.dylib"/>
+  <dllmap os="osx" dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.0.dylib"/>
+</configuration>
diff --git a/Crow/obj/Crow.NetStd.csproj.nuget.cache b/Crow/obj/Crow.NetStd.csproj.nuget.cache
deleted file mode 100644 (file)
index 9a59c47..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "version": 1,
-  "dgSpecHash": "2rCwvcmtcbaQGG3KBjAhVPu3dFHZmG/pKmVVwS4/M77psHg3X/WV4XzfrouykFVfs3O0q9UTUQizC5BGv4K26Q==",
-  "success": true
-}
\ No newline at end of file
diff --git a/Crow/obj/Crow.NetStd.csproj.nuget.g.props b/Crow/obj/Crow.NetStd.csproj.nuget.g.props
deleted file mode 100644 (file)
index 0aed083..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="no"?>
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
-    <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
-    <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
-    <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">/mnt/devel/gts/crow-xlib/Crow/obj/project.assets.json</ProjectAssetsFile>
-    <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/jp/.nuget/packages/</NuGetPackageRoot>
-    <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/jp/.nuget/packages/;/usr/share/dotnet/sdk/NuGetFallbackFolder</NuGetPackageFolders>
-    <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
-    <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.7.0</NuGetToolVersion>
-  </PropertyGroup>
-  <PropertyGroup>
-    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
-  </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/Crow/obj/Crow.NetStd.csproj.nuget.g.targets b/Crow/obj/Crow.NetStd.csproj.nuget.g.targets
deleted file mode 100644 (file)
index 0ba3e8c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="no"?>
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
-  </PropertyGroup>
-  <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
-    <Import Project="$(NuGetPackageRoot)netstandard.library/2.0.3/build/netstandard2.0/NETStandard.Library.targets" Condition="Exists('$(NuGetPackageRoot)netstandard.library/2.0.3/build/netstandard2.0/NETStandard.Library.targets')" />
-  </ImportGroup>
-</Project>
\ No newline at end of file
diff --git a/Crow/obj/project.assets.json b/Crow/obj/project.assets.json
deleted file mode 100644 (file)
index 79c924a..0000000
+++ /dev/null
@@ -1,885 +0,0 @@
-{
-  "version": 3,
-  "targets": {
-    ".NETStandard,Version=v2.0": {
-      "Microsoft.NETCore.Platforms/1.1.0": {
-        "type": "package",
-        "compile": {
-          "lib/netstandard1.0/_._": {}
-        },
-        "runtime": {
-          "lib/netstandard1.0/_._": {}
-        }
-      },
-      "Microsoft.NETCore.Targets/1.1.0": {
-        "type": "package",
-        "compile": {
-          "lib/netstandard1.0/_._": {}
-        },
-        "runtime": {
-          "lib/netstandard1.0/_._": {}
-        }
-      },
-      "NETStandard.Library/2.0.3": {
-        "type": "package",
-        "dependencies": {
-          "Microsoft.NETCore.Platforms": "1.1.0"
-        },
-        "compile": {
-          "lib/netstandard1.0/_._": {}
-        },
-        "runtime": {
-          "lib/netstandard1.0/_._": {}
-        },
-        "build": {
-          "build/netstandard2.0/NETStandard.Library.targets": {}
-        }
-      },
-      "System.IO/4.3.0": {
-        "type": "package",
-        "dependencies": {
-          "Microsoft.NETCore.Platforms": "1.1.0",
-          "Microsoft.NETCore.Targets": "1.1.0",
-          "System.Runtime": "4.3.0",
-          "System.Text.Encoding": "4.3.0",
-          "System.Threading.Tasks": "4.3.0"
-        },
-        "compile": {
-          "ref/netstandard1.5/System.IO.dll": {}
-        }
-      },
-      "System.Reflection/4.3.0": {
-        "type": "package",
-        "dependencies": {
-          "Microsoft.NETCore.Platforms": "1.1.0",
-          "Microsoft.NETCore.Targets": "1.1.0",
-          "System.IO": "4.3.0",
-          "System.Reflection.Primitives": "4.3.0",
-          "System.Runtime": "4.3.0"
-        },
-        "compile": {
-          "ref/netstandard1.5/System.Reflection.dll": {}
-        }
-      },
-      "System.Reflection.Emit.ILGeneration/4.3.0": {
-        "type": "package",
-        "dependencies": {
-          "System.Reflection": "4.3.0",
-          "System.Reflection.Primitives": "4.3.0",
-          "System.Runtime": "4.3.0"
-        },
-        "compile": {
-          "ref/netstandard1.0/System.Reflection.Emit.ILGeneration.dll": {}
-        },
-        "runtime": {
-          "lib/netstandard1.3/System.Reflection.Emit.ILGeneration.dll": {}
-        }
-      },
-      "System.Reflection.Emit.Lightweight/4.3.0": {
-        "type": "package",
-        "dependencies": {
-          "System.Reflection": "4.3.0",
-          "System.Reflection.Emit.ILGeneration": "4.3.0",
-          "System.Reflection.Primitives": "4.3.0",
-          "System.Runtime": "4.3.0"
-        },
-        "compile": {
-          "ref/netstandard1.0/System.Reflection.Emit.Lightweight.dll": {}
-        },
-        "runtime": {
-          "lib/netstandard1.3/System.Reflection.Emit.Lightweight.dll": {}
-        }
-      },
-      "System.Reflection.Primitives/4.3.0": {
-        "type": "package",
-        "dependencies": {
-          "Microsoft.NETCore.Platforms": "1.1.0",
-          "Microsoft.NETCore.Targets": "1.1.0",
-          "System.Runtime": "4.3.0"
-        },
-        "compile": {
-          "ref/netstandard1.0/System.Reflection.Primitives.dll": {}
-        }
-      },
-      "System.Runtime/4.3.0": {
-        "type": "package",
-        "dependencies": {
-          "Microsoft.NETCore.Platforms": "1.1.0",
-          "Microsoft.NETCore.Targets": "1.1.0"
-        },
-        "compile": {
-          "ref/netstandard1.5/System.Runtime.dll": {}
-        }
-      },
-      "System.Text.Encoding/4.3.0": {
-        "type": "package",
-        "dependencies": {
-          "Microsoft.NETCore.Platforms": "1.1.0",
-          "Microsoft.NETCore.Targets": "1.1.0",
-          "System.Runtime": "4.3.0"
-        },
-        "compile": {
-          "ref/netstandard1.3/System.Text.Encoding.dll": {}
-        }
-      },
-      "System.Threading.Tasks/4.3.0": {
-        "type": "package",
-        "dependencies": {
-          "Microsoft.NETCore.Platforms": "1.1.0",
-          "Microsoft.NETCore.Targets": "1.1.0",
-          "System.Runtime": "4.3.0"
-        },
-        "compile": {
-          "ref/netstandard1.3/System.Threading.Tasks.dll": {}
-        }
-      }
-    }
-  },
-  "libraries": {
-    "Microsoft.NETCore.Platforms/1.1.0": {
-      "sha512": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
-      "type": "package",
-      "path": "microsoft.netcore.platforms/1.1.0",
-      "files": [
-        "ThirdPartyNotices.txt",
-        "dotnet_library_license.txt",
-        "lib/netstandard1.0/_._",
-        "microsoft.netcore.platforms.1.1.0.nupkg.sha512",
-        "microsoft.netcore.platforms.nuspec",
-        "runtime.json"
-      ]
-    },
-    "Microsoft.NETCore.Targets/1.1.0": {
-      "sha512": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
-      "type": "package",
-      "path": "microsoft.netcore.targets/1.1.0",
-      "files": [
-        "ThirdPartyNotices.txt",
-        "dotnet_library_license.txt",
-        "lib/netstandard1.0/_._",
-        "microsoft.netcore.targets.1.1.0.nupkg.sha512",
-        "microsoft.netcore.targets.nuspec",
-        "runtime.json"
-      ]
-    },
-    "NETStandard.Library/2.0.3": {
-      "sha512": "R73gEjqCkI2Nw/IlN8QvcgPNklqQiPowp47JwvW0Bnp/RZnjN4UrJwEvWVJWRK1MsQ+HIfGe9i4aQlfK+ei9jA==",
-      "type": "package",
-      "path": "netstandard.library/2.0.3",
-      "files": [
-        ".signature.p7s",
-        "LICENSE.TXT",
-        "THIRD-PARTY-NOTICES.TXT",
-        "build/netstandard2.0/NETStandard.Library.targets",
-        "build/netstandard2.0/ref/Microsoft.Win32.Primitives.dll",
-        "build/netstandard2.0/ref/System.AppContext.dll",
-        "build/netstandard2.0/ref/System.Collections.Concurrent.dll",
-        "build/netstandard2.0/ref/System.Collections.NonGeneric.dll",
-        "build/netstandard2.0/ref/System.Collections.Specialized.dll",
-        "build/netstandard2.0/ref/System.Collections.dll",
-        "build/netstandard2.0/ref/System.ComponentModel.Composition.dll",
-        "build/netstandard2.0/ref/System.ComponentModel.EventBasedAsync.dll",
-        "build/netstandard2.0/ref/System.ComponentModel.Primitives.dll",
-        "build/netstandard2.0/ref/System.ComponentModel.TypeConverter.dll",
-        "build/netstandard2.0/ref/System.ComponentModel.dll",
-        "build/netstandard2.0/ref/System.Console.dll",
-        "build/netstandard2.0/ref/System.Core.dll",
-        "build/netstandard2.0/ref/System.Data.Common.dll",
-        "build/netstandard2.0/ref/System.Data.dll",
-        "build/netstandard2.0/ref/System.Diagnostics.Contracts.dll",
-        "build/netstandard2.0/ref/System.Diagnostics.Debug.dll",
-        "build/netstandard2.0/ref/System.Diagnostics.FileVersionInfo.dll",
-        "build/netstandard2.0/ref/System.Diagnostics.Process.dll",
-        "build/netstandard2.0/ref/System.Diagnostics.StackTrace.dll",
-        "build/netstandard2.0/ref/System.Diagnostics.TextWriterTraceListener.dll",
-        "build/netstandard2.0/ref/System.Diagnostics.Tools.dll",
-        "build/netstandard2.0/ref/System.Diagnostics.TraceSource.dll",
-        "build/netstandard2.0/ref/System.Diagnostics.Tracing.dll",
-        "build/netstandard2.0/ref/System.Drawing.Primitives.dll",
-        "build/netstandard2.0/ref/System.Drawing.dll",
-        "build/netstandard2.0/ref/System.Dynamic.Runtime.dll",
-        "build/netstandard2.0/ref/System.Globalization.Calendars.dll",
-        "build/netstandard2.0/ref/System.Globalization.Extensions.dll",
-        "build/netstandard2.0/ref/System.Globalization.dll",
-        "build/netstandard2.0/ref/System.IO.Compression.FileSystem.dll",
-        "build/netstandard2.0/ref/System.IO.Compression.ZipFile.dll",
-        "build/netstandard2.0/ref/System.IO.Compression.dll",
-        "build/netstandard2.0/ref/System.IO.FileSystem.DriveInfo.dll",
-        "build/netstandard2.0/ref/System.IO.FileSystem.Primitives.dll",
-        "build/netstandard2.0/ref/System.IO.FileSystem.Watcher.dll",
-        "build/netstandard2.0/ref/System.IO.FileSystem.dll",
-        "build/netstandard2.0/ref/System.IO.IsolatedStorage.dll",
-        "build/netstandard2.0/ref/System.IO.MemoryMappedFiles.dll",
-        "build/netstandard2.0/ref/System.IO.Pipes.dll",
-        "build/netstandard2.0/ref/System.IO.UnmanagedMemoryStream.dll",
-        "build/netstandard2.0/ref/System.IO.dll",
-        "build/netstandard2.0/ref/System.Linq.Expressions.dll",
-        "build/netstandard2.0/ref/System.Linq.Parallel.dll",
-        "build/netstandard2.0/ref/System.Linq.Queryable.dll",
-        "build/netstandard2.0/ref/System.Linq.dll",
-        "build/netstandard2.0/ref/System.Net.Http.dll",
-        "build/netstandard2.0/ref/System.Net.NameResolution.dll",
-        "build/netstandard2.0/ref/System.Net.NetworkInformation.dll",
-        "build/netstandard2.0/ref/System.Net.Ping.dll",
-        "build/netstandard2.0/ref/System.Net.Primitives.dll",
-        "build/netstandard2.0/ref/System.Net.Requests.dll",
-        "build/netstandard2.0/ref/System.Net.Security.dll",
-        "build/netstandard2.0/ref/System.Net.Sockets.dll",
-        "build/netstandard2.0/ref/System.Net.WebHeaderCollection.dll",
-        "build/netstandard2.0/ref/System.Net.WebSockets.Client.dll",
-        "build/netstandard2.0/ref/System.Net.WebSockets.dll",
-        "build/netstandard2.0/ref/System.Net.dll",
-        "build/netstandard2.0/ref/System.Numerics.dll",
-        "build/netstandard2.0/ref/System.ObjectModel.dll",
-        "build/netstandard2.0/ref/System.Reflection.Extensions.dll",
-        "build/netstandard2.0/ref/System.Reflection.Primitives.dll",
-        "build/netstandard2.0/ref/System.Reflection.dll",
-        "build/netstandard2.0/ref/System.Resources.Reader.dll",
-        "build/netstandard2.0/ref/System.Resources.ResourceManager.dll",
-        "build/netstandard2.0/ref/System.Resources.Writer.dll",
-        "build/netstandard2.0/ref/System.Runtime.CompilerServices.VisualC.dll",
-        "build/netstandard2.0/ref/System.Runtime.Extensions.dll",
-        "build/netstandard2.0/ref/System.Runtime.Handles.dll",
-        "build/netstandard2.0/ref/System.Runtime.InteropServices.RuntimeInformation.dll",
-        "build/netstandard2.0/ref/System.Runtime.InteropServices.dll",
-        "build/netstandard2.0/ref/System.Runtime.Numerics.dll",
-        "build/netstandard2.0/ref/System.Runtime.Serialization.Formatters.dll",
-        "build/netstandard2.0/ref/System.Runtime.Serialization.Json.dll",
-        "build/netstandard2.0/ref/System.Runtime.Serialization.Primitives.dll",
-        "build/netstandard2.0/ref/System.Runtime.Serialization.Xml.dll",
-        "build/netstandard2.0/ref/System.Runtime.Serialization.dll",
-        "build/netstandard2.0/ref/System.Runtime.dll",
-        "build/netstandard2.0/ref/System.Security.Claims.dll",
-        "build/netstandard2.0/ref/System.Security.Cryptography.Algorithms.dll",
-        "build/netstandard2.0/ref/System.Security.Cryptography.Csp.dll",
-        "build/netstandard2.0/ref/System.Security.Cryptography.Encoding.dll",
-        "build/netstandard2.0/ref/System.Security.Cryptography.Primitives.dll",
-        "build/netstandard2.0/ref/System.Security.Cryptography.X509Certificates.dll",
-        "build/netstandard2.0/ref/System.Security.Principal.dll",
-        "build/netstandard2.0/ref/System.Security.SecureString.dll",
-        "build/netstandard2.0/ref/System.ServiceModel.Web.dll",
-        "build/netstandard2.0/ref/System.Text.Encoding.Extensions.dll",
-        "build/netstandard2.0/ref/System.Text.Encoding.dll",
-        "build/netstandard2.0/ref/System.Text.RegularExpressions.dll",
-        "build/netstandard2.0/ref/System.Threading.Overlapped.dll",
-        "build/netstandard2.0/ref/System.Threading.Tasks.Parallel.dll",
-        "build/netstandard2.0/ref/System.Threading.Tasks.dll",
-        "build/netstandard2.0/ref/System.Threading.Thread.dll",
-        "build/netstandard2.0/ref/System.Threading.ThreadPool.dll",
-        "build/netstandard2.0/ref/System.Threading.Timer.dll",
-        "build/netstandard2.0/ref/System.Threading.dll",
-        "build/netstandard2.0/ref/System.Transactions.dll",
-        "build/netstandard2.0/ref/System.ValueTuple.dll",
-        "build/netstandard2.0/ref/System.Web.dll",
-        "build/netstandard2.0/ref/System.Windows.dll",
-        "build/netstandard2.0/ref/System.Xml.Linq.dll",
-        "build/netstandard2.0/ref/System.Xml.ReaderWriter.dll",
-        "build/netstandard2.0/ref/System.Xml.Serialization.dll",
-        "build/netstandard2.0/ref/System.Xml.XDocument.dll",
-        "build/netstandard2.0/ref/System.Xml.XPath.XDocument.dll",
-        "build/netstandard2.0/ref/System.Xml.XPath.dll",
-        "build/netstandard2.0/ref/System.Xml.XmlDocument.dll",
-        "build/netstandard2.0/ref/System.Xml.XmlSerializer.dll",
-        "build/netstandard2.0/ref/System.Xml.dll",
-        "build/netstandard2.0/ref/System.dll",
-        "build/netstandard2.0/ref/mscorlib.dll",
-        "build/netstandard2.0/ref/netstandard.dll",
-        "build/netstandard2.0/ref/netstandard.xml",
-        "lib/netstandard1.0/_._",
-        "netstandard.library.2.0.3.nupkg.sha512",
-        "netstandard.library.nuspec"
-      ]
-    },
-    "System.IO/4.3.0": {
-      "sha512": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
-      "type": "package",
-      "path": "system.io/4.3.0",
-      "files": [
-        "ThirdPartyNotices.txt",
-        "dotnet_library_license.txt",
-        "lib/MonoAndroid10/_._",
-        "lib/MonoTouch10/_._",
-        "lib/net45/_._",
-        "lib/net462/System.IO.dll",
-        "lib/portable-net45+win8+wp8+wpa81/_._",
-        "lib/win8/_._",
-        "lib/wp80/_._",
-        "lib/wpa81/_._",
-        "lib/xamarinios10/_._",
-        "lib/xamarinmac20/_._",
-        "lib/xamarintvos10/_._",
-        "lib/xamarinwatchos10/_._",
-        "ref/MonoAndroid10/_._",
-        "ref/MonoTouch10/_._",
-        "ref/net45/_._",
-        "ref/net462/System.IO.dll",
-        "ref/netcore50/System.IO.dll",
-        "ref/netcore50/System.IO.xml",
-        "ref/netcore50/de/System.IO.xml",
-        "ref/netcore50/es/System.IO.xml",
-        "ref/netcore50/fr/System.IO.xml",
-        "ref/netcore50/it/System.IO.xml",
-        "ref/netcore50/ja/System.IO.xml",
-        "ref/netcore50/ko/System.IO.xml",
-        "ref/netcore50/ru/System.IO.xml",
-        "ref/netcore50/zh-hans/System.IO.xml",
-        "ref/netcore50/zh-hant/System.IO.xml",
-        "ref/netstandard1.0/System.IO.dll",
-        "ref/netstandard1.0/System.IO.xml",
-        "ref/netstandard1.0/de/System.IO.xml",
-        "ref/netstandard1.0/es/System.IO.xml",
-        "ref/netstandard1.0/fr/System.IO.xml",
-        "ref/netstandard1.0/it/System.IO.xml",
-        "ref/netstandard1.0/ja/System.IO.xml",
-        "ref/netstandard1.0/ko/System.IO.xml",
-        "ref/netstandard1.0/ru/System.IO.xml",
-        "ref/netstandard1.0/zh-hans/System.IO.xml",
-        "ref/netstandard1.0/zh-hant/System.IO.xml",
-        "ref/netstandard1.3/System.IO.dll",
-        "ref/netstandard1.3/System.IO.xml",
-        "ref/netstandard1.3/de/System.IO.xml",
-        "ref/netstandard1.3/es/System.IO.xml",
-        "ref/netstandard1.3/fr/System.IO.xml",
-        "ref/netstandard1.3/it/System.IO.xml",
-        "ref/netstandard1.3/ja/System.IO.xml",
-        "ref/netstandard1.3/ko/System.IO.xml",
-        "ref/netstandard1.3/ru/System.IO.xml",
-        "ref/netstandard1.3/zh-hans/System.IO.xml",
-        "ref/netstandard1.3/zh-hant/System.IO.xml",
-        "ref/netstandard1.5/System.IO.dll",
-        "ref/netstandard1.5/System.IO.xml",
-        "ref/netstandard1.5/de/System.IO.xml",
-        "ref/netstandard1.5/es/System.IO.xml",
-        "ref/netstandard1.5/fr/System.IO.xml",
-        "ref/netstandard1.5/it/System.IO.xml",
-        "ref/netstandard1.5/ja/System.IO.xml",
-        "ref/netstandard1.5/ko/System.IO.xml",
-        "ref/netstandard1.5/ru/System.IO.xml",
-        "ref/netstandard1.5/zh-hans/System.IO.xml",
-        "ref/netstandard1.5/zh-hant/System.IO.xml",
-        "ref/portable-net45+win8+wp8+wpa81/_._",
-        "ref/win8/_._",
-        "ref/wp80/_._",
-        "ref/wpa81/_._",
-        "ref/xamarinios10/_._",
-        "ref/xamarinmac20/_._",
-        "ref/xamarintvos10/_._",
-        "ref/xamarinwatchos10/_._",
-        "system.io.4.3.0.nupkg.sha512",
-        "system.io.nuspec"
-      ]
-    },
-    "System.Reflection/4.3.0": {
-      "sha512": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
-      "type": "package",
-      "path": "system.reflection/4.3.0",
-      "files": [
-        "ThirdPartyNotices.txt",
-        "dotnet_library_license.txt",
-        "lib/MonoAndroid10/_._",
-        "lib/MonoTouch10/_._",
-        "lib/net45/_._",
-        "lib/net462/System.Reflection.dll",
-        "lib/portable-net45+win8+wp8+wpa81/_._",
-        "lib/win8/_._",
-        "lib/wp80/_._",
-        "lib/wpa81/_._",
-        "lib/xamarinios10/_._",
-        "lib/xamarinmac20/_._",
-        "lib/xamarintvos10/_._",
-        "lib/xamarinwatchos10/_._",
-        "ref/MonoAndroid10/_._",
-        "ref/MonoTouch10/_._",
-        "ref/net45/_._",
-        "ref/net462/System.Reflection.dll",
-        "ref/netcore50/System.Reflection.dll",
-        "ref/netcore50/System.Reflection.xml",
-        "ref/netcore50/de/System.Reflection.xml",
-        "ref/netcore50/es/System.Reflection.xml",
-        "ref/netcore50/fr/System.Reflection.xml",
-        "ref/netcore50/it/System.Reflection.xml",
-        "ref/netcore50/ja/System.Reflection.xml",
-        "ref/netcore50/ko/System.Reflection.xml",
-        "ref/netcore50/ru/System.Reflection.xml",
-        "ref/netcore50/zh-hans/System.Reflection.xml",
-        "ref/netcore50/zh-hant/System.Reflection.xml",
-        "ref/netstandard1.0/System.Reflection.dll",
-        "ref/netstandard1.0/System.Reflection.xml",
-        "ref/netstandard1.0/de/System.Reflection.xml",
-        "ref/netstandard1.0/es/System.Reflection.xml",
-        "ref/netstandard1.0/fr/System.Reflection.xml",
-        "ref/netstandard1.0/it/System.Reflection.xml",
-        "ref/netstandard1.0/ja/System.Reflection.xml",
-        "ref/netstandard1.0/ko/System.Reflection.xml",
-        "ref/netstandard1.0/ru/System.Reflection.xml",
-        "ref/netstandard1.0/zh-hans/System.Reflection.xml",
-        "ref/netstandard1.0/zh-hant/System.Reflection.xml",
-        "ref/netstandard1.3/System.Reflection.dll",
-        "ref/netstandard1.3/System.Reflection.xml",
-        "ref/netstandard1.3/de/System.Reflection.xml",
-        "ref/netstandard1.3/es/System.Reflection.xml",
-        "ref/netstandard1.3/fr/System.Reflection.xml",
-        "ref/netstandard1.3/it/System.Reflection.xml",
-        "ref/netstandard1.3/ja/System.Reflection.xml",
-        "ref/netstandard1.3/ko/System.Reflection.xml",
-        "ref/netstandard1.3/ru/System.Reflection.xml",
-        "ref/netstandard1.3/zh-hans/System.Reflection.xml",
-        "ref/netstandard1.3/zh-hant/System.Reflection.xml",
-        "ref/netstandard1.5/System.Reflection.dll",
-        "ref/netstandard1.5/System.Reflection.xml",
-        "ref/netstandard1.5/de/System.Reflection.xml",
-        "ref/netstandard1.5/es/System.Reflection.xml",
-        "ref/netstandard1.5/fr/System.Reflection.xml",
-        "ref/netstandard1.5/it/System.Reflection.xml",
-        "ref/netstandard1.5/ja/System.Reflection.xml",
-        "ref/netstandard1.5/ko/System.Reflection.xml",
-        "ref/netstandard1.5/ru/System.Reflection.xml",
-        "ref/netstandard1.5/zh-hans/System.Reflection.xml",
-        "ref/netstandard1.5/zh-hant/System.Reflection.xml",
-        "ref/portable-net45+win8+wp8+wpa81/_._",
-        "ref/win8/_._",
-        "ref/wp80/_._",
-        "ref/wpa81/_._",
-        "ref/xamarinios10/_._",
-        "ref/xamarinmac20/_._",
-        "ref/xamarintvos10/_._",
-        "ref/xamarinwatchos10/_._",
-        "system.reflection.4.3.0.nupkg.sha512",
-        "system.reflection.nuspec"
-      ]
-    },
-    "System.Reflection.Emit.ILGeneration/4.3.0": {
-      "sha512": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==",
-      "type": "package",
-      "path": "system.reflection.emit.ilgeneration/4.3.0",
-      "files": [
-        "ThirdPartyNotices.txt",
-        "dotnet_library_license.txt",
-        "lib/MonoAndroid10/_._",
-        "lib/MonoTouch10/_._",
-        "lib/net45/_._",
-        "lib/netcore50/System.Reflection.Emit.ILGeneration.dll",
-        "lib/netstandard1.3/System.Reflection.Emit.ILGeneration.dll",
-        "lib/portable-net45+wp8/_._",
-        "lib/wp80/_._",
-        "lib/xamarinios10/_._",
-        "lib/xamarinmac20/_._",
-        "lib/xamarintvos10/_._",
-        "lib/xamarinwatchos10/_._",
-        "ref/MonoAndroid10/_._",
-        "ref/MonoTouch10/_._",
-        "ref/net45/_._",
-        "ref/netstandard1.0/System.Reflection.Emit.ILGeneration.dll",
-        "ref/netstandard1.0/System.Reflection.Emit.ILGeneration.xml",
-        "ref/netstandard1.0/de/System.Reflection.Emit.ILGeneration.xml",
-        "ref/netstandard1.0/es/System.Reflection.Emit.ILGeneration.xml",
-        "ref/netstandard1.0/fr/System.Reflection.Emit.ILGeneration.xml",
-        "ref/netstandard1.0/it/System.Reflection.Emit.ILGeneration.xml",
-        "ref/netstandard1.0/ja/System.Reflection.Emit.ILGeneration.xml",
-        "ref/netstandard1.0/ko/System.Reflection.Emit.ILGeneration.xml",
-        "ref/netstandard1.0/ru/System.Reflection.Emit.ILGeneration.xml",
-        "ref/netstandard1.0/zh-hans/System.Reflection.Emit.ILGeneration.xml",
-        "ref/netstandard1.0/zh-hant/System.Reflection.Emit.ILGeneration.xml",
-        "ref/portable-net45+wp8/_._",
-        "ref/wp80/_._",
-        "ref/xamarinios10/_._",
-        "ref/xamarinmac20/_._",
-        "ref/xamarintvos10/_._",
-        "ref/xamarinwatchos10/_._",
-        "runtimes/aot/lib/netcore50/_._",
-        "system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512",
-        "system.reflection.emit.ilgeneration.nuspec"
-      ]
-    },
-    "System.Reflection.Emit.Lightweight/4.3.0": {
-      "sha512": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==",
-      "type": "package",
-      "path": "system.reflection.emit.lightweight/4.3.0",
-      "files": [
-        "ThirdPartyNotices.txt",
-        "dotnet_library_license.txt",
-        "lib/MonoAndroid10/_._",
-        "lib/MonoTouch10/_._",
-        "lib/net45/_._",
-        "lib/netcore50/System.Reflection.Emit.Lightweight.dll",
-        "lib/netstandard1.3/System.Reflection.Emit.Lightweight.dll",
-        "lib/portable-net45+wp8/_._",
-        "lib/wp80/_._",
-        "lib/xamarinios10/_._",
-        "lib/xamarinmac20/_._",
-        "lib/xamarintvos10/_._",
-        "lib/xamarinwatchos10/_._",
-        "ref/MonoAndroid10/_._",
-        "ref/MonoTouch10/_._",
-        "ref/net45/_._",
-        "ref/netstandard1.0/System.Reflection.Emit.Lightweight.dll",
-        "ref/netstandard1.0/System.Reflection.Emit.Lightweight.xml",
-        "ref/netstandard1.0/de/System.Reflection.Emit.Lightweight.xml",
-        "ref/netstandard1.0/es/System.Reflection.Emit.Lightweight.xml",
-        "ref/netstandard1.0/fr/System.Reflection.Emit.Lightweight.xml",
-        "ref/netstandard1.0/it/System.Reflection.Emit.Lightweight.xml",
-        "ref/netstandard1.0/ja/System.Reflection.Emit.Lightweight.xml",
-        "ref/netstandard1.0/ko/System.Reflection.Emit.Lightweight.xml",
-        "ref/netstandard1.0/ru/System.Reflection.Emit.Lightweight.xml",
-        "ref/netstandard1.0/zh-hans/System.Reflection.Emit.Lightweight.xml",
-        "ref/netstandard1.0/zh-hant/System.Reflection.Emit.Lightweight.xml",
-        "ref/portable-net45+wp8/_._",
-        "ref/wp80/_._",
-        "ref/xamarinios10/_._",
-        "ref/xamarinmac20/_._",
-        "ref/xamarintvos10/_._",
-        "ref/xamarinwatchos10/_._",
-        "runtimes/aot/lib/netcore50/_._",
-        "system.reflection.emit.lightweight.4.3.0.nupkg.sha512",
-        "system.reflection.emit.lightweight.nuspec"
-      ]
-    },
-    "System.Reflection.Primitives/4.3.0": {
-      "sha512": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
-      "type": "package",
-      "path": "system.reflection.primitives/4.3.0",
-      "files": [
-        "ThirdPartyNotices.txt",
-        "dotnet_library_license.txt",
-        "lib/MonoAndroid10/_._",
-        "lib/MonoTouch10/_._",
-        "lib/net45/_._",
-        "lib/portable-net45+win8+wp8+wpa81/_._",
-        "lib/win8/_._",
-        "lib/wp80/_._",
-        "lib/wpa81/_._",
-        "lib/xamarinios10/_._",
-        "lib/xamarinmac20/_._",
-        "lib/xamarintvos10/_._",
-        "lib/xamarinwatchos10/_._",
-        "ref/MonoAndroid10/_._",
-        "ref/MonoTouch10/_._",
-        "ref/net45/_._",
-        "ref/netcore50/System.Reflection.Primitives.dll",
-        "ref/netcore50/System.Reflection.Primitives.xml",
-        "ref/netcore50/de/System.Reflection.Primitives.xml",
-        "ref/netcore50/es/System.Reflection.Primitives.xml",
-        "ref/netcore50/fr/System.Reflection.Primitives.xml",
-        "ref/netcore50/it/System.Reflection.Primitives.xml",
-        "ref/netcore50/ja/System.Reflection.Primitives.xml",
-        "ref/netcore50/ko/System.Reflection.Primitives.xml",
-        "ref/netcore50/ru/System.Reflection.Primitives.xml",
-        "ref/netcore50/zh-hans/System.Reflection.Primitives.xml",
-        "ref/netcore50/zh-hant/System.Reflection.Primitives.xml",
-        "ref/netstandard1.0/System.Reflection.Primitives.dll",
-        "ref/netstandard1.0/System.Reflection.Primitives.xml",
-        "ref/netstandard1.0/de/System.Reflection.Primitives.xml",
-        "ref/netstandard1.0/es/System.Reflection.Primitives.xml",
-        "ref/netstandard1.0/fr/System.Reflection.Primitives.xml",
-        "ref/netstandard1.0/it/System.Reflection.Primitives.xml",
-        "ref/netstandard1.0/ja/System.Reflection.Primitives.xml",
-        "ref/netstandard1.0/ko/System.Reflection.Primitives.xml",
-        "ref/netstandard1.0/ru/System.Reflection.Primitives.xml",
-        "ref/netstandard1.0/zh-hans/System.Reflection.Primitives.xml",
-        "ref/netstandard1.0/zh-hant/System.Reflection.Primitives.xml",
-        "ref/portable-net45+win8+wp8+wpa81/_._",
-        "ref/win8/_._",
-        "ref/wp80/_._",
-        "ref/wpa81/_._",
-        "ref/xamarinios10/_._",
-        "ref/xamarinmac20/_._",
-        "ref/xamarintvos10/_._",
-        "ref/xamarinwatchos10/_._",
-        "system.reflection.primitives.4.3.0.nupkg.sha512",
-        "system.reflection.primitives.nuspec"
-      ]
-    },
-    "System.Runtime/4.3.0": {
-      "sha512": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
-      "type": "package",
-      "path": "system.runtime/4.3.0",
-      "files": [
-        "ThirdPartyNotices.txt",
-        "dotnet_library_license.txt",
-        "lib/MonoAndroid10/_._",
-        "lib/MonoTouch10/_._",
-        "lib/net45/_._",
-        "lib/net462/System.Runtime.dll",
-        "lib/portable-net45+win8+wp80+wpa81/_._",
-        "lib/win8/_._",
-        "lib/wp80/_._",
-        "lib/wpa81/_._",
-        "lib/xamarinios10/_._",
-        "lib/xamarinmac20/_._",
-        "lib/xamarintvos10/_._",
-        "lib/xamarinwatchos10/_._",
-        "ref/MonoAndroid10/_._",
-        "ref/MonoTouch10/_._",
-        "ref/net45/_._",
-        "ref/net462/System.Runtime.dll",
-        "ref/netcore50/System.Runtime.dll",
-        "ref/netcore50/System.Runtime.xml",
-        "ref/netcore50/de/System.Runtime.xml",
-        "ref/netcore50/es/System.Runtime.xml",
-        "ref/netcore50/fr/System.Runtime.xml",
-        "ref/netcore50/it/System.Runtime.xml",
-        "ref/netcore50/ja/System.Runtime.xml",
-        "ref/netcore50/ko/System.Runtime.xml",
-        "ref/netcore50/ru/System.Runtime.xml",
-        "ref/netcore50/zh-hans/System.Runtime.xml",
-        "ref/netcore50/zh-hant/System.Runtime.xml",
-        "ref/netstandard1.0/System.Runtime.dll",
-        "ref/netstandard1.0/System.Runtime.xml",
-        "ref/netstandard1.0/de/System.Runtime.xml",
-        "ref/netstandard1.0/es/System.Runtime.xml",
-        "ref/netstandard1.0/fr/System.Runtime.xml",
-        "ref/netstandard1.0/it/System.Runtime.xml",
-        "ref/netstandard1.0/ja/System.Runtime.xml",
-        "ref/netstandard1.0/ko/System.Runtime.xml",
-        "ref/netstandard1.0/ru/System.Runtime.xml",
-        "ref/netstandard1.0/zh-hans/System.Runtime.xml",
-        "ref/netstandard1.0/zh-hant/System.Runtime.xml",
-        "ref/netstandard1.2/System.Runtime.dll",
-        "ref/netstandard1.2/System.Runtime.xml",
-        "ref/netstandard1.2/de/System.Runtime.xml",
-        "ref/netstandard1.2/es/System.Runtime.xml",
-        "ref/netstandard1.2/fr/System.Runtime.xml",
-        "ref/netstandard1.2/it/System.Runtime.xml",
-        "ref/netstandard1.2/ja/System.Runtime.xml",
-        "ref/netstandard1.2/ko/System.Runtime.xml",
-        "ref/netstandard1.2/ru/System.Runtime.xml",
-        "ref/netstandard1.2/zh-hans/System.Runtime.xml",
-        "ref/netstandard1.2/zh-hant/System.Runtime.xml",
-        "ref/netstandard1.3/System.Runtime.dll",
-        "ref/netstandard1.3/System.Runtime.xml",
-        "ref/netstandard1.3/de/System.Runtime.xml",
-        "ref/netstandard1.3/es/System.Runtime.xml",
-        "ref/netstandard1.3/fr/System.Runtime.xml",
-        "ref/netstandard1.3/it/System.Runtime.xml",
-        "ref/netstandard1.3/ja/System.Runtime.xml",
-        "ref/netstandard1.3/ko/System.Runtime.xml",
-        "ref/netstandard1.3/ru/System.Runtime.xml",
-        "ref/netstandard1.3/zh-hans/System.Runtime.xml",
-        "ref/netstandard1.3/zh-hant/System.Runtime.xml",
-        "ref/netstandard1.5/System.Runtime.dll",
-        "ref/netstandard1.5/System.Runtime.xml",
-        "ref/netstandard1.5/de/System.Runtime.xml",
-        "ref/netstandard1.5/es/System.Runtime.xml",
-        "ref/netstandard1.5/fr/System.Runtime.xml",
-        "ref/netstandard1.5/it/System.Runtime.xml",
-        "ref/netstandard1.5/ja/System.Runtime.xml",
-        "ref/netstandard1.5/ko/System.Runtime.xml",
-        "ref/netstandard1.5/ru/System.Runtime.xml",
-        "ref/netstandard1.5/zh-hans/System.Runtime.xml",
-        "ref/netstandard1.5/zh-hant/System.Runtime.xml",
-        "ref/portable-net45+win8+wp80+wpa81/_._",
-        "ref/win8/_._",
-        "ref/wp80/_._",
-        "ref/wpa81/_._",
-        "ref/xamarinios10/_._",
-        "ref/xamarinmac20/_._",
-        "ref/xamarintvos10/_._",
-        "ref/xamarinwatchos10/_._",
-        "system.runtime.4.3.0.nupkg.sha512",
-        "system.runtime.nuspec"
-      ]
-    },
-    "System.Text.Encoding/4.3.0": {
-      "sha512": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
-      "type": "package",
-      "path": "system.text.encoding/4.3.0",
-      "files": [
-        "ThirdPartyNotices.txt",
-        "dotnet_library_license.txt",
-        "lib/MonoAndroid10/_._",
-        "lib/MonoTouch10/_._",
-        "lib/net45/_._",
-        "lib/portable-net45+win8+wp8+wpa81/_._",
-        "lib/win8/_._",
-        "lib/wp80/_._",
-        "lib/wpa81/_._",
-        "lib/xamarinios10/_._",
-        "lib/xamarinmac20/_._",
-        "lib/xamarintvos10/_._",
-        "lib/xamarinwatchos10/_._",
-        "ref/MonoAndroid10/_._",
-        "ref/MonoTouch10/_._",
-        "ref/net45/_._",
-        "ref/netcore50/System.Text.Encoding.dll",
-        "ref/netcore50/System.Text.Encoding.xml",
-        "ref/netcore50/de/System.Text.Encoding.xml",
-        "ref/netcore50/es/System.Text.Encoding.xml",
-        "ref/netcore50/fr/System.Text.Encoding.xml",
-        "ref/netcore50/it/System.Text.Encoding.xml",
-        "ref/netcore50/ja/System.Text.Encoding.xml",
-        "ref/netcore50/ko/System.Text.Encoding.xml",
-        "ref/netcore50/ru/System.Text.Encoding.xml",
-        "ref/netcore50/zh-hans/System.Text.Encoding.xml",
-        "ref/netcore50/zh-hant/System.Text.Encoding.xml",
-        "ref/netstandard1.0/System.Text.Encoding.dll",
-        "ref/netstandard1.0/System.Text.Encoding.xml",
-        "ref/netstandard1.0/de/System.Text.Encoding.xml",
-        "ref/netstandard1.0/es/System.Text.Encoding.xml",
-        "ref/netstandard1.0/fr/System.Text.Encoding.xml",
-        "ref/netstandard1.0/it/System.Text.Encoding.xml",
-        "ref/netstandard1.0/ja/System.Text.Encoding.xml",
-        "ref/netstandard1.0/ko/System.Text.Encoding.xml",
-        "ref/netstandard1.0/ru/System.Text.Encoding.xml",
-        "ref/netstandard1.0/zh-hans/System.Text.Encoding.xml",
-        "ref/netstandard1.0/zh-hant/System.Text.Encoding.xml",
-        "ref/netstandard1.3/System.Text.Encoding.dll",
-        "ref/netstandard1.3/System.Text.Encoding.xml",
-        "ref/netstandard1.3/de/System.Text.Encoding.xml",
-        "ref/netstandard1.3/es/System.Text.Encoding.xml",
-        "ref/netstandard1.3/fr/System.Text.Encoding.xml",
-        "ref/netstandard1.3/it/System.Text.Encoding.xml",
-        "ref/netstandard1.3/ja/System.Text.Encoding.xml",
-        "ref/netstandard1.3/ko/System.Text.Encoding.xml",
-        "ref/netstandard1.3/ru/System.Text.Encoding.xml",
-        "ref/netstandard1.3/zh-hans/System.Text.Encoding.xml",
-        "ref/netstandard1.3/zh-hant/System.Text.Encoding.xml",
-        "ref/portable-net45+win8+wp8+wpa81/_._",
-        "ref/win8/_._",
-        "ref/wp80/_._",
-        "ref/wpa81/_._",
-        "ref/xamarinios10/_._",
-        "ref/xamarinmac20/_._",
-        "ref/xamarintvos10/_._",
-        "ref/xamarinwatchos10/_._",
-        "system.text.encoding.4.3.0.nupkg.sha512",
-        "system.text.encoding.nuspec"
-      ]
-    },
-    "System.Threading.Tasks/4.3.0": {
-      "sha512": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
-      "type": "package",
-      "path": "system.threading.tasks/4.3.0",
-      "files": [
-        "ThirdPartyNotices.txt",
-        "dotnet_library_license.txt",
-        "lib/MonoAndroid10/_._",
-        "lib/MonoTouch10/_._",
-        "lib/net45/_._",
-        "lib/portable-net45+win8+wp8+wpa81/_._",
-        "lib/win8/_._",
-        "lib/wp80/_._",
-        "lib/wpa81/_._",
-        "lib/xamarinios10/_._",
-        "lib/xamarinmac20/_._",
-        "lib/xamarintvos10/_._",
-        "lib/xamarinwatchos10/_._",
-        "ref/MonoAndroid10/_._",
-        "ref/MonoTouch10/_._",
-        "ref/net45/_._",
-        "ref/netcore50/System.Threading.Tasks.dll",
-        "ref/netcore50/System.Threading.Tasks.xml",
-        "ref/netcore50/de/System.Threading.Tasks.xml",
-        "ref/netcore50/es/System.Threading.Tasks.xml",
-        "ref/netcore50/fr/System.Threading.Tasks.xml",
-        "ref/netcore50/it/System.Threading.Tasks.xml",
-        "ref/netcore50/ja/System.Threading.Tasks.xml",
-        "ref/netcore50/ko/System.Threading.Tasks.xml",
-        "ref/netcore50/ru/System.Threading.Tasks.xml",
-        "ref/netcore50/zh-hans/System.Threading.Tasks.xml",
-        "ref/netcore50/zh-hant/System.Threading.Tasks.xml",
-        "ref/netstandard1.0/System.Threading.Tasks.dll",
-        "ref/netstandard1.0/System.Threading.Tasks.xml",
-        "ref/netstandard1.0/de/System.Threading.Tasks.xml",
-        "ref/netstandard1.0/es/System.Threading.Tasks.xml",
-        "ref/netstandard1.0/fr/System.Threading.Tasks.xml",
-        "ref/netstandard1.0/it/System.Threading.Tasks.xml",
-        "ref/netstandard1.0/ja/System.Threading.Tasks.xml",
-        "ref/netstandard1.0/ko/System.Threading.Tasks.xml",
-        "ref/netstandard1.0/ru/System.Threading.Tasks.xml",
-        "ref/netstandard1.0/zh-hans/System.Threading.Tasks.xml",
-        "ref/netstandard1.0/zh-hant/System.Threading.Tasks.xml",
-        "ref/netstandard1.3/System.Threading.Tasks.dll",
-        "ref/netstandard1.3/System.Threading.Tasks.xml",
-        "ref/netstandard1.3/de/System.Threading.Tasks.xml",
-        "ref/netstandard1.3/es/System.Threading.Tasks.xml",
-        "ref/netstandard1.3/fr/System.Threading.Tasks.xml",
-        "ref/netstandard1.3/it/System.Threading.Tasks.xml",
-        "ref/netstandard1.3/ja/System.Threading.Tasks.xml",
-        "ref/netstandard1.3/ko/System.Threading.Tasks.xml",
-        "ref/netstandard1.3/ru/System.Threading.Tasks.xml",
-        "ref/netstandard1.3/zh-hans/System.Threading.Tasks.xml",
-        "ref/netstandard1.3/zh-hant/System.Threading.Tasks.xml",
-        "ref/portable-net45+win8+wp8+wpa81/_._",
-        "ref/win8/_._",
-        "ref/wp80/_._",
-        "ref/wpa81/_._",
-        "ref/xamarinios10/_._",
-        "ref/xamarinmac20/_._",
-        "ref/xamarintvos10/_._",
-        "ref/xamarinwatchos10/_._",
-        "system.threading.tasks.4.3.0.nupkg.sha512",
-        "system.threading.tasks.nuspec"
-      ]
-    }
-  },
-  "projectFileDependencyGroups": {
-    ".NETStandard,Version=v2.0": [
-      "NETStandard.Library >= 2.0.3",
-      "System.Reflection.Emit.ILGeneration >= 4.3.0",
-      "System.Reflection.Emit.Lightweight >= 4.3.0"
-    ]
-  },
-  "packageFolders": {
-    "/home/jp/.nuget/packages/": {},
-    "/usr/share/dotnet/sdk/NuGetFallbackFolder": {}
-  },
-  "project": {
-    "version": "1.0.0",
-    "restore": {
-      "projectUniqueName": "/mnt/devel/gts/crow-xlib/Crow/Crow.NetStd.csproj",
-      "projectName": "Crow.NetStd",
-      "projectPath": "/mnt/devel/gts/crow-xlib/Crow/Crow.NetStd.csproj",
-      "packagesPath": "/home/jp/.nuget/packages/",
-      "outputPath": "/mnt/devel/gts/crow-xlib/Crow/obj",
-      "projectStyle": "PackageReference",
-      "fallbackFolders": [
-        "/usr/share/dotnet/sdk/NuGetFallbackFolder"
-      ],
-      "configFilePaths": [
-        "/mnt/devel/gts/crow-xlib/.nuget/NuGet.config",
-        "/home/jp/.config/NuGet/NuGet.Config"
-      ],
-      "originalTargetFrameworks": [
-        "netstandard2.0"
-      ],
-      "sources": {
-        "https://api.nuget.org/v3/index.json": {}
-      },
-      "frameworks": {
-        "netstandard2.0": {
-          "projectReferences": {}
-        }
-      },
-      "warningProperties": {
-        "warnAsError": [
-          "NU1605"
-        ]
-      }
-    },
-    "frameworks": {
-      "netstandard2.0": {
-        "dependencies": {
-          "NETStandard.Library": {
-            "suppressParent": "All",
-            "target": "Package",
-            "version": "[2.0.3, )",
-            "autoReferenced": true
-          },
-          "System.Reflection.Emit.ILGeneration": {
-            "target": "Package",
-            "version": "[4.3.0, )"
-          },
-          "System.Reflection.Emit.Lightweight": {
-            "target": "Package",
-            "version": "[4.3.0, )"
-          }
-        },
-        "imports": [
-          "net461"
-        ],
-        "assetTargetFallback": true,
-        "warn": true
-      }
-    }
-  }
-}
\ No newline at end of file
index bc57b3209d3cc083521cdf930d34cfd6c02a7947..65d79d901bc37574cbc195c8840cd2525aa7ba37 100644 (file)
@@ -149,7 +149,7 @@ namespace Crow
                public override void onMouseWheel (object sender, MouseWheelEventArgs e)
                {
                        base.onMouseWheel (sender, e);
-                       if (IFace.Keyboard.Shift)
+                       if (IFace.Shift)
                                ScrollX += e.Delta * MouseWheelSpeed;
                        else
                                ScrollY -= e.Delta * MouseWheelSpeed;
index 5da67e3195a751bdb2d7e5efd45c66e996fc2453..500a0a1a45099f9e99d5d4411d6fd7798980afeb 100644 (file)
@@ -85,7 +85,7 @@ namespace Crow
                                if (selectionIsEmpty) {
                                        if (!MoveRight ())
                                                return;
-                               }else if (IFace.Keyboard.Shift)
+                               }else if (IFace.Shift)
                                        IFace.Clipboard = this.SelectedText;
                                this.DeleteChar ();
                                break;
@@ -104,46 +104,46 @@ namespace Crow
                                SelRelease = -1;
                                break;
                        case Key.Home:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (selectionIsEmpty)
                                                SelBegin = new Point (CurrentColumn, CurrentLine);
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                CurrentLine = 0;
                                        CurrentColumn = 0;
                                        SelRelease = new Point (CurrentColumn, CurrentLine);
                                        break;
                                }
                                SelRelease = -1;
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        CurrentLine = 0;
                                CurrentColumn = 0;
                                break;
                        case Key.End:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (selectionIsEmpty)
                                                SelBegin = CurrentPosition;
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                CurrentLine = int.MaxValue;
                                        CurrentColumn = int.MaxValue;
                                        SelRelease = CurrentPosition;
                                        break;
                                }
                                SelRelease = -1;
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        CurrentLine = int.MaxValue;
                                CurrentColumn = int.MaxValue;
                                break;
                        case Key.Insert:
-                               if (IFace.Keyboard.Shift)
+                               if (IFace.Shift)
                                        this.Insert (IFace.Clipboard);
-                               else if (IFace.Keyboard.Ctrl && !selectionIsEmpty)
+                               else if (IFace.Ctrl && !selectionIsEmpty)
                                        IFace.Clipboard = this.SelectedText;
                                break;
                        case Key.Left:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (selectionIsEmpty)
                                                SelBegin = new Point(CurrentColumn, CurrentLine);
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                GotoWordStart ();
                                        else if (!MoveLeft ())
                                                return;
@@ -151,16 +151,16 @@ namespace Crow
                                        break;
                                }
                                SelRelease = -1;
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        GotoWordStart ();
                                else
                                        MoveLeft();
                                break;
                        case Key.Right:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (selectionIsEmpty)
                                                SelBegin = CurrentPosition;
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                GotoWordEnd ();
                                        else if (!MoveRight ())
                                                return;
@@ -168,13 +168,13 @@ namespace Crow
                                        break;
                                }
                                SelRelease = -1;
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        GotoWordEnd ();
                                else
                                        MoveRight ();
                                break;
                        case Key.Up:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (selectionIsEmpty)
                                                SelBegin = CurrentPosition;
                                        CurrentLine--;
@@ -185,7 +185,7 @@ namespace Crow
                                CurrentLine--;
                                break;
                        case Key.Down:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (selectionIsEmpty)
                                                SelBegin = CurrentPosition;
                                        CurrentLine++;
index 051ecbde5796612837dc270d1e459b5755f692bc..647286fcf01f346793bb1c5722f2834e9b7d525e 100644 (file)
@@ -84,7 +84,7 @@ namespace Crow
                #endregion
 
                #region public properties
-               [DefaultValue("#Crow.Images.Icons.crow.png")]
+               [DefaultValue("#Crow.Icons.crow.svg")]
                public string Icon {
                        get { return _icon; } 
                        set {
index e4bbcf6d49efb74929f7655ab336b93a1c413b4b..1dfcfee2168818abd556157c00cfd1b006e12d61 100644 (file)
@@ -121,14 +121,14 @@ namespace Crow
 
                protected bool running;
                protected virtual void InitBackend () {
-                       backend = new Crow.XCB.XCBBackend ();
+            if (Environment.OSVersion.Platform == PlatformID.Unix)
+                backend = new Crow.XCB.XCBBackend();
+            else
+                backend = new Crow.Win32.Win32Backend();
+
                        //backend = new Crow.XLib.XLibBackend ();
                        backend.Init (this);
 
-                       Keyboard.KeyDown += Keyboard_KeyDown;
-                       Keyboard.KeyUp += Keyboard_KeyUp;
-                       Keyboard.KeyPress += Keyboard_KeyPress;
-
                        initTooltip ();
                        initContextMenus ();
 
@@ -144,36 +144,47 @@ namespace Crow
                                Thread.Sleep(1);
                        }
                }
-               void Keyboard_KeyPress (object sender, KeyPressEventArgs e)
+               public void ProcessKeyPress (char c)
                {
                        if (_focusedWidget != null)
-                               _focusedWidget.onKeyPress (this, e);
+                               _focusedWidget.onKeyPress (this, new KeyPressEventArgs(c));
                }
 
-               void Keyboard_KeyUp (object sender, KeyEventArgs e)
+               public void ProcessKeyUp (Key key)
                {
                        if (_focusedWidget != null)
-                               _focusedWidget.onKeyUp (this, e);
+                               _focusedWidget.onKeyUp (this, new KeyEventArgs(key, false));
 //                     if (keyboardRepeatThread != null) {
 //                             keyboardRepeatOn = false;
 //                             keyboardRepeatThread.Abort();
 //                             keyboardRepeatThread.Join ();
 //                     }
                }
-               void Keyboard_KeyDown (object sender, KeyEventArgs e)
+               public void ProcessKeyDown (Key key)
                {
                        //Keyboard.SetKeyState((Crow.Key)Key,true);
-                       lastKeyDownEvt = e;
-                       lastKeyDownEvt.IsRepeat = true;
+                       lastKeyDownEvt = new KeyEventArgs (key, true);
 
                        if (_focusedWidget != null)
-                               _focusedWidget.onKeyDown (this, e);
+                               _focusedWidget.onKeyDown (this, new KeyEventArgs (key, false));
 
                        //                      keyboardRepeatThread = new Thread (keyboardRepeatThreadFunc);
                        //                      keyboardRepeatThread.IsBackground = true;
                        //                      keyboardRepeatThread.Start ();
                }
 
+               public bool Shift {
+                       get { return backend.Shift; }
+               }
+
+               public bool Ctrl {
+                       get { return backend.Ctrl; }
+               }
+
+               public bool Alt {
+                       get { return backend.Alt; }
+               }
+
                void interfaceThread()
                {                       
                        while (running) {
@@ -301,6 +312,9 @@ namespace Crow
                public event EventHandler<MouseButtonEventArgs> MouseButtonDown;
                public event EventHandler<MouseButtonEventArgs> MouseClick;
                public event EventHandler<MouseMoveEventArgs> MouseMove;
+               public event EventHandler<KeyEventArgs> KeyDown;
+               public event EventHandler<KeyEventArgs> KeyUp;
+               public event EventHandler<KeyPressEventArgs> KeyPress;
                /*public event EventHandler<KeyEventArgs> KeyboardKeyDown;
                public event EventHandler<KeyEventArgs> KeyboardKeyUp;*/
                #endregion
@@ -995,7 +1009,6 @@ namespace Crow
                XCursor cursor = XCursor.Default;
 
                public MouseState Mouse;
-               public IKeyboard Keyboard;
 
                public XCursor MouseCursor {
                        set {
@@ -1100,10 +1113,10 @@ namespace Crow
                /// </summary>
                /// <returns>return true, if interface handled the event, false otherwise.</returns>
                /// <param name="button">Button index</param>
-               public bool ProcessMouseButtonUp(int button)
+               public bool ProcessMouseButtonUp(Crow.MouseButton button)
                {
-                       Mouse.DisableBit (button);
-                       MouseButtonEventArgs e = new MouseButtonEventArgs ((Crow.MouseButton)button) { Mouse = Mouse };
+                       Mouse.DisableBit ((int)button);
+                       MouseButtonEventArgs e = new MouseButtonEventArgs (button) { Mouse = Mouse };
                        if (_activeWidget == null)
                                return false;
 
@@ -1130,10 +1143,10 @@ namespace Crow
                /// </summary>
                /// <returns>return true, if interface handled the event, false otherwise.</returns>
                /// <param name="button">Button index</param>
-               public bool ProcessMouseButtonDown(int button)
+               public bool ProcessMouseButtonDown(Crow.MouseButton button)
                {
-                       Mouse.EnableBit (button);
-                       MouseButtonEventArgs e = new MouseButtonEventArgs ((Crow.MouseButton)button) { Mouse = Mouse };
+                       Mouse.EnableBit ((int)button);
+                       MouseButtonEventArgs e = new MouseButtonEventArgs (button) { Mouse = Mouse };
 
                        if (HoverWidget == null)
                                return false;
index 1bcdaa651c6592ef5b1b31f6985b9e1603da5fae..8ed90290cf9ceab521ffc61f0269c6065cb50e9a 100644 (file)
@@ -44,7 +44,7 @@ namespace Cairo
 #if MONOTOUCH
                const string cairo = "__Internal";
 #else
-    const string cairo = "cairo";
+       const string cairo = "cairo";
 #endif
 
         //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
index 2555d5665594a1c5af5a8a6fed588c91f82fdf9d..3275205e17f180942fec57b5ef6e8641815e25e1 100644 (file)
@@ -33,6 +33,11 @@ namespace Crow
                void CleanUp();
                void Flush();
                void ProcessEvents();
+
+               bool IsDown (Key key);
+               bool Shift { get; }
+               bool Ctrl { get; }
+               bool Alt { get; }
        }
 }
 
diff --git a/Crow/src/backends/win32/User32/Cursor.cs b/Crow/src/backends/win32/User32/Cursor.cs
new file mode 100644 (file)
index 0000000..f324d57
--- /dev/null
@@ -0,0 +1,170 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with the cursor.
+        /// </summary>
+        public static class Cursor
+        {
+            /// <summary>
+            /// Loads the specified cursor resource from a set of pre-defined cursors (see <see cref="CursorName"/>).
+            /// </summary>
+            /// <param name="cursorName">An identifier for one of the pre-defined cursors.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is the handle to the newly loaded cursor.
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            public static IntPtr LoadCursor(CursorName cursorName)
+                => LoadCursor(IntPtr.Zero, (int)cursorName);
+
+            /// <summary>
+            /// Loads the specified cursor resource from the executable (.EXE) file associated
+            /// with an application instance.
+            /// </summary>
+            /// <param name="moduleInstance">
+            /// A handle to an instance of the module whose executable file contains the cursor to be loaded.
+            /// </param>
+            /// <param name="cursorName">The name of the cursor resource to be loaded.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is the handle to the newly loaded cursor.
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true, CharSet = CharSet.Unicode)]
+            public static extern IntPtr LoadCursor
+            (
+                [In] IntPtr moduleInstance,
+                [In] string cursorName
+            );
+
+            /// <summary>
+            /// Loads the specified cursor resource from a set of pre-defined cursors (see <see cref="CursorName"/>).
+            /// </summary>
+            /// <param name="moduleInstance">Usually a handle to an instance, but null in this overload.</param>
+            /// <param name="cursorIdentifier">
+            /// An integer consisting of the resource identifier in the low-order word and zero in the high-order word.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is the handle to the newly loaded cursor.
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            private static extern IntPtr LoadCursor
+            (
+                [In] [Optional] IntPtr moduleInstance,
+                [In] int cursorIdentifier
+            );
+
+            /// <summary>
+            /// Confines the cursor to a rectangular area on the screen. If a subsequent cursor position
+            /// (set by the <see cref="SetCursorPos(int, int)"/> function or the mouse) lies outside the rectangle,
+            /// the system automatically adjusts the position to keep the cursor inside the rectangular area.
+            /// </summary>
+            /// <param name="rect">
+            /// A pointer to the structure that contains the screen coordinates of the upper-left and lower-right
+            /// corners of the confining rectangle. If this parameter is null,
+            /// the cursor is free to move anywhere on the screen.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool ClipCursor([In] [Optional] ref Rect rect);
+
+            /// <summary>
+            /// Confines the cursor to a rectangular area on the screen. If a subsequent cursor position
+            /// (set by the <see cref="SetCursorPos(int, int)"/> function or the mouse) lies outside the rectangle,
+            /// the system automatically adjusts the position to keep the cursor inside the rectangular area.
+            /// </summary>
+            /// <param name="rect">
+            /// A pointer to the structure that contains the screen coordinates of the upper-left and lower-right
+            /// corners of the confining rectangle. If this parameter is null,
+            /// the cursor is free to move anywhere on the screen.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool ClipCursor([In] [Optional] IntPtr rect);
+
+            /// <summary>
+            /// Displays or hides the cursor.
+            /// </summary>
+            /// <param name="show">
+            /// If true, the display count is incremented by one. If false, the display count is decremented by one.
+            /// </param>
+            /// <returns>The return value specifies the new display counter.</returns>
+            [DllImport(Library)]
+            public static extern int ShowCursor([In] bool show);
+
+            /// <summary>
+            /// Retrieves the cursor's position, in screen coordinates.
+            /// </summary>
+            /// <param name="point">
+            /// A pointer to a <see cref="Point"/> structure that receives the screen coordinates of the cursor.
+            /// </param>
+            /// <returns>
+            /// Returns true if successful or false otherwise.<para/>
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [SuppressUnmanagedCodeSecurity]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool GetCursorPos([Out] out Point point);
+
+            /// <summary>
+            /// Moves the cursor to the specified screen coordinates. If the new coordinates are not within the
+            /// screen rectangle set by the most recent <see cref="ClipCursor(ref Rect)"/> function call, the system
+            /// automatically adjusts the coordinates so that the cursor stays within the rectangle.
+            /// </summary>
+            /// <param name="x">The new x-coordinate of the cursor, in screen coordinates.</param>
+            /// <param name="y">The new y-coordinate of the cursor, in screen coordinates.</param>
+            /// <returns>
+            /// Returns true if successful or false otherwise.<para/>
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool SetCursorPos([In] int x, [In] int y);
+
+            /// <summary>
+            /// Retrieves a handle to the current cursor.
+            /// </summary>
+            /// <returns>
+            /// The return value is the handle to the current cursor. If there is
+            /// no cursor, the return value is null.
+            /// </returns>
+            [DllImport(Library)]
+            public static extern IntPtr GetCursor();
+
+            /// <summary>
+            /// Sets the cursor shape.
+            /// </summary>
+            /// <param name="cursor">
+            /// A handle to the cursor. The cursor must have been created by the CreateCursor function or loaded by
+            /// the <see cref="LoadCursor(IntPtr, string)"/> or LoadImage function. If this parameter is null,
+            /// the cursor is removed from the screen.
+            /// </param>
+            /// <returns>
+            /// The return value is the handle to the previous cursor, if there was one.
+            /// If there was no previous cursor, the return value is null.
+            /// </returns>
+            [DllImport(Library)]
+            public static extern IntPtr SetCursor([In] [Optional] IntPtr cursor);
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Delegates/TimerProc.cs b/Crow/src/backends/win32/User32/Delegates/TimerProc.cs
new file mode 100644 (file)
index 0000000..765e326
--- /dev/null
@@ -0,0 +1,25 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// An application-defined callback function that processes <see cref="WindowMessage.Timer"/> messages. TimerProc
+    /// is a placeholder for the application-defined function name.
+    /// </summary>
+    /// <param name="hwnd">A handle to the window associated with the timer. </param>
+    /// <param name="msg">The <see cref="WindowMessage.Timer"/> message.</param>
+    /// <param name="timerID">The timer's identifier.</param>
+    /// <param name="elapsedTime">
+    /// The number of milliseconds that have elapsed since the system was started. This is the
+    /// value returned by the GetTickCount function.
+    /// </param>
+    [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+    public delegate void TimerProc
+    (
+        [In] IntPtr hwnd,
+        [In] WindowMessage msg,
+        [In] UIntPtr timerID,
+        [In] uint elapsedTime
+    );
+}
diff --git a/Crow/src/backends/win32/User32/Delegates/WindowProc.cs b/Crow/src/backends/win32/User32/Delegates/WindowProc.cs
new file mode 100644 (file)
index 0000000..e3cc193
--- /dev/null
@@ -0,0 +1,31 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// An application-defined function that processes messages sent to a window. WindowProc is a placeholder for the
+    /// application-defined function name.
+    /// </summary>
+    /// <param name="hwnd">A handle to the window.</param>
+    /// <param name="msg">The message.</param>
+    /// <param name="wparam">
+    /// Additional message information. The contents of this parameter depend on the value of the
+    /// <paramref name="msg"/> parameter.
+    /// </param>
+    /// <param name="lparam">
+    /// Additional message information. The contents of this parameter depend on the value of the
+    /// <paramref name="msg"/> parameter.
+    /// </param>
+    /// <returns>The return value is the result of the message processing and depends on the message sent.</returns>
+    [SuppressUnmanagedCodeSecurity]
+    [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+    public delegate IntPtr WindowProc
+    (
+        [In] IntPtr hwnd,
+        [In] WindowMessage msg,
+        [In] IntPtr wparam,
+        [In] IntPtr lparam
+    );
+}
diff --git a/Crow/src/backends/win32/User32/Device.cs b/Crow/src/backends/win32/User32/Device.cs
new file mode 100644 (file)
index 0000000..9a4bea3
--- /dev/null
@@ -0,0 +1,61 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with devices.
+        /// </summary>
+        public static class Device
+        {
+            /// <summary>
+            /// Registers the device or type of device for which a window will receive notifications.
+            /// </summary>
+            /// <param name="recipient">
+            /// A handle to the window or service that will receive device events for the devices specified in the
+            /// <paramref name="notificationFilter"/> parameter. The same window handle can be used in multiple calls
+            /// to <see cref="RegisterDeviceNotification(IntPtr, IntPtr, DeviceNotificationEnum)"/>.<para/>
+            /// Services can specify either a window handle or service status handle.
+            /// </param>
+            /// <param name="notificationFilter">
+            /// A pointer to a block of data that specifies the type of device for which notifications should be sent.
+            /// This block always begins with the DEV_BROADCAST_HDR structure. The data following this header is
+            /// dependent on the value of the dbch_devicetype member, which can be
+            /// <see cref="DeviceBroadcastType.DeviceInterface"/> or <see cref="DeviceBroadcastType.Handle"/>.<para/>
+            /// For more information, see the Remarks section in the official documentation.
+            /// </param>
+            /// <param name="flags">Specifies additional information for this function call.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is a device notification handle.
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.<para/>
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            public static extern IntPtr RegisterDeviceNotification
+            (
+                [In] IntPtr recipient,
+                [In] IntPtr notificationFilter,
+                [In] DeviceNotificationEnum flags
+            );
+
+            /// <summary>
+            /// Closes the specified device notification handle.
+            /// </summary>
+            /// <param name="handle">
+            /// Device notification handle returned by the
+            /// <see cref="RegisterDeviceNotification(IntPtr, IntPtr, DeviceNotificationEnum)"/> function.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.
+            /// If the function fails, the return value is false.<para/>
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool UnregisterDeviceNotification([In] IntPtr handle);
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/DeviceContext.cs b/Crow/src/backends/win32/User32/DeviceContext.cs
new file mode 100644 (file)
index 0000000..e1d2a5d
--- /dev/null
@@ -0,0 +1,213 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with device contexts.
+        /// </summary>
+        public static class DeviceContext
+        {
+            /// <summary>
+            /// Retrieves a handle to a device context (DC) for the client area
+            /// of a specified window or for the entire screen.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window whose DC is to be retrieved.
+            /// If this value is <see cref="IntPtr.Zero"/>, the DC for the entire screen is retrieved.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is a handle
+            /// to the DC for the specified window's client area.
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// </returns>
+            [DllImport(Library)]
+            public static extern IntPtr GetDC([In] [Optional] IntPtr window);
+
+            /// <summary>
+            /// Releases a device context (DC), freeing it for use by other applications. The effect of this function
+            /// depends on the type of DC.<para/>
+            /// It frees only common and window DCs. It has no effect on class or private DCs.
+            /// </summary>
+            /// <param name="window">A handle to the window whose DC is to be released.</param>
+            /// <param name="dc">A handle to the DC to be released.</param>
+            /// <returns>
+            /// The return value indicates whether the DC was released.
+            /// If the DC was released, the return value is true.<para/>
+            /// If the DC was not released, the return value is false.
+            /// </returns>
+            [DllImport(Library)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool ReleaseDC([In] IntPtr window, [In] IntPtr dc);
+
+            /// <summary>
+            /// Changes the settings of the default display device to the specified graphics mode.<para/>
+            /// To change the settings of a specified display device, use the
+            /// <see cref="ChangeDisplaySettingsEx(string, IntPtr, IntPtr, DisplaySettingsChanges, IntPtr)"/>
+            /// function.
+            /// </summary>
+            /// <param name="deviceMode">
+            /// A <see cref="DeviceMode"/> structure that describes the new graphics mode. If
+            /// <paramref name="deviceMode"/> is <see cref="IntPtr.Zero"/>, all the values currently in the registry
+            /// will be used for the display setting. Passing <see cref="IntPtr.Zero"/> for the
+            /// <paramref name="deviceMode"/> parameter and 0 for the <paramref name="changeFlags"/> parameter is the
+            /// easiest way to return to the default mode after a dynamic mode change.
+            /// </param>
+            /// <param name="changeFlags">Indicates how the graphics mode should be changed.</param>
+            /// <returns>
+            /// A <see cref="ChangeDisplaySettingsResult"/> indicating the status of the change operation.
+            /// </returns>
+            [DllImport(Library)]
+            public static extern ChangeDisplaySettingsResult ChangeDisplaySettings
+            (
+                [In] ref DeviceMode deviceMode,
+                [In] DisplaySettingsChanges changeFlags
+            );
+
+            /// <summary>
+            /// Changes the settings of the specified display device to the specified graphics mode.
+            /// </summary>
+            /// <param name="deviceName">
+            /// A string that specifies the display device whose graphics mode will change.<para/>
+            /// Only display device names as returned by
+            /// <see cref="EnumDisplayDevices(string, uint, out DisplayDevice, uint)"/> are valid.
+            /// </param>
+            /// <param name="deviceMode">
+            /// A <see cref="DeviceMode"/> structure that describes the new graphics mode. If
+            /// <paramref name="deviceMode"/> is <see cref="IntPtr.Zero"/>, all the values currently in the registry
+            /// will be used for the display setting. Passing <see cref="IntPtr.Zero"/> for the
+            /// <paramref name="deviceMode"/> parameter and 0 for the <paramref name="changeFlags"/> parameter is the
+            /// easiest way to return to the default mode after a dynamic mode change.
+            /// </param>
+            /// <param name="window">Reserved, must be null.</param>
+            /// <param name="changeFlags">Indicates how the graphics mode should be changed.</param>
+            /// <param name="changeParams">
+            /// If <paramref name="changeFlags"/> is <see cref="DisplaySettingsChanges.VideoParameters"/>, this
+            /// parameter is a pointer to a VIDEOPARAMETERS structure.<para/>
+            /// Otherwise <paramref name="changeParams"/> must be NULL.
+            /// </param>
+            /// <returns>
+            /// A <see cref="ChangeDisplaySettingsResult"/> indicating the status of the change operation.
+            /// </returns>
+            [DllImport(Library, CharSet = CharSet.Unicode)]
+            public static extern ChangeDisplaySettingsResult ChangeDisplaySettingsEx
+            (
+                [In] [Optional] string deviceName,
+                [In] [Optional] IntPtr deviceMode,
+                [Optional] IntPtr window,
+                [In] DisplaySettingsChanges changeFlags,
+                [In] IntPtr changeParams
+            );
+
+            /// <summary>
+            /// Retrieves information about one of the graphics modes for a display device. To retrieve information
+            /// for all the graphics modes of a display device, make a series of calls to this function.
+            /// </summary>
+            /// <param name="deviceName">
+            /// A string that specifies the display device about whose graphics mode the function
+            /// will obtain information.<para/>
+            /// This parameter is either null or a <see cref="DisplayDevice.DeviceName"/> returned from
+            /// <see cref="EnumDisplayDevices(string, uint, out DisplayDevice, uint)"/>. A null value specifies the
+            /// current display device on the computer on which the calling thread is running.
+            /// </param>
+            /// <param name="modeSetting">Specifies the type of information to be retrieved.</param>
+            /// <param name="deviceMode">
+            /// A <see cref="DeviceMode"/> structure into which the function stores information about the specified
+            /// graphics mode. Before calling
+            /// <see cref="EnumDisplaySettings(string, DisplayModeSetting, out DeviceMode)"/>, set the
+            /// <see cref="DeviceMode.Size"/> member to <see cref="DeviceMode.SizeInBytes"/>,
+            /// and set the <see cref="DeviceMode.DriverExtra"/> member to indicate the size, in bytes,
+            /// of the additional space available to receive private driver data.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.
+            /// If the function fails, the return value is false.
+            /// </returns>
+            [DllImport(Library, CharSet = CharSet.Unicode)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool EnumDisplaySettings
+            (
+                [In] string deviceName,
+                [In] DisplayModeSetting modeSetting,
+                [Out] out DeviceMode deviceMode
+            );
+
+            /// <summary>
+            /// Retrieves information about one of the graphics modes for a display device. To retrieve information
+            /// for all the graphics modes of a display device, make a series of calls to this function.
+            /// </summary>
+            /// <param name="deviceName">
+            /// A string that specifies the display device about whose graphics mode the function
+            /// will obtain information.<para/>
+            /// This parameter is either null or a <see cref="DisplayDevice.DeviceName"/> returned from
+            /// <see cref="EnumDisplayDevices(string, uint, out DisplayDevice, uint)"/>. A null value specifies the
+            /// current display device on the computer on which the calling thread is running.
+            /// </param>
+            /// <param name="modeSetting">Specifies the type of information to be retrieved.</param>
+            /// <param name="deviceMode">
+            /// A <see cref="DeviceMode"/> structure into which the function stores information about the specified
+            /// graphics mode. Before calling
+            /// <see cref="EnumDisplaySettings(string, DisplayModeSetting, out DeviceMode)"/>, set the
+            /// <see cref="DeviceMode.Size"/> member to <see cref="DeviceMode.SizeInBytes"/>,
+            /// and set the <see cref="DeviceMode.DriverExtra"/> member to indicate the size, in bytes,
+            /// of the additional space available to receive private driver data.
+            /// </param>
+            /// <param name="displayModeFlags">
+            /// Sets constraints on which graphics modes to return for the given display device.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.
+            /// If the function fails, the return value is false.
+            /// </returns>
+            [DllImport(Library, CharSet = CharSet.Unicode)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool EnumDisplaySettingsEx
+            (
+                [In] string deviceName,
+                [In] DisplayModeSetting modeSetting,
+                [Out] out DeviceMode deviceMode,
+                [In] EnumDisplayModes displayModeFlags
+            );
+
+            /// <summary>
+            /// Obtains information about the display devices in the current session.
+            /// </summary>
+            /// <param name="deviceName">
+            /// A pointer to the device name. If NULL, function returns information for the display adapter(s)
+            /// on the machine, based on <paramref name="deviceIndex"/>.
+            /// </param>
+            /// <param name="deviceIndex">An index value that specifies the display device of interest.</param>
+            /// <param name="displayDevice">
+            /// A <see cref="DisplayDevice"/> structure that receives information about the display device
+            /// specified by <paramref name="deviceIndex"/>.<para/>
+            /// Before calling <see cref="EnumDisplayDevices(string, uint, out DisplayDevice, uint)"/>, you must
+            /// initialize the <see cref="DisplayDevice.Size"/> member of <see cref="DisplayDevice"/>
+            /// to <see cref="DisplayDevice.SizeInBytes"/>.
+            /// </param>
+            /// <param name="flags">
+            /// Set this to 1 to retrieve the device interface name for GUID_DEVINTERFACE_MONITOR, which is registered
+            /// by the operating system on a per monitor basis. The value is placed in the
+            /// <see cref="DisplayDevice.DeviceID"/> member in <paramref name="displayDevice"/>. The resulting device
+            /// interface name can be used with SetupAPI functions and serves as a link between GDI monitor
+            /// devices and SetupAPI monitor devices.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// The function fails if <paramref name="deviceIndex"/> is greater than the largest device index.
+            /// </returns>
+            [DllImport(Library, CharSet = CharSet.Unicode)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool EnumDisplayDevices
+            (
+                [In] [Optional] string deviceName,
+                [In] uint deviceIndex,
+                [Out] out DisplayDevice displayDevice,
+                [In] uint flags
+            );
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/ChangeDisplaySettingsResult.cs b/Crow/src/backends/win32/User32/Enums/ChangeDisplaySettingsResult.cs
new file mode 100644 (file)
index 0000000..89e2b39
--- /dev/null
@@ -0,0 +1,53 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in <see cref="User32.DeviceContext.ChangeDisplaySettings(ref DeviceMode, DisplaySettingsChanges)"/>
+    /// and <see cref="User32.DeviceContext.ChangeDisplaySettingsEx(string, IntPtr, IntPtr, DisplaySettingsChanges,
+    /// IntPtr)"/> to indicate the result of the function call.
+    /// </summary>
+    public enum ChangeDisplaySettingsResult : int
+    {
+        /// <summary>
+        /// The settings change was successful.
+        /// </summary>
+        Successful = 0,
+
+        /// <summary>
+        /// The computer must be restarted for the graphics mode to work.
+        /// </summary>
+        Restart = 1,
+
+        /// <summary>
+        /// The display driver failed the specified graphics mode.
+        /// </summary>
+        Failed = -1,
+
+        /// <summary>
+        /// The graphics mode is not supported.
+        /// </summary>
+        BadMode = -2,
+
+        /// <summary>
+        /// Unable to write settings to the registry.
+        /// </summary>
+        NotUpdated = -3,
+
+        /// <summary>
+        /// An invalid set of flags was passed in.
+        /// </summary>
+        BadFlags = -4,
+
+        /// <summary>
+        /// An invalid parameter was passed in. This can include an invalid flag or combination of flags.
+        /// </summary>
+        BadParam = -5,
+
+        /// <summary>
+        /// The settings change was unsuccessful because the system is DualView capable.
+        /// Only supported on XP and higher.
+        /// </summary>
+        BadDualView = -6,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/CursorName.cs b/Crow/src/backends/win32/User32/Enums/CursorName.cs
new file mode 100644 (file)
index 0000000..c8aac66
--- /dev/null
@@ -0,0 +1,88 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies resource identifiers for the pre-defined cursors.
+    /// </summary>
+    public enum CursorName
+    {
+        /// <summary>
+        /// Standard arrow and small hourglass.
+        /// </summary>
+        AppStarting = 32650,
+
+        /// <summary>
+        /// Standard arrow.
+        /// </summary>
+        Arrow = 32512,
+
+        /// <summary>
+        /// Crosshair.
+        /// </summary>
+        Cross = 32515,
+
+        /// <summary>
+        /// Hand.
+        /// </summary>
+        Hand = 32649,
+
+        /// <summary>
+        /// Arrow and question mark.
+        /// </summary>
+        Help = 32651,
+
+        /// <summary>
+        /// I-beam.
+        /// </summary>
+        IBeam = 32513,
+
+        /// <summary>
+        /// Obsolete for applications marked version 4.0 or later.
+        /// </summary>
+        Icon = 32641,
+
+        /// <summary>
+        /// Slashed circle.
+        /// </summary>
+        No = 32648,
+
+        /// <summary>
+        /// Obsolete for applications marked version 4.0 or later. Use <see cref="SizeAll"/>.
+        /// </summary>
+        Size = 32640,
+
+        /// <summary>
+        /// Four-pointed arrow pointing north, south, east, and west.
+        /// </summary>
+        SizeAll = 32646,
+
+        /// <summary>
+        /// Double-pointed arrow pointing northeast and southwest.
+        /// </summary>
+        SizeNortheastSouthwest = 32643,
+
+        /// <summary>
+        /// Double-pointed arrow pointing north and south.
+        /// </summary>
+        SizeNorthSouth = 32645,
+
+        /// <summary>
+        /// Double-pointed arrow pointing northwest and southeast.
+        /// </summary>
+        SizeNorthwestSoutheast = 32642,
+
+        /// <summary>
+        /// Double-pointed arrow pointing west and east.
+        /// </summary>
+        SizeWestEast = 32644,
+
+        /// <summary>
+        /// Vertical arrow.
+        /// </summary>
+        UpArrow = 32516,
+
+        /// <summary>
+        /// Hourglass.
+        /// </summary>
+        Wait = 32514
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/DeviceBroadcastType.cs b/Crow/src/backends/win32/User32/Enums/DeviceBroadcastType.cs
new file mode 100644 (file)
index 0000000..1389972
--- /dev/null
@@ -0,0 +1,43 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in the <see cref="BroadcastDeviceInterface"/>.
+    /// </summary>
+    public enum DeviceBroadcastType : uint
+    {
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        Oem = 0,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        DevNode = 1,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        Volume = 2,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        Port = 3,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        Net = 4,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        DeviceInterface = 5,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        Handle = 6
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/DeviceModeFieldFlags.cs b/Crow/src/backends/win32/User32/Enums/DeviceModeFieldFlags.cs
new file mode 100644 (file)
index 0000000..ea642a9
--- /dev/null
@@ -0,0 +1,165 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in the <see cref="DeviceMode"/> structure to specify whether certain members of the structure
+    /// have been initialized.<para/>
+    /// If a member is initialized, its corresponding bit is set, otherwise the bit is clear.
+    /// A driver supports only those <see cref="DeviceMode"/> members that are appropriate for the
+    /// printer or display technology.
+    /// </summary>
+    [Flags]
+    public enum DeviceModeFieldFlags : uint
+    {
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.PrinterDeviceOptions.Orientation"/> field is set.
+        /// </summary>
+        Orientation = 0x00000001,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.PrinterDeviceOptions.PaperSize"/> field is set.
+        /// </summary>
+        PaperSize = 0x00000002,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.PrinterDeviceOptions.PaperLength"/> field is set.
+        /// </summary>
+        PaperLength = 0x00000004,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.PrinterDeviceOptions.PaperWidth"/> field is set.
+        /// </summary>
+        PaperWidth = 0x00000008,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.PrinterDeviceOptions.Scale"/> field is set.
+        /// </summary>
+        Scale = 0x00000010,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.DisplayDeviceOptions.Position"/> field is set.
+        /// </summary>
+        Position = 0x00000020,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.Nup"/> field is set.
+        /// </summary>
+        Nup = 0x00000040,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.DisplayDeviceOptions.DisplayOrientation"/> field is set.
+        /// </summary>
+        DisplayOrientation = 0x00000080,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.PrinterDeviceOptions.Copies"/> field is set.
+        /// </summary>
+        Copies = 0x00000100,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.PrinterDeviceOptions.DefaultSource"/> field is set.
+        /// </summary>
+        DefaultSource = 0x00000200,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.PrinterDeviceOptions.PrintQuality"/> field is set.
+        /// </summary>
+        PrintQuality = 0x00000400,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.Color"/> field is set.
+        /// </summary>
+        Color = 0x00000800,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.Duplex"/> field is set.
+        /// </summary>
+        Duplex = 0x00001000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.YResolution"/> field is set.
+        /// </summary>
+        YResolution = 0x00002000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.TrueTypeOption"/> field is set.
+        /// </summary>
+        TrueTypeOption = 0x00004000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.Collate"/> field is set.
+        /// </summary>
+        Collate = 0x00008000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.FormName"/> field is set.
+        /// </summary>
+        FormName = 0x00010000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.LogPixels"/> field is set.
+        /// </summary>
+        LogPixels = 0x00020000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.BitsPerPixel"/> field is set.
+        /// </summary>
+        BitsPerPixel = 0x00040000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.WidthInPixels"/> field is set.
+        /// </summary>
+        WidthInPixels = 0x00080000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.HeightInPixels"/> field is set.
+        /// </summary>
+        HeightInPixels = 0x00100000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.DisplayFlags"/> field is set.
+        /// </summary>
+        DisplayFlags = 0x00200000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.DisplayFrequency"/> field is set.
+        /// </summary>
+        DisplayFrequency = 0x00400000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.IcmMethod"/> field is set.
+        /// </summary>
+        IcmMethod = 0x00800000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.IcmIntent"/> field is set.
+        /// </summary>
+        IcmIntent = 0x01000000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.MediaType"/> field is set.
+        /// </summary>
+        MediaType = 0x02000000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.DitherType"/> field is set.
+        /// </summary>
+        DitherType = 0x04000000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.PanningWidth"/> field is set.
+        /// </summary>
+        PanningWidth = 0x08000000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.PanningHeight"/> field is set.
+        /// </summary>
+        PanningHeight = 0x10000000,
+
+        /// <summary>
+        /// Specifies whether the <see cref="DeviceMode.DisplayDeviceOptions.DisplayFixedOutput"/> field is set.
+        /// </summary>
+        DisplayFixedOutput = 0x20000000,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/DeviceNotification.cs b/Crow/src/backends/win32/User32/Enums/DeviceNotification.cs
new file mode 100644 (file)
index 0000000..f0a455a
--- /dev/null
@@ -0,0 +1,28 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in
+    /// <see cref="User32.Device.RegisterDeviceNotification(System.IntPtr, System.IntPtr, DeviceNotificationEnum)"/>
+    /// to specify additional information.
+    /// </summary>
+    public enum DeviceNotificationEnum
+    {
+        /// <summary>
+        /// The recipient parameter is a window handle.
+        /// </summary>
+        WindowHandle = 0x00000000,
+
+        /// <summary>
+        /// The recipient parameter is a service status handle.
+        /// </summary>
+        ServiceHandle = 0x00000001,
+
+        /// <summary>
+        /// Notifies the recipient of device interface events for all device interface classes.
+        /// (The dbcc_classguid member is ignored.)<para/>
+        /// This value can be used only if the dbch_devicetype member is
+        /// <see cref="DeviceBroadcastType.DeviceInterface"/>.
+        /// </summary>
+        AllInterfaceClasses = 0x00000004
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/DisplayDeviceStateFlags.cs b/Crow/src/backends/win32/User32/Enums/DisplayDeviceStateFlags.cs
new file mode 100644 (file)
index 0000000..54a4491
--- /dev/null
@@ -0,0 +1,48 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in <see cref="DisplayDevice"/> to represent the device state.
+    /// </summary>
+    [Flags]
+    public enum DisplayDeviceStateFlags : uint
+    {
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        AttachedToDesktop = 0x00000001,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        MultiDriver = 0x00000002,
+
+        /// <summary>
+        /// The primary desktop is on the device. For a system with a single display card, this is always set. For a
+        /// system with multiple display cards, only one device can have this set.
+        /// </summary>
+        PrimaryDevice = 0x00000004,
+
+        /// <summary>
+        /// Represents a pseudo device used to mirror application drawing for remoting or other purposes.<para/>
+        /// An invisible pseudo monitor is associated with this device.
+        /// </summary>
+        MirroringDriver = 0x00000008,
+
+        /// <summary>
+        /// The device is VGA compatible.
+        /// </summary>
+        VgaCompatible = 0x00000010,
+
+        /// <summary>
+        /// The device is removable; it cannot be the primary display.
+        /// </summary>
+        Removable = 0x00000020,
+
+        /// <summary>
+        /// The device has more display modes than its output devices support.
+        /// </summary>
+        ModesPruned = 0x08000000,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/DisplayFixedOutputType.cs b/Crow/src/backends/win32/User32/Enums/DisplayFixedOutputType.cs
new file mode 100644 (file)
index 0000000..71256c0
--- /dev/null
@@ -0,0 +1,19 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// For fixed-resolution displays, specifies how the device can present a lower-resolution
+    /// mode on a higher-resolution display.
+    /// </summary>
+    public enum DisplayFixedOutputType : uint
+    {
+        /// <summary>
+        /// The display device presents a lower-resolution mode image by stretching it to fill the larger screen space.
+        /// </summary>
+        Stretch = 1,
+
+        /// <summary>
+        /// The display device presents a lower resolution mode image by centering it in the larger screen space.
+        /// </summary>
+        Center = 2,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/DisplayFlags.cs b/Crow/src/backends/win32/User32/Enums/DisplayFlags.cs
new file mode 100644 (file)
index 0000000..17ad23f
--- /dev/null
@@ -0,0 +1,21 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies the device's display mode.
+    /// </summary>
+    [Flags]
+    public enum DisplayFlags : uint
+    {
+        /// <summary>
+        /// Specifies that the display is a noncolor device. If this flag is not set, color is assumed.
+        /// </summary>
+        Grayscale = 0x00000001,
+
+        /// <summary>
+        /// Specifies that the display mode is interlaced. If the flag is not set, noninterlaced is assumed.
+        /// </summary>
+        Interlaced = 0x00000002,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/DisplayModeSetting.cs b/Crow/src/backends/win32/User32/Enums/DisplayModeSetting.cs
new file mode 100644 (file)
index 0000000..6c00421
--- /dev/null
@@ -0,0 +1,20 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in <see cref="User32.DeviceContext.EnumDisplaySettings(string, DisplayModeSetting, out DeviceMode)"/> and
+    /// <see cref="User32.DeviceContext.EnumDisplaySettingsEx(string, DisplayModeSetting, out DeviceMode,
+    /// EnumDisplayModes)"/> to specify which information should be retrieved.
+    /// </summary>
+    public enum DisplayModeSetting : uint
+    {
+        /// <summary>
+        /// Retrieve the current settings for the display device.
+        /// </summary>
+        CurrentSettings = unchecked((uint)(-1)),
+
+        /// <summary>
+        /// Retrieve the settings for the display device that are currently stored in the registry.
+        /// </summary>
+        RegistrySettings = unchecked((uint)(-2))
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/DisplayOrientation.cs b/Crow/src/backends/win32/User32/Enums/DisplayOrientation.cs
new file mode 100644 (file)
index 0000000..c7bd5a4
--- /dev/null
@@ -0,0 +1,29 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines possible display orientations.
+    /// </summary>
+    public enum DisplayOrientation : uint
+    {
+        /// <summary>
+        /// The current mode's display device orientation is the natural orientation of the device,
+        /// and should be used as the default.
+        /// </summary>
+        Default = 0,
+
+        /// <summary>
+        /// The display device orientation is 90 degrees (measured clockwise) from that of <see cref="Default"/>.
+        /// </summary>
+        Rotated90 = 1,
+
+        /// <summary>
+        /// The display device orientation is 180 degrees (measured clockwise) from that of <see cref="Default"/>.
+        /// </summary>
+        Rotated180 = 2,
+
+        /// <summary>
+        /// The display device orientation is 270 degrees (measured clockwise) from that of <see cref="Default"/>.
+        /// </summary>
+        Rotated270 = 3,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/DisplaySettingsChanges.cs b/Crow/src/backends/win32/User32/Enums/DisplaySettingsChanges.cs
new file mode 100644 (file)
index 0000000..e65084f
--- /dev/null
@@ -0,0 +1,76 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in <see cref="User32.DeviceContext.ChangeDisplaySettings(ref DeviceMode, DisplaySettingsChanges)"/>
+    /// and <see cref="User32.DeviceContext.ChangeDisplaySettingsEx(string, IntPtr, IntPtr, DisplaySettingsChanges,
+    /// IntPtr)"/> to indicate how the graphics mode should be changed.
+    /// </summary>
+    [Flags]
+    public enum DisplaySettingsChanges : uint
+    {
+        /// <summary>
+        /// The graphics mode for the current screen will be changed dynamically.
+        /// </summary>
+        Dynamic = 0,
+
+        /// <summary>
+        /// The graphics mode for the current screen will be changed dynamically and the graphics mode will be
+        /// updated in the registry. The mode information is stored in the USER profile.
+        /// </summary>
+        UpdateRegistry = 0x00000001,
+
+        /// <summary>
+        /// The system tests if the requested graphics mode could be set.
+        /// </summary>
+        Test = 0x00000002,
+
+        /// <summary>
+        /// The mode is temporary in nature.<para/>
+        /// If you change to and from another desktop, this mode will not be reset.
+        /// </summary>
+        Fullscreen = 0x00000004,
+
+        /// <summary>
+        /// The settings will be saved in the global settings area so that they will affect all users on the machine.
+        /// Otherwise, only the settings for the user are modified.
+        /// This flag is only valid when specified with the <see cref="UpdateRegistry"/> flag.
+        /// </summary>
+        Global = 0x00000008,
+
+        /// <summary>
+        /// This device will become the primary device.
+        /// </summary>
+        SetPrimary = 0x00000010,
+
+        /// <summary>
+        /// Not supported by <see cref="User32.DeviceContext.ChangeDisplaySettings"/>.<para/>
+        /// Only supported on Vista and higher.
+        /// </summary>
+        VideoParameters = 0x00000020,
+
+        /// <summary>
+        /// Not supported by <see cref="User32.DeviceContext.ChangeDisplaySettings"/>.<para/>
+        /// Only supported on Vista and higher.
+        /// </summary>
+        EnableUnsafeModes = 0x00000100,
+
+        /// <summary>
+        /// Not supported by <see cref="User32.DeviceContext.ChangeDisplaySettings"/>.<para/>
+        /// Only supported on Vista and higher.
+        /// </summary>
+        DisableUnsafeModes = 0x00000200,
+
+        /// <summary>
+        /// The settings should be changed, even if the requested settings are the same as the current settings.
+        /// </summary>
+        Reset = 0x40000000,
+
+        /// <summary>
+        /// The settings will be saved in the registry, but will not take effect.
+        /// This flag is only valid when specified with the <see cref="UpdateRegistry"/> flag.
+        /// </summary>
+        NoReset = 0x10000000
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/EnumDisplayModes.cs b/Crow/src/backends/win32/User32/Enums/EnumDisplayModes.cs
new file mode 100644 (file)
index 0000000..08c1cb2
--- /dev/null
@@ -0,0 +1,24 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Flags used in <see cref="User32.DeviceContext.EnumDisplaySettingsEx(string, DisplayModeSetting, out DeviceMode,
+    /// EnumDisplayModes)"/> to specify which graphics modes to return.
+    /// </summary>
+    [Flags]
+    public enum EnumDisplayModes
+    {
+        /// <summary>
+        /// If set, the function will return all graphics modes reported by the adapter driver, regardless of
+        /// monitor capabilities. Otherwise, it will only return modes that are compatible with current monitors.
+        /// </summary>
+        RawMode = 0x00000002,
+
+        /// <summary>
+        /// If set, the function will return graphics modes in all orientations. Otherwise, it will only return
+        /// modes that have the same orientation as the one currently set for the requested display.
+        /// </summary>
+        RotatedMode = 0x00000004,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/ExtendedWindowStyles.cs b/Crow/src/backends/win32/User32/Enums/ExtendedWindowStyles.cs
new file mode 100644 (file)
index 0000000..538b674
--- /dev/null
@@ -0,0 +1,193 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines extended window style flags for usage in <see cref="User32.Window.AdjustWindowRectEx(ref Rect,
+    /// WindowStyles, bool, ExtendedWindowStyles)"/> and <see cref="User32.Window.CreateWindowEx(
+    /// ExtendedWindowStyles, string, string, WindowStyles, int, int, int, int, IntPtr, IntPtr, IntPtr, IntPtr)"/>.
+    /// </summary>
+    [Flags]
+    public enum ExtendedWindowStyles : uint
+    {
+        /// <summary>
+        /// The window has a double border; the window can, optionally, be created with a title bar
+        /// by specifying the <see cref="WindowStyles.Caption"/> style in the dwStyle parameter.
+        /// </summary>
+        DialogModalFrame = 0x00000001,
+
+        /// <summary>
+        /// The child window created with this style does not send the <see cref="WindowMessage.ParentNotify"/> message
+        /// to its parent window when it is created or destroyed.
+        /// </summary>
+        NoParentModify = 0x00000004,
+
+        /// <summary>
+        /// The window should be placed above all non-topmost windows and should stay above them,
+        /// even when the window is deactivated. To add or remove this style, use the
+        /// <see cref="User32.Window.SetWindowPos(IntPtr, IntPtr, int, int, int, int, SetWindowPosFlags)"/> function.
+        /// </summary>
+        Topmost = 0x00000008,
+
+        /// <summary>
+        /// The window accepts drag-drop files.
+        /// </summary>
+        AcceptFiles = 0x00000010,
+
+        /// <summary>
+        /// The window should not be painted until siblings beneath the window
+        /// (that were created by the same thread) have been painted.
+        /// The window appears transparent because the bits of underlying
+        /// sibling windows have already been painted.<para/>
+        /// To achieve transparency without these restrictions, use the SetWindowRgn function.
+        /// </summary>
+        Transparent = 0x00000020,
+
+        /// <summary>
+        /// The window is a MDI child window.
+        /// </summary>
+        MdiChild = 0x00000040,
+
+        /// <summary>
+        /// The window is intended to be used as a floating toolbar. A tool window has a title bar
+        /// that is shorter than a normal title bar, and the window title is drawn using a smaller font.
+        /// A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB.
+        /// If a tool window has a system menu, its icon is not displayed on the title bar. However,
+        /// you can display the system menu by right-clicking or by typing ALT+SPACE.
+        /// </summary>
+        ToolWindow = 0x00000080,
+
+        /// <summary>
+        /// The window has a border with a raised edge.
+        /// </summary>
+        WindowEdge = 0x00000100,
+
+        /// <summary>
+        /// The window has a border with a sunken edge.
+        /// </summary>
+        ClientEdge = 0x00000200,
+
+        /// <summary>
+        /// The title bar of the window includes a question mark. When the user clicks the question mark,
+        /// the cursor changes to a question mark with a pointer. If the user then clicks a child window,
+        /// the child receives a <see cref="WindowMessage.Help"/> message. The child window should pass the message to
+        /// the parent window procedure, which should call the WinHelp function using the HELP_WM_HELP command.
+        /// The Help application displays a pop-up window that typically contains help for the child window.<para/>
+        /// <see cref="ContextHelp"/> cannot be used with the <see cref="WindowStyles.MaximizeBox"/>
+        /// or <see cref="WindowStyles.MinimizeBox"/> styles.
+        /// </summary>
+        ContextHelp = 0x00000400,
+
+        /// <summary>
+        /// The window has generic "right-aligned" properties. This depends on the window class.
+        /// This style has an effect only if the shell language is Hebrew, Arabic, or another language
+        /// that supports reading-order alignment; otherwise, the style is ignored.<para/>
+        /// Using the <see cref="Right"/> style for static or edit controls has the same effect as using the SS_RIGHT
+        /// or ES_RIGHT style, respectively. Using this style with button controls has the same effect
+        /// as using BS_RIGHT and BS_RIGHTBUTTON styles.
+        /// </summary>
+        Right = 0x00001000,
+
+        /// <summary>
+        /// The window has generic left-aligned properties. This is the default.
+        /// </summary>
+        Left = 0x00000000,
+
+        /// <summary>
+        /// If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment,
+        /// the window text is displayed using right-to-left reading-order properties. For other languages,
+        /// the style is ignored.
+        /// </summary>
+        RtlReading = 0x00002000,
+
+        /// <summary>
+        /// The window text is displayed using left-to-right reading-order properties. This is the default.
+        /// </summary>
+        LtrReading = 0x00000000,
+
+        /// <summary>
+        /// If the shell language is Hebrew, Arabic, or another language that supports reading order alignment,
+        /// the vertical scroll bar (if present) is to the left of the client area.
+        /// For other languages, the style is ignored.
+        /// </summary>
+        LeftScrollbar = 0x00004000,
+
+        /// <summary>
+        /// The vertical scroll bar (if present) is to the right of the client area. This is the default.
+        /// </summary>
+        RightScrollbar = 0x00000000,
+
+        /// <summary>
+        /// The window itself contains child windows that should take part in dialog box navigation.<para/>
+        /// If this style is specified, the dialog manager recurses into children of this window when performing
+        /// navigation operations such as handling the TAB key, an arrow key, or a keyboard mnemonic.
+        /// </summary>
+        ControlParent = 0x00010000,
+
+        /// <summary>
+        /// The window has a three-dimensional border style intended to be used for items
+        /// that do not accept user input.
+        /// </summary>
+        StaticEdge = 0x00020000,
+
+        /// <summary>
+        /// Forces a top-level window onto the taskbar when the window is visible.
+        /// </summary>
+        AppWindow = 0x00040000,
+
+        /// <summary>
+        /// The window is an overlapped window.
+        /// </summary>
+        OverlappedWindow = WindowEdge | ClientEdge,
+
+        /// <summary>
+        /// The window is palette window, which is a modeless dialog box that presents an array of commands.
+        /// </summary>
+        PaletteWindow = WindowEdge | ToolWindow | Topmost,
+
+        /// <summary>
+        /// The window is a layered window. This style cannot be used if the window has
+        /// a class style of either <see cref="WindowClassStyles.OwnDeviceContext"/> or
+        /// <see cref="WindowClassStyles.ClassDeviceContext"/>.<para/>
+        /// </summary>
+        Layered = 0x00080000,
+
+        /// <summary>
+        /// The window does not pass its window layout to its child windows.<para/>
+        /// </summary>
+        NoInheritLayout = 0x00100000,
+
+        /// <summary>
+        /// The window does not render to a redirection surface. This is for windows that do not have visible
+        /// content or that use mechanisms other than surfaces to provide their visual.<para/>
+        /// </summary>
+        NoRedirectionBitmap = 0x00200000,
+
+        /// <summary>
+        /// If the shell language is Hebrew, Arabic, or another language that supports reading order alignment,
+        /// the horizontal origin of the window is on the right edge.
+        /// Increasing horizontal values advance to the left.<para/>
+        /// </summary>
+        LayoutRtl = 0x00400000,
+
+        /// <summary>
+        /// Paints all descendants of a window in bottom-to-top painting order using double-buffering.<para/>
+        /// This cannot be used if the window has a class style of either <see cref="WindowClassStyles.OwnDeviceContext"/>
+        /// or <see cref="WindowClassStyles.ClassDeviceContext"/>.<para/>
+        /// </summary>
+        Composited = 0x02000000,
+
+        /// <summary>
+        /// A top-level window created with this style does not become the foreground window when the user clicks it.
+        /// The system does not bring this window to the foreground when the user minimizes or closes
+        /// the foreground window.<para/>
+        /// The window should not be activated through programmatic access or via keyboard navigation by accessible
+        /// technology, such as Narrator.<para/>
+        /// To activate the window, use the SetActiveWindow or <see cref="User32.Window.SetForegroundWindow"/>
+        /// function.<para/>
+        /// The window does not appear on the taskbar by default. To force the window to appear on the taskbar,
+        /// use the <see cref="ExtendedWindowStyles.AppWindow"/> style.<para/>
+        /// </summary>
+        NoActivate = 0x08000000
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/GetMouseMovePointsResolution.cs b/Crow/src/backends/win32/User32/Enums/GetMouseMovePointsResolution.cs
new file mode 100644 (file)
index 0000000..a138f79
--- /dev/null
@@ -0,0 +1,21 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies the resolution desired by <see cref="User32.Mouse.GetMouseMovePointsEx(uint, ref MouseMovePoint,
+    /// MouseMovePoint*, int, GetMouseMovePointsResolution)"/>.
+    /// </summary>
+    public enum GetMouseMovePointsResolution : uint
+    {
+        /// <summary>
+        /// Retrieves the points using the display resolution.
+        /// </summary>
+        UseDisplayPoints = 1,
+
+        /// <summary>
+        /// Retrieves high resolution points. Points can range from zero to 65,535 (0xFFFF) in both x- and
+        /// y-coordinates. This is the resolution provided by absolute coordinate pointing devices
+        /// such as drawing tablets.
+        /// </summary>
+        UseHighResolutionPoints = 2
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/GetRawInputDataCommand.cs b/Crow/src/backends/win32/User32/Enums/GetRawInputDataCommand.cs
new file mode 100644 (file)
index 0000000..efc773c
--- /dev/null
@@ -0,0 +1,19 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies which type of raw input data to get in a <see cref="User32.RawInput.GetRawInputData(System.IntPtr,
+    /// GetRawInputDataCommand, System.IntPtr, ref uint, uint)"/> function call.
+    /// </summary>
+    public enum GetRawInputDataCommand : uint
+    {
+        /// <summary>
+        /// Get the raw data from the <see cref="RawInput"/> structure.
+        /// </summary>
+        Input = 0x10000003,
+
+        /// <summary>
+        /// Get the header information from the <see cref="RawInput"/> structure.
+        /// </summary>
+        Header = 0x10000005
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/GetRawInputDeviceInfoEnum.cs b/Crow/src/backends/win32/User32/Enums/GetRawInputDeviceInfoEnum.cs
new file mode 100644 (file)
index 0000000..01f82ff
--- /dev/null
@@ -0,0 +1,25 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in <see cref="User32.RawInput.GetRawInputDeviceInfo(System.IntPtr,
+    /// GetRawInputDeviceInfoEnum, byte[], ref uint)"/> to specify what data to return in the data parameter.
+    /// </summary>
+    public enum GetRawInputDeviceInfoEnum : uint
+    {
+        /// <summary>
+        /// data points to the previously parsed data.
+        /// </summary>
+        PreparsedData = 0x20000005,
+
+        /// <summary>
+        /// data points to a string that contains the device name.<para/>
+        /// For this command only, the value in dataSize is the character count (not the byte count).
+        /// </summary>
+        DeviceName = 0x20000007,
+
+        /// <summary>
+        /// data points to an <see cref="RawInputDeviceInfo"/> structure.
+        /// </summary>
+        DeviceInfo = 0x2000000b
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/GetWindowLongIndex.cs b/Crow/src/backends/win32/User32/Enums/GetWindowLongIndex.cs
new file mode 100644 (file)
index 0000000..279608c
--- /dev/null
@@ -0,0 +1,50 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Pre-defines memory offsets in extra window memory for specific pieces information to be used in
+    /// <see cref="User32.Window.GetWindowLong(System.IntPtr, GetWindowLongIndex)"/> and
+    /// <see cref="User32.Window.SetWindowLong(System.IntPtr, GetWindowLongIndex, System.IntPtr)"/>.
+    /// </summary>
+    public enum GetWindowLongIndex
+    {
+        /// <summary>
+        /// Retrieves the address of the window procedure, or a handle
+        /// representing the address of the window procedure.
+        /// You must use the CallWindowProc function to call the window procedure.
+        /// </summary>
+        WindowProcedure = -4,
+
+        /// <summary>
+        /// Retrieves a handle to the application instance.
+        /// </summary>
+        HInstance = -6,
+
+        /// <summary>
+        /// Retrieves a handle to the parent window, if any.<para/>
+        /// Not supported in <see cref="User32.Window.SetWindowLong(System.IntPtr, int, System.IntPtr)"/>.
+        /// </summary>
+        HWndParent = -8,
+
+        /// <summary>
+        /// Retrieves the identifier of the window.
+        /// </summary>
+        ID = -12,
+
+        /// <summary>
+        /// Retrieves the window styles.
+        /// </summary>
+        Style = -16,
+
+        /// <summary>
+        /// Retrieves the extended window styles.
+        /// </summary>
+        ExStyle = -20,
+
+        /// <summary>
+        /// Retrieves the user data associated with the window.
+        /// This data is intended for use by the application that created the window.
+        /// Its value is initially zero.
+        /// </summary>
+        UserData = -21
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/IconName.cs b/Crow/src/backends/win32/User32/Enums/IconName.cs
new file mode 100644 (file)
index 0000000..d410b30
--- /dev/null
@@ -0,0 +1,38 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies resource identifiers for the pre-defined icons.
+    /// </summary>
+    public enum IconName
+    {
+        /// <summary>
+        /// Application icon.
+        /// </summary>
+        Application = 32512,
+
+        /// <summary>
+        /// Stop sign icon.
+        /// </summary>
+        Hand = 32513,
+
+        /// <summary>
+        /// Question-mark icon.
+        /// </summary>
+        Question = 32514,
+
+        /// <summary>
+        /// Exclamation point icon.
+        /// </summary>
+        Exclamation = 32515,
+
+        /// <summary>
+        /// Asterisk icon.
+        /// </summary>
+        Asterisk = 32516,
+
+        /// <summary>
+        /// Application icon.
+        /// </summary>
+        WinLogo = 32517,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/MapVirtualKeyType.cs b/Crow/src/backends/win32/User32/Enums/MapVirtualKeyType.cs
new file mode 100644 (file)
index 0000000..70de9c0
--- /dev/null
@@ -0,0 +1,39 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in <see cref="MapVirtualKeyType"/> to specify the translation to be performed.
+    /// </summary>
+    public enum MapVirtualKeyType : uint
+    {
+        /// <summary>
+        /// uCode is a virtual-key code and is translated into a scan code. If it is a virtual-key code that does not
+        /// distinguish between left- and right-hand keys, the left-hand scan code is returned.
+        /// If there is no translation, the function returns 0.
+        /// </summary>
+        VirtualKeyToScanCode = 0,
+
+        /// <summary>
+        /// uCode is a scan code and is translated into a virtual-key code that does not distinguish between left- and
+        /// right-hand keys. If there is no translation, the function returns 0.
+        /// </summary>
+        ScanCodeToVirtualKey = 1,
+
+        /// <summary>
+        /// uCode is a virtual-key code and is translated into an unshifted character value in the low-order word of
+        /// the return value. Dead keys (diacritics) are indicated by setting the top bit of the return value.
+        /// If there is no translation, the function returns 0.
+        /// </summary>
+        VirtualKeyToCharacter = 2,
+
+        /// <summary>
+        /// Windows NT/2000/XP: uCode is a scan code and is translated into a virtual-key code that distinguishes
+        /// between left- and right-hand keys. If there is no translation, the function returns 0.
+        /// </summary>
+        ScanCodeToVirtualKeyExtended = 3,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        VirtualKeyToScanCodeExtended = 4
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/MonitorFromDefaultValue.cs b/Crow/src/backends/win32/User32/Enums/MonitorFromDefaultValue.cs
new file mode 100644 (file)
index 0000000..50eb7e2
--- /dev/null
@@ -0,0 +1,26 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies what values to return if
+    /// <see cref="User32.Monitor.MonitorFromPoint(Point, MonitorFromDefaultValue)"/> and
+    /// <see cref="User32.Monitor.MonitorFromWindow(System.IntPtr, MonitorFromDefaultValue)"/>
+    /// fail to find a monitor for the given arguments.
+    /// </summary>
+    public enum MonitorFromDefaultValue : uint
+    {
+        /// <summary>
+        /// Returns null.
+        /// </summary>
+        DefaultToNull = 0,
+
+        /// <summary>
+        /// Returns a handle to the primary display monitor.
+        /// </summary>
+        DefaultToPrimary = 1,
+
+        /// <summary>
+        /// Returns a handle to the display monitor that is nearest to the window/display monitor.
+        /// </summary>
+        DefaultToNearest = 2
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PeekMessageActions.cs b/Crow/src/backends/win32/User32/Enums/PeekMessageActions.cs
new file mode 100644 (file)
index 0000000..160bc91
--- /dev/null
@@ -0,0 +1,48 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in <see cref="User32.Message.PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/>
+    /// to define what actions to take for retrieved messages.
+    /// </summary>
+    [Flags]
+    public enum PeekMessageActions : uint
+    {
+        /// <summary>
+        /// Messages are not removed from the queue after processing by <see cref="User32.Message.PeekMessage"/>.
+        /// </summary>
+        NoRemove = 0,
+
+        /// <summary>
+        /// Messages are removed from the queue after processing by <see cref="User32.Message.PeekMessage"/>.
+        /// </summary>
+        Remove = 1,
+
+        /// <summary>
+        /// Prevents the system from releasing any thread that is waiting for the caller to go idle
+        /// (see WaitForInputIdle). Combine this value with either <see cref="NoRemove"/> or <see cref="Remove"/>.
+        /// </summary>
+        NoYield = 2,
+
+        /// <summary>
+        /// Process mouse and keyboard messages.
+        /// </summary>
+        QSInput = QueueMessageTypes.Input << 16,
+
+        /// <summary>
+        /// Process paint messages.
+        /// </summary>
+        QSPaint = QueueMessageTypes.Paint << 16,
+
+        /// <summary>
+        /// Process all posted messages, including timers and hotkeys.
+        /// </summary>
+        QSPostMessage = (QueueMessageTypes.PostMessage | QueueMessageTypes.Hotkey | QueueMessageTypes.Timer) << 16,
+
+        /// <summary>
+        /// Process all sent messages.
+        /// </summary>
+        QSSendMessage = QueueMessageTypes.SendMessage << 16
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterColor.cs b/Crow/src/backends/win32/User32/Enums/PrinterColor.cs
new file mode 100644 (file)
index 0000000..2e3606e
--- /dev/null
@@ -0,0 +1,18 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies the color mode to use with color printers.
+    /// </summary>
+    public enum PrinterColor : short
+    {
+        /// <summary>
+        /// Use monochrome printing mode.
+        /// </summary>
+        Monochrome = 1,
+
+        /// <summary>
+        /// Use color printing mode.
+        /// </summary>
+        Color = 2,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterDefaultSource.cs b/Crow/src/backends/win32/User32/Enums/PrinterDefaultSource.cs
new file mode 100644 (file)
index 0000000..d2bb026
--- /dev/null
@@ -0,0 +1,84 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// For a printer, specifies the paper source.
+    /// </summary>
+    public enum PrinterDefaultSource : short
+    {
+        /// <summary>
+        /// Select the upper paper bin.
+        /// This value is also used for the paper source for printers that only have one paper bin.
+        /// </summary>
+        Upper = 1,
+
+        /// <summary>
+        /// Same as <see cref="Upper"/>.
+        /// </summary>
+        OnlyOne = 1,
+
+        /// <summary>
+        /// Select the lower bin.
+        /// </summary>
+        Lower = 2,
+
+        /// <summary>
+        /// Select the middle paper bin.
+        /// </summary>
+        Middle = 3,
+
+        /// <summary>
+        /// Manually select the paper bin.
+        /// </summary>
+        Manual = 4,
+
+        /// <summary>
+        /// Select the auto envelope bin.
+        /// </summary>
+        Envelope = 5,
+
+        /// <summary>
+        /// Select the manual envelope bin.
+        /// </summary>
+        EnvelopeManual = 6,
+
+        /// <summary>
+        /// Auto-select the bin.
+        /// </summary>
+        Auto = 7,
+
+        /// <summary>
+        /// Select the bin with the tractor paper.
+        /// </summary>
+        Tractor = 8,
+
+        /// <summary>
+        /// Select the bin with the smaller paper format.
+        /// </summary>
+        SmallFormat = 9,
+
+        /// <summary>
+        /// Select the bin with the larger paper format.
+        /// </summary>
+        LargeFormat = 10,
+
+        /// <summary>
+        /// Select the bin with large capacity.
+        /// </summary>
+        LargeCapacity = 11,
+
+        /// <summary>
+        /// Select the cassette bin.
+        /// </summary>
+        Cassette = 14,
+
+        /// <summary>
+        /// Select the bin with the required form.
+        /// </summary>
+        FormSource = 15,
+
+        /// <summary>
+        /// Starting value for user-defined printer sources.
+        /// </summary>
+        User = 256,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterDitherType.cs b/Crow/src/backends/win32/User32/Enums/PrinterDitherType.cs
new file mode 100644 (file)
index 0000000..7b8a886
--- /dev/null
@@ -0,0 +1,66 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// For printers, specifies types of dithering.
+    /// </summary>
+    public enum PrinterDitherType : uint
+    {
+        /// <summary>
+        /// No dithering.
+        /// </summary>
+        None = 1,
+
+        /// <summary>
+        /// Dithering with a coarse brush.
+        /// </summary>
+        Coarse = 2,
+
+        /// <summary>
+        /// Dithering with a fine brush.
+        /// </summary>
+        Fine = 3,
+
+        /// <summary>
+        /// Line art dithering, a special dithering method that produces well defined borders between black, white,
+        /// and gray scaling. It is not suitable for images that include continuous graduations in intensity and hue,
+        /// such as scanned photographs.
+        /// </summary>
+        LineArt = 4,
+
+        /// <summary>
+        /// Error diffusion dithering.<para/>
+        /// Only supported on Windows 95, 98, and Millennium Edition.
+        /// </summary>
+        ErrorDiffusion = 5,
+
+        /// <summary>
+        /// Reserved. Do not use.
+        /// </summary>
+        Reserved6 = 6,
+
+        /// <summary>
+        /// Reserved. Do not use.
+        /// </summary>
+        Reserved7 = 7,
+
+        /// <summary>
+        /// Reserved. Do not use.
+        /// </summary>
+        Reserved8 = 8,
+
+        /// <summary>
+        /// Reserved. Do not use.
+        /// </summary>
+        Reserved9 = 9,
+
+        /// <summary>
+        /// Device does gray scaling.
+        /// </summary>
+        Grayscale = 10,
+
+        /// <summary>
+        /// This is the starting value for user-defined values.
+        /// </summary>
+        User = 256,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterDuplex.cs b/Crow/src/backends/win32/User32/Enums/PrinterDuplex.cs
new file mode 100644 (file)
index 0000000..1caa897
--- /dev/null
@@ -0,0 +1,23 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies duplex (double-sided) printing for duplex-capable printers.
+    /// </summary>
+    public enum PrinterDuplex : short
+    {
+        /// <summary>
+        /// Print single-sided.
+        /// </summary>
+        SimpleX = 1,
+
+        /// <summary>
+        /// Print double-sided, using long edge binding.
+        /// </summary>
+        Vertical = 2,
+
+        /// <summary>
+        /// Print double-sided, using short edge binding.
+        /// </summary>
+        Horizontal = 3,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterIcmIntent.cs b/Crow/src/backends/win32/User32/Enums/PrinterIcmIntent.cs
new file mode 100644 (file)
index 0000000..9ae6e24
--- /dev/null
@@ -0,0 +1,38 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies which color matching method, or intent, is used by default.
+    /// </summary>
+    public enum PrinterIcmIntent : uint
+    {
+        /// <summary>
+        /// Optimize for color saturation.<para/>
+        /// This value is the most appropriate choice for business graphs when dithering is not desired.
+        /// </summary>
+        Saturate = 1,
+
+        /// <summary>
+        /// Optimize for color contrast.<para/>
+        /// This value is the most appropriate choice for scanned or photographic images when dithering is desired.
+        /// </summary>
+        Contrast = 2,
+
+        /// <summary>
+        /// Optimize to match the exact color requested.<para/>
+        /// This value is most appropriate for use with business logos
+        /// or other images when an exact color match is desired.
+        /// </summary>
+        Colorimetric = 3,
+
+        /// <summary>
+        /// Optimize to match the exact color requested without white point mapping.<para/>
+        /// This value is most appropriate for use with proofing.
+        /// </summary>
+        AbsoluteColorimetric = 4,
+
+        /// <summary>
+        /// This is the starting value for user-defined values.
+        /// </summary>
+        User = 256,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterIcmMethod.cs b/Crow/src/backends/win32/User32/Enums/PrinterIcmMethod.cs
new file mode 100644 (file)
index 0000000..0a98c6c
--- /dev/null
@@ -0,0 +1,33 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies how Image Color Management (ICM) is handled.
+    /// </summary>
+    public enum PrinterIcmMethod : uint
+    {
+        /// <summary>
+        /// Specifies that ICM is disabled.
+        /// </summary>
+        None = 1,
+
+        /// <summary>
+        /// Specifies that ICM is handled by the system on which the page description language (PDL) data is generated.
+        /// </summary>
+        System = 2,
+
+        /// <summary>
+        /// Specifies that ICM is handled by the printer driver.
+        /// </summary>
+        Driver = 3,
+
+        /// <summary>
+        /// Specifies that ICM is handled by the destination device.
+        /// </summary>
+        Device = 4,
+
+        /// <summary>
+        /// This is the starting value for user-defined values.
+        /// </summary>
+        User = 256,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterMediaType.cs b/Crow/src/backends/win32/User32/Enums/PrinterMediaType.cs
new file mode 100644 (file)
index 0000000..3db4d06
--- /dev/null
@@ -0,0 +1,28 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies the type of media being printed on.
+    /// </summary>
+    public enum PrinterMediaType : uint
+    {
+        /// <summary>
+        /// Plain paper.
+        /// </summary>
+        Standard = 1,
+
+        /// <summary>
+        /// Transparent film.
+        /// </summary>
+        Transparency = 2,
+
+        /// <summary>
+        /// Glossy paper.
+        /// </summary>
+        Glossy = 3,
+
+        /// <summary>
+        /// This is the starting value for user-defined values.
+        /// </summary>
+        User = 256,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterNupHandling.cs b/Crow/src/backends/win32/User32/Enums/PrinterNupHandling.cs
new file mode 100644 (file)
index 0000000..2e0372d
--- /dev/null
@@ -0,0 +1,18 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies the responsibility for performing page layout for N-up printing.
+    /// </summary>
+    public enum PrinterNupHandling : uint
+    {
+        /// <summary>
+        /// The print server does the page layout.
+        /// </summary>
+        System = 1,
+
+        /// <summary>
+        /// The application does the page layout.
+        /// </summary>
+        OneUp = 2,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterPaperOrientation.cs b/Crow/src/backends/win32/User32/Enums/PrinterPaperOrientation.cs
new file mode 100644 (file)
index 0000000..0543a35
--- /dev/null
@@ -0,0 +1,18 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// For printers, the orientation for output.
+    /// </summary>
+    public enum PrinterPaperOrientation : short
+    {
+        /// <summary>
+        /// "Portrait" orientation.
+        /// </summary>
+        Portrait = 1,
+
+        /// <summary>
+        /// "Landscape" orientation.
+        /// </summary>
+        Landscape = 2,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterPaperSize.cs b/Crow/src/backends/win32/User32/Enums/PrinterPaperSize.cs
new file mode 100644 (file)
index 0000000..e0ac4a9
--- /dev/null
@@ -0,0 +1,600 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Lists all defined types for paper size, with <see cref="Letter"/>, <see cref="Legal"/>, <see cref="A3"/> and
+    /// <see cref="A4"/> being the most typical. All types not included in this enum are reserved.<para/>
+    /// Note that the paper size types cannot be combined with one another.
+    /// </summary>
+    public enum PrinterPaperSize : short
+    {
+        /// <summary>
+        /// US Letter 8 1/2 x 11 in
+        /// </summary>
+        Letter = 1,
+
+        /// <summary>
+        /// US Letter Small 8 1/2 x 11 in
+        /// </summary>
+        LetterSmall = 2,
+
+        /// <summary>
+        /// US Tabloid 11 x 17 in
+        /// </summary>
+        Tabloid = 3,
+
+        /// <summary>
+        /// US Ledger 17 x 11 in
+        /// </summary>
+        Ledger = 4,
+
+        /// <summary>
+        /// US Legal 8 1/2 x 14 in
+        /// </summary>
+        Legal = 5,
+
+        /// <summary>
+        /// US Statement 5 1/2 x 8 1/2 in
+        /// </summary>
+        Statement = 6,
+
+        /// <summary>
+        /// US Executive 7 1/4 x 10 1/2 in
+        /// </summary>
+        Executive = 7,
+
+        /// <summary>
+        /// A3 297 x 420 mm
+        /// </summary>
+        A3 = 8,
+
+        /// <summary>
+        /// A4 210 x 297 mm
+        /// </summary>
+        A4 = 9,
+
+        /// <summary>
+        /// A4 Small 210 x 297 mm
+        /// </summary>
+        A4Small = 10,
+
+        /// <summary>
+        /// A5 148 x 210 mm
+        /// </summary>
+        A5 = 11,
+
+        /// <summary>
+        /// B4 (JIS) 257 x 364 mm
+        /// </summary>
+        B4 = 12,
+
+        /// <summary>
+        /// B5 (JIS) 182 x 257 mm
+        /// </summary>
+        B5 = 13,
+
+        /// <summary>
+        /// Folio 8 1/2 x 13 in
+        /// </summary>
+        Folio = 14,
+
+        /// <summary>
+        /// Quarto 215 x 275 mm
+        /// </summary>
+        Quarto = 15,
+
+        /// <summary>
+        /// 10 x 14 in
+        /// </summary>
+        TenByFourteenInches = 16,
+
+        /// <summary>
+        /// 11 x 17 in
+        /// </summary>
+        ElevenBySeventeenInches = 17,
+
+        /// <summary>
+        /// US Note 8 1/2 x 11 in
+        /// </summary>
+        Note = 18,
+
+        /// <summary>
+        /// US Envelope #9 3 7/8 x 8 7/8
+        /// </summary>
+        Envelope9 = 19,
+
+        /// <summary>
+        /// US Envelope #10 4 1/8 x 9 1/2
+        /// </summary>
+        Envelope10 = 20,
+
+        /// <summary>
+        /// US Envelope #11 4 1/2 x 10 3/8
+        /// </summary>
+        Envelope11 = 21,
+
+        /// <summary>
+        /// US Envelope #12 4 3/4 x 11 in
+        /// </summary>
+        Envelope12 = 22,
+
+        /// <summary>
+        /// US Envelope #14 5 x 11 1/2
+        /// </summary>
+        Envelope14 = 23,
+
+        /// <summary>
+        /// C size sheet
+        /// </summary>
+        CSheet = 24,
+
+        /// <summary>
+        /// D size sheet
+        /// </summary>
+        DSheet = 25,
+
+        /// <summary>
+        /// E size sheet
+        /// </summary>
+        ESheet = 26,
+
+        /// <summary>
+        /// Envelope DL 110 x 220mm
+        /// </summary>
+        EnvelopeDL = 27,
+
+        /// <summary>
+        /// Envelope C5 162 x 229 mm
+        /// </summary>
+        EnvelopeC5 = 28,
+
+        /// <summary>
+        /// Envelope C3 324 x 458 mm
+        /// </summary>
+        EnvelopeC3 = 29,
+
+        /// <summary>
+        /// Envelope C4 229 x 324 mm
+        /// </summary>
+        EnvelopeC4 = 30,
+
+        /// <summary>
+        /// Envelope C6 114 x 162 mm
+        /// </summary>
+        EnvelopeC6 = 31,
+
+        /// <summary>
+        /// Envelope C65 114 x 229 mm
+        /// </summary>
+        EnvelopeC65 = 32,
+
+        /// <summary>
+        /// Envelope B4 250 x 353 mm
+        /// </summary>
+        EnvelopeB4 = 33,
+
+        /// <summary>
+        /// Envelope B5 176 x 250 mm
+        /// </summary>
+        EnvelopeB5 = 34,
+
+        /// <summary>
+        /// Envelope B6 176 x 125 mm
+        /// </summary>
+        EnvelopeB6 = 35,
+
+        /// <summary>
+        /// Envelope 110 x 230 mm
+        /// </summary>
+        EnvelopeItaly = 36,
+
+        /// <summary>
+        /// US Envelope Monarch 3.875 x 7.5 in
+        /// </summary>
+        EnvelopeMonarch = 37,
+
+        /// <summary>
+        /// 6 3/4 US Envelope 3 5/8 x 6 1/2 in
+        /// </summary>
+        EnvelopePersonal = 38,
+
+        /// <summary>
+        /// US Std Fanfold 14 7/8 x 11 in
+        /// </summary>
+        FanfoldUS = 39,
+
+        /// <summary>
+        /// German Std Fanfold 8 1/2 x 12 in
+        /// </summary>
+        FanfoldStandardGerman = 40,
+
+        /// <summary>
+        /// German Legal Fanfold 8 1/2 x 13 in
+        /// </summary>
+        FanfoldLegalGerman = 41,
+
+        /// <summary>
+        /// B4 (ISO) 250 x 353 mm
+        /// </summary>
+        IsoB4 = 42,
+
+        /// <summary>
+        /// Japanese Postcard 100 x 148 mm
+        /// </summary>
+        JapanesePostcard = 43,
+
+        /// <summary>
+        /// 9 x 11 in
+        /// </summary>
+        NineByElevenInches = 44,
+
+        /// <summary>
+        /// 10 x 11 in
+        /// </summary>
+        TenByElevenInches = 45,
+
+        /// <summary>
+        /// 15 x 11 in
+        /// </summary>
+        FifteenByElevenInches = 46,
+
+        /// <summary>
+        /// Envelope Invite 220 x 220 mm
+        /// </summary>
+        EnvelopeInvite = 47,
+
+        /// <summary>
+        /// RESERVED--DO NOT USE
+        /// </summary>
+        Reserved48 = 48,
+
+        /// <summary>
+        /// RESERVED--DO NOT USE
+        /// </summary>
+        Reserved49 = 49,
+
+        /// <summary>
+        /// US Letter Extra 9 1/2 x 12 in
+        /// </summary>
+        LetterExtra = 50,
+
+        /// <summary>
+        /// US Legal Extra 9 1/2 x 15 in
+        /// </summary>
+        LegalExtra = 51,
+
+        /// <summary>
+        /// US Tabloid Extra 11.69 x 18 in
+        /// </summary>
+        TabloidExtra = 52,
+
+        /// <summary>
+        /// A4 Extra 9.27 x 12.69 in
+        /// </summary>
+        A4Extra = 53,
+
+        /// <summary>
+        /// Letter Transverse 8 1/2 x 11 in
+        /// </summary>
+        LetterTransverse = 54,
+
+        /// <summary>
+        /// A4 Transverse 210 x 297 mm
+        /// </summary>
+        A4Transverse = 55,
+
+        /// <summary>
+        /// Letter Extra Transverse 9 1/2 x 12 in
+        /// </summary>
+        LetterExtraTransverse = 56,
+
+        /// <summary>
+        /// SuperA/SuperA/A4 227 x 356 mm
+        /// </summary>
+        APlus = 57,
+
+        /// <summary>
+        /// SuperB/SuperB/A3 305 x 487 mm
+        /// </summary>
+        BPlus = 58,
+
+        /// <summary>
+        /// US Letter Plus 8.5 x 12.69 in
+        /// </summary>
+        LetterPlus = 59,
+
+        /// <summary>
+        /// A4 Plus 210 x 330 mm
+        /// </summary>
+        A4Plus = 60,
+
+        /// <summary>
+        /// A5 Transverse 148 x 210 mm
+        /// </summary>
+        A5Transverse = 61,
+
+        /// <summary>
+        /// B5 (JIS) Transverse 182 x 257 mm
+        /// </summary>
+        B5Transverse = 62,
+
+        /// <summary>
+        /// A3 Extra 322 x 445 mm
+        /// </summary>
+        A3Extra = 63,
+
+        /// <summary>
+        /// A5 Extra 174 x 235 mm
+        /// </summary>
+        A5Extra = 64,
+
+        /// <summary>
+        /// B5 (ISO) Extra 201 x 276 mm
+        /// </summary>
+        B5Extra = 65,
+
+        /// <summary>
+        /// A2 420 x 594 mm
+        /// </summary>
+        A2 = 66,
+
+        /// <summary>
+        /// A3 Transverse 297 x 420 mm
+        /// </summary>
+        A3Transverse = 67,
+
+        /// <summary>
+        /// A3 Extra Transverse 322 x 445 mm
+        /// </summary>
+        A3ExtraTransverse = 68,
+
+        /// <summary>
+        /// Japanese Double Postcard 200 x 148 mm
+        /// </summary>
+        DoubleJapanesePostcard = 69,
+
+        /// <summary>
+        /// A6 105 x 148 mm
+        /// </summary>
+        A6 = 70,
+
+        /// <summary>
+        /// Japanese Envelope Kaku #2
+        /// </summary>
+        JapaneseEnvelopeKaku2 = 71,
+
+        /// <summary>
+        /// Japanese Envelope Kaku #3
+        /// </summary>
+        JapaneseEnvelopeKaku3 = 72,
+
+        /// <summary>
+        /// Japanese Envelope Chou #3
+        /// </summary>
+        JapaneseEnvelopeChou3 = 73,
+
+        /// <summary>
+        /// Japanese Envelope Chou #4
+        /// </summary>
+        JapaneseEnvelopeChou4 = 74,
+
+        /// <summary>
+        /// Letter Rotated 11 x 8 1/2 11 in
+        /// </summary>
+        LetterRotated = 75,
+
+        /// <summary>
+        /// A3 Rotated 420 x 297 mm
+        /// </summary>
+        A3Rotated = 76,
+
+        /// <summary>
+        /// A4 Rotated 297 x 210 mm
+        /// </summary>
+        A4Rotated = 77,
+
+        /// <summary>
+        /// A5 Rotated 210 x 148 mm
+        /// </summary>
+        A5Rotated = 78,
+
+        /// <summary>
+        /// B4 (JIS) Rotated 364 x 257 mm
+        /// </summary>
+        B4JisRotated = 79,
+
+        /// <summary>
+        /// B5 (JIS) Rotated 257 x 182 mm
+        /// </summary>
+        B5JisRotated = 80,
+
+        /// <summary>
+        /// Japanese Postcard Rotated 148 x 100 mm
+        /// </summary>
+        JapanesePostcardRotated = 81,
+
+        /// <summary>
+        /// Double Japanese Postcard Rotated 148 x 200 mm
+        /// </summary>
+        DoubleJapanesePostcardRotated = 82,
+
+        /// <summary>
+        /// A6 Rotated 148 x 105 mm
+        /// </summary>
+        A6Rotated = 83,
+
+        /// <summary>
+        /// Japanese Envelope Kaku #2 Rotated
+        /// </summary>
+        JapaneseEnvelopeKaku2Rotated = 84,
+
+        /// <summary>
+        /// Japanese Envelope Kaku #3 Rotated
+        /// </summary>
+        JapaneseEnvelopeKaku3Rotated = 85,
+
+        /// <summary>
+        /// Japanese Envelope Chou #3 Rotated
+        /// </summary>
+        JapaneseEnvelopeChou3Rotated = 86,
+
+        /// <summary>
+        /// Japanese Envelope Chou #4 Rotated
+        /// </summary>
+        JapaneseEnvelopeChou4Rotated = 87,
+
+        /// <summary>
+        /// B6 (JIS) 128 x 182 mm
+        /// </summary>
+        B6Jis = 88,
+
+        /// <summary>
+        /// B6 (JIS) Rotated 182 x 128 mm
+        /// </summary>
+        B6JisRotated = 89,
+
+        /// <summary>
+        /// 12 x 11 in
+        /// </summary>
+        TwelveByElevenInches = 90,
+
+        /// <summary>
+        /// Japanese Envelope You #4
+        /// </summary>
+        JapaneseEnvelopeYou4 = 91,
+
+        /// <summary>
+        /// Japanese Envelope You #4 Rotated
+        /// </summary>
+        JapaneseEnvelopeYou4Rotated = 92,
+
+        /// <summary>
+        /// PRC 16K 146 x 215 mm
+        /// </summary>
+        Prc16K = 93,
+
+        /// <summary>
+        /// PRC 32K 97 x 151 mm
+        /// </summary>
+        Prc32K = 94,
+
+        /// <summary>
+        /// PRC 32K(Big) 97 x 151 mm
+        /// </summary>
+        Prc32KBig = 95,
+
+        /// <summary>
+        /// PRC Envelope #1 102 x 165 mm
+        /// </summary>
+        PrcEnvelope1 = 96,
+
+        /// <summary>
+        /// PRC Envelope #2 102 x 176 mm
+        /// </summary>
+        PrcEnvelope2 = 97,
+
+        /// <summary>
+        /// PRC Envelope #3 125 x 176 mm
+        /// </summary>
+        PrcEnvelope3 = 98,
+
+        /// <summary>
+        /// PRC Envelope #4 110 x 208 mm
+        /// </summary>
+        PrcEnvelope4 = 99,
+
+        /// <summary>
+        /// PRC Envelope #5 110 x 220 mm
+        /// </summary>
+        PrcEnvelope5 = 100,
+
+        /// <summary>
+        /// PRC Envelope #6 120 x 230 mm
+        /// </summary>
+        PrcEnvelope6 = 101,
+
+        /// <summary>
+        /// PRC Envelope #7 160 x 230 mm
+        /// </summary>
+        PrcEnvelope7 = 102,
+
+        /// <summary>
+        /// PRC Envelope #8 120 x 309 mm
+        /// </summary>
+        PrcEnvelope8 = 103,
+
+        /// <summary>
+        /// PRC Envelope #9 229 x 324 mm
+        /// </summary>
+        PrcEnvelope9 = 104,
+
+        /// <summary>
+        /// PRC Envelope #10 324 x 458 mm
+        /// </summary>
+        PrcEnvelope10 = 105,
+
+        /// <summary>
+        /// PRC 16K Rotated
+        /// </summary>
+        P16KRotated = 106,
+
+        /// <summary>
+        /// PRC 32K Rotated
+        /// </summary>
+        P32KRotated = 107,
+
+        /// <summary>
+        /// PRC 32K(Big) Rotated
+        /// </summary>
+        P32KBigRotated = 108,
+
+        /// <summary>
+        /// PRC Envelope #1 Rotated 165 x 102 mm
+        /// </summary>
+        PrcEnvelope1Rotated = 109,
+
+        /// <summary>
+        /// PRC Envelope #2 Rotated 176 x 102 mm
+        /// </summary>
+        PrcEnvelope2Rotated = 110,
+
+        /// <summary>
+        /// PRC Envelope #3 Rotated 176 x 125 mm
+        /// </summary>
+        PrcEnvelope3Rotated = 111,
+
+        /// <summary>
+        /// PRC Envelope #4 Rotated 208 x 110 mm
+        /// </summary>
+        PrcEnvelope4Rotated = 112,
+
+        /// <summary>
+        /// PRC Envelope #5 Rotated 220 x 110 mm
+        /// </summary>
+        PrcEnvelope5Rotated = 113,
+
+        /// <summary>
+        /// PRC Envelope #6 Rotated 230 x 120 mm
+        /// </summary>
+        PrcEnvelope6Rotated = 114,
+
+        /// <summary>
+        /// PRC Envelope #7 Rotated 230 x 160 mm
+        /// </summary>
+        PrcEnvelope7Rotated = 115,
+
+        /// <summary>
+        /// PRC Envelope #8 Rotated 309 x 120 mm
+        /// </summary>
+        PrcEnvelope8Rotated = 116,
+
+        /// <summary>
+        /// PRC Envelope #9 Rotated 324 x 229 mm
+        /// </summary>
+        PrcEnvelope9Rotated = 117,
+
+        /// <summary>
+        /// PRC Envelope #10 Rotated 458 x 324 mm
+        /// </summary>
+        PrcEnvelope10Rotated = 118,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterPrintQuality.cs b/Crow/src/backends/win32/User32/Enums/PrinterPrintQuality.cs
new file mode 100644 (file)
index 0000000..e3392a6
--- /dev/null
@@ -0,0 +1,29 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// For printers, specifies the printer resolution.<para/>
+    /// Either specify one of these pre-defined values or specify a positive device-dependent resolution in DPI.
+    /// </summary>
+    public enum PrinterPrintQuality : short
+    {
+        /// <summary>
+        /// Draft-resolution printouts.
+        /// </summary>
+        Draft = -1,
+
+        /// <summary>
+        /// Low-resolution printouts.
+        /// </summary>
+        Low = -2,
+
+        /// <summary>
+        /// Medium-resolution printouts.
+        /// </summary>
+        Medium = -3,
+
+        /// <summary>
+        /// High-resolution printouts.
+        /// </summary>
+        High = -4,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/PrinterTrueTypeOption.cs b/Crow/src/backends/win32/User32/Enums/PrinterTrueTypeOption.cs
new file mode 100644 (file)
index 0000000..650542e
--- /dev/null
@@ -0,0 +1,28 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies how TrueType fonts should be printed.
+    /// </summary>
+    public enum PrinterTrueTypeOption : short
+    {
+        /// <summary>
+        /// Device will print TrueType fonts as graphics.
+        /// </summary>
+        Bitmap = 1,
+
+        /// <summary>
+        /// Device will download TrueType fonts.
+        /// </summary>
+        Download = 2,
+
+        /// <summary>
+        /// Device will substitute device fonts for TrueType fonts.
+        /// </summary>
+        SubstituteDevice = 3,
+
+        /// <summary>
+        /// Downloads TrueType fonts as outline soft fonts.
+        /// </summary>
+        DownloadOutline = 4,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/QueueMessageTypes.cs b/Crow/src/backends/win32/User32/Enums/QueueMessageTypes.cs
new file mode 100644 (file)
index 0000000..cf9a09e
--- /dev/null
@@ -0,0 +1,96 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Flags used in <see cref="User32.Message.GetQueueStatus(QueueMessageTypes)"/>
+    /// to specify the types of messages to check for.
+    /// </summary>
+    [Flags]
+    public enum QueueMessageTypes : uint
+    {
+        /// <summary>
+        /// A <see cref="WindowMessage.KeyUp"/>, <see cref="WindowMessage.KeyDown"/>,
+        /// <see cref="WindowMessage.SystemKeyUp"/>, or <see cref="WindowMessage.SystemKeyDown"/> message
+        /// is in the queue.
+        /// </summary>
+        Key = 0x0001,
+
+        /// <summary>
+        /// A <see cref="WindowMessage.MouseMove"/> message is in the queue.
+        /// </summary>
+        MouseMove = 0x0002,
+
+        /// <summary>
+        /// A mouse-button message (<see cref="WindowMessage.LButtonUp"/>,
+        /// <see cref="WindowMessage.RButtonDown"/>, and so on).
+        /// </summary>
+        MouseButton = 0x0004,
+
+        /// <summary>
+        /// A posted message (other than those listed here) is in the queue.
+        /// </summary>
+        PostMessage = 0x0008,
+
+        /// <summary>
+        /// A <see cref="WindowMessage.Timer"/> message is in the queue.
+        /// </summary>
+        Timer = 0x0010,
+
+        /// <summary>
+        /// A <see cref="WindowMessage.Paint"/> message is in the queue.
+        /// </summary>
+        Paint = 0x0020,
+
+        /// <summary>
+        /// A message sent by another thread or application is in the queue.
+        /// </summary>
+        SendMessage = 0x0040,
+
+        /// <summary>
+        /// A <see cref="WindowMessage.Hotkey"/> message is in the queue.
+        /// </summary>
+        Hotkey = 0x0080,
+
+        /// <summary>
+        /// A posted message (other than those listed here) is in the queue.
+        /// </summary>
+        AllPostMessage = 0x0100,
+
+        /// <summary>
+        /// A raw input message is in the queue. For more information, see Raw Input.
+        /// Windows XP and higher only.
+        /// </summary>
+        RawInput = 0x0400,
+
+        /// <summary>
+        /// A <see cref="WindowMessage.MouseMove"/> message or mouse-button message
+        /// (<see cref="WindowMessage.LButtonUp"/>, <see cref="WindowMessage.RButtonDown"/>, and so on).
+        /// </summary>
+        Mouse = MouseMove | MouseButton,
+
+        /// <summary>
+        /// An input message is in the queue. This is composed of <see cref="Key"/>,
+        /// <see cref="Mouse"/> and <see cref="RawInput"/>.
+        /// Windows XP and higher only.
+        /// </summary>
+        Input = Mouse | Key | RawInput,
+
+        /// <summary>
+        /// An input message is in the queue. This is composed of <see cref="Key"/> and <see cref="Mouse"/>.
+        /// Windows 2000 and earlier.
+        /// </summary>
+        InputLegacy = Mouse | Key,
+
+        /// <summary>
+        /// An input, <see cref="WindowMessage.Timer"/>, <see cref="WindowMessage.Paint"/>,
+        /// <see cref="WindowMessage.Hotkey"/>, or posted message is in the queue.
+        /// </summary>
+        AllEvents = Input | PostMessage | Timer | Paint | Hotkey,
+
+        /// <summary>
+        /// Any message is in the queue.
+        /// </summary>
+        AllInput = Input | PostMessage | Timer | Paint | Hotkey | SendMessage
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/RawInputDeviceFlags.cs b/Crow/src/backends/win32/User32/Enums/RawInputDeviceFlags.cs
new file mode 100644 (file)
index 0000000..3d4230e
--- /dev/null
@@ -0,0 +1,75 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in <see cref="RawInputDevice"/> to specify how to interpret the data in the structure.
+    /// </summary>
+    [Flags]
+    public enum RawInputDeviceFlags : uint
+    {
+        /// <summary>
+        /// If set, this removes the top level collection from the inclusion list.
+        /// This tells the operating system to stop reading from a device which matches the top level collection.
+        /// </summary>
+        Remove = 0x00000001,
+
+        /// <summary>
+        /// If set, this specifies the top level collections to exclude when reading a complete usage page.
+        /// This flag only affects a TLC whose usage page is already specified with RawInputDeviceEnum.PAGEONLY.
+        /// </summary>
+        Exclude = 0x00000010,
+
+        /// <summary>
+        /// If set, this specifies all devices whose top level collection is from the specified UsagePage.
+        /// Note that usUsage must be zero. To exclude a particular top level collection, use EXCLUDE.
+        /// </summary>
+        PageOnly = 0x00000020,
+
+        /// <summary>
+        /// If set, this prevents any devices specified by UsagePage or Usage from generating legacy messages.
+        /// This is only for the mouse and keyboard. See RawInputDevice Remarks.
+        /// </summary>
+        NoLegacy = 0x00000030,
+
+        /// <summary>
+        /// If set, this enables the caller to receive the input even when the caller is not in the foreground.
+        /// Note that Target must be specified in RawInputDevice.
+        /// </summary>
+        InputSink = 0x00000100,
+
+        /// <summary>
+        /// If set, the mouse button click does not activate the other window.
+        /// </summary>
+        CaptureMouse = 0x00000200, // effective when mouse nolegacy is specified, otherwise it would be an error
+
+        /// <summary>
+        /// If set, the application-defined keyboard device hotkeys are not handled.
+        /// However, the system hotkeys; for example, ALT+TAB and CTRL+ALT+DEL, are still handled.
+        /// By default, all keyboard hotkeys are handled.
+        /// NOHOTKEYS can be specified even if NOLEGACY is not specified and Target is NULL in RawInputDevice.
+        /// </summary>
+        NoHotkeys = 0x00000200, // effective for keyboard.
+
+        /// <summary>
+        /// Microsoft Windows XP Service Pack 1 (SP1): If set, the application command keys are handled. APPKEYS can be
+        /// specified only if NOLEGACY is specified for a keyboard device.
+        /// </summary>
+        AppKeys = 0x00000400, // effective for keyboard.
+
+        /// <summary>
+        /// If set, this enables the caller to receive input in the background only if the foreground application
+        /// does not process it. In other words, if the foreground application is not registered for raw input,
+        /// then the background application that is registered will receive the input.<para/>
+        /// Only supported on Vista later.
+        /// </summary>
+        ExInputSink = 0x00001000,
+
+        /// <summary>
+        /// If set, this enables the caller to receive WM_INPUT_DEVICE_CHANGE notifications for device arrival and
+        /// device removal.<para/>
+        /// Only supported on Vista and later.
+        /// </summary>
+        DevNotify = 0x00002000
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/RawInputDeviceType.cs b/Crow/src/backends/win32/User32/Enums/RawInputDeviceType.cs
new file mode 100644 (file)
index 0000000..95fa067
--- /dev/null
@@ -0,0 +1,23 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies the type of raw input device.
+    /// </summary>
+    public enum RawInputDeviceType : uint
+    {
+        /// <summary>
+        /// Data comes from a mouse.
+        /// </summary>
+        Mouse = 0,
+
+        /// <summary>
+        /// Data comes from a keyboard.
+        /// </summary>
+        Keyboard = 1,
+
+        /// <summary>
+        /// Data comes from an HID that is not a keyboard or a mouse.
+        /// </summary>
+        Hid = 2
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/RawKeyboardScanCodeFlags.cs b/Crow/src/backends/win32/User32/Enums/RawKeyboardScanCodeFlags.cs
new file mode 100644 (file)
index 0000000..e4725d5
--- /dev/null
@@ -0,0 +1,38 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Flags for scan code information.
+    /// </summary>
+    public enum RawKeyboardScanCodeFlags : ushort
+    {
+        /// <summary>
+        /// The key is down.
+        /// </summary>
+        Make = 0x0,
+
+        /// <summary>
+        /// The key is up.
+        /// </summary>
+        Break = 0x1,
+
+        /// <summary>
+        /// The scan code has the E0 prefix.
+        /// </summary>
+        E0 = 0x2,
+
+        /// <summary>
+        /// The scan code has the E1 prefix.
+        /// </summary>
+        E1 = 0x4,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        TermsrvSetLed = 0x8,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        TermsrvShadow = 0x10
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/RawMouseButtonFlags.cs b/Crow/src/backends/win32/User32/Enums/RawMouseButtonFlags.cs
new file mode 100644 (file)
index 0000000..174f659
--- /dev/null
@@ -0,0 +1,101 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies the transition state of the mouse buttons.
+    /// </summary>
+    [Flags]
+    public enum RawMouseButtonFlags : ushort
+    {
+        /// <summary>
+        /// Left Button changed to down.
+        /// </summary>
+        LeftButtonDown = 0x0001,
+
+        /// <summary>
+        /// Left Button changed to up.
+        /// </summary>
+        LeftButtonUp = 0x0002,
+
+        /// <summary>
+        /// Right Button changed to down.
+        /// </summary>
+        RightButtonDown = 0x0004,
+
+        /// <summary>
+        /// Right Button changed to up.
+        /// </summary>
+        RightButtonUp = 0x0008,
+
+        /// <summary>
+        /// Middle Button changed to down.
+        /// </summary>
+        MiddleButtonDown = 0x0010,
+
+        /// <summary>
+        /// Middle Button changed to up.
+        /// </summary>
+        MiddleButtonUp = 0x0020,
+
+        /// <summary>
+        /// Same as <see cref="LeftButtonDown"/>.
+        /// </summary>
+        Button1Down = LeftButtonDown,
+
+        /// <summary>
+        /// Same as <see cref="LeftButtonUp"/>.
+        /// </summary>
+        Button1Up = LeftButtonUp,
+
+        /// <summary>
+        /// Same as <see cref="RightButtonDown"/>.
+        /// </summary>
+        Button2Down = RightButtonDown,
+
+        /// <summary>
+        /// Same as <see cref="RightButtonUp"/>.
+        /// </summary>
+        Button2Up = RightButtonUp,
+
+        /// <summary>
+        /// Same as <see cref="MiddleButtonDown"/>.
+        /// </summary>
+        Button3Down = MiddleButtonDown,
+
+        /// <summary>
+        /// Same as <see cref="MiddleButtonUp"/>.
+        /// </summary>
+        Button3Up = MiddleButtonUp,
+
+        /// <summary>
+        /// XBUTTON1 changed to down.
+        /// </summary>
+        Button4Down = 0x0040,
+
+        /// <summary>
+        /// XBUTTON1 changed to up.
+        /// </summary>
+        Button4Up = 0x0080,
+
+        /// <summary>
+        /// XBUTTON2 changed to down.
+        /// </summary>
+        Button5Down = 0x0100,
+
+        /// <summary>
+        /// XBUTTON2 changed to up.
+        /// </summary>
+        Button5Up = 0x0200,
+
+        /// <summary>
+        /// Raw input comes from a mouse wheel. The wheel delta is stored in <see cref="RawMouse.ButtonData"/>.
+        /// </summary>
+        Wheel = 0x0400,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        HWheel = 0x0800
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/RawMouseFlags.cs b/Crow/src/backends/win32/User32/Enums/RawMouseFlags.cs
new file mode 100644 (file)
index 0000000..c299c9e
--- /dev/null
@@ -0,0 +1,31 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Mouse indicator flags (found in winuser.h).
+    /// </summary>
+    [Flags]
+    public enum RawMouseFlags : ushort
+    {
+        /// <summary>
+        /// LastX/Y indicate relative motion.
+        /// </summary>
+        MouseMoveRelative = 0x00,
+
+        /// <summary>
+        /// LastX/Y indicate absolute motion.
+        /// </summary>
+        MouseMoveAbsolute = 0x01,
+
+        /// <summary>
+        /// The coordinates are mapped to the virtual desktop.
+        /// </summary>
+        MouseVirtualDesktop = 0x02,
+
+        /// <summary>
+        /// Requery for mouse attributes.
+        /// </summary>
+        MouseAttributesChanged = 0x04
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/SetWindowPosFlags.cs b/Crow/src/backends/win32/User32/Enums/SetWindowPosFlags.cs
new file mode 100644 (file)
index 0000000..6a80fb0
--- /dev/null
@@ -0,0 +1,98 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Window sizing and positioning flags.
+    /// </summary>
+    [Flags]
+    public enum SetWindowPosFlags : uint
+    {
+        /// <summary>
+        /// Retains the current size (ignores the cx and cy parameters).
+        /// </summary>
+        NoSize = 0x0001,
+
+        /// <summary>
+        /// Retains the current position (ignores the x and y parameters).
+        /// </summary>
+        NoMove = 0x0002,
+
+        /// <summary>
+        /// Retains the current Z order (ignores the hwndInsertAfter parameter).
+        /// </summary>
+        NoZOrder = 0x0004,
+
+        /// <summary>
+        /// Does not redraw changes. If this flag is set, no repainting of any kind occurs.
+        /// This applies to the client area, the nonclient area (including the title bar and scroll bars),
+        /// and any part of the parent window uncovered as a result of the window being moved.
+        /// When this flag is set, the application must explicitly invalidate or redraw any parts
+        /// of the window and parent window that need redrawing.
+        /// </summary>
+        NoRedraw = 0x0008,
+
+        /// <summary>
+        /// Does not activate the window. If this flag is not set,
+        /// the window is activated and moved to the top of either the topmost or non-topmost group
+        /// (depending on the setting of the hwndInsertAfter member).
+        /// </summary>
+        NoActivate = 0x0010,
+
+        /// <summary>
+        /// Sends a <see cref="WindowMessage.NCCalcSize"/> message to the window, even if the window's size is not
+        /// being changed. If this flag is not specified, <see cref="WindowMessage.NCCalcSize"/> is sent only when
+        /// the window's size is being changed.
+        /// </summary>
+        FrameChanged = 0x0020,
+
+        /// <summary>
+        /// Displays the window.
+        /// </summary>
+        ShowWindow = 0x0040,
+
+        /// <summary>
+        /// Hides the window.
+        /// </summary>
+        HideWindow = 0x0080,
+
+        /// <summary>
+        /// Discards the entire contents of the client area. If this flag is not specified,
+        /// the valid contents of the client area are saved and copied back into the client area
+        /// after the window is sized or repositioned.
+        /// </summary>
+        NoCopyBits = 0x0100,
+
+        /// <summary>
+        /// Does not change the owner window's position in the Z order.
+        /// </summary>
+        NoOwnerZOrder = 0x0200,
+
+        /// <summary>
+        /// Prevents the window from receiving the <see cref="WindowMessage.WindowPosChanging"/> message.
+        /// </summary>
+        NoSendChanging = 0x0400,
+
+        /// <summary>
+        /// Draws a frame (defined in the window's class description) around the window.
+        /// </summary>
+        DrawFrame = FrameChanged,
+
+        /// <summary>
+        /// Same as the <see cref="NoOwnerZOrder"/> flag.
+        /// </summary>
+        NoReposition = NoOwnerZOrder,
+
+        /// <summary>
+        /// Prevents generation of the <see cref="WindowMessage.SyncPaint"/> message.
+        /// </summary>
+        DeferErase = 0x2000,
+
+        /// <summary>
+        /// If the calling thread and the thread that owns the window are attached to different input queues,
+        /// the system posts the request to the thread that owns the window. This prevents the calling thread
+        /// from blocking its execution while other threads process the request.
+        /// </summary>
+        AsyncWindowPos = 0x4000
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/SetWindowPosHwndEnum.cs b/Crow/src/backends/win32/User32/Enums/SetWindowPosHwndEnum.cs
new file mode 100644 (file)
index 0000000..9df8394
--- /dev/null
@@ -0,0 +1,32 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies a set of pre-defined values for special behavior in <see cref="User32.Window.SetWindowPos(
+    /// System.IntPtr, SetWindowPosHwndEnum, int, int, int, int, SetWindowPosFlags)"/>.
+    /// </summary>
+    public enum SetWindowPosHwndEnum
+    {
+        /// <summary>
+        /// Places the window above all non-topmost windows (that is, behind all topmost windows).
+        /// This flag has no effect if the window is already a non-topmost window.
+        /// </summary>
+        NoTopmost = -2,
+
+        /// <summary>
+        /// Places the window above all non-topmost windows.
+        /// The window maintains its topmost position even when it is deactivated.
+        /// </summary>
+        Topmost = -1,
+
+        /// <summary>
+        /// Places the window at the top of the Z order.
+        /// </summary>
+        Top = 0,
+
+        /// <summary>
+        /// Places the window at the bottom of the Z order. If the hWnd parameter identifies a topmost window,
+        /// the window loses its topmost status and is placed at the bottom of all other windows.
+        /// </summary>
+        Bottom = 1,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/ShowWindowCommand.cs b/Crow/src/backends/win32/User32/Enums/ShowWindowCommand.cs
new file mode 100644 (file)
index 0000000..22ea736
--- /dev/null
@@ -0,0 +1,83 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in <see cref="User32.Window.ShowWindow(System.IntPtr, ShowWindowCommand)"/> to control
+    /// how a window is to be shown.
+    /// </summary>
+    public enum ShowWindowCommand
+    {
+        /// <summary>
+        /// Hides the window and activates another window.
+        /// </summary>
+        Hide = 0,
+
+        /// <summary>
+        /// Activates and displays a window. If the window is minimized or maximized, the system restores it to
+        /// its original size and position.
+        /// An application should specify this flag when displaying the window for the first time.
+        /// </summary>
+        ShowNormal = 1,
+
+        /// <summary>
+        /// Activates the window and displays it as a minimized window.
+        /// </summary>
+        ShowMinimized = 2,
+
+        /// <summary>
+        /// Activates the window and displays it as a maximized window.
+        /// </summary>
+        ShowMaximized = 3,
+
+        /// <summary>
+        /// Maximizes the specified window.
+        /// </summary>
+        Maximize = 3,
+
+        /// <summary>
+        /// Displays a window in its most recent size and position. This value is similar to <see cref="ShowNormal"/>,
+        /// except that the window is not activated.
+        /// </summary>
+        ShowNoActivate = 4,
+
+        /// <summary>
+        /// Activates the window and displays it in its current size and position.
+        /// </summary>
+        Show = 5,
+
+        /// <summary>
+        /// Minimizes the specified window and activates the next top-level window in the Z order.
+        /// </summary>
+        Minimize = 6,
+
+        /// <summary>
+        /// Displays the window as a minimized window. This value is similar to <see cref="ShowMinimized"/>,
+        /// except the window is not activated.
+        /// </summary>
+        ShowMinimizedNoActivate = 7,
+
+        /// <summary>
+        /// Displays the window in its current size and position. This value is similar to <see cref="ShowNormal"/>,
+        /// except the window is not activated.
+        /// </summary>
+        ShowNA = 8,
+
+        /// <summary>
+        /// Activates and displays the window. If the window is minimized or maximized, the system restores it to
+        /// its original size and position.
+        /// An application should specify this flag when restoring a minimized window.
+        /// </summary>
+        Restore = 9,
+
+        /// <summary>
+        /// Sets the show state based on the <see cref="ShowWindowCommand"/> value specified in the STARTUPINFO
+        /// structure passed to the CreateProcess function by the program that started the application.
+        /// </summary>
+        ShowDefault = 10,
+
+        /// <summary>
+        /// Windows 2000/XP: Minimizes a window, even if the thread that owns the window is not responding.
+        /// This flag should only be used when minimizing windows from a different thread.
+        /// </summary>
+        ForceMinimize = 11
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/TrackMouseEvents.cs b/Crow/src/backends/win32/User32/Enums/TrackMouseEvents.cs
new file mode 100644 (file)
index 0000000..e4a55dd
--- /dev/null
@@ -0,0 +1,51 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used in <see cref="TrackMouseEvent"/> to request specific services.
+    /// </summary>
+    [Flags]
+    public enum TrackMouseEvents : uint
+    {
+        /// <summary>
+        /// The caller wants hover notification. Notification is delivered as a <see cref="WindowMessage.MouseHover"/>
+        /// message.<para/>
+        /// If the caller requests hover tracking while hover tracking is already active,
+        /// the hover timer will be reset.<para/>
+        /// This flag is ignored if the mouse pointer is not over the specified window or area.
+        /// </summary>
+        Hover = 0x00000001,
+
+        /// <summary>
+        /// The caller wants leave notification. Notification is delivered as a <see cref="WindowMessage.MouseLeave"/>
+        /// message. If the mouse is not over the specified window or area,
+        /// a leave notification is generated immediately and no further tracking is performed.
+        /// </summary>
+        Leave = 0x00000002,
+
+        /// <summary>
+        /// The caller wants hover and leave notification for the nonclient areas.
+        /// Notification is delivered as <see cref="WindowMessage.NCMouseHover"/>
+        /// and <see cref="WindowMessage.NCMouseLeave"/> messages.
+        /// </summary>
+        NonClient = 0x00000010,
+
+        /// <summary>
+        /// The function fills in the structure instead of treating it as a tracking request.
+        /// The structure is filled such that had that structure been passed to TrackMouseEvent,
+        /// it would generate the current tracking. The only anomaly is that the hover time-out
+        /// returned is always the actual time-out and not <see cref="TrackMouseEvent.DefaultHoverTime"/>, if
+        /// <see cref="TrackMouseEvent.DefaultHoverTime"/> was specified during the original
+        /// <see cref="User32.Mouse.TrackMouseEvent"/> request.
+        /// </summary>
+        Query = 0x40000000,
+
+        /// <summary>
+        /// The caller wants to cancel a prior tracking request. The caller should also specify the type
+        /// of tracking that it wants to cancel. For example, to cancel hover tracking, the caller must
+        /// pass the <see cref="Cancel"/> and <see cref="Hover"/> flags.
+        /// </summary>
+        Cancel = 0x80000000
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/VirtualKey.cs b/Crow/src/backends/win32/User32/Enums/VirtualKey.cs
new file mode 100644 (file)
index 0000000..40529d8
--- /dev/null
@@ -0,0 +1,874 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Lists all virtual keys.
+    /// </summary>
+    public enum VirtualKey : uint
+    {
+        /// <summary>
+        /// Left mouse button.
+        /// </summary>
+        LButton = 0x01,
+
+        /// <summary>
+        /// Right mouse button.
+        /// </summary>
+        RButton = 0x02,
+
+        /// <summary>
+        /// Control-break processing.
+        /// </summary>
+        Cancel = 0x03,
+
+        /// <summary>
+        /// Middle mouse button (three-button mouse).<para/>
+        /// Not contiguous with L and R Button.
+        /// </summary>
+        MButton = 0x04,
+
+        /// <summary>
+        /// X1 mouse button.
+        /// Not contiguous with L and R Button.
+        /// </summary>
+        XButton1 = 0x05,
+
+        /// <summary>
+        /// X2 mouse button.
+        /// Not contiguous with L and R Button.
+        /// </summary>
+        XButton2 = 0x06,
+
+        /*
+         * 0x07: Undefined
+         */
+
+        /// <summary>
+        /// BACKSPACE key.
+        /// </summary>
+        Back = 0x08,
+
+        /// <summary>
+        /// TAB key.
+        /// </summary>
+        Tab = 0x09,
+
+        /*
+         * 0x0A - 0x0B: Reserved
+         */
+
+        /// <summary>
+        /// CLEAR key.
+        /// </summary>
+        Clear = 0x0C,
+
+        /// <summary>
+        /// ENTER key.
+        /// </summary>
+        Return = 0x0D,
+
+        /*
+         * 0x0E - 0x0F: Undefined
+         */
+
+        /// <summary>
+        /// SHIFT key.
+        /// </summary>
+        Shift = 0x10,
+
+        /// <summary>
+        /// CTRL key.
+        /// </summary>
+        Control = 0x11,
+
+        /// <summary>
+        /// ALT key.
+        /// </summary>
+        Menu = 0x12,
+
+        /// <summary>
+        /// PAUSE key.
+        /// </summary>
+        Pause = 0x13,
+
+        /// <summary>
+        /// CAPS LOCK key
+        /// </summary>
+        Capital = 0x14,
+
+        /// <summary>
+        /// IME Kana mode.
+        /// </summary>
+        Kana = 0x15,
+
+        /// <summary>
+        /// IME Hanguel mode (maintained for compatibility; use <see cref="Hangul"/>).
+        /// </summary>
+        Hangeul = 0x15,
+
+        /// <summary>
+        /// IME Hangul mode.
+        /// </summary>
+        Hangul = 0x15,
+
+        /*
+         * 0x16: Undefined
+         */
+
+        /// <summary>
+        /// IME Junja mode
+        /// </summary>
+        Junja = 0x17,
+
+        /// <summary>
+        /// IME final mode.
+        /// </summary>
+        Final = 0x18,
+
+        /// <summary>
+        /// IME Hanja mode.
+        /// </summary>
+        Hanja = 0x19,
+
+        /// <summary>
+        /// IME Kanji mode.
+        /// </summary>
+        Kanji = 0x19,
+
+        /*
+         * 0x1A: Undefined
+         */
+
+        /// <summary>
+        /// ESC key
+        /// </summary>
+        Escape = 0x1B,
+
+        /// <summary>
+        /// IME convert.
+        /// </summary>
+        Convert = 0x1C,
+
+        /// <summary>
+        /// IME nonconvert.
+        /// </summary>
+        NonConvert = 0x1D,
+
+        /// <summary>
+        /// IME accept.
+        /// </summary>
+        Accept = 0x1E,
+
+        /// <summary>
+        /// IME mode change request.
+        /// </summary>
+        ModeChange = 0x1F,
+
+        /// <summary>
+        /// SPACEBAR.
+        /// </summary>
+        Space = 0x20,
+
+        /// <summary>
+        /// PAGE UP key.
+        /// </summary>
+        Prior = 0x21,
+
+        /// <summary>
+        /// PAGE DOWN key.
+        /// </summary>
+        Next = 0x22,
+
+        /// <summary>
+        /// END key.
+        /// </summary>
+        End = 0x23,
+
+        /// <summary>
+        /// HOME key.
+        /// </summary>
+        Home = 0x24,
+
+        /// <summary>
+        /// LEFT ARROW key.
+        /// </summary>
+        Left = 0x25,
+
+        /// <summary>
+        /// UP ARROW key.
+        /// </summary>
+        Up = 0x26,
+
+        /// <summary>
+        /// RIGHT ARROW key.
+        /// </summary>
+        Right = 0x27,
+
+        /// <summary>
+        /// DOWN ARROW key.
+        /// </summary>
+        Down = 0x28,
+
+        /// <summary>
+        /// SELECT key.
+        /// </summary>
+        Select = 0x29,
+
+        /// <summary>
+        /// PRINT key.
+        /// </summary>
+        Print = 0x2A,
+
+        /// <summary>
+        /// EXECUTE key.
+        /// </summary>
+        Execute = 0x2B,
+
+        /// <summary>
+        /// PRINT SCREEN key.
+        /// </summary>
+        Snapshot = 0x2C,
+
+        /// <summary>
+        /// INS key.
+        /// </summary>
+        Insert = 0x2D,
+
+        /// <summary>
+        /// DEL key.
+        /// </summary>
+        Delete = 0x2E,
+
+        /// <summary>
+        /// HELP key.
+        /// </summary>
+        Help = 0x2F,
+
+        /*
+         * 0 - 9 are the same as ASCII '0' - '9' (0x30 - 0x39)
+         * 0x40: Unassigned
+         * A - Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A)
+         */
+
+        /// <summary>
+        /// Left Windows key (Natural keyboard).
+        /// </summary>
+        LWin = 0x5B,
+
+        /// <summary>
+        /// Right Windows key (Natural keyboard).
+        /// </summary>
+        RWin = 0x5C,
+
+        /// <summary>
+        /// Applications key (Natural keyboard).
+        /// </summary>
+        Apps = 0x5D,
+
+        /*
+         * 0x5E: Reserved
+         */
+
+        /// <summary>
+        /// Computer Sleep key.
+        /// </summary>
+        Sleep = 0x5F,
+
+        /// <summary>
+        /// Numeric keypad 0 key.
+        /// </summary>
+        Numpad0 = 0x60,
+
+        /// <summary>
+        /// Numeric keypad 1 key
+        /// </summary>
+        Numpad1 = 0x61,
+
+        /// <summary>
+        /// Numeric keypad 2 key
+        /// </summary>
+        Numpad2 = 0x62,
+
+        /// <summary>
+        /// Numeric keypad 3 key
+        /// </summary>
+        Numpad3 = 0x63,
+
+        /// <summary>
+        /// Numeric keypad 4 key
+        /// </summary>
+        Numpad4 = 0x64,
+
+        /// <summary>
+        /// Numeric keypad 5 key
+        /// </summary>
+        Numpad5 = 0x65,
+
+        /// <summary>
+        /// Numeric keypad 6 key
+        /// </summary>
+        Numpad6 = 0x66,
+
+        /// <summary>
+        /// Numeric keypad 7 key
+        /// </summary>
+        Numpad7 = 0x67,
+
+        /// <summary>
+        /// Numeric keypad 8 key
+        /// </summary>
+        Numpad8 = 0x68,
+
+        /// <summary>
+        /// Numeric keypad 9 key
+        /// </summary>
+        Numpad9 = 0x69,
+
+        /// <summary>
+        /// Multiply key.
+        /// </summary>
+        Multiply = 0x6A,
+
+        /// <summary>
+        /// Add key.
+        /// </summary>
+        Add = 0x6B,
+
+        /// <summary>
+        /// Separator key.
+        /// </summary>
+        Separator = 0x6C,
+
+        /// <summary>
+        /// Subtract key.
+        /// </summary>
+        Subtract = 0x6D,
+
+        /// <summary>
+        /// Decimal key.
+        /// </summary>
+        Decimal = 0x6E,
+
+        /// <summary>
+        /// Divide key.
+        /// </summary>
+        Divide = 0x6F,
+
+        /// <summary>
+        /// F1 key.
+        /// </summary>
+        F1 = 0x70,
+
+        /// <summary>
+        /// F2 key.
+        /// </summary>
+        F2 = 0x71,
+
+        /// <summary>
+        /// F3 key.
+        /// </summary>
+        F3 = 0x72,
+
+        /// <summary>
+        /// F4 key.
+        /// </summary>
+        F4 = 0x73,
+
+        /// <summary>
+        /// F5 key.
+        /// </summary>
+        F5 = 0x74,
+
+        /// <summary>
+        /// F6 key.
+        /// </summary>
+        F6 = 0x75,
+
+        /// <summary>
+        /// F7 key.
+        /// </summary>
+        F7 = 0x76,
+
+        /// <summary>
+        /// F8 key.
+        /// </summary>
+        F8 = 0x77,
+
+        /// <summary>
+        /// F9 key.
+        /// </summary>
+        F9 = 0x78,
+
+        /// <summary>
+        /// F10 key.
+        /// </summary>
+        F10 = 0x79,
+
+        /// <summary>
+        /// F11 key.
+        /// </summary>
+        F11 = 0x7A,
+
+        /// <summary>
+        /// F12 key.
+        /// </summary>
+        F12 = 0x7B,
+
+        /// <summary>
+        /// F13 key.
+        /// </summary>
+        F13 = 0x7C,
+
+        /// <summary>
+        /// F14 key.
+        /// </summary>
+        F14 = 0x7D,
+
+        /// <summary>
+        /// F15 key.
+        /// </summary>
+        F15 = 0x7E,
+
+        /// <summary>
+        /// F16 key.
+        /// </summary>
+        F16 = 0x7F,
+
+        /// <summary>
+        /// F17 key.
+        /// </summary>
+        F17 = 0x80,
+
+        /// <summary>
+        /// F18 key.
+        /// </summary>
+        F18 = 0x81,
+
+        /// <summary>
+        /// F19 key.
+        /// </summary>
+        F19 = 0x82,
+
+        /// <summary>
+        /// F20 key.
+        /// </summary>
+        F20 = 0x83,
+
+        /// <summary>
+        /// F21 key.
+        /// </summary>
+        F21 = 0x84,
+
+        /// <summary>
+        /// F22 key.
+        /// </summary>
+        F22 = 0x85,
+
+        /// <summary>
+        /// F23 key.
+        /// </summary>
+        F23 = 0x86,
+
+        /// <summary>
+        /// F24 key.
+        /// </summary>
+        F24 = 0x87,
+
+        /*
+         * 0x88 - 0x8F: Unassigned
+         */
+
+        /// <summary>
+        /// NUM LOCK key.
+        /// </summary>
+        NumLock = 0x90,
+
+        /// <summary>
+        /// SCROLL LOCK key.
+        /// </summary>
+        Scroll = 0x91,
+
+        /*
+         * 0x92 - 0x96: OEM specific
+         */
+
+        /*
+         * 0x97 - 0x9F: Unassigned
+         */
+
+        /*
+         * L* & R* - left and right Alt, Ctrl and Shift virtual keys.
+         * Used only as parameters to GetAsyncKeyState() and GetKeyState().
+         * No other API or message will distinguish left and right keys in this way.
+         */
+
+        /// <summary>
+        /// Left SHIFT key.
+        /// </summary>
+        LShift = 0xA0,
+
+        /// <summary>
+        /// Right SHIFT key.
+        /// </summary>
+        RShift = 0xA1,
+
+        /// <summary>
+        /// Left CONTROL key.
+        /// </summary>
+        LControl = 0xA2,
+
+        /// <summary>
+        /// Right CONTROL key.
+        /// </summary>
+        RControl = 0xA3,
+
+        /// <summary>
+        /// Left MENU key.
+        /// </summary>
+        LMenu = 0xA4,
+
+        /// <summary>
+        /// Right MENU key.
+        /// </summary>
+        RMenu = 0xA5,
+
+        /// <summary>
+        /// Browser Back key.
+        /// </summary>
+        BrowserBack = 0xA6,
+
+        /// <summary>
+        /// Browser Forward key
+        /// </summary>
+        BrowserForward = 0xA7,
+
+        /// <summary>
+        /// Browser Refresh key.
+        /// </summary>
+        BrowserRefresh = 0xA8,
+
+        /// <summary>
+        /// Browser Stop key.
+        /// </summary>
+        BrowserStop = 0xA9,
+
+        /// <summary>
+        /// Browser Search key.
+        /// </summary>
+        BrowserSearch = 0xAA,
+
+        /// <summary>
+        /// Browser Favorites key.
+        /// </summary>
+        BrowserFavorites = 0xAB,
+
+        /// <summary>
+        /// Browser Start and Home key.
+        /// </summary>
+        BrowserHome = 0xAC,
+
+        /// <summary>
+        /// Volume Mute key.
+        /// </summary>
+        VolumeMute = 0xAD,
+
+        /// <summary>
+        /// Volume Down key.
+        /// </summary>
+        VolumeDown = 0xAE,
+
+        /// <summary>
+        /// Volume Up key.
+        /// </summary>
+        VolumeUp = 0xAF,
+
+        /// <summary>
+        /// Next Track key.
+        /// </summary>
+        MediaNextTrack = 0xB0,
+
+        /// <summary>
+        /// Previous Track key.
+        /// </summary>
+        MediaPreviousTrack = 0xB1,
+
+        /// <summary>
+        /// Stop Media key.
+        /// </summary>
+        MediaStop = 0xB2,
+
+        /// <summary>
+        /// Play/Pause Media key.
+        /// </summary>
+        MediaPlayPause = 0xB3,
+
+        /// <summary>
+        /// Start Mail key.
+        /// </summary>
+        LaunchMail = 0xB4,
+
+        /// <summary>
+        /// Select Media key.
+        /// </summary>
+        LaunchMediaSelect = 0xB5,
+
+        /// <summary>
+        /// Start Application 1 key.
+        /// </summary>
+        LaunchApp1 = 0xB6,
+
+        /// <summary>
+        /// Start Application 2 key.
+        /// </summary>
+        LaunchApp2 = 0xB7,
+
+        /*
+         * 0xB8 - 0xB9 : reserved
+         */
+
+        /// <summary>
+        /// Used for miscellaneous characters; it can vary by keyboard.
+        /// For the US standard keyboard, the ';:' key.
+        /// </summary>
+        Oem1 = 0xBA,
+
+        /// <summary>
+        /// For any country/region, the '+' key.
+        /// </summary>
+        OemPlus = 0xBB,
+
+        /// <summary>
+        /// For any country/region, the ',' key.
+        /// </summary>
+        OemComma = 0xBC,
+
+        /// <summary>
+        /// For any country/region, the '-' key.
+        /// </summary>
+        OemMinus = 0xBD,
+
+        /// <summary>
+        /// For any country/region, the '.' key.
+        /// </summary>
+        OemPeriod = 0xBE,
+
+        /// <summary>
+        /// Used for miscellaneous characters; it can vary by keyboard.
+        /// For the US standard keyboard, the '/?' key.
+        /// </summary>
+        Oem2 = 0xBF,
+
+        /// <summary>
+        /// Used for miscellaneous characters; it can vary by keyboard.
+        /// For the US standard keyboard, the '`~' key.
+        /// </summary>
+        Oem3 = 0xC0,
+
+        /*
+         * 0xC1 - 0xD7: Reserved
+         */
+
+        /*
+         * 0xD8 - 0xDA: Unassigned
+         */
+
+        /// <summary>
+        /// Used for miscellaneous characters; it can vary by keyboard.
+        /// For the US standard keyboard, the '[{' key
+        /// </summary>
+        Oem4 = 0xDB,
+
+        /// <summary>
+        /// Used for miscellaneous characters; it can vary by keyboard.
+        /// For the US standard keyboard, the '\|' key
+        /// </summary>
+        Oem5 = 0xDC,
+
+        /// <summary>
+        /// Used for miscellaneous characters; it can vary by keyboard.
+        /// For the US standard keyboard, the ']}' key
+        /// </summary>
+        Oem6 = 0xDD,
+
+        /// <summary>
+        /// Used for miscellaneous characters; it can vary by keyboard.
+        /// For the US standard keyboard, the 'single-quote/double-quote' key
+        /// </summary>
+        Oem7 = 0xDE,
+
+        /// <summary>
+        /// Used for miscellaneous characters; it can vary by keyboard.
+        /// </summary>
+        Oem8 = 0xDF,
+
+        /*
+         * 0xE0: Reserved
+         */
+
+        /*
+         * Various extended or enhanced keyboards
+         */
+
+        /// <summary>
+        /// OEM specific.
+        /// 'AX' key on Japanese AX keyboard.
+        /// </summary>
+        OemAX = 0xE1,
+
+        /// <summary>
+        /// Either the angle bracket key or the backslash key on the RT 102-key keyboard.
+        /// </summary>
+        Oem102 = 0xE2,
+
+        /// <summary>
+        /// OEM specific.
+        /// Help key on ICO.
+        /// </summary>
+        IcoHelp = 0xE3,
+
+        /// <summary>
+        /// OEM specific.
+        /// 00 key on ICO.
+        /// </summary>
+        Ico00 = 0xE4,
+
+        /// <summary>
+        /// IME PROCESS key.
+        /// </summary>
+        ProcessKey = 0xE5,
+
+        /// <summary>
+        /// OEM specific.
+        /// Clear key on ICO.
+        /// </summary>
+        IcoClear = 0xE6,
+
+        /// <summary>
+        /// Used to pass Unicode characters as if they were keystrokes. The <see cref="Packet"/> key is
+        /// the low word of a 32-bit Virtual Key value used for non-keyboard input methods.
+        /// </summary>
+        Packet = 0xE7,
+
+        /*
+         * 0xE8: Unassigned
+         */
+
+        /*
+         * Nokia/Ericsson definitions
+         */
+
+        /// <summary>
+        /// OEM specific Reset key.
+        /// </summary>
+        OemReset = 0xE9,
+
+        /// <summary>
+        /// OEM specific Jump key.
+        /// </summary>
+        OemJump = 0xEA,
+
+        /// <summary>
+        /// OEM specific PA1 key.
+        /// </summary>
+        OemPA1 = 0xEB,
+
+        /// <summary>
+        /// OEM specific PA2 key.
+        /// </summary>
+        OemPA2 = 0xEC,
+
+        /// <summary>
+        /// OEM specific PA3 key.
+        /// </summary>
+        OemPA3 = 0xED,
+
+        /// <summary>
+        /// OEM specific WSCtrl key.
+        /// </summary>
+        OemWSCtrl = 0xEE,
+
+        /// <summary>
+        /// OEM specific CUseL key.
+        /// </summary>
+        OemCUseL = 0xEF,
+
+        /// <summary>
+        /// OEM specific attn key.
+        /// </summary>
+        OemAttn = 0xF0,
+
+        /// <summary>
+        /// OEM specific Finish key.
+        /// </summary>
+        OemFinish = 0xF1,
+
+        /// <summary>
+        /// OEM specific Copy key.
+        /// </summary>
+        OemCopy = 0xF2,
+
+        /// <summary>
+        /// OEM specific Auto key.
+        /// </summary>
+        OemAuto = 0xF3,
+
+        /// <summary>
+        /// OEM specific Enlw key.
+        /// </summary>
+        OemEnlw = 0xF4,
+
+        /// <summary>
+        /// OEM specific Backtab key.
+        /// </summary>
+        OemBacktab = 0xF5,
+
+        /// <summary>
+        /// Attn key.
+        /// </summary>
+        Attn = 0xF6,
+
+        /// <summary>
+        /// CrSel key.
+        /// </summary>
+        CrSel = 0xF7,
+
+        /// <summary>
+        /// ExSel key.
+        /// </summary>
+        ExSel = 0xF8,
+
+        /// <summary>
+        /// Erase EOF key.
+        /// </summary>
+        ErEof = 0xF9,
+
+        /// <summary>
+        /// Play key.
+        /// </summary>
+        Play = 0xFA,
+
+        /// <summary>
+        /// Zoom key.
+        /// </summary>
+        Zoom = 0xFB,
+
+        /// <summary>
+        /// Reserved.
+        /// </summary>
+        NoName = 0xFC,
+
+        /// <summary>
+        /// PA1 key.
+        /// </summary>
+        PA1 = 0xFD,
+
+        /// <summary>
+        /// Clear key.
+        /// </summary>
+        OemClear = 0xFE,
+
+        /// <summary>
+        /// The highest possible value for virtual keys.
+        /// </summary>
+        Last = 0xFF,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/WindowClassStyles.cs b/Crow/src/backends/win32/User32/Enums/WindowClassStyles.cs
new file mode 100644 (file)
index 0000000..b3f9d5f
--- /dev/null
@@ -0,0 +1,97 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines additional elements of the window class.
+    /// </summary>
+    [Flags]
+    public enum WindowClassStyles : uint
+    {
+        /// <summary>
+        /// Redraws the entire window if a movement or size adjustment changes the height of the client area.
+        /// </summary>
+        VRedraw = 0x0001,
+
+        /// <summary>
+        /// Redraws the entire window if a movement or size adjustment changes the width of the client area.
+        /// </summary>
+        HRedraw = 0x0002,
+
+        /// <summary>
+        /// Sends a double-click message to the window procedure when the user double-clicks
+        /// the mouse while the cursor is within a window belonging to the class.
+        /// </summary>
+        DoubleClicks = 0x0008,
+
+        /// <summary>
+        /// Allocates a unique device context for each window in the class.
+        /// </summary>
+        OwnDeviceContext = 0x0020,
+
+        /// <summary>
+        /// Allocates one device context to be shared by all windows in the class. Because window classes are process
+        /// specific, it is possible for multiple threads of an application to create a window of the same class.
+        /// It is also possible for the threads to attempt to use the device context simultaneously. When this
+        /// happens, the system allows only one thread to successfully finish its drawing operation.
+        /// </summary>
+        ClassDeviceContext = 0x0040,
+
+        /// <summary>
+        /// Sets the clipping rectangle of the child window to that of the parent window so that the child can draw on
+        /// the parent. A window with the <see cref="ParentDeviceContext"/> style bit receives a regular device context
+        /// from the system's cache of device contexts. It does not give the child the parent's device context or
+        /// device context settings. Specifying <see cref="ParentDeviceContext"/> enhances an application's
+        /// performance.
+        /// </summary>
+        ParentDeviceContext = 0x0080,
+
+        /// <summary>
+        /// Disables Close on the window menu.
+        /// </summary>
+        NoClose = 0x0200,
+
+        /// <summary>
+        /// Saves, as a bitmap, the portion of the screen image obscured by a window of this class. When the window is
+        /// removed, the system uses the saved bitmap to restore the screen image, including other windows that were
+        /// obscured. Therefore, the system does not send <see cref="WindowMessage.Paint"/> to windows that were
+        /// obscured if the memory used by the bitmap has not been discarded and if other screen actions
+        /// have not invalidated the stored image.<para/>
+        /// This style is useful for small windows (for example, menus or dialog boxes) that are displayed briefly
+        /// and then removed before other screen activity takes place. This style increases the time required to
+        /// display the window, because the system must first allocate memory to store the bitmap.
+        /// </summary>
+        SaveBits = 0x0800,
+
+        /// <summary>
+        /// Aligns the window's client area on a byte boundary (in the x direction).
+        /// This style affects the width of the window and its horizontal placement on the display.
+        /// </summary>
+        ByteAlignClient = 0x1000,
+
+        /// <summary>
+        /// Aligns the window on a byte boundary (in the x direction).
+        /// This style affects the width of the window and its horizontal placement on the display.
+        /// </summary>
+        ByteAlignWindow = 0x2000,
+
+        /// <summary>
+        /// Indicates that the window class is an application global class. For more information, see the
+        /// "Application Global Classes" section of About Window Classes.
+        /// </summary>
+        GlobalClass = 0x4000,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        Ime = 0x00010000,
+
+        /// <summary>
+        /// Enables the drop shadow effect on a window. The effect is turned on and off through SPI_SETDROPSHADOW.
+        /// Typically, this is enabled for small, short-lived windows such as menus to emphasize their Z-order
+        /// relationship to other windows. Windows created from a class with this style must be top-level windows;
+        /// they may not be child windows.
+        /// </summary>
+        DropShadow = 0x00020000
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/WindowMessage.cs b/Crow/src/backends/win32/User32/Enums/WindowMessage.cs
new file mode 100644 (file)
index 0000000..cb7be8b
--- /dev/null
@@ -0,0 +1,1661 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies the different types of window messages.
+    /// </summary>
+    public enum WindowMessage : uint
+    {
+        /// <summary>
+        /// Performs no operation. An application sends the <see cref="Null"/> message if it wants to
+        /// post a message that the recipient window will ignore.
+        /// </summary>
+        Null = 0x0000,
+
+        /// <summary>
+        /// Sent when an application requests that a window be created by calling the
+        /// <see cref="User32.Window.CreateWindowEx(ExtendedWindowStyles, string, string,
+        /// WindowStyles, int, int, int, int, IntPtr, IntPtr, IntPtr, IntPtr)"/> or CreateWindow function.
+        /// (The message is sent before the function returns.) The window procedure of the
+        /// new window receives this message after the window is created, but before the window becomes visible.
+        /// </summary>
+        Create = 0x0001,
+
+        /// <summary>
+        /// Sent when a window is being destroyed. It is sent to the window procedure of the window being destroyed
+        /// after the window is removed from the screen.<para/>
+        /// This message is sent first to the window being destroyed and then to the child windows (if any) as they
+        /// are destroyed. During the processing of the message, it can be assumed that all child windows still exist.
+        /// </summary>
+        Destroy = 0x0002,
+
+        /// <summary>
+        /// Sent after a window has been moved.
+        /// </summary>
+        Move = 0x0003,
+
+        /// <summary>
+        /// Sent to a window after its size has changed.
+        /// </summary>
+        Size = 0x0005,
+
+        /// <summary>
+        /// Sent to both the window being activated and the window being deactivated. If the windows use the same
+        /// input queue, the message is sent synchronously, first to the window procedure of the top-level window being
+        /// deactivated, then to the window procedure of the top-level window being activated. If the windows use
+        /// different input queues, the message is sent asynchronously, so the window is activated immediately.
+        /// </summary>
+        Activate = 0x0006,
+
+        /// <summary>
+        /// Sent to a window after it has gained the keyboard focus.
+        /// </summary>
+        SetFocus = 0x0007,
+
+        /// <summary>
+        /// Sent to a window immediately before it loses the keyboard focus.
+        /// </summary>
+        KillFocus = 0x0008,
+
+        /// <summary>
+        /// Sent when an application changes the enabled state of a window. It is sent to the window whose enabled
+        /// state is changing. This message is sent before the EnableWindow function returns, but after the enabled
+        /// state (<see cref="WindowStyles.Disabled"/> style bit) of the window has changed.
+        /// </summary>
+        Enable = 0x000A,
+
+        /// <summary>
+        /// An application sends the <see cref="SetRedraw"/> message to a window to allow changes in that window
+        /// to be redrawn or to prevent changes in that window from being redrawn.
+        /// </summary>
+        SetRedraw = 0x000B,
+
+        /// <summary>
+        /// Sets the text of a window.
+        /// </summary>
+        SetText = 0x000C,
+
+        /// <summary>
+        /// Copies the text that corresponds to a window into a buffer provided by the caller.
+        /// </summary>
+        GetText = 0x000D,
+
+        /// <summary>
+        /// Determines the length, in characters, of the text associated with a window.
+        /// </summary>
+        GetTextLength = 0x000E,
+
+        /// <summary>
+        /// Sent when the system or another application makes a request to paint a portion of an application's window.
+        /// The message is sent when the UpdateWindow or RedrawWindow function is called, or by the
+        /// <see cref="User32.Message.DispatchMessage(ref Msg)"/> function when the application obtains a
+        /// <see cref="WindowMessage.Paint"/> message by using the
+        /// <see cref="User32.Message.GetMessage(out Msg, IntPtr, uint, uint)"/> or
+        /// <see cref="User32.Message.PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> function.
+        /// </summary>
+        Paint = 0x000F,
+
+        /// <summary>
+        /// Sent as a signal that a window or an application should terminate.
+        /// </summary>
+        Close = 0x0010,
+
+        /// <summary>
+        /// Sent when the user chooses to end the session or when an application calls one of the system shutdown
+        /// functions. If any application returns zero, the session is not ended. The system stops sending
+        /// <see cref="QueryEndSession"/> messages as soon as one application returns zero.
+        /// </summary>
+        QueryEndSession = 0x0011,
+
+        /// <summary>
+        /// Indicates a request to terminate an application, and is generated when the application calls the
+        /// <see cref="User32.Message.PostQuitMessage(int)"/> function. This message causes the
+        /// <see cref="User32.Message.GetMessage(out Msg, IntPtr, uint, uint)"/> function to return zero.
+        /// </summary>
+        Quit = 0x0012,
+
+        /// <summary>
+        /// Sent to an icon when the user requests that the window be restored to its previous size and position.
+        /// </summary>
+        QueryOpen = 0x0013,
+
+        /// <summary>
+        /// Sent when the window background must be erased (for example, when a window is resized).
+        /// The message is sent to prepare an invalidated portion of a window for painting.
+        /// </summary>
+        EraseBackground = 0x0014,
+
+        /// <summary>
+        /// The <see cref="SystemColorChange"/> message is sent to all top-level windows when
+        /// a change is made to a system color setting.
+        /// </summary>
+        SystemColorChange = 0x0015,
+
+        /// <summary>
+        /// Sent to an application after the system processes the results of the <see cref="QueryEndSession"/> message.
+        /// The <see cref="EndSession"/> message informs the application whether the session is ending.
+        /// </summary>
+        EndSession = 0x0016,
+
+        /// <summary>
+        /// Sent to a window when the window is about to be hidden or shown.
+        /// </summary>
+        ShowWindow = 0x0018,
+
+        /// <summary>
+        /// Sent by an application to all top-level windows after making a change to the
+        /// WIN.INI file. The SystemParametersInfo function sends this message
+        /// after an application uses the function to change a setting in WIN.INI.
+        /// </summary>
+        WinIniChange = 0x001A,
+
+        /// <summary>
+        /// A message that is sent to all top-level windows when the SystemParametersInfo function changes
+        /// a system-wide setting or when policy settings have changed.<para/>
+        /// Applications should send <see cref="SettingChange"/> to all top-level windows when they make changes to
+        /// system parameters. (This message cannot be sent directly to a window.) To send the
+        /// <see cref="SettingChange"/> message to all top-level windows, use the SendMessageTimeout function with the
+        /// hwnd parameter set to <see cref="User32.Message.BroadcastHandle"/>.
+        /// </summary>
+        SettingChange = WinIniChange,
+
+        /// <summary>
+        /// Sent to all top-level windows whenever the user changes device-mode settings.
+        /// </summary>
+        DeviceModeChange = 0x001B,
+
+        /// <summary>
+        /// Sent when a window belonging to a different application than the active window is about to be activated.
+        /// The message is sent to the application whose window is being activated
+        /// and to the application whose window is being deactivated.
+        /// </summary>
+        ActivateApp = 0x001C,
+
+        /// <summary>
+        /// Sent to all top-level windows in the system after changing the pool of font resources.
+        /// </summary>
+        FontChange = 0x001D,
+
+        /// <summary>
+        /// A message that is sent whenever there is a change in the system time.
+        /// </summary>
+        TimeChange = 0x001E,
+
+        /// <summary>
+        /// Sent to cancel certain modes, such as mouse capture. For example, the system sends this message to the
+        /// active window when a dialog box or message box is displayed. Certain functions also send this message
+        /// explicitly to the specified window regardless of whether it is the active window. For example,
+        /// the EnableWindow function sends this message when disabling the specified window.
+        /// </summary>
+        CancelMode = 0x001F,
+
+        /// <summary>
+        /// Sent to a window if the mouse causes the cursor to move within a window and mouse input is not captured.
+        /// </summary>
+        SetCursor = 0x0020,
+
+        /// <summary>
+        /// Sent when the cursor is in an inactive window and the user presses a mouse button. The parent window
+        /// receives this message only if the child window passes it to the
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// function.
+        /// </summary>
+        MouseActivate = 0x0021,
+
+        /// <summary>
+        /// Sent to a child window when the user clicks the window's title bar or
+        /// when the window is activated, moved, or sized.
+        /// </summary>
+        ChildActivate = 0x0022,
+
+        /// <summary>
+        /// Sent by a computer-based training (CBT) application to separate user-input messages
+        /// from other messages sent through the WH_JOURNALPLAYBACK procedure.
+        /// </summary>
+        QueueSync = 0x0023,
+
+        /// <summary>
+        /// Sent to a window when the size or position of the window is about to change. An application can use
+        /// this message to override the window's default maximized size and position,
+        /// or its default minimum or maximum tracking size.
+        /// </summary>
+        GetMinMaxInfo = 0x0024,
+
+        /// <summary>
+        /// Obsolete. Used in Windows NT 3.51 and earlier.
+        /// </summary>
+        PaintIcon = 0x0026,
+
+        /// <summary>
+        /// Obsolete. Used in Windows NT 3.51 and earlier.
+        /// </summary>
+        IconEraseBackground = 0x0027,
+
+        /// <summary>
+        /// Sent to a dialog box procedure to set the keyboard focus to a different control in the dialog box.
+        /// </summary>
+        NextDialogCtl = 0x0028,
+
+        /// <summary>
+        /// Sent from Print Manager whenever a job is added to or removed from the Print Manager queue.
+        /// </summary>
+        SpoolerStatus = 0x002A,
+
+        /// <summary>
+        /// Sent to the parent window of an owner-drawn button, combo box, list box, or menu when a
+        /// visual aspect of the button, combo box, list box, or menu has changed.
+        /// </summary>
+        DrawItem = 0x002B,
+
+        /// <summary>
+        /// Sent to the owner window of a combo box, list box, list view control, or menu item when
+        /// the control or menu is created.
+        /// </summary>
+        MeasureItem = 0x002C,
+
+        /// <summary>
+        /// Sent to the owner of a list box or combo box when the list box or combo box is destroyed or when items
+        /// are removed by the LB_DELETESTRING, LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT message.
+        /// The system sends a <see cref="DeleteItem"/> message for each deleted item. The system sends the
+        /// <see cref="DeleteItem"/> message for any deleted list box or combo box item with nonzero item data.
+        /// </summary>
+        DeleteItem = 0x002D,
+
+        /// <summary>
+        /// Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its
+        /// owner in response to a <see cref="KeyDown"/> message.
+        /// </summary>
+        VKeyToItem = 0x002E,
+
+        /// <summary>
+        /// Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its
+        /// owner in response to a <see cref="Char"/> message.
+        /// </summary>
+        CharToItem = 0x002F,
+
+        /// <summary>
+        /// Sent to specify the font that a control is to use when drawing text.
+        /// </summary>
+        SetFont = 0x0030,
+
+        /// <summary>
+        /// Sent to a control to retrieve the font with which the control is currently drawing its text.
+        /// </summary>
+        GetFont = 0x0031,
+
+        /// <summary>
+        /// Sent to a window to associate a hot key with the window.
+        /// When the user presses the hot key, the system activates the window.
+        /// </summary>
+        SetHotkey = 0x0032,
+
+        /// <summary>
+        /// Sent to determine the hot key associated with a window.
+        /// </summary>
+        GetHotkey = 0x0033,
+
+        /// <summary>
+        /// Sent to a minimized (iconic) window. The window is about to be dragged by the user but does not have an
+        /// icon defined for its class. An application can return a handle to an icon or cursor.
+        /// The system displays this cursor or icon while the user drags the icon.
+        /// </summary>
+        QueryDragIcon = 0x0037,
+
+        /// <summary>
+        /// Sent to determine the relative position of a new item in the sorted list of an owner-drawn combo box or
+        /// list box. Whenever the application adds a new item, the system sends this message to the owner of a
+        /// combo box or list box created with the CBS_SORT or LBS_SORT style.
+        /// </summary>
+        CompareItem = 0x0039,
+
+        /// <summary>
+        /// Sent by Active Accessibility to obtain information about an accessible object contained in a server
+        /// application. Applications never send this message directly. It is sent only by Active Accessibility
+        /// in response to calls to AccessibleObjectFromPoint, AccessibleObjectFromEvent, or
+        /// AccessibleObjectFromWindow. However, server applications handle this message.
+        /// </summary>
+        GetObject = 0x003D,
+
+        /// <summary>
+        /// Sent to all top-level windows when the system detects more than 12.5 percent of system time over a
+        /// 30- to 60-second interval is being spent compacting memory. This indicates that system memory is low.
+        /// </summary>
+        Compacting = 0x0041,
+
+        /// <summary>
+        /// Marked as "no longer supported" and not officially documented. Use with care.
+        /// </summary>
+        CommNotify = 0x0044,
+
+        /// <summary>
+        /// Sent to a window whose size, position, or place in the Z order is about to change as a result of a
+        /// call to the <see cref="User32.Window.SetWindowPos(IntPtr, SetWindowPosHwndEnum, int, int, int, int,
+        /// SetWindowPosFlags)"/> function or another window-management function.
+        /// </summary>
+        WindowPosChanging = 0x0046,
+
+        /// <summary>
+        /// Sent to a window whose size, position, or place in the Z order has changed as a result of a call to the
+        /// <see cref="User32.Window.SetWindowPos(IntPtr, SetWindowPosHwndEnum, int, int, int, int,
+        /// SetWindowPosFlags)"/> function or another window-management function.
+        /// </summary>
+        WindowPosChanged = 0x0047,
+
+        /// <summary>
+        /// Notifies applications that the system, typically a battery-powered personal computer,
+        /// is about to enter a suspended mode.<para/>
+        /// Obsolete : use <see cref="PowerBroadcast"/> instead.
+        /// </summary>
+        Power = 0x0048,
+
+        /// <summary>
+        /// Sent to pass data to another application.
+        /// </summary>
+        CopyData = 0x004A,
+
+        /// <summary>
+        /// Posted to an application when a user cancels the application's journaling activities.
+        /// The message is posted with a null/zero window handle.
+        /// </summary>
+        CancelJournal = 0x004B,
+
+        /// <summary>
+        /// Sent by a common control to its parent window when an event has occurred
+        /// or the control requires some information.
+        /// </summary>
+        Notify = 0x004E,
+
+        /// <summary>
+        /// Posted to the window with the focus when the user chooses a new input language, either with the hotkey
+        /// (specified in the Keyboard control panel application) or from the indicator on the system taskbar.
+        /// An application can accept the change by passing the message to the
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// function or reject the change (and prevent it from taking place) by returning immediately.
+        /// </summary>
+        InputLanguageChangeRequest = 0x0050,
+
+        /// <summary>
+        /// Sent to the topmost affected window after an application's input language has been changed. You should
+        /// make any application-specific settings and pass the message to the
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// function, which passes the message to all first-level child windows. These child windows can pass the
+        /// message to
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// to have it pass the message to their child windows, and so on.
+        /// </summary>
+        InputLanguageChange = 0x0051,
+
+        /// <summary>
+        /// Sent to an application that has initiated a training card with Microsoft Windows Help. The message informs
+        /// the application when the user clicks an authorable button. An application initiates a training card by
+        /// specifying the HELP_TCARD command in a call to the WinHelp function.
+        /// </summary>
+        TCard = 0x0052,
+
+        /// <summary>
+        /// Indicates that the user pressed the F1 key. If a menu is active when F1 is pressed, <see cref="Help"/> is
+        /// sent to the window associated with the menu; otherwise, <see cref="Help"/> is sent to the window that has
+        /// the keyboard focus. If no window has the keyboard focus, <see cref="Help"/> is sent to the currently
+        /// active window.
+        /// </summary>
+        Help = 0x0053,
+
+        /// <summary>
+        /// Sent to all windows after the user has logged on or off. When the user logs on or off, the system updates
+        /// the user-specific settings. The system sends this message immediately after updating the settings.
+        /// </summary>
+        UserChanged = 0x0054,
+
+        /// <summary>
+        /// Determines if a window accepts ANSI or Unicode structures in the <see cref="Notify"/> notification message.
+        /// <see cref="NotifyFormat"/> messages are sent from a common control to its parent window
+        /// and from the parent window to the common control.
+        /// </summary>
+        NotifyFormat = 0x0055,
+
+        /// <summary>
+        /// Notifies a window that the user clicked the right mouse button (right-clicked) in the window.
+        /// </summary>
+        ContextMenu = 0x007B,
+
+        /// <summary>
+        /// Sent to a window when the <see cref="User32.Window.SetWindowLong(IntPtr, int, int)"/>
+        /// function is about to change one or more of the window's styles.
+        /// </summary>
+        StyleChanging = 0x007C,
+
+        /// <summary>
+        /// Sent to a window after the <see cref="User32.Window.SetWindowLong(IntPtr, int, int)"/>
+        /// function has changed one or more of the window's styles.
+        /// </summary>
+        StyleChanged = 0x007D,
+
+        /// <summary>
+        /// Sent to all windows when the display resolution has changed.
+        /// </summary>
+        DisplayChange = 0x007E,
+
+        /// <summary>
+        /// Sent to a window to retrieve a handle to the large or small icon associated with a window.
+        /// The system displays the large icon in the ALT+TAB dialog, and the small icon in the window caption.
+        /// </summary>
+        GetIcon = 0x007F,
+
+        /// <summary>
+        /// Sent by an application to associate a new large or small icon with a window. The system displays the
+        /// large icon in the ALT+TAB dialog box, and the small icon in the window caption.
+        /// </summary>
+        SetIcon = 0x0080,
+
+        /// <summary>
+        /// Sent prior to the <see cref="Create"/> message when a window is first created.
+        /// </summary>
+        NCCreate = 0x0081,
+
+        /// <summary>
+        /// Informs a window that its nonclient area is being destroyed. The
+        /// <see cref="User32.Window.DestroyWindow(IntPtr)"/> function sends the <see cref="NCDestroy"/> message
+        /// to the window following the <see cref="Destroy"/> message.
+        /// <see cref="Destroy"/> is used to free the allocated memory object associated with the window.
+        /// </summary>
+        NCDestroy = 0x0082,
+
+        /// <summary>
+        /// Sent when the size and position of a window's client area must be calculated. By processing this message,
+        /// an application can control the content of the window's client area when
+        /// the size or position of the window changes.
+        /// </summary>
+        NCCalcSize = 0x0083,
+
+        /// <summary>
+        /// Sent to a window when the cursor moves, or when a mouse button is pressed or released. If the mouse is
+        /// not captured, the message is sent to the window beneath the cursor.
+        /// Otherwise, the message is sent to the window that has captured the mouse.
+        /// </summary>
+        NCHitTest = 0x0084,
+
+        /// <summary>
+        /// Sent to a window when its frame must be painted.
+        /// </summary>
+        NCPaint = 0x0085,
+
+        /// <summary>
+        /// Non Client Area Activated Caption (Title) of the Form.
+        /// </summary>
+        NCActivate = 0x0086,
+
+        /// <summary>
+        /// Sent to the window procedure associated with a control. By default, the system handles all keyboard input
+        /// to the control; the system interprets certain types of keyboard input as dialog box navigation keys.
+        /// To override this default behavior, the control can respond to the <see cref="GetDialogCode"/> message to
+        /// indicate the types of input it wants to process itself.
+        /// </summary>
+        GetDialogCode = 0x0087,
+
+        /// <summary>
+        /// Used to synchronize painting while avoiding linking independent GUI threads.
+        /// </summary>
+        SyncPaint = 0x0088,
+
+        /// <summary>
+        /// Posted to a window when the cursor is moved within the nonclient area of the window. This message is posted
+        /// to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCMouseMove = 0x00A0,
+
+        /// <summary>
+        /// Posted when the user presses the left mouse button while the cursor is within the nonclient area of a
+        /// window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCLButtonDown = 0x00A1,
+
+        /// <summary>
+        /// Posted when the user releases the left mouse button while the cursor is within the nonclient area of a
+        /// window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCLButtonUp = 0x00A2,
+
+        /// <summary>
+        /// Posted when the user double-clicks the middle mouse button while the cursor is within the nonclient area
+        /// of a window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCLButtonDoubleClick = 0x00A3,
+
+        /// <summary>
+        /// Posted when the user presses the right mouse button while the cursor is within the nonclient area of a
+        /// window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCRButtonDown = 0x00A4,
+
+        /// <summary>
+        /// Posted when the user releases the right mouse button while the cursor is within the nonclient area of a
+        /// window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCRButtonUp = 0x00A5,
+
+        /// <summary>
+        /// Posted when the user double-clicks the right mouse button while the cursor is within the nonclient area
+        /// of a window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCRButtonDoubleClick = 0x00A6,
+
+        /// <summary>
+        /// Posted when the user presses the middle mouse button while the cursor is within the nonclient area of a
+        /// window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCMButtonDown = 0x00A7,
+
+        /// <summary>
+        /// Posted when the user releases the middle mouse button while the cursor is within the nonclient area of a
+        /// window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCMButtonUp = 0x00A8,
+
+        /// <summary>
+        /// Posted when the user double-clicks the middle mouse button while the cursor is within the nonclient area
+        /// of a window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCMButtonDoubleClick = 0x00A9,
+
+        /// <summary>
+        /// Posted when the user presses the first or second X button while the cursor is within the nonclient area
+        /// of a window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCXButtonDown = 0x00AB,
+
+        /// <summary>
+        /// Posted when the user releases the first or second X button while the cursor is within the nonclient area
+        /// of a window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCXButtonUp = 0x00AC,
+
+        /// <summary>
+        /// Posted when the user double-clicks the first or second X button while the cursor is within the nonclient
+        /// area of a window. This message is posted to the window that contains the cursor.<para/>
+        /// If a window has captured the mouse, this message is not posted.
+        /// </summary>
+        NCXButtonDoubleClick = 0x00AD,
+
+        /// <summary>
+        /// Sent to the window that registered to receive raw input.
+        /// </summary>
+        InputDeviceChange = 0x00FE,
+
+        /// <summary>
+        /// Sent to the window that is getting raw input.
+        /// </summary>
+        Input = 0x00FF,
+
+        /// <summary>
+        /// Posted to the window with the keyboard focus when a nonsystem key is pressed.
+        /// A nonsystem key is a key that is pressed when the ALT key is not pressed.
+        /// </summary>
+        KeyDown = 0x0100,
+
+        /// <summary>
+        /// This message filters for keyboard messages.
+        /// </summary>
+        KeyFirst = 0x0100,
+
+        /// <summary>
+        /// Posted to the window with the keyboard focus when a nonsystem key is released. A nonsystem key is a key
+        /// that is pressed when the ALT key is not pressed,
+        /// or a keyboard key that is pressed when a window has the keyboard focus.
+        /// </summary>
+        KeyUp = 0x0101,
+
+        /// <summary>
+        /// Posted to the window with the keyboard focus when a <see cref="KeyDown"/> message is translated by the
+        /// TranslateMessage function. The <see cref="Char"/> message contains
+        /// the character code of the key that was pressed.
+        /// </summary>
+        Char = 0x0102,
+
+        /// <summary>
+        /// Posted to the window with the keyboard focus when a <see cref="KeyUp"/> message is translated by the
+        /// TranslateMessage function. <see cref="DeadChar"/> specifies a character code generated by a dead key.
+        /// A dead key is a key that generates a character, such as the umlaut (double-dot), that is combined with
+        /// another character to form a composite character. For example, the umlaut-O character (Ö) is generated
+        /// by typing the dead key for the umlaut character, and then typing the O key.
+        /// </summary>
+        DeadChar = 0x0103,
+
+        /// <summary>
+        /// Posted to the window with the keyboard focus when the user presses the F10 key (which activates the menu
+        /// bar) or holds down the ALT key and then presses another key. It also occurs when no window currently
+        /// has the keyboard focus; in this case, the <see cref="SystemKeyDown"/> message is sent to the active window.
+        /// The window that receives the message can distinguish between these two contexts by
+        /// checking the context code in the lParam parameter.
+        /// </summary>
+        SystemKeyDown = 0x0104,
+
+        /// <summary>
+        /// Posted to the window with the keyboard focus when the user releases a key that was pressed while the ALT
+        /// key was held down. It also occurs when no window currently has the keyboard focus; in this case, the
+        /// <see cref="SystemKeyUp"/> message is sent to the active window. The window that receives the message can
+        /// distinguish between these two contexts by checking the context code in the lParam parameter.
+        /// </summary>
+        SystemKeyUp = 0x0105,
+
+        /// <summary>
+        /// Posted to the window with the keyboard focus when a <see cref="SystemKeyDown"/> message is translated by
+        /// the TranslateMessage function. It specifies the character code of a system character key — that is, a
+        /// character key that is pressed while the ALT key is down.
+        /// </summary>
+        SystemChar = 0x0106,
+
+        /// <summary>
+        /// Sent to the window with the keyboard focus when a <see cref="SystemKeyDown"/> message is translated by the
+        /// TranslateMessage function. <see cref="SystemDeadChar"/> specifies the character code of a system dead key
+        /// — that is, a dead key that is pressed while holding down the ALT key.
+        /// </summary>
+        SystemDeadChar = 0x0107,
+
+        /// <summary>
+        /// Can be used by an application to post input to other windows. This message contains the character code
+        /// of the key that was pressed. (Test whether a target app can process <see cref="UnicodeCharacter"/> messages
+        /// by sending the message with wParam set to UNICODE_NOCHAR.)
+        /// </summary>
+        UnicodeCharacter = 0x0109,
+
+        /// <summary>
+        /// This message filters for keyboard messages.
+        /// </summary>
+        KeyLast = 0x0109,
+
+        /// <summary>
+        /// Sent immediately before the IME generates the composition string as a result of a keystroke.
+        /// </summary>
+        ImeStartComposition = 0x010D,
+
+        /// <summary>
+        /// Sent to an application when the IME ends composition.
+        /// </summary>
+        ImeEndComposition = 0x010E,
+
+        /// <summary>
+        /// Sent to an application when the IME changes composition status as a result of a keystroke.
+        /// </summary>
+        ImeComposition = 0x010F,
+
+        /// <summary>
+        /// Same as <see cref="ImeComposition"/>. Documentation incomplete.
+        /// </summary>
+        ImeKeylast = 0x010F,
+
+        /// <summary>
+        /// Sent to the dialog box procedure immediately before a dialog box is displayed. Dialog box procedures
+        /// typically use this message to initialize controls and carry out any other
+        /// initialization tasks that affect the appearance of the dialog box.
+        /// </summary>
+        InitDialog = 0x0110,
+
+        /// <summary>
+        /// Sent when the user selects a command item from a menu, when a control sends a notification message
+        /// to its parent window, or when an accelerator keystroke is translated.
+        /// </summary>
+        Command = 0x0111,
+
+        /// <summary>
+        /// A window receives this message when the user chooses a command from the Window menu (formerly known
+        /// as the system or control menu) or when the user chooses the maximize button, minimize button,
+        /// restore button, or close button.
+        /// </summary>
+        SystemCommand = 0x0112,
+
+        /// <summary>
+        /// Posted to the installing thread's message queue when a timer expires.
+        /// The message is posted by the <see cref="User32.Message.GetMessage(out Msg, IntPtr, uint, uint)"/> or
+        /// <see cref="User32.Message.PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> function.
+        /// </summary>
+        Timer = 0x0113,
+
+        /// <summary>
+        /// Sent to a window when a scroll event occurs in the window's standard horizontal scroll bar.
+        /// This message is also sent to the owner of a horizontal scroll bar control
+        /// when a scroll event occurs in the control.
+        /// </summary>
+        HScroll = 0x0114,
+
+        /// <summary>
+        /// Sent to a window when a scroll event occurs in the window's standard vertical scroll bar. This message
+        /// is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control.
+        /// </summary>
+        VScroll = 0x0115,
+
+        /// <summary>
+        /// Sent when a menu is about to become active. It occurs when the user clicks an item on the menu bar or
+        /// presses a menu key. This allows the application to modify the menu before it is displayed.
+        /// </summary>
+        InitMenu = 0x0116,
+
+        /// <summary>
+        /// Sent when a drop-down menu or submenu is about to become active. This allows an application to modify
+        /// the menu before it is displayed, without changing the entire menu.
+        /// </summary>
+        InitMenuPopup = 0x0117,
+
+        /// <summary>
+        /// Passes information about a gesture.<para/>
+        /// Only supported on Windows 7 and higher.
+        /// </summary>
+        Gesture = 0x0119,
+
+        /// <summary>
+        /// Gives you a chance to set the gesture configuration.<para/>
+        /// Only supported on Windows 7 and higher.
+        /// </summary>
+        GestureNotify = 0x011A,
+
+        /// <summary>
+        /// Sent to a menu's owner window when the user selects a menu item.
+        /// </summary>
+        MenuSelect = 0x011F,
+
+        /// <summary>
+        /// Sent when a menu is active and the user presses a key that does not correspond to any mnemonic
+        /// or accelerator key. This message is sent to the window that owns the menu.
+        /// </summary>
+        MenuChar = 0x0120,
+
+        /// <summary>
+        /// Sent to the owner window of a modal dialog box or menu that is entering an idle state.
+        /// A modal dialog box or menu enters an idle state when no messages are waiting in its queue
+        /// after it has processed one or more previous messages.
+        /// </summary>
+        EnterIdle = 0x0121,
+
+        /// <summary>
+        /// Sent when the user releases the right mouse button while the cursor is on a menu item.
+        /// </summary>
+        MenuRButtonUp = 0x0122,
+
+        /// <summary>
+        /// Sent to the owner of a drag-and-drop menu when the user drags a menu item.
+        /// </summary>
+        MenuDrag = 0x0123,
+
+        /// <summary>
+        /// Sent to the owner of a drag-and-drop menu when the mouse cursor enters a menu item or moves
+        /// from the center of the item to the top or bottom of the item.
+        /// </summary>
+        MenuGetObject = 0x0124,
+
+        /// <summary>
+        /// Sent when a drop-down menu or submenu has been destroyed.
+        /// </summary>
+        UninitMenuPopup = 0x0125,
+
+        /// <summary>
+        /// Sent when the user makes a selection from a menu.
+        /// </summary>
+        MenuCommand = 0x0126,
+
+        /// <summary>
+        /// Sent by an application to indicate that the UI state should be changed.
+        /// </summary>
+        ChangeUIState = 0x0127,
+
+        /// <summary>
+        /// Sent by an application to change the UI state for the specified window and all its child windows.
+        /// </summary>
+        UpdateUIState = 0x0128,
+
+        /// <summary>
+        /// Sent by an application to retrieve the UI state for a window.
+        /// </summary>
+        QueryUIState = 0x0129,
+
+        /// <summary>
+        /// Sent to the owner window of a message box before Windows draws the message box. By responding to this
+        /// message, the owner window can set the text and background colors of the message box
+        /// by using the given display device context handle.
+        /// </summary>
+        CtlColorMsgBox = 0x0132,
+
+        /// <summary>
+        /// An edit control that is not read-only or disabled sends the <see cref="CtlColorEdit"/> message to its
+        /// parent window when the control is about to be drawn. By responding to this message, the parent window
+        /// can use the specified device context handle to set the text and background colors of the edit control.
+        /// </summary>
+        CtlColorEdit = 0x0133,
+
+        /// <summary>
+        /// Sent to the parent window of a list box before the system draws the list box. By responding to this
+        /// message, the parent window can set the text and background colors of the list box
+        /// by using the specified display device context handle.
+        /// </summary>
+        CtlColorListBox = 0x0134,
+
+        /// <summary>
+        /// Sent to the parent window of a button before drawing the button. The parent window can change
+        /// the button's text and background colors. However, only owner-drawn buttons
+        /// respond to the parent window processing this message.
+        /// </summary>
+        CtlColorButton = 0x0135,
+
+        /// <summary>
+        /// Sent to a dialog box before the system draws the dialog box. By responding to this message,
+        /// the dialog box can set its text and background colors using the specified display device context handle.
+        /// </summary>
+        CtlColorDialog = 0x0136,
+
+        /// <summary>
+        /// Sent to the parent window of a scroll bar control when the control is about to be drawn.
+        /// By responding to this message, the parent window can use the display context handle
+        /// to set the background color of the scroll bar control.
+        /// </summary>
+        CtlColorScrollbar = 0x0137,
+
+        /// <summary>
+        /// A static control, or an edit control that is read-only or disabled, sends the <see cref="CtlColorStatic"/>
+        /// message to its parent window when the control is about to be drawn.
+        /// By responding to this message, the parent window can use the specified device context handle
+        /// to set the text and background colors of the static control.
+        /// </summary>
+        CtlColorStatic = 0x0138,
+
+        /// <summary>
+        /// Retrieves the menu handle for the current window.
+        /// </summary>
+        GetHMenu = 0x01E1,
+
+        /// <summary>
+        /// Posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window
+        /// that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        MouseMove = 0x0200,
+
+        /// <summary>
+        /// Use to specify the first mouse message. Use the
+        /// <see cref="User32.Message.PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> function.
+        /// </summary>
+        MouseFirst = 0x0200,
+
+        /// <summary>
+        /// Posted when the user presses the left mouse button while the cursor is in the client area of a window.
+        /// If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        LButtonDown = 0x0201,
+
+        /// <summary>
+        /// Posted when the user releases the left mouse button while the cursor is in the client area of a window.
+        /// If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        LButtonUp = 0x0202,
+
+        /// <summary>
+        /// Posted when the user double-clicks the left mouse button while the cursor is in the client area of a
+        /// window. If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        LButtonDoubleClick = 0x0203,
+
+        /// <summary>
+        /// Posted when the user presses the right mouse button while the cursor is in the client area of a window.
+        /// If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        RButtonDown = 0x0204,
+
+        /// <summary>
+        /// Posted when the user releases the right mouse button while the cursor is in the client area of a window.
+        /// If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        RButtonUp = 0x0205,
+
+        /// <summary>
+        /// Posted when the user double-clicks the right mouse button while the cursor is in the client area of a
+        /// window. If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        RButtonDoubleClick = 0x0206,
+
+        /// <summary>
+        /// Posted when the user presses the middle mouse button while the cursor is in the client area of a window.
+        /// If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        MButtonDown = 0x0207,
+
+        /// <summary>
+        /// Posted when the user releases the middle mouse button while the cursor is in the client area of a window.
+        /// If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        MButtonUp = 0x0208,
+
+        /// <summary>
+        /// Posted when the user double-clicks the middle mouse button while the cursor is in the client area of a
+        /// window. If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        MButtonDoubleClick = 0x0209,
+
+        /// <summary>
+        /// Sent to the focus window when the mouse wheel is rotated. The
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// function propagates the message to the window's parent. There should be no internal forwarding of the
+        /// message, since
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// propagates it up the parent chain until it finds a window that processes it.
+        /// </summary>
+        MouseWheel = 0x020A,
+
+        /// <summary>
+        /// Posted when the user presses the first or second X button while the cursor is in the client area of a
+        /// window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise,
+        /// the message is posted to the window that has captured the mouse.
+        /// </summary>
+        XButtonDown = 0x020B,
+
+        /// <summary>
+        /// Posted when the user releases the first or second X button while the cursor is in the client area of a
+        /// window. If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        XButtonUp = 0x020C,
+
+        /// <summary>
+        /// Posted when the user double-clicks the first or second X button while the cursor is in the client area of
+        /// a window. If the mouse is not captured, the message is posted to the window beneath the cursor.
+        /// Otherwise, the message is posted to the window that has captured the mouse.
+        /// </summary>
+        XButtonDoubleClick = 0x020D,
+
+        /// <summary>
+        /// Sent to the focus window when the mouse's horizontal scroll wheel is tilted or rotated. The
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// function propagates the message to the window's parent. There should be no internal forwarding of the
+        /// message, since
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// propagates it up the parent chain until it finds a window that processes it.
+        /// </summary>
+        MouseHWheel = 0x020E,
+
+        /// <summary>
+        /// Same as <see cref="MouseHWheel"/>. Documentation incomplete.
+        /// </summary>
+        MouseLast = 0x020E,
+
+        /// <summary>
+        /// Sent to the parent of a child window when the child window is created or destroyed, or when the user
+        /// clicks a mouse button while the cursor is over the child window. When the child window is being created,
+        /// the system sends <see cref="ParentNotify"/> just before the CreateWindow or
+        /// <see cref="User32.Window.CreateWindowEx(ExtendedWindowStyles, string, string,
+        /// WindowStyles, int, int, int, int, IntPtr, IntPtr, IntPtr, IntPtr)"/>
+        /// function that creates the window returns. When the child window is being destroyed, the system sends the
+        /// message before any processing to destroy the window takes place.
+        /// </summary>
+        ParentNotify = 0x0210,
+
+        /// <summary>
+        /// Informs an application's main window procedure that a menu modal loop has been entered.
+        /// </summary>
+        EnterMenuLoop = 0x0211,
+
+        /// <summary>
+        /// Informs an application's main window procedure that a menu modal loop has been exited.
+        /// </summary>
+        ExitMenuLoop = 0x0212,
+
+        /// <summary>
+        /// Sent to an application when the right or left arrow key is used
+        /// to switch between the menu bar and the system menu.
+        /// </summary>
+        NextMenu = 0x0213,
+
+        /// <summary>
+        /// Sent to a window that the user is resizing. By processing this message, an application can monitor
+        /// the size and position of the drag rectangle and, if needed, change its size or position.
+        /// </summary>
+        Sizing = 0x0214,
+
+        /// <summary>
+        /// Sent to the window that is losing the mouse capture.
+        /// </summary>
+        CaptureChanged = 0x0215,
+
+        /// <summary>
+        /// Sent to a window that the user is moving. By processing this message, an application can monitor
+        /// the position of the drag rectangle and, if needed, change its position.
+        /// </summary>
+        Moving = 0x0216,
+
+        /// <summary>
+        /// Notifies applications that a power-management event has occurred.
+        /// </summary>
+        PowerBroadcast = 0x0218,
+
+        /// <summary>
+        /// Notifies an application of a change to the hardware configuration of a device or the computer.
+        /// </summary>
+        DeviceChange = 0x0219,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to create an MDI child window.
+        /// </summary>
+        MdiCreate = 0x0220,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to close an MDI child window.
+        /// </summary>
+        MdiDestroy = 0x0221,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to instruct the client window
+        /// to activate a different MDI child window.
+        /// </summary>
+        MdiActivate = 0x0222,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to restore an MDI child
+        /// window from maximized or minimized size.
+        /// </summary>
+        MdiRestore = 0x0223,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to activate the
+        /// next or previous child window.
+        /// </summary>
+        MdiNext = 0x0224,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to maximize an MDI
+        /// child window. The system resizes the child window to make its client area fill the client window. The
+        /// system places the child window's window menu icon in the rightmost position of the frame window's menu bar,
+        /// and places the child window's restore icon in the leftmost position. The system also appends the title bar
+        /// text of the child window to that of the frame window.
+        /// </summary>
+        MdiMaximize = 0x0225,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to arrange all of its MDI
+        /// child windows in a tile format.
+        /// </summary>
+        MdiTile = 0x0226,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to arrange all its MDI
+        /// child windows in a cascade format.
+        /// </summary>
+        MdiCascade = 0x0227,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to arrange all minimized MDI
+        /// child windows. It does not affect child windows that are not minimized.
+        /// </summary>
+        MdiIconArrange = 0x0228,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to retrieve the handle
+        /// to the active MDI child window.
+        /// </summary>
+        MdiGetActive = 0x0229,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to replace the entire menu
+        /// of an MDI frame window, to replace the window menu of the frame window, or both.
+        /// </summary>
+        MdiSetMenu = 0x0230,
+
+        /// <summary>
+        /// Sent one time to a window after it enters the moving or sizing modal loop. The window enters the moving or
+        /// sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes
+        /// the <see cref="SystemCommand"/> message to the
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value.
+        /// The operation is complete when
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// returns.
+        /// </summary>
+        EnterSizeMove = 0x0231,
+
+        /// <summary>
+        /// Sent one time to a window, after it has exited the moving or sizing modal loop. The window enters the
+        /// moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the
+        /// window passes the <see cref="SystemCommand"/> message to the
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value.
+        /// The operation is complete when
+        /// <see cref="User32.Window.DefWindowProc(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+        /// returns.
+        /// </summary>
+        ExitSizeMove = 0x0232,
+
+        /// <summary>
+        /// Sent when the user drops a file on the window of an application that
+        /// has registered itself as a recipient of dropped files.
+        /// </summary>
+        DropFiles = 0x0233,
+
+        /// <summary>
+        /// Sent to a multiple-document interface (MDI) client window by an application to refresh
+        /// the window menu of the MDI frame window.
+        /// </summary>
+        MdiRefreshMenu = 0x0234,
+
+        /// <summary>
+        /// Sent to a window when there is a change in the settings of a monitor that has a digitizer attached to it.
+        /// This message contains information regarding the scaling of the display mode.<para/>
+        /// Only supported on Windows 7 and higher.
+        /// </summary>
+        PointerDeviceChange = 0x0238,
+
+        /// <summary>
+        /// Sent to a window when a pointer device is detected within range of an input digitizer.
+        /// This message contains information regarding the device and its proximity.<para/>
+        /// Only supported on Windows 7 and higher.
+        /// </summary>
+        PointerDeviceInRange = 0x0239,
+
+        /// <summary>
+        /// Sent to a window when a pointer device has departed the range of an input digitizer.
+        /// This message contains information regarding the device and its proximity.<para/>
+        /// Only supported on Windows 7 and higher.
+        /// </summary>
+        PointerDeviceOutOfRange = 0x023A,
+
+        /// <summary>
+        /// Notifies the window when one or more touch points, such as a finger or pen,
+        /// touches a touch-sensitive digitizer surface.<para/>
+        /// Only supported on Windows 7 and higher.
+        /// </summary>
+        Touch = 0x0240,
+
+        /// <summary>
+        /// Posted to provide an update on a pointer that made contact over the non-client area of a window or when a
+        /// hovering uncaptured contact moves over the non-client area of a window. While the pointer is hovering,
+        /// the message targets whichever window the pointer happens to be over. While the pointer is in contact with
+        /// the surface, the pointer is implicitly captured to the window over which the pointer made contact and that
+        /// window continues to receive input for the pointer until it breaks contact.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        NCPointerUpdate = 0x0241,
+
+        /// <summary>
+        /// Posted when a pointer makes contact over the non-client area of a window. The message targets the window
+        /// over which the pointer makes contact. The pointer is implicitly captured to the window so that the window
+        /// continues to receive input for the pointer until it breaks contact.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        NCPointerDown = 0x0242,
+
+        /// <summary>
+        /// Posted when a pointer that made contact over the non-client area of a window breaks contact. The message
+        /// targets the window over which the pointer makes contact and the pointer is, at that point, implicitly
+        /// captured to the window so that the window continues to receive input for the pointer until it breaks
+        /// contact, including the <see cref="NCPointerUp"/> notification.<para/>
+        /// If a window has captured this pointer, this message is not posted. Instead, a <see cref="PointerUp"/>
+        /// is posted to the window that has captured this pointer.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        NCPointerUp = 0x0243,
+
+        /// <summary>
+        /// Posted to provide an update on a pointer that made contact over the client area of a window or on a
+        /// hovering uncaptured pointer over the client area of a window. While the pointer is hovering, the message
+        /// targets whichever window the pointer happens to be over. While the pointer is in contact with the surface,
+        /// the pointer is implicitly captured to the window over which the pointer made contact and that window
+        /// continues to receive input for the pointer until it breaks contact.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerUpdate = 0x0245,
+
+        /// <summary>
+        /// Posted when a pointer makes contact over the client area of a window. This input message targets the
+        /// window over which the pointer makes contact, and the pointer is implicitly captured to the window so
+        /// that the window continues to receive input for the pointer until it breaks contact.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerDown = 0x0246,
+
+        /// <summary>
+        /// Posted when a pointer that made contact over the client area of a window breaks contact. This input
+        /// message targets the window over which the pointer makes contact and the pointer is, at that point,
+        /// implicitly captured to the window so that the window continues to receive input messages including
+        /// the <see cref="PointerUp"/> notification for the pointer until it breaks contact.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerUp = 0x0247,
+
+        /// <summary>
+        /// Sent to a window when a new pointer enters detection range over the window (hover) or when an
+        /// existing pointer moves within the boundaries of the window.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerEnter = 0x0249,
+
+        /// <summary>
+        /// Sent to a window when a pointer leaves detection range over the window (hover) or when a
+        /// pointer moves outside the boundaries of the window.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerLeave = 0x024A,
+
+        /// <summary>
+        /// Sent to an inactive window when a primary pointer generates a <see cref="PointerDown"/> over the window.
+        /// As long as the message remains unhandled, it travels up the parent window chain until it is reaches the
+        /// top-level window. Applications can respond to this message to specify whether they wish to be activated.
+        /// <para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerActivate = 0x024B,
+
+        /// <summary>
+        /// Sent to a window that is losing capture of an input pointer.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerCaptureChanged = 0x024C,
+
+        /// <summary>
+        /// Sent to a window on a touch down in order to determine the most probable touch target.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        TouchHitTesting = 0x024D,
+
+        /// <summary>
+        /// Posted to the window with foreground keyboard focus when a scroll wheel is rotated.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerWheel = 0x024E,
+
+        /// <summary>
+        /// Posted to the window with foreground keyboard focus when a horizontal scroll wheel is rotated.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerHWheel = 0x024F,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerHitTest = 0x0250,
+
+        /// <summary>
+        /// Sent when ongoing pointer input, for an existing pointer ID, transitions from one process to another
+        /// across content configured for cross-process chaining (AddContentWithCrossProcessChaining).<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerRoutedTo = 0x0251,
+
+        /// <summary>
+        /// Sent when pointer input transitions from one process to another across content configured for
+        /// cross-process chaining (AddContentWithCrossProcessChaining).<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerRoutedAway = 0x0252,
+
+        /// <summary>
+        /// Sent to all processes (configured for cross-process chaining through AddContentWithCrossProcessChaining
+        /// and not currently handling pointer input) ever associated with a specific pointer ID,
+        /// when a <see cref="PointerUp"/> message is received on the current process.<para/>
+        /// Only supported on Windows 8 and higher.
+        /// </summary>
+        PointerRoutedReleased = 0x0253,
+
+        /// <summary>
+        /// Sent to an application when a window is activated.
+        /// </summary>
+        ImeSetContext = 0x0281,
+
+        /// <summary>
+        /// Sent to an application to notify it of changes to the IME window.
+        /// </summary>
+        ImeNotify = 0x0282,
+
+        /// <summary>
+        /// Sent by an application to direct the IME window to carry out the requested command. The application
+        /// uses this message to control the IME window that it has created.
+        /// </summary>
+        ImeControl = 0x0283,
+
+        /// <summary>
+        /// Sent to an application when the IME window finds no space to extend the area for the composition window.
+        /// </summary>
+        ImeCompositionFull = 0x0284,
+
+        /// <summary>
+        /// Sent to an application when the operating system is about to change the current IME.
+        /// </summary>
+        ImeSelect = 0x0285,
+
+        /// <summary>
+        /// Sent to an application when the IME gets a character of the conversion result.
+        /// </summary>
+        ImeChar = 0x0286,
+
+        /// <summary>
+        /// Sent to an application to provide commands and request information.
+        /// </summary>
+        ImeRequest = 0x0288,
+
+        /// <summary>
+        /// Sent to an application by the IME to notify the application of a key press and to keep message order.
+        /// </summary>
+        ImeKeydown = 0x0290,
+
+        /// <summary>
+        /// Sent to an application by the IME to notify the application of a key release and to keep message order.
+        /// </summary>
+        ImeKeyup = 0x0291,
+
+        /// <summary>
+        /// Posted to a window when the cursor hovers over the nonclient area of the window for the period of time
+        /// specified in a prior call to <see cref="User32.Mouse.TrackMouseEvent(ref TrackMouseEvent)"/>.
+        /// </summary>
+        NCMouseHover = 0x02A0,
+
+        /// <summary>
+        /// Posted to a window when the cursor hovers over the client area of the window for the period of time
+        /// specified in a prior call to <see cref="User32.Mouse.TrackMouseEvent(ref TrackMouseEvent)"/>.
+        /// </summary>
+        MouseHover = 0x02A1,
+
+        /// <summary>
+        /// Posted to a window when the cursor leaves the nonclient area of the window specified
+        /// in a prior call to <see cref="User32.Mouse.TrackMouseEvent(ref TrackMouseEvent)"/>.
+        /// </summary>
+        NCMouseLeave = 0x02A2,
+
+        /// <summary>
+        /// Posted to a window when the cursor leaves the client area of the window specified
+        /// in a prior call to <see cref="User32.Mouse.TrackMouseEvent(ref TrackMouseEvent)"/>.
+        /// </summary>
+        MouseLeave = 0x02A3,
+
+        /// <summary>
+        /// Notifies applications of changes in session state.
+        /// </summary>
+        WtsSessionChange = 0x02B1,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        TabletFirst = 0x02C0,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        TabletLast = 0x02DF,
+
+        /// <summary>
+        /// Sent when the effective dots per inch (dpi) for a window has changed. The DPI is the scale factor for a
+        /// window. There are multiple events that can cause the DPI to change.<para/>
+        /// Only supported on Windows 7 and higher.
+        /// </summary>
+        DpiChanged = 0x02E0,
+
+        /// <summary>
+        /// For Per Monitor v2 top-level windows, this message is sent to all HWNDs in the child HWDN tree of the
+        /// window that is undergoing a DPI change. This message occurs before the top-level window receives
+        /// <see cref="DpiChanged"/>, and traverses the child tree from the bottom up.<para/>
+        /// Only supported on Windows 10.
+        /// </summary>
+        DpiChangedBeforeParent = 0x02E2,
+
+        /// <summary>
+        /// For Per Monitor v2 top-level windows, this message is sent to all HWNDs in the child HWDN tree of the
+        /// window that is undergoing a DPI change. This message occurs after the top-level window receives
+        /// <see cref="DpiChanged"/>, and traverses the child tree from the top down.<para/>
+        /// Only supported on Windows 10.
+        /// </summary>
+        DpiChangedAfterParent = 0x02E3,
+
+        /// <summary>
+        /// This message tells the operating system that the window will be sized to dimensions other than the default.
+        /// <para/>
+        /// Only supported on Windows 10.
+        /// </summary>
+        GetDpiScaledSize = 0x02E4,
+
+        /// <summary>
+        /// Sent to an edit control or combo box by an application to delete (cut) the current selection,
+        /// if any, in the edit control and copy the deleted text to the clipboard in CF_TEXT format.
+        /// </summary>
+        Cut = 0x0300,
+
+        /// <summary>
+        /// Sent to an edit control or combo box by an application to copy the current selection
+        /// to the clipboard in CF_TEXT format.
+        /// </summary>
+        Copy = 0x0301,
+
+        /// <summary>
+        /// Sent to an edit control or combo box by an application to copy the current content of the clipboard to the
+        /// edit control at the current caret position.
+        /// Data is inserted only if the clipboard contains data in CF_TEXT format.
+        /// </summary>
+        Paste = 0x0302,
+
+        /// <summary>
+        /// Sent to an edit control or combo box by an application to delete (clear) the current selection,
+        /// if any, from the edit control.
+        /// </summary>
+        Clear = 0x0303,
+
+        /// <summary>
+        /// Sent to an edit control by an application to undo the last operation. When this message is sent to
+        /// an edit control, the previously deleted text is restored or the previously added text is deleted.
+        /// </summary>
+        Undo = 0x0304,
+
+        /// <summary>
+        /// Sent to the clipboard owner if it has delayed rendering a specific clipboard format and if an application
+        /// has requested data in that format. The clipboard owner must render data in the specified format
+        /// and place it on the clipboard by calling the SetClipboardData function.
+        /// </summary>
+        RenderFormat = 0x0305,
+
+        /// <summary>
+        /// Sent to the clipboard owner before it is destroyed, if the clipboard owner has delayed rendering one or
+        /// more clipboard formats. For the content of the clipboard to remain available to other applications,
+        /// the clipboard owner must render data in all the formats it is capable of generating, and place the
+        /// data on the clipboard by calling the SetClipboardData function.
+        /// </summary>
+        RenderAllFormats = 0x0306,
+
+        /// <summary>
+        /// Sent to the clipboard owner when a call to the EmptyClipboard function empties the clipboard.
+        /// </summary>
+        DestroyClipboard = 0x0307,
+
+        /// <summary>
+        /// Sent to the first window in the clipboard viewer chain when the content of the clipboard changes. This
+        /// enables a clipboard viewer window to display the new content of the clipboard.
+        /// </summary>
+        DrawClipboard = 0x0308,
+
+        /// <summary>
+        /// Sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the
+        /// CF_OWNERDISPLAY format and the clipboard viewer's client area needs repainting.
+        /// </summary>
+        PaintClipboard = 0x0309,
+
+        /// <summary>
+        /// Sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the
+        /// CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's vertical scroll bar.
+        /// The owner should scroll the clipboard image and update the scroll bar values.
+        /// </summary>
+        VScrollClipboard = 0x030A,
+
+        /// <summary>
+        /// Sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the
+        /// CF_OWNERDISPLAY format and the clipboard viewer's client area has changed size.
+        /// </summary>
+        SizeClipboard = 0x030B,
+
+        /// <summary>
+        /// Sent to the clipboard owner by a clipboard viewer window to request the name of a
+        /// CF_OWNERDISPLAY clipboard format.
+        /// </summary>
+        AskClipboardFormatName = 0x030C,
+
+        /// <summary>
+        /// Sent to the first window in the clipboard viewer chain when a window is being removed from the chain.
+        /// </summary>
+        ChangeClipboardChain = 0x030D,
+
+        /// <summary>
+        /// Sent to the clipboard owner by a clipboard viewer window. This occurs when the clipboard contains data in
+        /// the CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's horizontal scroll bar. The owner
+        /// should scroll the clipboard image and update the scroll bar values.
+        /// </summary>
+        HScrollClipboard = 0x030E,
+
+        /// <summary>
+        /// Informs a window that it is about to receive the keyboard focus, giving the window the opportunity
+        /// to realize its logical palette when it receives the focus.
+        /// </summary>
+        QueryNewPalette = 0x030F,
+
+        /// <summary>
+        /// Informs applications that an application is going to realize its logical palette.
+        /// </summary>
+        PaletteIsChanging = 0x0310,
+
+        /// <summary>
+        /// Sent by the OS to all top-level and overlapped windows after the window with the keyboard focus realizes
+        /// its logical palette. This message enables windows that do not have the keyboard focus to realize
+        /// their logical palettes and update their client areas.
+        /// </summary>
+        PaletteChanged = 0x0311,
+
+        /// <summary>
+        /// Posted when the user presses a hot key registered by the RegisterHotKey function. The message is placed
+        /// at the top of the message queue associated with the thread that registered the hot key.
+        /// </summary>
+        Hotkey = 0x0312,
+
+        /// <summary>
+        /// Sent to a window to request that it draw itself in the specified device context,
+        /// most commonly in a printer device context.
+        /// </summary>
+        Print = 0x0317,
+
+        /// <summary>
+        /// Sent to a window to request that it draw its client area in the specified device context,
+        /// most commonly in a printer device context.
+        /// </summary>
+        PrintClient = 0x0318,
+
+        /// <summary>
+        /// Notifies a window that the user generated an application command event, for example, by clicking an
+        /// application command button using the mouse or typing an application command key on the keyboard.<para/>
+        /// </summary>
+        AppCommand = 0x0319,
+
+        /// <summary>
+        /// Broadcast to every window following a theme change event. Examples of theme change events are the
+        /// activation of a theme, the deactivation of a theme, or a transition from one theme to another.
+        /// </summary>
+        ThemeChanged = 0x031A,
+
+        /// <summary>
+        /// Sent when the contents of the clipboard have changed.
+        /// </summary>
+        ClipboardUpdate = 0x031D,
+
+        /// <summary>
+        /// Informs all top-level windows that Desktop Window Manager (DWM) composition has been enabled or disabled.
+        /// <para/>
+        /// Only supported on Windows Vista or higher.
+        /// </summary>
+        DwmCompositionChanged = 0x031E,
+
+        /// <summary>
+        /// Sent when the non-client area rendering policy has changed.<para/>
+        /// Only supported on Windows Vista or higher.
+        /// </summary>
+        DwmNCRenderingChanged = 0x031F,
+
+        /// <summary>
+        /// Informs all top-level windows that the colorization color has changed.<para/>
+        /// Only supported on Windows Vista or higher.
+        /// </summary>
+        DwmColorizationColorChanged = 0x0320,
+
+        /// <summary>
+        /// Sent when a Desktop Window Manager (DWM) composed window is maximized.<para/>
+        /// Only supported on Windows Vista or higher.
+        /// </summary>
+        DwmWindowMaximizedChange = 0x0321,
+
+        /// <summary>
+        /// Instructs a window to provide a static bitmap to use as a thumbnail representation of that window.<para/>
+        /// Only supported on Windows 7 or higher.
+        /// </summary>
+        DwmSendIconicThumbnail = 0x0323,
+
+        /// <summary>
+        /// Instructs a window to provide a static bitmap to use as a
+        /// live preview (also known as a Peek preview) of that window.<para/>
+        /// Only supported on Windows 7 or higher.
+        /// </summary>
+        DwmSendIconicLivePreviewBitmap = 0x0326,
+
+        /// <summary>
+        /// Sent to request extended title bar information.<para/>
+        /// Only supported on Windows Vista or higher.
+        /// </summary>
+        GetTitleBarInfoEx = 0x033F,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        HandheldFirst = 0x0358,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        HandheldLast = 0x035F,
+
+        /// <summary>
+        /// Specifies the first afx message.
+        /// </summary>
+        AfxFirst = 0x0360,
+
+        /// <summary>
+        /// Specifies the last afx message.
+        /// </summary>
+        AfxLast = 0x037F,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        PenWinFirst = 0x0380,
+
+        /// <summary>
+        /// This member is not officially documented. Use with care.
+        /// </summary>
+        PenWinLast = 0x038F,
+
+        /// <summary>
+        /// Used by applications to help define private messages,
+        /// usually of the form <see cref="App"/> + X, where X is an integer value.
+        /// </summary>
+        App = 0x8000,
+
+        /// <summary>
+        /// Used by applications to help define private messages for use by private window classes,
+        /// usually of the form <see cref="User"/> + X, where X is an integer value.
+        /// </summary>
+        User = 0x0400,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/WindowMessageSizeType.cs b/Crow/src/backends/win32/User32/Enums/WindowMessageSizeType.cs
new file mode 100644 (file)
index 0000000..5085e50
--- /dev/null
@@ -0,0 +1,34 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// The type of resizing requested by a <see cref="WindowMessage.Size"/>.
+    /// </summary>
+    public enum WindowMessageSizeType
+    {
+        /// <summary>
+        /// The window has been resized, but neither the <see cref="Minimized"/>
+        /// nor <see cref="Maximized"/> value applies.
+        /// </summary>
+        Restored = 0,
+
+        /// <summary>
+        /// The window has been minimized.
+        /// </summary>
+        Minimized = 1,
+
+        /// <summary>
+        /// The window has been maximized.
+        /// </summary>
+        Maximized = 2,
+
+        /// <summary>
+        /// Message is sent to all pop-up windows when some other window has been restored to its former size.
+        /// </summary>
+        MaxShow = 3,
+
+        /// <summary>
+        /// Message is sent to all pop-up windows when some other window is maximized.
+        /// </summary>
+        MaxHide = 4,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Enums/WindowStyles.cs b/Crow/src/backends/win32/User32/Enums/WindowStyles.cs
new file mode 100644 (file)
index 0000000..501e9de
--- /dev/null
@@ -0,0 +1,179 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Every window has one or more window styles. A window style is a named constant that defines an aspect of the
+    /// window's appearance and behavior that is not specified by the window's class. An application usually sets
+    /// window styles when creating windows. It can also set the styles after creating a window by using the
+    /// <see cref="User32.Window.SetWindowLong(IntPtr, int, int)"/> function.
+    /// </summary>
+    [Flags]
+    public enum WindowStyles : uint
+    {
+        /// <summary>
+        /// The window is an overlapped window. An overlapped window has a title bar and a border.
+        /// Same as the <see cref="Tiled"/> style.
+        /// </summary>
+        Overlapped = 0x00000000,
+
+        /// <summary>
+        /// The window is an overlapped window. An overlapped window has a title bar and a border.
+        /// Same as the <see cref="Overlapped"/> style.
+        /// </summary>
+        Tiled = Overlapped,
+
+        /// <summary>
+        /// The window is a control that can receive the keyboard focus when the user presses the TAB key. Pressing
+        /// the TAB key changes the keyboard focus to the next control with the <see cref="TabStop"/> style.<para/>
+        /// You can turn this style on and off to change dialog box navigation. To change this style after a window
+        /// has been created, use the <see cref="User32.Window.SetWindowLong(IntPtr, GetWindowLongIndex, IntPtr)"/>
+        /// function. For user-created windows and modeless dialogs to work with tab stops,
+        /// alter the message loop to call the IsDialogMessage function.
+        /// </summary>
+        TabStop = 0x00010000,
+
+        /// <summary>
+        /// The window has a maximize button. Cannot be combined with the
+        /// <see cref="ExtendedWindowStyles.ContextHelp"/> style. The <see cref="SystemMenu"/>
+        /// style must also be specified.
+        /// </summary>
+        MaximizeBox = 0x00010000,
+
+        /// <summary>
+        /// The window is the first control of a group of controls. The group consists of this first control and all
+        /// controls defined after it, up to the next control with the <see cref="Group"/> style. The first control
+        /// in each group usually has the <see cref="TabStop"/> style so that the user can move from group to group.
+        /// The user can subsequently change the keyboard focus from one control in the group to
+        /// the next control in the group by using the direction keys.<para/>
+        /// You can turn this style on and off to change dialog box navigation. To change this style after a window
+        /// has been created, use the <see cref="User32.Window.SetWindowLong(IntPtr, GetWindowLongIndex, IntPtr)"/>
+        /// function.
+        /// </summary>
+        Group = 0x00020000,
+
+        /// <summary>
+        /// The window has a minimize button. Cannot be combined with the
+        /// <see cref="ExtendedWindowStyles.ContextHelp"/> style.
+        /// The <see cref="SystemMenu"/> style must also be specified.
+        /// </summary>
+        MinimizeBox = 0x00020000,
+
+        /// <summary>
+        /// The window has a sizing border. Same as the <see cref="SizeBox"/> style.
+        /// </summary>
+        ThickFrame = 0x00040000,
+
+        /// <summary>
+        /// The window has a sizing border. Same as the <see cref="ThickFrame"/> style.
+        /// </summary>
+        SizeBox = ThickFrame,
+
+        /// <summary>
+        /// The window has a window menu on its title bar. The <see cref="Caption"/> style must also be specified.
+        /// </summary>
+        SystemMenu = 0x00080000,
+
+        /// <summary>
+        /// The window has a horizontal scroll bar.
+        /// </summary>
+        HScroll = 0x00100000,
+
+        /// <summary>
+        /// The window has a vertical scroll bar.
+        /// </summary>
+        VScroll = 0x00200000,
+
+        /// <summary>
+        /// The window has a border of a style typically used with dialog boxes.
+        /// A window with this style cannot have a title bar.
+        /// </summary>
+        DialogFrame = 0x00400000,
+
+        /// <summary>
+        /// The window has a thin-line border.
+        /// </summary>
+        Border = 0x00800000,
+
+        /// <summary>
+        /// The window has a title bar (includes the <see cref="Border"/> style).
+        /// </summary>
+        Caption = Border | DialogFrame,
+
+        /// <summary>
+        /// The window is initially maximized.
+        /// </summary>
+        Maximize = 0x01000000,
+
+        /// <summary>
+        /// Excludes the area occupied by child windows when drawing occurs within the parent window.
+        /// This style is used when creating the parent window.
+        /// </summary>
+        ClipChildren = 0x02000000,
+
+        /// <summary>
+        /// Clips child windows relative to each other; that is, when a particular child window receives a
+        /// <see cref="WindowMessage.Paint"/> message, the <see cref="ClipSiblings"/> style clips all other overlapping
+        /// child windows out of the region of the child window to be updated. If <see cref="ClipSiblings"/> is not
+        /// specified and child windows overlap, it is possible, when drawing within the client area of a child window,
+        /// to draw within the client area of a neighboring child window.
+        /// </summary>
+        ClipSiblings = 0x04000000,
+
+        /// <summary>
+        /// The window is initially disabled. A disabled window cannot receive input from the user. To change this
+        /// after a window has been created, use the EnableWindow function.
+        /// </summary>
+        Disabled = 0x08000000,
+
+        /// <summary>
+        /// The window is initially visible.<para/>
+        /// This style can be turned on and off by using the
+        /// <see cref="User32.Window.ShowWindow(IntPtr, ShowWindowCommand)"/> or <see cref="User32.Window.SetWindowPos(
+        /// IntPtr, SetWindowPosHwndEnum, int, int, int, int, SetWindowPosFlags)"/> function.
+        /// </summary>
+        Visible = 0x10000000,
+
+        /// <summary>
+        /// The window is initially minimized. Same as the <see cref="Iconic"/> style.
+        /// </summary>
+        Minimize = 0x20000000,
+
+        /// <summary>
+        /// The window is initially minimized. Same as the <see cref="Minimize"/> style.
+        /// </summary>
+        Iconic = Minimize,
+
+        /// <summary>
+        /// The window is a child window. A window with this style cannot have a menu bar.
+        /// This style cannot be used with the <see cref="Popup"/> style.
+        /// </summary>
+        Child = 0x40000000,
+
+        /// <summary>
+        /// Same as the <see cref="Child"/> style.
+        /// </summary>
+        ChildWindow = Child,
+
+        /// <summary>
+        /// The windows is a pop-up window. This style cannot be used with the <see cref="Child"/> style.
+        /// </summary>
+        Popup = 0x80000000,
+
+        /// <summary>
+        /// The window is an overlapped window. Same as the <see cref="TiledWindow"/> style.
+        /// </summary>
+        OverlappedWindow = Overlapped | Caption | SystemMenu | ThickFrame | MinimizeBox | MaximizeBox,
+
+        /// <summary>
+        /// The window is an overlapped window. Same as the <see cref="OverlappedWindow"/> style.
+        /// </summary>
+        TiledWindow = OverlappedWindow,
+
+        /// <summary>
+        /// The window is a pop-up window. The <see cref="Caption"/> and
+        /// <see cref="PopupWindow"/> styles must be combined to make the window menu visible.
+        /// </summary>
+        PopupWindow = Popup | Border | SystemMenu,
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Icon.cs b/Crow/src/backends/win32/User32/Icon.cs
new file mode 100644 (file)
index 0000000..468aabe
--- /dev/null
@@ -0,0 +1,159 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with icons.
+        /// </summary>
+        public static class Icon
+        {
+            /// <summary>
+            /// Creates an icon or cursor from an <see cref="IconInfo"/> structure.
+            /// </summary>
+            /// <param name="iconInfo">
+            /// An <see cref="IconInfo"/> structure the function uses to create the icon or cursor.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is a handle to the icon or cursor that is created.<para/>
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            public static extern IntPtr CreateIconIndirect([In] ref IconInfo iconInfo);
+
+            /// <summary>
+            /// Destroys an icon and frees any memory the icon occupied.
+            /// </summary>
+            /// <param name="icon">A handle to the icon to be destroyed. The icon must not be in use.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool DestroyIcon([In] IntPtr icon);
+
+            /// <summary>
+            /// Retrieves information about the specified icon or cursor.
+            /// </summary>
+            /// <param name="icon">A handle to the icon or cursor.</param>
+            /// <param name="iconInfo">
+            /// A pointer to an <see cref="IconInfo"/> structure. The function fills in the structure's members.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true and the function
+            /// fills in the members of the specified <see cref="IconInfo"/> structure.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool GetIconInfo([In] IntPtr icon, [Out] out IconInfo iconInfo);
+
+            /// <summary>
+            /// Retrieves information about the specified pre-defined cursor.
+            /// </summary>
+            /// <param name="cursorName">One of the pre-defined cursors.</param>
+            /// <param name="iconInfo">
+            /// A pointer to an <see cref="IconInfo"/> structure. The function fills in the structure's members.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true and the function
+            /// fills in the members of the specified <see cref="IconInfo"/> structure.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            public static bool GetIconInfo(CursorName cursorName, out IconInfo iconInfo)
+            {
+                return GetIconInfo(new IntPtr((int)cursorName), out iconInfo);
+            }
+
+            /// <summary>
+            /// Retrieves information about the specified pre-defined icon.
+            /// </summary>
+            /// <param name="iconName">One of the pre-defined cursors.</param>
+            /// <param name="iconInfo">
+            /// A pointer to an <see cref="IconInfo"/> structure. The function fills in the structure's members.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true and the function
+            /// fills in the members of the specified <see cref="IconInfo"/> structure.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            public static bool GetIconInfo(IconName iconName, out IconInfo iconInfo)
+            {
+                return GetIconInfo(new IntPtr((int)iconName), out iconInfo);
+            }
+
+            /// <summary>
+            /// Loads the specified icon resource from the executable (.exe)
+            /// file associated with an application instance.
+            /// </summary>
+            /// <param name="moduleInstance">
+            /// A handle to an instance of the module whose executable file contains the icon to be loaded.
+            /// This parameter must be <see cref="IntPtr.Zero"/> when a standard icon is being loaded.
+            /// </param>
+            /// <param name="iconName">The name of the icon resource to be loaded.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is a handle to the newly loaded icon.<para/>
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true, CharSet = CharSet.Unicode)]
+            public static extern IntPtr LoadIcon([In] [Optional] IntPtr moduleInstance, [In] string iconName);
+
+            /// <summary>
+            /// Loads the specified icon resource from the executable (.exe)
+            /// file associated with an application instance.
+            /// </summary>
+            /// <param name="moduleInstance">
+            /// A handle to an instance of the module whose executable file contains the icon to be loaded.
+            /// This parameter must be <see cref="IntPtr.Zero"/> when a standard icon is being loaded.
+            /// </param>
+            /// <param name="iconName">A pointer to a string with the name of the icon resource to be loaded.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is a handle to the newly loaded icon.<para/>
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true, CharSet = CharSet.Unicode)]
+            public static extern IntPtr LoadIcon([In] [Optional] IntPtr moduleInstance, [In] IntPtr iconName);
+
+            /// <summary>
+            /// Loads the specified icon resource from the executable (.exe)
+            /// file associated with an application instance.
+            /// </summary>
+            /// <param name="cursorName">One of the pre-defined cursors to be loaded.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is a handle to the newly loaded icon.<para/>
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            public static IntPtr LoadIcon(CursorName cursorName)
+            {
+                return LoadIcon(IntPtr.Zero, new IntPtr((int)cursorName));
+            }
+
+            /// <summary>
+            /// Loads the specified icon resource from the executable (.exe)
+            /// file associated with an application instance.
+            /// </summary>
+            /// <param name="iconName">One of the pre-defined icons to be loaded.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is a handle to the newly loaded icon.<para/>
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            public static IntPtr LoadIcon(IconName iconName)
+            {
+                return LoadIcon(IntPtr.Zero, new IntPtr((int)iconName));
+            }
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Keyboard.cs b/Crow/src/backends/win32/User32/Keyboard.cs
new file mode 100644 (file)
index 0000000..5c86e43
--- /dev/null
@@ -0,0 +1,93 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with the keyboard.
+        /// </summary>
+        public static class Keyboard
+        {
+            /// <summary>
+            /// Retrieves the status of the specified virtual key. The status specifies whether the key is up, down,
+            /// or toggled (on, off—alternating each time the key is pressed).
+            /// </summary>
+            /// <param name="key">The desired virtual key.</param>
+            /// <returns>
+            /// The return value specifies the status of the specified virtual key, as follows:<para/>
+            /// If the high-order bit is 1, the key is down; otherwise, it is up.<para/>
+            /// If the low-order bit is 1, the key is toggled. A key, such as the CAPS LOCK key, is toggled if it is
+            /// turned on. The key is off and untoggled if the low-order bit is 0. A toggle key's indicator light
+            /// (if any) on the keyboard will be on when the key is toggled, and off when the key is untoggled.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static extern short GetKeyState([In] VirtualKey key);
+
+            /// <summary>
+            /// Determines whether a key is up or down at the time the function is called,
+            /// and whether the key was pressed after a previous call to GetAsyncKeyState.
+            /// </summary>
+            /// <param name="key">The desired virtual key.</param>
+            /// <returns>
+            /// If the function succeeds, the return value specifies whether the key was pressed since the last call
+            /// to <see cref="GetAsyncKeyState(VirtualKey)"/>, and whether the key is currently up or down. If the
+            /// most significant bit is set, the key is down, and if the least significant bit is set, the key was
+            /// pressed after the previous call to GetAsyncKeyState. However, you should not rely on this last
+            /// behavior; for more information, see the Remarks section in the official documentation.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static extern short GetAsyncKeyState([In] VirtualKey key);
+
+            /// <summary>
+            /// Retrieves the handle to the window that has the keyboard focus,
+            /// if the window is attached to the calling thread's message queue.
+            /// </summary>
+            /// <returns>
+            /// The return value is the handle to the window with the keyboard focus. If the calling thread's message
+            /// queue does not have an associated window with the keyboard focus,
+            /// the return value is <see cref="IntPtr.Zero"/>.
+            /// </returns>
+            [DllImport(Library)]
+            public static extern IntPtr GetFocus();
+
+            /// <summary>
+            /// Sets the keyboard focus to the specified window.
+            /// The window must be attached to the calling thread's message queue.
+            /// </summary>
+            /// <param name="window">A handle to the window that will receive the keyboard input.
+            /// If this parameter is <see cref="IntPtr.Zero"/>, keystrokes are ignored.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is the handle to the window that previously had the
+            /// keyboard focus. If the <paramref name="window"/> parameter is invalid or the window is not attached
+            /// to the calling thread's message queue, the return value is <see cref="IntPtr.Zero"/>.<para/>
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            public static extern IntPtr SetFocus([In] [Optional] IntPtr window);
+
+            /// <summary>
+            /// Translates (maps) a virtual-key code into a scan code or character value,
+            /// or translates a scan code into a virtual-key code.
+            /// </summary>
+            /// <param name="vkey">
+            /// The virtual key code or scan code for a key.
+            /// How this value is interpreted depends on the value of the <paramref name="mapType"/> parameter.
+            /// </param>
+            /// <param name="mapType">The translation to be performed.</param>
+            /// <returns>
+            /// The return value is either a scan code, a virtual-key code, or a character value, depending on
+            /// the value of <paramref name="vkey"/> and <paramref name="mapType"/>.<para/>
+            /// If there is no translation, the return value is zero.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static extern uint MapVirtualKey([In] VirtualKey vkey, [In] MapVirtualKeyType mapType);
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Message.cs b/Crow/src/backends/win32/User32/Message.cs
new file mode 100644 (file)
index 0000000..eac8d7b
--- /dev/null
@@ -0,0 +1,307 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with messages.
+        /// </summary>
+        public static class Message
+        {
+            /// <summary>
+            /// A special constant value that can be used to send a message to all top-level windows, including
+            /// disabled or invisible unowned windows, overlapped windows, and pop-up windows;
+            /// but not to child windows.
+            /// </summary>
+            public static readonly IntPtr BroadcastHandle = new IntPtr(0xFFFF);
+
+            /// <summary>
+            /// Dispatches incoming sent messages, checks the thread message queue for a posted message,
+            /// and retrieves the message (if any exist).
+            /// </summary>
+            /// <param name="msg">A <see cref="Msg"/> structure that receives message information.</param>
+            /// <param name="window">
+            /// A handle to the window whose messages are to be retrieved.
+            /// The window must belong to the current thread.<para/>
+            /// If <paramref name="window"/> is <see cref="IntPtr.Zero"/>,
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> retrieves messages for any
+            /// window that belongs to the current thread, and any messages on the current thread's message queue whose
+            /// <paramref name="window"/> value is <see cref="IntPtr.Zero"/> (see the <see cref="Msg"/> structure).
+            /// Therefore if <paramref name="window"/> is <see cref="IntPtr.Zero"/>, both window messages
+            /// and thread messages are processed.<para/>
+            /// If <paramref name="window"/> is -1,
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> retrieves only messages on the
+            /// current thread's message queue whose <paramref name="window"/> value is <see cref="IntPtr.Zero"/>,
+            /// that is, thread messages as posted by <see cref="PostMessage(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+            /// (when the window parameter is <see cref="IntPtr.Zero"/>) or PostThreadMessage.
+            /// </param>
+            /// <param name="messageFilterMin">
+            /// The value of the first message in the range of messages to be examined.
+            /// Use <see cref="WindowMessage.KeyFirst"/> to specify the first keyboard message or
+            /// <see cref="WindowMessage.MouseFirst"/> to specify the first mouse message.<para/>
+            /// If <paramref name="messageFilterMin"/> and <paramref name="messageFilterMax"/> are both zero,
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> returns all available messages
+            /// (that is, no range filtering is performed).
+            /// </param>
+            /// <param name="messageFilterMax">
+            /// The value of the last message in the range of messages to be examined. Use
+            /// <see cref="WindowMessage.KeyLast"/> to specify the last keyboard message or
+            /// <see cref="WindowMessage.MouseLast"/> to specify the last mouse message.<para/>
+            /// If <paramref name="messageFilterMin"/> and <paramref name="messageFilterMax"/> are both zero,
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> returns all available messages
+            /// (that is, no range filtering is performed).
+            /// </param>
+            /// <param name="messageActions">Specifies how messages are to be handled.</param>
+            /// <returns>
+            /// If a message is available, the return value is true.<para/>
+            /// If no messages are available, the return value is false.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool PeekMessage
+            (
+                [Out] out Msg msg,
+                [In] [Optional] IntPtr window,
+                [In] uint messageFilterMin,
+                [In] uint messageFilterMax,
+                [In] PeekMessageActions messageActions
+            );
+
+            /// <summary>
+            /// Retrieves a message from the calling thread's message queue. The function dispatches
+            /// incoming sent messages until a posted message is available for retrieval.<para/>
+            /// Unlike <see cref="GetMessage(out Msg, IntPtr, uint, uint)"/>, the
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> function does not wait
+            /// for a message to be posted before returning.
+            /// </summary>
+            /// <param name="msg">
+            /// An <see cref="Msg"/> structure that receives message information from the thread's message queue.
+            /// </param>
+            /// <param name="window">
+            /// A handle to the window whose messages are to be retrieved.
+            /// The window must belong to the current thread.<para/>
+            /// If <paramref name="window"/> is <see cref="IntPtr.Zero"/>,
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> retrieves messages for any
+            /// window that belongs to the current thread, and any messages on the current thread's message queue whose
+            /// <paramref name="window"/> value is <see cref="IntPtr.Zero"/> (see the <see cref="Msg"/> structure).
+            /// Therefore if <paramref name="window"/> is <see cref="IntPtr.Zero"/>, both window messages
+            /// and thread messages are processed.<para/>
+            /// If <paramref name="window"/> is -1,
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> retrieves only messages on the
+            /// current thread's message queue whose <paramref name="window"/> value is <see cref="IntPtr.Zero"/>,
+            /// that is, thread messages as posted by <see cref="PostMessage(IntPtr, WindowMessage, IntPtr, IntPtr)"/>
+            /// (when the window parameter is <see cref="IntPtr.Zero"/>) or PostThreadMessage.
+            /// </param>
+            /// <param name="messageFilterMin">
+            /// The value of the first message in the range of messages to be examined.
+            /// Use <see cref="WindowMessage.KeyFirst"/> to specify the first keyboard message or
+            /// <see cref="WindowMessage.MouseFirst"/> to specify the first mouse message.<para/>
+            /// Use <see cref="WindowMessage.Input"/> here and in <paramref name="messageFilterMax"/> to specify only
+            /// the <see cref="WindowMessage.Input"/> messages.<para/>
+            /// If <paramref name="messageFilterMin"/> and <paramref name="messageFilterMax"/> are both zero,
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> returns all available messages
+            /// (that is, no range filtering is performed).
+            /// </param>
+            /// <param name="messageFilterMax">
+            /// The value of the last message in the range of messages to be examined. Use
+            /// <see cref="WindowMessage.KeyLast"/> to specify the last keyboard message or
+            /// <see cref="WindowMessage.MouseLast"/> to specify the last mouse message.<para/>
+            /// Use <see cref="WindowMessage.Input"/> here and in <paramref name="messageFilterMin"/> to specify only
+            /// the <see cref="WindowMessage.Input"/> messages.<para/>
+            /// If <paramref name="messageFilterMin"/> and <paramref name="messageFilterMax"/> are both zero,
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> returns all available messages
+            /// (that is, no range filtering is performed).
+            /// </param>
+            /// <returns>
+            /// If the function retrieves a message other than <see cref="WindowMessage.Quit"/>,
+            /// the return value is true.<para/>
+            /// If the function retrieves the <see cref="WindowMessage.Quit"/> message, the return value is false.
+            /// <para/>
+            /// If there is an error, the return value is -1. For example, the function fails if
+            /// <paramref name="window"/> is an invalid window handle or <paramref name="msg"/> is an invalid pointer.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static extern int GetMessage
+            (
+                [Out] out Msg msg,
+                [In] [Optional] IntPtr window,
+                [In] uint messageFilterMin,
+                [In] uint messageFilterMax
+            );
+
+            /// <summary>
+            /// Retrieves the message time for the last message retrieved by the
+            /// <see cref="GetMessage(out Msg, IntPtr, uint, uint)"/> function. The time is a long integer that
+            /// specifies the elapsed time, in milliseconds, from the time the system was started to the time the
+            /// message was created (that is, placed in the thread's message queue).
+            /// </summary>
+            /// <returns>The return value specifies the message time.</returns>
+            [DllImport(Library)]
+            public static extern int GetMessageTime();
+
+            /// <summary>
+            /// Sends the specified message to a window or windows. The
+            /// <see cref="SendMessage(IntPtr, WindowMessage, IntPtr, IntPtr)"/> function calls the window procedure for the
+            /// specified window and does not return until the window procedure has processed the message.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window whose window procedure will receive the message.<para/>
+            /// Message sending is subject to UIPI. The thread of a process can send messages only to message queues
+            /// of threads in processes of lesser or equal integrity level.
+            /// </param>
+            /// <param name="msg">The message to be sent.</param>
+            /// <param name="wparam">Additional message-specific information.</param>
+            /// <param name="lparam">Additional message-specific information.</param>
+            /// <returns>
+            /// The return value specifies the result of the message processing; it depends on the message sent.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            public static extern IntPtr SendMessage
+            (
+                [In] IntPtr window,
+                [In] WindowMessage msg,
+                [In] IntPtr wparam,
+                [In] IntPtr lparam
+            );
+
+            /// <summary>
+            /// Sends a message to all top-level windows in the system, including disabled or invisible unowned
+            /// windows, overlapped windows, and pop-up windows; but not to child windows.
+            /// </summary>
+            /// <param name="msg">The message to be sent.</param>
+            /// <param name="wparam">Additional message-specific information.</param>
+            /// <param name="lparam">Additional message-specific information.</param>
+            /// <returns>
+            /// The return value specifies the result of the message processing; it depends on the message sent.
+            /// </returns>
+            /// <remarks>
+            /// This method uses the constant <see cref="BroadcastHandle"/> for this special behavior.
+            /// </remarks>
+            public static IntPtr SendMessageAsBroadcast(WindowMessage msg, IntPtr wparam, IntPtr lparam)
+            {
+                return SendMessage(BroadcastHandle, msg, wparam, lparam);
+            }
+
+            /// <summary>
+            /// Places (posts) a message in the message queue associated with the thread that created the specified
+            /// window and returns without waiting for the thread to process the message.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window whose window procedure is to receive the message.<para/>
+            /// Starting with Windows Vista, message posting is subject to UIPI. The thread of a process can post
+            /// messages only to message queues of threads in processes of lesser or equal integrity level.<para/>
+            /// If <paramref name="window"/> is <see cref="IntPtr.Zero"/>, this function will behave like a call to
+            /// PostThreadMessage with the dwThreadId parameter set to the identifier of the current thread.
+            /// </param>
+            /// <param name="msg">The message to be posted.</param>
+            /// <param name="wparam">Additional message-specific information.</param>
+            /// <param name="lparam">Additional message-specific information.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool PostMessage
+            (
+                [In] [Optional] IntPtr window,
+                [In] WindowMessage msg,
+                [In] IntPtr wparam,
+                [In] IntPtr lparam
+            );
+
+            /// <summary>
+            /// Places (posts) a message to all top-level windows in the system, including disabled or invisible
+            /// unowned windows, overlapped windows, and pop-up windows. The message is not posted to child windows.
+            /// </summary>
+            /// <param name="msg">The message to be posted.</param>
+            /// <param name="wparam">Additional message-specific information.</param>
+            /// <param name="lparam">Additional message-specific information.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            /// <remarks>
+            /// This method uses the constant <see cref="BroadcastHandle"/> for this special behavior.
+            /// </remarks>
+            public static bool PostMessageAsBroadcast(WindowMessage msg, IntPtr wparam, IntPtr lparam)
+            {
+                return PostMessage(BroadcastHandle, msg, wparam, lparam);
+            }
+
+            /// <summary>
+            /// Indicates to the system that a thread has made a request to terminate (quit).
+            /// It is typically used in response to a <see cref="WindowMessage.Destroy"/> message.
+            /// </summary>
+            /// <param name="exitCode">
+            /// The application exit code. This value is used as the
+            /// wParam parameter of the <see cref="WindowMessage.Quit"/> message.
+            /// </param>
+            [DllImport(Library)]
+            public static extern void PostQuitMessage([In] int exitCode);
+
+            /// <summary>
+            /// Dispatches a message to a window procedure. It is typically used to
+            /// dispatch a message retrieved by the <see cref="GetMessage(out Msg, IntPtr, uint, uint)"/> function.
+            /// </summary>
+            /// <param name="msg">A structure that contains the message.</param>
+            /// <returns>
+            /// The return value specifies the value returned by the window procedure.
+            /// Although its meaning depends on the message being dispatched, the return value generally is ignored.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library)]
+            public static extern IntPtr DispatchMessage([In] ref Msg msg);
+
+            /// <summary>
+            /// Translates virtual-key messages into character messages. The character messages are posted to the
+            /// calling thread's message queue, to be read the next time the thread calls the
+            /// <see cref="GetMessage(out Msg, IntPtr, uint, uint)"/> or
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> function.
+            /// </summary>
+            /// <param name="msg">
+            /// An <see cref="Msg"/> structure that contains message information retrieved from the
+            /// calling thread's message queue by using the <see cref="GetMessage(out Msg, IntPtr, uint, uint)"/> or
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> function.
+            /// </param>
+            /// <returns>
+            /// If the message is translated (that is, a character message is posted to the thread's message queue),
+            /// the return value is true.<para/>
+            /// If the message is <see cref="WindowMessage.KeyDown"/>, <see cref="WindowMessage.KeyUp"/>,
+            /// <see cref="WindowMessage.SystemKeyDown"/>, or <see cref="WindowMessage.SystemKeyUp"/>,
+            /// the return value is true, regardless of the translation.<para/>
+            /// If the message is not translated (that is, a character message is not posted to the
+            /// thread's message queue), the return value is false.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool TranslateMessage([In] ref Msg msg);
+
+            /// <summary>
+            /// Retrieves the type of messages found in the calling thread's message queue.
+            /// </summary>
+            /// <param name="flags">The types of messages for which to check.</param>
+            /// <returns>
+            /// The high-order word of the return value indicates the types of messages currently in the queue.
+            /// The low-order word indicates the types of messages that have been added to the queue and that are
+            /// still in the queue since the last call to the <see cref="GetQueueStatus(QueueMessageTypes)"/>,
+            /// <see cref="GetMessage(out Msg, IntPtr, uint, uint)"/>, or
+            /// <see cref="PeekMessage(out Msg, IntPtr, uint, uint, PeekMessageActions)"/> function.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library)]
+            public static extern uint GetQueueStatus([In] QueueMessageTypes flags);
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Monitor.cs b/Crow/src/backends/win32/User32/Monitor.cs
new file mode 100644 (file)
index 0000000..d7cc6cc
--- /dev/null
@@ -0,0 +1,70 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with monitors.
+        /// </summary>
+        public static class Monitor
+        {
+            /// <summary>
+            /// Retrieves information about a display monitor.
+            /// </summary>
+            /// <param name="monitor">A handle to the display monitor of interest.</param>
+            /// <param name="monitorInfo">
+            /// A pointer to a <see cref="MonitorInfo"/> or MONITORINFOEX structure
+            /// that receives information about the specified display monitor.<para/>
+            /// You must set the Size member of the structure to the respective structure's size in bytes
+            /// before calling the <see cref="GetMonitorInfo(IntPtr, out MonitorInfo)"/> function. Doing so
+            /// lets the function determine the type of structure you are passing to it.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is nonzero.<para/>
+            /// If the function fails, the return value is zero.
+            /// </returns>
+            [DllImport(Library)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool GetMonitorInfo([In] IntPtr monitor, [Out] out MonitorInfo monitorInfo);
+
+            /// <summary>
+            /// Retrieves a handle to the display monitor that contains a specified point.
+            /// </summary>
+            /// <param name="pt">
+            /// A <see cref="Point"/> structure that specifies the point of interest in virtual-screen coordinates.
+            /// </param>
+            /// <param name="defaultTo">
+            /// Determines the function's return value if the point is not contained within any display monitor.
+            /// </param>
+            /// <returns>
+            /// If the point is contained by a display monitor,
+            /// the return value is an <see cref="IntPtr"/> handle to that display monitor.<para/>
+            /// If the point is not contained by a display monitor,
+            /// the return value depends on the value of <paramref name="defaultTo"/>.
+            /// </returns>
+            [DllImport(Library)]
+            public static extern IntPtr MonitorFromPoint([In] Point pt, [In] MonitorFromDefaultValue defaultTo);
+
+            /// <summary>
+            /// Retrieves a handle to the display monitor that has the largest area of intersection
+            /// with the bounding rectangle of a specified window.
+            /// </summary>
+            /// <param name="window">A handle to the window of interest.</param>
+            /// <param name="defaultTo">
+            /// Determines the function's return value if the window does not intersect any display monitor.
+            /// </param>
+            /// <returns>
+            /// If the window intersects one or more display monitor rectangles, the return value is an
+            /// <see cref="IntPtr"/> handle to the display monitor that
+            /// has the largest area of intersection with the window.<para/>
+            /// If the window does not intersect a display monitor,
+            /// the return value depends on the value of <paramref name="defaultTo"/>.
+            /// </returns>
+            [DllImport(Library)]
+            public static extern IntPtr MonitorFromWindow([In] IntPtr window, [In] MonitorFromDefaultValue defaultTo);
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Mouse.cs b/Crow/src/backends/win32/User32/Mouse.cs
new file mode 100644 (file)
index 0000000..b61eaa2
--- /dev/null
@@ -0,0 +1,133 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with the mouse.
+        /// </summary>
+        public static class Mouse
+        {
+            /// <summary>
+            /// Retrieves a handle to the window (if any) that has captured the mouse. Only one window at a time can
+            /// capture the mouse; this window receives mouse input whether or not the cursor is within its borders.
+            /// </summary>
+            /// <returns>
+            /// The return value is a handle to the capture window associated with the current thread.<para/>
+            /// If no window in the thread has captured the mouse, the return value is <see cref="IntPtr.Zero"/>.
+            /// </returns>
+            [DllImport(Library)]
+            public static extern IntPtr GetCapture();
+
+            /// <summary>
+            /// Sets the mouse capture to the specified window belonging to the current thread.
+            /// <see cref="SetCapture(IntPtr)"/> captures mouse input either when the mouse is over the capturing window,
+            /// or when the mouse button was pressed while the mouse was over the capturing window and the button is
+            /// still down. Only one window at a time can capture the mouse.<para/>
+            /// If the mouse cursor is over a window created by another thread,
+            /// the system will direct mouse input to the specified window only if a mouse button is down.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window in the current thread that is to capture the mouse.
+            /// </param>
+            /// <returns>
+            /// The return value is a handle to the window that had previously captured the mouse.
+            /// If there is no such window, the return value is <see cref="IntPtr.Zero"/>.
+            /// </returns>
+            [DllImport(Library)]
+            public static extern IntPtr SetCapture(IntPtr window);
+
+            /// <summary>
+            /// Releases the mouse capture from a window in the current thread and restores normal mouse input
+            /// processing. A window that has captured the mouse receives all mouse input, regardless of the position
+            /// of the cursor, except when a mouse button is clicked while the cursor
+            /// hot spot is in the window of another thread.
+            /// </summary>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool ReleaseCapture();
+
+            /// <summary>
+            /// Posts messages when the mouse pointer leaves a window or hovers
+            /// over a window for a specified amount of time.
+            /// </summary>
+            /// <param name="trackMouseEvent">
+            /// A pointer to a <see cref="Native.TrackMouseEvent"/> structure that contains tracking information.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool TrackMouseEvent([In] [Out] ref TrackMouseEvent trackMouseEvent);
+
+            /// <summary>
+            /// Retrieves a history of up to 64 previous coordinates of the mouse or pen.
+            /// </summary>
+            /// <param name="size">The size, in bytes, of the <see cref="MouseMovePoint"/> structure.</param>
+            /// <param name="movePointIn">
+            /// A pointer to a <see cref="MouseMovePoint"/> structure containing valid mouse coordinates
+            /// (in screen coordinates). It may also contain a time stamp.
+            /// </param>
+            /// <param name="movePointOutBuffer">
+            /// A pointer to a buffer that will receive the points.
+            /// It should be at least <paramref name="size"/> * <paramref name="pointAmount"/> in size.
+            /// </param>
+            /// <param name="pointAmount">The number of points to be retrieved.</param>
+            /// <param name="resolution">The resolution desired.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is the number of points in the buffer.<para/>
+            /// Otherwise, the function returns –1.
+            /// For extended error information, your application can call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport("user32", SetLastError = true)]
+            public static extern int GetMouseMovePointsEx
+            (
+                [In] uint size,
+                [In] ref MouseMovePoint movePointIn,
+                [Out] out MouseMovePoint[] movePointOutBuffer,
+                [In] int pointAmount,
+                [In] GetMouseMovePointsResolution resolution
+            );
+
+            /// <summary>
+            /// Retrieves a history of up to 64 previous coordinates of the mouse or pen.
+            /// </summary>
+            /// <param name="size">The size, in bytes, of the <see cref="MouseMovePoint"/> structure.</param>
+            /// <param name="movePointIn">
+            /// A pointer to a <see cref="MouseMovePoint"/> structure containing valid mouse coordinates
+            /// (in screen coordinates). It may also contain a time stamp.
+            /// </param>
+            /// <param name="movePointOutBuffer">
+            /// A pointer to a buffer that will receive the points.
+            /// It should be at least <paramref name="size"/> * <paramref name="pointAmount"/> in size.
+            /// </param>
+            /// <param name="pointAmount">The number of points to be retrieved.</param>
+            /// <param name="resolution">The resolution desired.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is the number of points in the buffer.<para/>
+            /// Otherwise, the function returns –1.
+            /// For extended error information, your application can call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport("user32", SetLastError = true)]
+            public static unsafe extern int GetMouseMovePointsEx
+            (
+                [In] uint size,
+                [In] ref MouseMovePoint movePointIn,
+                [Out] MouseMovePoint* movePointOutBuffer,
+                [In] int pointAmount,
+                [In] GetMouseMovePointsResolution resolution
+            );
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/RawInput.cs b/Crow/src/backends/win32/User32/RawInput.cs
new file mode 100644 (file)
index 0000000..4864961
--- /dev/null
@@ -0,0 +1,423 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with raw input.
+        /// </summary>
+        public static class RawInput
+        {
+            /// <summary>
+            /// Calls the default raw input procedure to provide default processing for any raw input messages that
+            /// an application does not process. This function ensures that every message is processed.
+            /// <see cref="DefRawInputProc(Native.RawInput[], int, uint)"/> is called with the same parameters
+            /// received by the window procedure.
+            /// </summary>
+            /// <param name="rawInputArrayOut">An array of <see cref="Native.RawInput"/> structures.</param>
+            /// <param name="rawInputAmount">
+            /// The number of <see cref="Native.RawInput"/>
+            /// structures pointed to by <paramref name="rawInputArrayOut"/>.
+            /// </param>
+            /// <param name="headerSize">The size, in bytes, of the <see cref="RawInputHeader"/> structure.</param>
+            /// <returns>
+            /// If successful, the function returns <see cref="IntPtr.Zero"/>. Otherwise it returns an error value.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library)]
+            public static extern IntPtr DefRawInputProc
+            (
+                [In] Native.RawInput[] rawInputArrayOut,
+                [In] int rawInputAmount,
+                [In] uint headerSize
+            );
+
+            /// <summary>
+            /// Calls the default raw input procedure to provide default processing for any raw input messages that
+            /// an application does not process. This function ensures that every message is processed.
+            /// <see cref="DefRawInputProc(Native.RawInput[], int, uint)"/> is called with the same parameters
+            /// received by the window procedure.
+            /// </summary>
+            /// <param name="rawInputArrayOut">
+            /// A pointer to an array of <see cref="Native.RawInput"/> structures.
+            /// </param>
+            /// <param name="rawInputAmount">
+            /// The number of <see cref="Native.RawInput"/>
+            /// structures pointed to by <paramref name="rawInputArrayOut"/>.
+            /// </param>
+            /// <param name="headerSize">The size, in bytes, of the <see cref="RawInputHeader"/> structure.</param>
+            /// <returns>
+            /// If successful, the function returns <see cref="IntPtr.Zero"/>. Otherwise it returns an error value.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library)]
+            public static unsafe extern IntPtr DefRawInputProc
+            (
+                [In] Native.RawInput* rawInputArrayOut,
+                [In] int rawInputAmount,
+                [In] uint headerSize
+            );
+
+            /// <summary>
+            /// Registers the devices that supplies the raw input data.
+            /// </summary>
+            /// <param name="rawInputDevices">
+            /// An array of <see cref="RawInputDevice"/> structures that
+            /// represent the devices that supply the raw input.
+            /// </param>
+            /// <param name="deviceAmount">
+            /// The number of <see cref="RawInputDevice"/> structures pointed to by <paramref name="rawInputDevices"/>.
+            /// </param>
+            /// <param name="size">The size, in bytes, of a <see cref="RawInputDevice"/> structure.</param>
+            /// <returns>
+            /// True if the function succeeds; otherwise, false.<para/>
+            /// If the function fails, call <see cref="Marshal.GetLastWin32Error"/> for more information.
+            /// </returns>
+            //[DllImport(Library, SetLastError = true)]
+            //[return: MarshalAs(UnmanagedType.Bool)]
+            //public static extern bool RegisterRawInputDevices
+            //(
+            //    [In] RawInputDevice[] rawInputDevices,
+            //    [In] uint deviceAmount,
+            //    [In] uint size
+            //);
+
+            /// <summary>
+            /// Retrieves the information about the raw input devices for the current application.
+            /// </summary>
+            /// <param name="rawInputDevicesOut">
+            /// An array of <see cref="RawInputDevice"/> structures for the application.
+            /// </param>
+            /// <param name="deviceAmount">
+            /// The number of <see cref="RawInputDevice"/> structures in <paramref name="rawInputDevicesOut"/>.
+            /// </param>
+            /// <param name="size">The size, in bytes, of a <see cref="RawInputDevice"/> structure.</param>
+            /// <returns>
+            /// If successful, the function returns a non-negative number that is
+            /// the number of <see cref="RawInputDevice"/> structures written to the buffer.<para/>
+            /// If the <paramref name="rawInputDevicesOut"/> buffer is too small or null, the function sets the last
+            /// error as ERROR_INSUFFICIENT_BUFFER, returns -1, and sets <paramref name="deviceAmount"/> to the
+            /// required number of devices. If the function fails for any other reason, it returns -1.<para/>
+            /// For more details, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            //[DllImport(Library, SetLastError = true)]
+            //public static extern uint GetRegisteredRawInputDevices
+            //(
+            //    [Out] [Optional] RawInputDevice[] rawInputDevicesOut,
+            //    [In] [Out] ref uint deviceAmount,
+            //    [In] uint size
+            //);
+
+            /// <summary>
+            /// Performs a buffered read of the raw input data.
+            /// </summary>
+            /// <param name="data">
+            /// A buffer of <see cref="RawInput"/> structures that contain the raw input data.
+            /// If null, the minimum required buffer, in bytes, is returned in <paramref name="rawInputSize"/>.
+            /// </param>
+            /// <param name="rawInputSize">The size, in bytes, of a <see cref="RawInput"/> structure.</param>
+            /// <param name="headerSize">The size, in bytes, of the <see cref="RawInputHeader"/> structure.</param>
+            /// <returns>
+            /// If <paramref name="data"/> is null and the function is successful, the return value is zero.
+            /// If <paramref name="data"/> is not null and the function is successful, the return value is the
+            /// number of <see cref="RawInput"/> structures written to <paramref name="data"/>.<para/>
+            /// If an error occurs, the return value is -1.
+            /// Call <see cref="Marshal.GetLastWin32Error"/> for the error code.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static extern uint GetRawInputBuffer
+            (
+                [Out] [Optional] Native.RawInput[] data,
+                [In] [Out] ref uint rawInputSize,
+                [In] uint headerSize
+            );
+
+            /// <summary>
+            /// Performs a buffered read of the raw input data.
+            /// </summary>
+            /// <param name="data">
+            /// A pointer to a buffer of <see cref="RawInput"/> structures that contain the raw input data.
+            /// If null, the minimum required buffer, in bytes, is returned in <paramref name="rawInputSize"/>.
+            /// </param>
+            /// <param name="rawInputSize">The size, in bytes, of a <see cref="RawInput"/> structure.</param>
+            /// <param name="headerSize">The size, in bytes, of the <see cref="RawInputHeader"/> structure.</param>
+            /// <returns>
+            /// If <paramref name="data"/> is null and the function is successful, the return value is zero.
+            /// If <paramref name="data"/> is not null and the function is successful, the return value is the
+            /// number of <see cref="RawInput"/> structures written to <paramref name="data"/>.<para/>
+            /// If an error occurs, the return value is (uint)-1.
+            /// Call <see cref="Marshal.GetLastWin32Error"/> for the error code.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static unsafe extern uint GetRawInputBuffer
+            (
+                [Out] [Optional] Native.RawInput* data,
+                [In] [Out] ref uint rawInputSize,
+                [In] uint headerSize
+            );
+
+            /// <summary>
+            /// Enumerates the raw input devices attached to the system.
+            /// </summary>
+            /// <param name="deviceListArrayOut">
+            /// An array of <see cref="RawInputDeviceList"/> structures for the devices attached to the system.
+            /// If null, the number of devices are returned in <paramref name="deviceListAmount"/>.
+            /// </param>
+            /// <param name="deviceListAmount">
+            /// If <paramref name="deviceListArrayOut"/> is null, the function populates this variable with
+            /// the number of devices attached to the system; otherwise, this variable specifies the number of
+            /// <see cref="RawInputDeviceList"/> structures that can be contained in the buffer to which
+            /// <paramref name="deviceListArrayOut"/> points. If this value is less than the number of devices
+            /// attached to the system, the function returns the actual number of devices in this variable
+            /// and fails with ERROR_INSUFFICIENT_BUFFER.
+            /// </param>
+            /// <param name="deviceListSize">
+            /// The size of a <see cref="RawInputDeviceList"/> structure, in bytes.
+            /// </param>
+            /// <returns>
+            /// If the function is successful, the return value is the number of devices stored in the buffer
+            /// pointed to by <paramref name="deviceListArrayOut"/>.<para/>
+            /// On any other error, the function returns (uint)-1 and
+            /// <see cref="Marshal.GetLastWin32Error"/> returns the error indication.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            public static extern uint GetRawInputDeviceList
+            (
+                [Out] [Optional] RawInputDeviceList[] deviceListArrayOut,
+                [In] [Out] ref uint deviceListAmount,
+                [In] uint deviceListSize
+            );
+
+            /// <summary>
+            /// Enumerates the raw input devices attached to the system.
+            /// </summary>
+            /// <param name="deviceListArrayOut">
+            /// A pointer to an array of <see cref="RawInputDeviceList"/> structures for the devices attached to the
+            /// system. If null, the number of devices are returned in <paramref name="deviceListAmount"/>.
+            /// </param>
+            /// <param name="deviceListAmount">
+            /// If <paramref name="deviceListArrayOut"/> is null, the function populates this variable with
+            /// the number of devices attached to the system; otherwise, this variable specifies the number of
+            /// <see cref="RawInputDeviceList"/> structures that can be contained in the buffer to which
+            /// <paramref name="deviceListArrayOut"/> points. If this value is less than the number of devices
+            /// attached to the system, the function returns the actual number of devices in this variable
+            /// and fails with ERROR_INSUFFICIENT_BUFFER.
+            /// </param>
+            /// <param name="deviceListSize">
+            /// The size of a <see cref="RawInputDeviceList"/> structure, in bytes.
+            /// </param>
+            /// <returns>
+            /// If the function is successful, the return value is the number of devices stored in the buffer
+            /// pointed to by <paramref name="deviceListArrayOut"/>.<para/>
+            /// On any other error, the function returns (uint)-1 and
+            /// <see cref="Marshal.GetLastWin32Error"/> returns the error indication.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            public static unsafe extern uint GetRawInputDeviceList
+            (
+                [Out] [Optional] RawInputDeviceList* deviceListArrayOut,
+                [In] [Out] ref uint deviceListAmount,
+                [In] uint deviceListSize
+            );
+
+            /// <summary>
+            /// Retrieves information about the raw input device.
+            /// </summary>
+            /// <param name="device">
+            /// A handle to the raw input device. This comes from the <see cref="RawInputHeader.Device"/> or
+            /// from <see cref="GetRawInputDeviceList(RawInputDeviceList[], ref uint, uint)"/>.
+            /// </param>
+            /// <param name="command">Specifies what data will be returned in <paramref name="data"/>.</param>
+            /// <param name="data">
+            /// A buffer that contains the information specified by <paramref name="command"/>.
+            /// If <paramref name="command"/> is <see cref="GetRawInputDeviceInfoEnum.DeviceInfo"/>, set the
+            /// <see cref="RawInputDeviceInfo.Size"/> to <see cref="RawInputDeviceInfo.SizeInBytes"/> before calling
+            /// <see cref="GetRawInputDeviceInfo(IntPtr, GetRawInputDeviceInfoEnum, IntPtr, ref uint)"/>.
+            /// </param>
+            /// <param name="dataSize">The size, in bytes, of the data in <paramref name="data"/>.</param>
+            /// <returns>
+            /// If successful, this function returns a non-negative number indicating the number
+            /// of bytes copied to <paramref name="data"/>.<para/>
+            /// If pData is not large enough for the data, the function returns -1. If <paramref name="data"/> is
+            /// <see cref="IntPtr.Zero"/>, the function returns a value of zero. In both of these cases,
+            /// <paramref name="dataSize"/> is set to the minimum size required for the <paramref name="data"/> buffer.
+            /// <para/>
+            /// Call <see cref="Marshal.GetLastWin32Error"/> to identify any other errors.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static extern uint GetRawInputDeviceInfo
+            (
+                [In] [Optional] IntPtr device,
+                [In] GetRawInputDeviceInfoEnum command,
+                [In] [Out] [Optional] byte[] data,
+                [In] [Out] ref uint dataSize
+            );
+
+            /// <summary>
+            /// Retrieves information about the raw input device.
+            /// </summary>
+            /// <param name="device">
+            /// A handle to the raw input device. This comes from the <see cref="RawInputHeader.Device"/> or
+            /// from <see cref="GetRawInputDeviceList(RawInputDeviceList[], ref uint, uint)"/>.
+            /// </param>
+            /// <param name="command">Specifies what data will be returned in <paramref name="data"/>.</param>
+            /// <param name="data">
+            /// A pointer to a buffer that contains the information specified by <paramref name="command"/>.
+            /// If <paramref name="command"/> is <see cref="GetRawInputDeviceInfoEnum.DeviceInfo"/>, set the
+            /// <see cref="RawInputDeviceInfo.Size"/> to <see cref="RawInputDeviceInfo.SizeInBytes"/> before calling
+            /// <see cref="GetRawInputDeviceInfo(IntPtr, GetRawInputDeviceInfoEnum, IntPtr, ref uint)"/>.
+            /// </param>
+            /// <param name="dataSize">The size, in bytes, of the data in <paramref name="data"/>.</param>
+            /// <returns>
+            /// If successful, this function returns a non-negative number indicating the number
+            /// of bytes copied to <paramref name="data"/>.<para/>
+            /// If pData is not large enough for the data, the function returns -1. If <paramref name="data"/> is
+            /// <see cref="IntPtr.Zero"/>, the function returns a value of zero. In both of these cases,
+            /// <paramref name="dataSize"/> is set to the minimum size required for the <paramref name="data"/> buffer.
+            /// <para/>
+            /// Call <see cref="Marshal.GetLastWin32Error"/> to identify any other errors.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static unsafe extern uint GetRawInputDeviceInfo
+            (
+                [In] [Optional] IntPtr device,
+                [In] GetRawInputDeviceInfoEnum command,
+                [In] [Out] [Optional] IntPtr data,
+                [In] [Out] ref uint dataSize
+            );
+
+            /// <summary>
+            /// Retrieves information about the raw input device.
+            /// </summary>
+            /// <param name="device">
+            /// A handle to the raw input device. This comes from <see cref="RawInputHeader.Device"/> or from
+            /// <see cref="GetRawInputDeviceList(RawInputDeviceList[], ref uint, uint)"/>.
+            /// </param>
+            /// <param name="command">Specifies what data will be returned in <paramref name="data"/>.</param>
+            /// <param name="data">
+            /// A pointer to a buffer that contains the information specified by <paramref name="command"/>. If
+            /// <paramref name="command"/> is <see cref="GetRawInputDeviceInfoEnum.DeviceInfo"/>, set the
+            /// <see cref="RawInputDeviceInfo.Size"/> to <see cref="RawInputDeviceInfo.SizeInBytes"/>
+            /// before calling this.
+            /// </param>
+            /// <param name="size">The size, in bytes, of the data in <paramref name="data"/>.</param>
+            /// <returns>
+            /// If successful, this function returns a non-negative number
+            /// indicating the number of bytes copied to <paramref name="data"/>.<para/>
+            /// If <paramref name="data"/> is not large enough for the data, the function returns -1. If
+            /// <paramref name="data"/> is null, the function returns a value of zero. In both of these cases,
+            /// <paramref name="size"/> is set to the minimum size required for the <paramref name="data"/> buffer.
+            /// <para/>
+            /// Call <see cref="Marshal.GetLastWin32Error"/> to identify any other errors.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static extern uint GetRawInputDeviceInfo
+            (
+                [In] [Optional] IntPtr device,
+                [In] GetRawInputDeviceInfoEnum command,
+                [In] [Out] [Optional] ref RawInputDeviceInfo data,
+                [In] [Out] ref uint size
+            );
+
+            /// <summary>
+            /// Retrieves the raw input header from the specified device.
+            /// </summary>
+            /// <param name="rawInput">
+            /// A handle to the <see cref="Native.RawInput"/> structure. This comes from the lParam in
+            /// <see cref="WindowMessage.Input"/>.
+            /// </param>
+            /// <param name="header">The <see cref="RawInputHeader"/> structure to receive the raw data.</param>
+            /// <returns>
+            /// If the function is successful, the return value is the number of bytes copied into
+            /// <paramref name="header"/>.<para/>
+            /// If there is an error, the return value is (uint)-1 [== <see cref="uint.MaxValue"/>].
+            /// </returns>
+            public static unsafe uint GetRawInputData(IntPtr rawInput, out RawInputHeader header)
+            {
+                uint size = RawInputHeader.SizeInBytes;
+                fixed (RawInputHeader* headerPtr = &header)
+                {
+                    return GetRawInputData
+                    (
+                        rawInput,
+                        GetRawInputDataCommand.Header,
+                        (IntPtr)headerPtr,
+                        ref size,
+                        RawInputHeader.SizeInBytes
+                    );
+                }
+            }
+
+            /// <summary>
+            /// Retrieves raw input data from the specified device.
+            /// </summary>
+            /// <param name="rawInput">
+            /// A handle to the <see cref="Native.RawInput"/> structure. This comes from the lParam in
+            /// <see cref="WindowMessage.Input"/>.
+            /// </param>
+            /// <param name="data">The <see cref="Native.RawInput"/> structure to receive the raw data.</param>
+            /// <returns>
+            /// If the function is successful, the return value is the number of bytes copied into
+            /// <paramref name="data"/>.<para/>
+            /// If there is an error, the return value is (uint)-1 [== <see cref="uint.MaxValue"/>].
+            /// </returns>
+            public static unsafe uint GetRawInputData(IntPtr rawInput, out Native.RawInput data)
+            {
+                uint size = Native.RawInput.SizeInBytes;
+                fixed (Native.RawInput* dataPtr = &data)
+                {
+                    return GetRawInputData
+                    (
+                        rawInput,
+                        GetRawInputDataCommand.Input,
+                        (IntPtr)dataPtr,
+                        ref size,
+                        RawInputHeader.SizeInBytes
+                    );
+                }
+            }
+
+            /// <summary>
+            /// Retrieves the raw input from the specified device.<para/>
+            /// Consider using one of the other overloads for a better experience.
+            /// </summary>
+            /// <param name="rawInput">
+            /// A handle to the <see cref="Native.RawInput"/> structure. This comes from the lParam in
+            /// <see cref="WindowMessage.Input"/>.
+            /// </param>
+            /// <param name="command">The command flag.</param>
+            /// <param name="data">
+            /// A pointer to the data that comes from the <see cref="Native.RawInput"/> structure. This depends on the
+            /// value of <paramref name="command"/>. If <paramref name="data"/> is <see cref="IntPtr.Zero"/>,
+            /// the required size of the buffer is returned in <paramref name="size"/>.
+            /// </param>
+            /// <param name="size">The size, in bytes, of the data in <paramref name="data"/>.</param>
+            /// <param name="headerSize">The size, in bytes, of the <see cref="RawInputHeader"/> structure.</param>
+            /// <returns>
+            /// If <paramref name="data"/> is <see cref="IntPtr.Zero"/> and the function is successful, the return
+            /// value is 0. If <paramref name="data"/> is not <see cref="IntPtr.Zero"/> and the function is successful,
+            /// the return value is the number of bytes copied into <paramref name="data"/>.<para/>
+            /// If there is an error, the return value is (uint)-1 [== <see cref="uint.MaxValue"/>].
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static extern uint GetRawInputData
+            (
+                [In] IntPtr rawInput,
+                [In] GetRawInputDataCommand command,
+                [Out] [Optional] IntPtr data,
+                [In] [Out] ref uint size,
+                [In] uint headerSize
+            );
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/BroadcastDeviceInterface.cs b/Crow/src/backends/win32/User32/Structs/BroadcastDeviceInterface.cs
new file mode 100644 (file)
index 0000000..874402b
--- /dev/null
@@ -0,0 +1,58 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains information about a class of devices.
+    /// </summary>
+    public struct BroadcastDeviceInterface
+    {
+        /// <summary>
+        /// The size of this structure, in bytes. This is the size of the members plus the actual length of the
+        /// <see cref="Name"/> string (the null character is accounted for by the declaration of <see cref="Name"/>
+        /// as a one-character array).
+        /// </summary>
+        public uint Size;
+
+        /// <summary>
+        /// Official documentation states "Set to <see cref="DeviceBroadcastType.DeviceInterface"/>".<para/>
+        /// Only set to something else if you know what you're doing.
+        /// </summary>
+        public DeviceBroadcastType DeviceType;
+
+        /// <summary>
+        /// Reserved; do not use.
+        /// </summary>
+        public uint Reserved;
+
+        /// <summary>
+        /// The GUID for the interface device class.
+        /// </summary>
+        public Guid ClassGuid;
+
+        /// <summary>
+        /// Gets a string that specifies the name of the device.
+        /// </summary>
+        public unsafe string Name
+        {
+            get
+            {
+                fixed (char* namePtr = &_name)
+                {
+                    return Marshal.PtrToStringUni((IntPtr)namePtr);
+                }
+            }
+        }
+
+        /// <summary>
+        /// The first character of the <see cref="Name"/>.
+        /// </summary>
+        private char _name;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<BroadcastDeviceInterface>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/CreateStruct.cs b/Crow/src/backends/win32/User32/Structs/CreateStruct.cs
new file mode 100644 (file)
index 0000000..d8cb565
--- /dev/null
@@ -0,0 +1,92 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines the initialization parameters passed to the window procedure of an application. These members are
+    /// identical to the parameters of the
+    /// <see cref="User32.Window.CreateWindowEx(ExtendedWindowStyles, IntPtr, string,
+    /// WindowStyles, int, int, int, int, IntPtr, IntPtr, IntPtr, IntPtr)"/> function.
+    /// </summary>
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+    public struct CreateStruct
+    {
+        /// <summary>
+        /// Contains additional data which may be used to create the window. If the window is being created as a
+        /// result of a call to the CreateWindow or
+        /// <see cref="User32.Window.CreateWindowEx(ExtendedWindowStyles, IntPtr, string,
+        /// WindowStyles, int, int, int, int, IntPtr, IntPtr, IntPtr, IntPtr)"/>
+        /// function, this member contains the value of the lpParam parameter specified in the function call.<para/>
+        /// If the window being created is a MDI client window, this member contains a pointer to a CLIENTCREATESTRUCT
+        /// structure. If the window being created is a MDI child window, this member contains a pointer to an
+        /// MDICREATESTRUCT structure.<para/>
+        /// If the window is being created from a dialog template, this member is the address of a <see cref="short"/>
+        /// value that specifies the size, in bytes, of the window creation data. The value is immediately followed
+        /// by the creation data.
+        /// </summary>
+        public IntPtr CreateParams;
+
+        /// <summary>
+        /// Handle to the module that owns the new window.
+        /// </summary>
+        public IntPtr Instance;
+
+        /// <summary>
+        /// Handle to the menu to be used by the new window.
+        /// </summary>
+        public IntPtr Menu;
+
+        /// <summary>
+        /// Handle to the parent window, if the window is a child window.
+        /// If the window is owned, this member identifies the owner window.
+        /// If the window is not a child or owned window, this member is null.
+        /// </summary>
+        public IntPtr Parent;
+
+        /// <summary>
+        /// Specifies the height of the new window, in pixels.
+        /// </summary>
+        public int Height;
+
+        /// <summary>
+        /// Specifies the width of the new window, in pixels.
+        /// </summary>
+        public int Width;
+
+        /// <summary>
+        /// Specifies the y-coordinate of the upper left corner of the new window.
+        /// If the new window is a child window, coordinates are relative to the parent window.
+        /// Otherwise, the coordinates are relative to the screen origin.
+        /// </summary>
+        public int Y;
+
+        /// <summary>
+        /// Specifies the x-coordinate of the upper left corner of the new window.
+        /// If the new window is a child window, coordinates are relative to the parent window.
+        /// Otherwise, the coordinates are relative to the screen origin.
+        /// </summary>
+        public int X;
+
+        /// <summary>
+        /// Specifies the style for the new window.
+        /// </summary>
+        public WindowStyles Style;
+
+        /// <summary>
+        /// Pointer to a null-terminated string that specifies the name of the new window.
+        /// </summary>
+        public string Name;
+
+        /// <summary>
+        /// Either a pointer to a null-terminated string or an atom that specifies the class name
+        /// of the new window.
+        /// </summary>
+        public IntPtr ClassName;
+
+        /// <summary>
+        /// The extended window style for the new window.
+        /// </summary>
+        public ExtendedWindowStyles ExtendedStyle;
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/DeviceMode.cs b/Crow/src/backends/win32/User32/Structs/DeviceMode.cs
new file mode 100644 (file)
index 0000000..9f3c13d
--- /dev/null
@@ -0,0 +1,334 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Specifies characteristics of display and print devices.<para/>
+    /// Before accessing a field, check the <see cref="Fields"/> field to determine whether any given field is set.
+    /// </summary>
+    [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
+    public struct DeviceMode
+    {
+        /// <summary>
+        /// Length of the <see cref="DeviceName"/> in characters.
+        /// </summary>
+        public const int DeviceNameLength = 32;
+
+        /// <summary>
+        /// Length of the <see cref="FormName"/> in characters.
+        /// </summary>
+        public const int FormNameLength = 32;
+
+        /// <summary>
+        /// Default value for <see cref="SpecVersion"/> and <see cref="DriverVersion"/> (see the documentation of those
+        /// fields for more information).
+        /// </summary>
+        public const ushort DefaultSpecVersion = 800;
+
+        /// <summary>
+        /// A zero-terminated character array that specifies the "friendly" name of the printer or display.
+        /// </summary>
+        [FieldOffset(0)]
+        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
+        public string DeviceName;
+
+        /// <summary>
+        /// The version number of the initialization data specification on which the structure is based.
+        /// The current version number is identified by <see cref="DefaultSpecVersion"/>.
+        /// </summary>
+        [FieldOffset(64)]
+        public ushort SpecVersion;
+
+        /// <summary>
+        /// For a printer, specifies the printer driver version number assigned by the printer driver developer.<para/>
+        /// Display drivers can set this member to <see cref="DefaultSpecVersion"/>.
+        /// </summary>
+        [FieldOffset(66)]
+        public ushort DriverVersion;
+
+        /// <summary>
+        /// Specifies the size in bytes of the public DEVMODEW structure, not including any private,
+        /// driver-specified members identified by the dmDriverExtra member.<para/>
+        /// Set this to <see cref="SizeInBytes"/>.
+        /// </summary>
+        [FieldOffset(68)]
+        public ushort Size;
+
+        /// <summary>
+        /// Specifies the number of bytes of private driver data that follow the public structure members.
+        /// If a device driver does not provide private members, this member should be set to zero.
+        /// </summary>
+        [FieldOffset(70)]
+        public ushort DriverExtra;
+
+        /// <summary>
+        /// Specifies bit flags identifying which of the following members are in use.
+        /// For example, the <see cref="DeviceModeFieldFlags.Orientation"/> flag is set when the
+        /// <see cref="PrinterDeviceOptions.Orientation"/> member contains valid data.
+        /// </summary>
+        [FieldOffset(72)]
+        public DeviceModeFieldFlags Fields;
+
+        /// <summary>
+        /// Provides printer-specific device mode options.
+        /// </summary>
+        [FieldOffset(76)]
+        public PrinterDeviceOptions PrinterOptions;
+
+        /// <summary>
+        /// Provides display-specific device mode options.
+        /// </summary>
+        [FieldOffset(76)]
+        public DisplayDeviceOptions DisplayOptions;
+
+        /// <summary>
+        /// For printers, specifies whether a color printer should print color or monochrome.
+        /// </summary>
+        [FieldOffset(92)]
+        public PrinterColor Color;
+
+        /// <summary>
+        /// For printers, specifies duplex (double-sided) printing for duplex-capable printers.
+        /// </summary>
+        [FieldOffset(94)]
+        public PrinterDuplex Duplex;
+
+        /// <summary>
+        /// For printers, specifies the y resolution of the printer, in DPI. If this member is used,
+        /// the <see cref="PrinterDeviceOptions.PrintQuality"/> member specifies the x resolution.
+        /// </summary>
+        [FieldOffset(96)]
+        public short YResolution;
+
+        /// <summary>
+        /// For printers, specifies how TrueType fonts should be printed.
+        /// </summary>
+        [FieldOffset(98)]
+        public PrinterTrueTypeOption TrueTypeOption;
+
+        /// <summary>
+        /// For printers, specifies whether multiple copies should be collated. 1 == true, 0 == false.
+        /// </summary>
+        [FieldOffset(100)]
+        public short Collate;
+
+        /// <summary>
+        /// Gets the name of the printer form to use; such as "Letter" or "Legal".
+        /// This must be a name that can be obtain by calling the Win32 EnumForms function.
+        /// </summary>
+        public unsafe string FormName
+        {
+            get
+            {
+                fixed (char* formNamePtr = &_formName)
+                {
+                    return Marshal.PtrToStringUni((IntPtr)formNamePtr);
+                }
+            }
+        }
+
+        /// <summary>
+        /// With the current struct layout (which is set in stone because of interoperability with the Windows API),
+        /// there is no way to put a `string` type at this position(string is a reference type -> there is a pointer
+        /// here, which is either 4 or 8 bytes depending on the platform). This means that a string can never be
+        /// properly aligned at position 102 (which, again, can't be changed). This is why the <see cref="FormName"/>
+        /// property exists.
+        /// </summary>
+        [FieldOffset(102)]
+        private char _formName;
+
+        /// <summary>
+        /// For displays, specifies the number of logical pixels per inch of a display device and should be equal
+        /// to the ulLogPixels member of the GDIINFO structure.
+        /// </summary>
+        [FieldOffset(166)]
+        public ushort LogPixels;
+
+        /// <summary>
+        /// For displays, specifies the color resolution, in bits per pixel, of a display device.
+        /// </summary>
+        [FieldOffset(168)]
+        public uint BitsPerPixel;
+
+        /// <summary>
+        /// For displays, specifies the width, in pixels, of the visible device surface.
+        /// </summary>
+        [FieldOffset(172)]
+        public uint WidthInPixels;
+
+        /// <summary>
+        /// For displays, specifies the height, in pixels, of the visible device surface.
+        /// </summary>
+        [FieldOffset(176)]
+        public uint HeightInPixels;
+
+        /// <summary>
+        /// For displays, specifies a display device's display mode.
+        /// </summary>
+        [FieldOffset(180)]
+        public DisplayFlags DisplayFlags;
+
+        /// <summary>
+        /// For printers, specifies whether the print system handles "N-up" printing
+        /// (playing multiple EMF logical pages onto a single physical page).
+        /// </summary>
+        [FieldOffset(180)]
+        public uint Nup;
+
+        /// <summary>
+        /// For displays, specifies the frequency, in hertz, of a display device in its current mode.
+        /// </summary>
+        [FieldOffset(184)]
+        public uint DisplayFrequency;
+
+        /// <summary>
+        /// For printers, specifies how Image Color Management (ICM) is handled. For a non-ICM application, this field
+        /// determines if ICM is enabled or disabled. For ICM applications, the system examines this field to determine
+        /// how to handle ICM support.<para/>
+        /// The value of this field can be one of the pre-defined <see cref="PrinterIcmMethod"/> values or a printer
+        /// driver-defined value greater than or equal to <see cref="PrinterIcmMethod.User"/>.
+        /// </summary>
+        [FieldOffset(188)]
+        public PrinterIcmMethod IcmMethod;
+
+        /// <summary>
+        /// For printers, specifies which color matching method, or intent, is used by default. This field is primarily
+        /// for non-ICM applications. ICM applications can establish intents by using the ICM functions.<para/>
+        /// The value of this field can be one of the pre-defined <see cref="PrinterIcmIntent"/> values or a printer
+        /// driver-defined value greater than or equal to <see cref="PrinterIcmIntent.User"/>.
+        /// </summary>
+        [FieldOffset(192)]
+        public PrinterIcmIntent IcmIntent;
+
+        /// <summary>
+        /// For printers, specifies the type of media being printed on.<para/>
+        /// The value of this field can be one of the pre-defined <see cref="PrinterMediaType"/> values or a printer
+        /// driver-defined value greater than or equal to <see cref="PrinterMediaType.User"/>.
+        /// </summary>
+        [FieldOffset(196)]
+        public PrinterMediaType MediaType;
+
+        /// <summary>
+        /// Specifies how dithering is to be done.<para/>
+        /// The value of this field can be one of the pre-defined <see cref="PrinterDitherType"/> values or a printer
+        /// driver-defined value greater than or equal to <see cref="PrinterDitherType.User"/>.
+        /// </summary>
+        [FieldOffset(200)]
+        public PrinterDitherType DitherType;
+
+        /// <summary>
+        /// Is reserved for system use and must be zero.
+        /// </summary>
+        [FieldOffset(204)]
+        public uint Reserved1;
+
+        /// <summary>
+        /// Is reserved for system use and must be zero.
+        /// </summary>
+        [FieldOffset(208)]
+        public uint Reserved2;
+
+        /// <summary>
+        /// Must be zero.
+        /// </summary>
+        [FieldOffset(212)]
+        public uint PanningWidth;
+
+        /// <summary>
+        /// Must be zero.
+        /// </summary>
+        [FieldOffset(216)]
+        public uint PanningHeight;
+
+        /// <summary>
+        /// The size of the structure in bytes.
+        /// </summary>
+        public static readonly ushort SizeInBytes = (ushort)Marshal.SizeOf<DeviceMode>();
+
+        /// <summary>
+        /// Contains printer-specific device options.
+        /// </summary>
+        public struct PrinterDeviceOptions
+        {
+            /// <summary>
+            /// For printers, specifies the paper orientation.
+            /// </summary>
+            public PrinterPaperOrientation Orientation;
+
+            /// <summary>
+            /// For printers, specifies the size of the paper to be printed on. This member must be zero if the length
+            /// and width of the paper are specified by the <see cref="PaperLength"/> and <see cref="PaperWidth"/>
+            /// members.
+            /// </summary>
+            public PrinterPaperSize PaperSize;
+
+            /// <summary>
+            /// For printers, specifies the length of the paper, in units of 1/10 of a millimeter.
+            /// This value overrides the length of the paper specified by the <see cref="PaperSize"/> member,
+            /// and is used if the paper is of a custom size, or if the device is a dot matrix printer,
+            /// which can print a page of arbitrary length.
+            /// </summary>
+            public short PaperLength;
+
+            /// <summary>
+            /// For printers, specifies the width of the paper, in units of 1/10 of a millimeter.
+            /// This value overrides the width of the paper specified by the <see cref="PaperSize"/> member.
+            /// This member must be used if <see cref="PaperLength"/> is used.
+            /// </summary>
+            public short PaperWidth;
+
+            /// <summary>
+            /// For printers, specifies the percentage by which the image is to be scaled for printing. The image's
+            /// page size is scaled to the physical page by a factor of <see cref="Scale"/>/100. For example,
+            /// a 17-inch by 22-inch image with a scale value of 100 requires 17x22-inch paper, while the same image
+            /// with a scale value of 50 should print as half-sized and fit on letter-sized paper.
+            /// </summary>
+            public short Scale;
+
+            /// <summary>
+            /// For printers, specifies the number of copies to be printed, if the device supports multiple copies.
+            /// </summary>
+            public short Copies;
+
+            /// <summary>
+            /// For printers, specifies the printer's default input bin. If the specified constant is
+            /// <see cref="PrinterDefaultSource.FormSource"/>, the input bin should be selected automatically.
+            /// </summary>
+            public PrinterDefaultSource DefaultSource;
+
+            /// <summary>
+            /// For printers, specifies the printer resolution. Either set this to one of the
+            /// <see cref="PrinterPrintQuality"/> values, or use a positive value specifying the number of DPI for the
+            /// x resolution, with the y resolution being specified by <see cref="YResolution"/>.
+            /// </summary>
+            public PrinterPrintQuality PrintQuality;
+        }
+
+        /// <summary>
+        /// Contains display-specific device options.
+        /// </summary>
+        public struct DisplayDeviceOptions
+        {
+            /// <summary>
+            /// For displays, specifies a <see cref="Point"/> structure containing the x- and y-coordinates of the
+            /// upper-left corner of the display, in desktop coordinates. This member is used to determine the
+            /// relative position of monitors in a multiple monitor environment.
+            /// </summary>
+            public Point Position;
+
+            /// <summary>
+            /// For displays, specifies the orientation at which images should be presented.
+            /// </summary>
+            public DisplayOrientation DisplayOrientation;
+
+            /// <summary>
+            /// For fixed-resolution displays, specifies how the device can present a lower-resolution mode on a
+            /// higher-resolution display. For example, if a display device's resolution is fixed at 1024 X 768,
+            /// and its mode is set to 640 x 480, the device can either display a 640 X 480 image within the 1024 X 768
+            /// screen space, or stretch the 640 X 480 image to fill the larger screen space.
+            /// </summary>
+            public DisplayFixedOutputType DisplayFixedOutput;
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/DisplayDevice.cs b/Crow/src/backends/win32/User32/Structs/DisplayDevice.cs
new file mode 100644 (file)
index 0000000..db46d3d
--- /dev/null
@@ -0,0 +1,55 @@
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Receives information about the display device specified by the iDevNum parameter of the
+    /// <see cref="User32.DeviceContext.EnumDisplayDevices(string, uint, out DisplayDevice, uint)"/> function.
+    /// </summary>
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+    public struct DisplayDevice
+    {
+        /// <summary>
+        /// Size, in bytes, of the structure. This must be initialized prior to calling
+        /// <see cref="User32.DeviceContext.EnumDisplayDevices(string, uint, out DisplayDevice, uint)"/>.
+        /// </summary>
+        /// <seealso cref="SizeInBytes"/>
+        public uint Size;
+
+        /// <summary>
+        /// An array of characters identifying the device name.
+        /// This is either the adapter device or the monitor device.
+        /// </summary>
+        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
+        public string DeviceName;
+
+        /// <summary>
+        /// An array of characters containing the device context string.
+        /// This is either a description of the display adapter or of the display monitor.
+        /// </summary>
+        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
+        public string DeviceString;
+
+        /// <summary>
+        /// Device state flags. It can be any reasonable combination of <see cref="DisplayDeviceStateFlags"/>.
+        /// </summary>
+        public DisplayDeviceStateFlags StateFlags;
+
+        /// <summary>
+        /// Not used.
+        /// </summary>
+        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
+        public string DeviceID;
+
+        /// <summary>
+        /// Reserved.
+        /// </summary>
+        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
+        public string DeviceKey;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<DisplayDevice>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/ExtendedWindowClass.cs b/Crow/src/backends/win32/User32/Structs/ExtendedWindowClass.cs
new file mode 100644 (file)
index 0000000..3bf68a3
--- /dev/null
@@ -0,0 +1,98 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains window class information. It is used with the
+    /// <see cref="User32.WindowClass.RegisterClassEx(ref ExtendedWindowClass)"/> and
+    /// <see cref="User32.WindowClass.GetClassInfoEx(IntPtr, string, out ExtendedWindowClass)"/> functions.<para/>
+    /// The <see cref="ExtendedWindowClass"/> structure is similar to the <see cref="WindowClass"/> structure.
+    /// There are two differences. <see cref="ExtendedWindowClass"/> includes the <see cref="Size"/> member, which
+    /// specifies the size of the structure, and the <see cref="IconSmall"/> member, which contains a handle
+    /// to a small icon associated with the window class.
+    /// </summary>
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+    public struct ExtendedWindowClass
+    {
+        /// <summary>
+        /// The size, in bytes, of this structure. Set this member to <see cref="SizeInBytes"/>.<para/>
+        /// Be sure to set this member before calling the
+        /// <see cref="User32.WindowClass.GetClassInfoEx(IntPtr, IntPtr, out ExtendedWindowClass)"/> function.
+        /// </summary>
+        public uint Size;
+
+        /// <summary>
+        /// The class style(s). This member can be any combination of <see cref="WindowClassStyles"/>.
+        /// </summary>
+        public WindowClassStyles Style;
+
+        /// <summary>
+        /// A pointer to the window procedure. You must use the CallWindowProc function to call the window procedure.
+        /// </summary>
+        public WindowProc WindowProc;
+
+        /// <summary>
+        /// The number of extra bytes to allocate following the window-class structure.
+        /// The system initializes the bytes to zero.
+        /// </summary>
+        public int ClassExtra;
+
+        /// <summary>
+        /// The number of extra bytes to allocate following the window instance. The system initializes the bytes
+        /// to zero. If an application uses <see cref="ExtendedWindowClass"/> to register a dialog box created by
+        /// using the CLASS directive in the resource file, it must set this member to DLGWINDOWEXTRA.
+        /// </summary>
+        public int WindowExtra;
+
+        /// <summary>
+        /// A handle to the instance that contains the window procedure for the class.
+        /// </summary>
+        public IntPtr Instance;
+
+        /// <summary>
+        /// A handle to the class icon. This member must be a handle to an icon resource.
+        /// If this member is <see cref="IntPtr.Zero"/>, the system provides a default icon.
+        /// </summary>
+        public IntPtr Icon;
+
+        /// <summary>
+        /// A handle to the class cursor. This member must be a handle to a cursor resource.
+        /// If this member is <see cref="IntPtr.Zero"/>, an application must explicitly set the cursor shape
+        /// whenever the mouse moves into the application's window.
+        /// </summary>
+        public IntPtr Cursor;
+
+        /// <summary>
+        /// A handle to the class background brush. This member can be a handle to the brush to be used for
+        /// painting the background, or it can be a color value.<para/>
+        /// For more information on setting this to a color value, check the official documentation.
+        /// </summary>
+        public IntPtr Background;
+
+        /// <summary>
+        /// Pointer to a string that specifies the resource name of the class menu, as the name appears in the
+        /// resource file. If this member is null, windows belonging to this class have no default menu.
+        /// </summary>
+        public string MenuName;
+
+        /// <summary>
+        /// A string specifying the window class name. The class name can be any name registered with
+        /// RegisterClass or <see cref="User32.WindowClass.RegisterClassEx(ref ExtendedWindowClass)"/>,
+        /// or any of the predefined control-class names.
+        /// </summary>
+        public string ClassName;
+
+        /// <summary>
+        /// A handle to a small icon that is associated with the window class. If this member is
+        /// <see cref="IntPtr.Zero"/>, the system searches the icon resource specified by the hIcon member for an icon
+        /// of the appropriate size to use as the small icon.
+        /// </summary>
+        public IntPtr IconSmall;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<ExtendedWindowClass>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/IconInfo.cs b/Crow/src/backends/win32/User32/Structs/IconInfo.cs
new file mode 100644 (file)
index 0000000..ff0f45c
--- /dev/null
@@ -0,0 +1,49 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains information about an icon or a cursor.
+    /// </summary>
+    public struct IconInfo
+    {
+        /// <summary>
+        /// Specifies whether this structure defines an icon or a cursor. A
+        /// value of true specifies an icon; false specifies a cursor.
+        /// </summary>
+        public bool Icon;
+
+        /// <summary>
+        /// The x-coordinate of a cursor's hot spot. If this structure defines
+        /// an icon, the hot spot is always in the center of the icon, and
+        /// this member is ignored.
+        /// </summary>
+        public uint XHotspot;
+
+        /// <summary>
+        /// The y-coordinate of a cursor's hot spot. If this structure defines
+        /// an icon, the hot spot is always in the center of the icon, and
+        /// this member is ignored.
+        /// </summary>
+        public uint YHotspot;
+
+        /// <summary>
+        /// The icon bitmask bitmap. If this structure defines a black and
+        /// white icon, this bitmask is formatted so that the upper half is
+        /// the icon AND bitmask and the lower half is the icon XOR bitmask.
+        /// Under this condition, the height should be an even multiple of
+        /// two. If this structure defines a color icon, this mask only
+        /// defines the AND bitmask of the icon.
+        /// </summary>
+        public IntPtr BitmapMask;
+
+        /// <summary>
+        /// A handle to the icon color bitmap. This member can be optional if
+        /// this structure defines a black and white icon. The AND bitmask of
+        /// <see cref="BitmapMask"/> is applied with the SRCAND flag to the destination;
+        /// subsequently, the color bitmap is applied (using XOR) to the
+        /// destination by using the SRCINVERT flag.
+        /// </summary>
+        public IntPtr BitmapColor;
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/MonitorInfo.cs b/Crow/src/backends/win32/User32/Structs/MonitorInfo.cs
new file mode 100644 (file)
index 0000000..908777c
--- /dev/null
@@ -0,0 +1,42 @@
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains information about a display monitor.
+    /// </summary>
+    public struct MonitorInfo
+    {
+        /// <summary>
+        /// The size of the structure, in bytes. Set this member to <see cref="SizeInBytes"/> before calling the
+        /// <see cref="User32.Monitor.GetMonitorInfo(System.IntPtr, out MonitorInfo)"/> function.
+        /// </summary>
+        public uint Size;
+
+        /// <summary>
+        /// A <see cref="Rect"/> structure that specifies the display monitor rectangle, expressed in virtual-screen
+        /// coordinates. Note that if the monitor is not the primary display monitor, some of the rectangle's
+        /// coordinates may be negative values.
+        /// </summary>
+        public Rect Monitor;
+
+        /// <summary>
+        /// A <see cref="Rect"/> structure that specifies the work area rectangle of the display monitor,
+        /// expressed in virtual-screen coordinates. Note that if the monitor is not the primary display monitor,
+        /// some of the rectangle's coordinates may be negative values.
+        /// </summary>
+        public Rect Work;
+
+        /// <summary>
+        /// A set of flags that represent attributes of the display monitor.<para/>
+        /// The (currently only) defined flag is "Primary" with a value of 1, so a value of 1 means the display is
+        /// primary while a value of 0 means that it is not.
+        /// </summary>
+        public uint Flags;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<MonitorInfo>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/MouseMovePoint.cs b/Crow/src/backends/win32/User32/Structs/MouseMovePoint.cs
new file mode 100644 (file)
index 0000000..8be2fa2
--- /dev/null
@@ -0,0 +1,36 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains information about the mouse's location in screen coordinates.
+    /// </summary>
+    public struct MouseMovePoint
+    {
+        /// <summary>
+        /// The x-coordinate of the mouse.
+        /// </summary>
+        public int X;
+
+        /// <summary>
+        /// The y-coordinate of the mouse.
+        /// </summary>
+        public int Y;
+
+        /// <summary>
+        /// The time stamp of the mouse coordinate.
+        /// </summary>
+        public uint Time;
+
+        /// <summary>
+        /// Additional information associated with this coordinate.
+        /// </summary>
+        public IntPtr ExtraInfo;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<MouseMovePoint>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/Msg.cs b/Crow/src/backends/win32/User32/Structs/Msg.cs
new file mode 100644 (file)
index 0000000..f31c4db
--- /dev/null
@@ -0,0 +1,50 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains message information from a thread's message queue.
+    /// </summary>
+    public struct Msg
+    {
+        /// <summary>
+        /// A handle to the window whose window procedure receives the message. This member is
+        /// <see cref="System.IntPtr.Zero"/> when the message is a thread message.
+        /// </summary>
+        public IntPtr HWnd;
+
+        /// <summary>
+        /// The message identifier. Applications can only use the low word; the high word is reserved by the system.
+        /// </summary>
+        public WindowMessage Message;
+
+        /// <summary>
+        /// Additional information about the message.The exact meaning depends on the value of the
+        /// <see cref="Message"/> member.
+        /// </summary>
+        public IntPtr WParam;
+
+        /// <summary>
+        /// Additional information about the message.The exact meaning depends on the value of the
+        /// <see cref="Message"/> member.
+        /// </summary>
+        public IntPtr LParam;
+
+        /// <summary>
+        /// The time at which the message was posted.
+        /// </summary>
+        public uint Time;
+
+        /// <summary>
+        /// The cursor position, in screen coordinates, when the message was posted.
+        /// </summary>
+        public Point Point;
+
+        /// <inheritdoc/>
+        public override string ToString()
+        {
+            return $"msg=0x{(int)Message:x} ({Message.ToString()}) hwnd=0x{HWnd.ToInt32():x}"
+                + $"wparam=0x{WParam.ToInt32():x} lparam=0x{LParam.ToInt32():x} pt={Point}";
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/Point.cs b/Crow/src/backends/win32/User32/Structs/Point.cs
new file mode 100644 (file)
index 0000000..bd3fe05
--- /dev/null
@@ -0,0 +1,49 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines the X and Y coordinates of a point.
+    /// </summary>
+    public struct Point
+    {
+        /// <summary>
+        /// The X coordinate of this point.
+        /// </summary>
+        public int X;
+
+        /// <summary>
+        /// The Y coordinate of this point.
+        /// </summary>
+        public int Y;
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Point"/> struct with the given X and Y coordinates.
+        /// </summary>
+        /// <param name="x">The X coordinate.</param>
+        /// <param name="y">The Y coordinate.</param>
+        public Point(int x, int y)
+        {
+            X = x;
+            Y = y;
+        }
+
+        /// <summary>
+        /// Converts a <see cref="Point"/> structure used for interoperability with the Windows API to a
+        /// <see cref="System.Drawing.Point"/>.
+        /// </summary>
+        /// <param name="point">The OpenTK.NT.Native.Point structure to convert.</param>
+        public static implicit operator System.Drawing.Point(Point point)
+        {
+            return new System.Drawing.Point(point.X, point.Y);
+        }
+
+        /// <summary>
+        /// Converts a <see cref="System.Drawing.Point"/> to a <see cref="Point"/>
+        /// structure meant for interoperability with the Windows API.
+        /// </summary>
+        /// <param name="point">The System.Drawing.Point structure to convert.</param>
+        public static implicit operator Point(System.Drawing.Point point) => new Point(point.X, point.Y);
+
+        /// <inheritdoc/>
+        public override string ToString() => $"{{X={X},Y={Y}}}";
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawHid.cs b/Crow/src/backends/win32/User32/Structs/RawHid.cs
new file mode 100644 (file)
index 0000000..f415e71
--- /dev/null
@@ -0,0 +1,66 @@
+using System;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// The RawHID structure describes the format of the raw input from a Human Interface Device (HID).
+    /// </summary>
+    /// <remarks>
+    /// Each <see cref="WindowMessage.Input"/> can indicate several inputs, but all of the inputs come from the same
+    /// HID. The size of the <see cref="RawData"/> array is <see cref="SizeHid"/> * <see cref="Count"/>.
+    /// </remarks>
+    public struct RawHid
+    {
+        /// <summary>
+        /// Size, in bytes, of each HID input in bRawData.
+        /// </summary>
+        public uint SizeHid;
+
+        /// <summary>
+        /// Number of HID inputs in bRawData.
+        /// </summary>
+        public uint Count;
+
+        /// <summary>
+        /// The first byte of the raw input data.
+        /// </summary>
+        public byte RawData;
+
+        /// <summary>
+        /// Gets the raw input data as an array of bytes.
+        /// </summary>
+        /// <returns>An array of raw input data.</returns>
+        public unsafe byte[] GetRawData()
+        {
+            byte[] result = new byte[SizeHid * Count];
+
+            fixed (byte* dataPtr = &RawData)
+            {
+                for (int i = 0; i < result.Length; i++)
+                {
+                    result[i] = *(dataPtr + i);
+                }
+            }
+
+            return result;
+        }
+
+        /// <summary>
+        /// Access the raw input data at a given index.
+        /// </summary>
+        /// <param name="index">The index at which to access the raw input data.</param>
+        /// <returns>A byte of raw input data at the given index.</returns>
+        public unsafe byte GetRawDataAt(int index)
+        {
+            if (index < 0 || index > SizeHid * Count)
+            {
+                throw new ArgumentOutOfRangeException(nameof(index));
+            }
+
+            fixed (byte* dataPtr = &RawData)
+            {
+                return *(dataPtr + index);
+            }
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawInput.cs b/Crow/src/backends/win32/User32/Structs/RawInput.cs
new file mode 100644 (file)
index 0000000..7d8f0bf
--- /dev/null
@@ -0,0 +1,26 @@
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains the raw input from a device.
+    /// </summary>
+    [StructLayout(LayoutKind.Sequential)]
+    public struct RawInput
+    {
+        /// <summary>
+        /// The raw input data.
+        /// </summary>
+        public RawInputHeader Header;
+
+        /// <summary>
+        /// Contains device-specific raw input data.
+        /// </summary>
+        public RawInputData Data;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<RawInput>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawInputData.cs b/Crow/src/backends/win32/User32/Structs/RawInputData.cs
new file mode 100644 (file)
index 0000000..3c4c73e
--- /dev/null
@@ -0,0 +1,34 @@
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// A union containing raw input data from a device.
+    /// </summary>
+    [StructLayout(LayoutKind.Explicit)]
+    public struct RawInputData
+    {
+        /// <summary>
+        /// If the data comes from a mouse, this is the raw input data.
+        /// </summary>
+        [FieldOffset(0)]
+        public RawMouse Mouse;
+
+        /// <summary>
+        /// If the data comes from a keyboard, this is the raw input data.
+        /// </summary>
+        [FieldOffset(0)]
+        public RawKeyboard Keyboard;
+
+        /// <summary>
+        /// If the data comes from a HID, this is the raw input data.
+        /// </summary>
+        [FieldOffset(0)]
+        public RawHid Hid;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<RawInputData>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawInputDevice.cs b/Crow/src/backends/win32/User32/Structs/RawInputDevice.cs
new file mode 100644 (file)
index 0000000..04242df
--- /dev/null
@@ -0,0 +1,83 @@
+using System;
+using System.Runtime.InteropServices;
+using OpenToolkit.Input.Hid;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines information for the raw input devices.
+    /// </summary>
+    public struct RawInputDevice
+    {
+        /// <summary>
+        /// Top level collection Usage page for the raw input device.
+        /// </summary>
+        public HidPage UsagePage;
+
+        /// <summary>
+        /// Top level collection Usage for the raw input device.
+        /// </summary>
+        public ushort Usage;
+
+        /// <summary>
+        /// Mode flag that specifies how to interpret the information provided by UsagePage and Usage.
+        /// By default, the operating system sends raw input from devices with the specified top level collection (TLC)
+        /// to the registered application as long as it has the window focus.
+        /// </summary>
+        public RawInputDeviceFlags Flags;
+
+        /// <summary>
+        /// Handle to the target window. If NULL it follows the keyboard focus.
+        /// </summary>
+        public IntPtr Target;
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="RawInputDevice"/> struct for generic desktop usage.
+        /// </summary>
+        /// <param name="usage">HID usage for the Generic Desktop page.</param>
+        /// <param name="flags">Specifies how to interpret the raw input data.</param>
+        /// <param name="target">Handle to the target window.</param>
+        public RawInputDevice(HidGenericDesktopUsage usage, RawInputDeviceFlags flags, IntPtr target)
+            : this((ushort)usage, flags, target, HidPage.GenericDesktop)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="RawInputDevice"/> struct for consumer usage.
+        /// </summary>
+        /// <param name="usage">HID usage for the Consumer page.</param>
+        /// <param name="flags">Specifies how to interpret the raw input data.</param>
+        /// <param name="target">Handle to the target window.</param>
+        public RawInputDevice(HidConsumerUsage usage, RawInputDeviceFlags flags, IntPtr target)
+            : this((ushort)usage, flags, target, HidPage.Consumer)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="RawInputDevice"/> struct for simulation usage.
+        /// </summary>
+        /// <param name="usage">HID usage for the Simulation page.</param>
+        /// <param name="flags">Specifies how to interpret the raw input data.</param>
+        /// <param name="target">Handle to the target window.</param>
+        public RawInputDevice(HidSimulationUsage usage, RawInputDeviceFlags flags, IntPtr target)
+            : this((ushort)usage, flags, target, HidPage.Simulation)
+        {
+        }
+
+        private RawInputDevice(ushort usage, RawInputDeviceFlags flags, IntPtr target, HidPage usagePage)
+        {
+            Usage = usage;
+            Flags = flags;
+            Target = target;
+            UsagePage = usagePage;
+        }
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<RawInputDevice>();
+
+        /// <inheritdoc/>
+        public override string ToString() => $"{UsagePage}/{Usage}, flags: {Flags}, window: {Target}";
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawInputDeviceInfo.cs b/Crow/src/backends/win32/User32/Structs/RawInputDeviceInfo.cs
new file mode 100644 (file)
index 0000000..07cca2b
--- /dev/null
@@ -0,0 +1,49 @@
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines the raw input data coming from any device.
+    /// </summary>
+    [StructLayout(LayoutKind.Explicit)]
+    public struct RawInputDeviceInfo
+    {
+        /// <summary>
+        /// Size, in bytes, of the <see cref="RawInputDeviceInfo"/> structure.
+        /// </summary>
+        [FieldOffset(0)]
+        public uint Size;
+
+        /// <summary>
+        /// Type of raw input data.
+        /// </summary>
+        [FieldOffset(4)]
+        public RawInputDeviceType Type;
+
+        /// <summary>
+        /// If <see cref="Type"/> is <see cref="RawInputDeviceType.Mouse"/>, this is the
+        /// <see cref="RawInputDeviceInfoMouse"/> structure that defines the mouse.
+        /// </summary>
+        [FieldOffset(8)]
+        public RawInputDeviceInfoMouse Mouse;
+
+        /// <summary>
+        /// If <see cref="Type"/> is <see cref="RawInputDeviceType.Keyboard"/>, this is the
+        /// <see cref="RawInputDeviceInfoKeyboard"/> structure that defines the keyboard.
+        /// </summary>
+        [FieldOffset(8)]
+        public RawInputDeviceInfoKeyboard Keyboard;
+
+        /// <summary>
+        /// If <see cref="Type"/> is <see cref="RawInputDeviceType.Hid"/>, this is the
+        /// <see cref="RawInputDeviceInfoHid"/> structure that defines the HID.
+        /// </summary>
+        [FieldOffset(8)]
+        public RawInputDeviceInfoHid Hid;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<RawInputDeviceInfo>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawInputDeviceInfoHid.cs b/Crow/src/backends/win32/User32/Structs/RawInputDeviceInfoHid.cs
new file mode 100644 (file)
index 0000000..403e221
--- /dev/null
@@ -0,0 +1,33 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines the raw input data coming from the specified Human Interface Device (HID).
+    /// </summary>
+    public struct RawInputDeviceInfoHid
+    {
+        /// <summary>
+        /// Vendor ID for the HID.
+        /// </summary>
+        public uint VendorId;
+
+        /// <summary>
+        /// Product ID for the HID.
+        /// </summary>
+        public uint ProductId;
+
+        /// <summary>
+        /// Version number for the HID.
+        /// </summary>
+        public uint VersionNumber;
+
+        /// <summary>
+        /// Top-level collection Usage Page for the device.
+        /// </summary>
+        public ushort UsagePage;
+
+        /// <summary>
+        /// Top-level collection Usage for the device.
+        /// </summary>
+        public ushort Usage;
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawInputDeviceInfoKeyboard.cs b/Crow/src/backends/win32/User32/Structs/RawInputDeviceInfoKeyboard.cs
new file mode 100644 (file)
index 0000000..62cd837
--- /dev/null
@@ -0,0 +1,41 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines the raw input data coming from the specified keyboard.
+    /// </summary>
+    /// <remarks>
+    /// For the keyboard, the Usage Page is 1 and the Usage is 6.
+    /// </remarks>
+    public struct RawInputDeviceInfoKeyboard
+    {
+        /// <summary>
+        /// Type of the keyboard.
+        /// </summary>
+        public uint Type;
+
+        /// <summary>
+        /// Subtype of the keyboard.
+        /// </summary>
+        public uint SubType;
+
+        /// <summary>
+        /// Scan code mode.
+        /// </summary>
+        public uint KeyboardMode;
+
+        /// <summary>
+        /// Number of function keys on the keyboard.
+        /// </summary>
+        public uint NumberOfFunctionKeys;
+
+        /// <summary>
+        /// Number of LED indicators on the keyboard.
+        /// </summary>
+        public uint NumberOfIndicators;
+
+        /// <summary>
+        /// Total number of keys on the keyboard.
+        /// </summary>
+        public uint NumberOfKeysTotal;
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawInputDeviceInfoMouse.cs b/Crow/src/backends/win32/User32/Structs/RawInputDeviceInfoMouse.cs
new file mode 100644 (file)
index 0000000..fa20c44
--- /dev/null
@@ -0,0 +1,34 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines the raw input data coming from the specified mouse.
+    /// </summary>
+    /// <remarks>
+    /// For the keyboard, the Usage Page is 1 and the Usage is 2.
+    /// </remarks>
+    public struct RawInputDeviceInfoMouse
+    {
+        /// <summary>
+        /// ID for the mouse device.
+        /// </summary>
+        public uint Id;
+
+        /// <summary>
+        /// Number of buttons for the mouse.
+        /// </summary>
+        public uint NumberOfButtons;
+
+        /// <summary>
+        /// Number of data points per second. This information may not be applicable for every mouse device.
+        /// </summary>
+        public uint SampleRate;
+
+        /// <summary>
+        /// TRUE if the mouse has a wheel for horizontal scrolling; otherwise, FALSE.
+        /// </summary>
+        /// <remarks>
+        /// This member is only supported under Microsoft Windows Vista and later versions.
+        /// </remarks>
+        public bool HasHorizontalWheel;
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawInputDeviceList.cs b/Crow/src/backends/win32/User32/Structs/RawInputDeviceList.cs
new file mode 100644 (file)
index 0000000..8e87acc
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains information about a raw input device.
+    /// </summary>
+    public struct RawInputDeviceList
+    {
+        /// <summary>
+        /// Handle to the raw input device.
+        /// </summary>
+        public IntPtr Device;
+
+        /// <summary>
+        /// Type of device.
+        /// </summary>
+        public RawInputDeviceType Type;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<RawInputDeviceList>();
+
+        /// <inheritdoc/>
+        public override string ToString() => $"{Type}, Handle: {Device}";
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawInputHeader.cs b/Crow/src/backends/win32/User32/Structs/RawInputHeader.cs
new file mode 100644 (file)
index 0000000..724fae5
--- /dev/null
@@ -0,0 +1,37 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains the header information that is part of the raw input data.
+    /// </summary>
+    public struct RawInputHeader
+    {
+        /// <summary>
+        /// Type of raw input.
+        /// </summary>
+        public RawInputDeviceType Type;
+
+        /// <summary>
+        /// The size, in bytes, of the entire input packet of data. This includes <see cref="RawInput"/> plus
+        /// possible extra input reports in the <see cref="RawHid"/> variable length array.
+        /// </summary>
+        public uint Size;
+
+        /// <summary>
+        /// Handle to the device generating the raw input data.
+        /// </summary>
+        public IntPtr Device;
+
+        /// <summary>
+        /// Value passed in the wParam parameter of the <see cref="WindowMessage.Input"/> message.
+        /// </summary>
+        public IntPtr Param;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<RawInputHeader>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawKeyboard.cs b/Crow/src/backends/win32/User32/Structs/RawKeyboard.cs
new file mode 100644 (file)
index 0000000..bc3c746
--- /dev/null
@@ -0,0 +1,39 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains information about the state of the keyboard.
+    /// </summary>
+    public struct RawKeyboard
+    {
+        /// <summary>
+        /// Scan code from the key depression. The scan code for keyboard overrun is KEYBOARD_OVERRUN_MAKE_CODE.
+        /// </summary>
+        public ushort MakeCode;
+
+        /// <summary>
+        /// Flags for scan code information.
+        /// </summary>
+        public RawKeyboardScanCodeFlags Flags;
+
+        /// <summary>
+        /// Reserved; must be zero.
+        /// </summary>
+        public ushort Reserved;
+
+        /// <summary>
+        /// Microsoft Windows message compatible virtual-key code. For more information, see Virtual-Key Codes.
+        /// </summary>
+        public VirtualKey VKey;
+
+        /// <summary>
+        /// Corresponding window message, for example <see cref="WindowMessage.KeyDown"/>,
+        /// <see cref="WindowMessage.SystemKeyDown"/>, and so forth.
+        /// </summary>
+        public uint Message;
+
+        /// <summary>
+        /// Device-specific additional information for the event.
+        /// </summary>
+        public uint ExtraInformation;
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/RawMouse.cs b/Crow/src/backends/win32/User32/Structs/RawMouse.cs
new file mode 100644 (file)
index 0000000..945be9f
--- /dev/null
@@ -0,0 +1,67 @@
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains information about the state of the mouse.
+    /// </summary>
+    [StructLayout(LayoutKind.Explicit)]
+    public struct RawMouse
+    {
+        /// <summary>
+        /// Mouse state.
+        /// </summary>
+        [FieldOffset(0)]
+        public RawMouseFlags Flags;
+
+        /// <summary>
+        /// Reserved. Use <see cref="ButtonFlags"/> instead.
+        /// </summary>
+        [FieldOffset(4)]
+        public uint Buttons;
+
+        /// <summary>
+        /// The transition state of the mouse buttons.
+        /// </summary>
+        [FieldOffset(4)]
+        public RawMouseButtonFlags ButtonFlags;
+
+        /// <summary>
+        /// If <see cref="ButtonFlags"/> is <see cref="RawMouseButtonFlags.Wheel"/>,
+        /// this member is a signed value that specifies the wheel delta.
+        /// </summary>
+        [FieldOffset(6)]
+        public ushort ButtonData;
+
+        /// <summary>
+        /// Raw state of the mouse buttons.
+        /// </summary>
+        [FieldOffset(8)]
+        public uint RawButtons;
+
+        /// <summary>
+        /// Motion in the X direction. This is signed relative motion or absolute motion,
+        /// depending on the value of <see cref="Flags"/>.
+        /// </summary>
+        [FieldOffset(12)]
+        public int LastX;
+
+        /// <summary>
+        /// Motion in the Y direction. This is signed relative motion or absolute motion,
+        /// depending on the value of <see cref="Flags"/>.
+        /// </summary>
+        [FieldOffset(16)]
+        public int LastY;
+
+        /// <summary>
+        /// Device-specific additional information for the event.
+        /// </summary>
+        [FieldOffset(20)]
+        public uint ExtraInformation;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<RawMouse>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/Rect.cs b/Crow/src/backends/win32/User32/Structs/Rect.cs
new file mode 100644 (file)
index 0000000..832420c
--- /dev/null
@@ -0,0 +1,102 @@
+using System;
+using System.Drawing;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Defines the coordinates of the upper-left and lower-right corners of a rectangle.
+    /// </summary>
+    /// <remarks>
+    /// By convention, the right and bottom edges of the rectangle are normally considered exclusive. In other words,
+    /// the pixel whose coordinates are (right, bottom) lies immediately outside of the the rectangle. For example,
+    /// when <see cref="Rect"/> is passed to the FillRect function, the rectangle is filled up to, but not including,
+    /// the right column and bottom row of pixels.
+    /// </remarks>
+    public struct Rect
+    {
+        /// <summary>
+        /// Specifies the x-coordinate of the upper-left corner of the rectangle.
+        /// </summary>
+        public int Left;
+
+        /// <summary>
+        /// Specifies the y-coordinate of the upper-left corner of the rectangle.
+        /// </summary>
+        public int Top;
+
+        /// <summary>
+        /// Specifies the x-coordinate of the lower-right corner of the rectangle.
+        /// </summary>
+        public int Right;
+
+        /// <summary>
+        /// Specifies the y-coordinate of the lower-right corner of the rectangle.
+        /// </summary>
+        public int Bottom;
+
+        /// <summary>
+        /// Gets the width of the rectangle.
+        /// </summary>
+        public int Width => Right - Left;
+
+        /// <summary>
+        /// Gets the height of the rectangle.
+        /// </summary>
+        public int Height => Bottom - Top;
+
+        /// <inheritdoc/>
+        public override string ToString() => $"{{X={Left},Y={Top},Width={Width},Height={Height}}}";
+
+        /// <summary>
+        /// Implicitly converts a <see cref="Rect"/> structure into a <see cref="Rectangle"/> structure.
+        /// </summary>
+        /// <param name="value">A <see cref="Rectangle"/> with the same values as the given <see cref="Rect"/>.</param>
+        public static implicit operator Rectangle(Rect value)
+        {
+            return Rectangle.FromLTRB(value.Left, value.Top, value.Right, value.Bottom);
+        }
+
+        /// <summary>
+        /// Implicitly converts a <see cref="Rectangle"/> structure into a <see cref="Rect"/> structure.
+        /// </summary>
+        /// <param name="value">A <see cref="Rect"/> with the same values as the given <see cref="Rectangle"/>.</param>
+        public static implicit operator Rect(Rectangle value)
+        {
+            return new Rect
+            {
+                Left = value.Left,
+                Right = value.Right,
+                Top = value.Top,
+                Bottom = value.Bottom
+            };
+        }
+
+        /// <summary>
+        /// Creates a <see cref="Rect"/> structure with the specified Size at location (0,0).
+        /// </summary>
+        /// <param name="value">The size from which to construct the new <see cref="Rect"/> structure.</param>
+        /// <returns>A <see cref="Rect"/> structure with the given size.</returns>
+        public static Rect FromSize(Size value)
+        {
+            return new Rect
+            {
+                Left = 0,
+                Right = value.Width,
+                Top = 0,
+                Bottom = value.Height
+            };
+        }
+    }
+
+    [StructLayout(LayoutKind.Sequential)]
+    public struct PAINTSTRUCT
+    {
+        public IntPtr hdc;
+        public bool fErase;
+        public Rect rcPaint;
+        public bool fRestore;
+        public bool fIncUpdate;
+        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public byte[] rgbReserved;
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/StyleStruct.cs b/Crow/src/backends/win32/User32/Structs/StyleStruct.cs
new file mode 100644 (file)
index 0000000..93cdd2c
--- /dev/null
@@ -0,0 +1,19 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains the styles for a window.<para/>
+    /// Both members can be <see cref="WindowStyles"/> or <see cref="ExtendedWindowStyles"/>.
+    /// </summary>
+    public struct StyleStruct
+    {
+        /// <summary>
+        /// The previous styles for a window.
+        /// </summary>
+        public uint StyleOld;
+
+        /// <summary>
+        /// The new styles for a window.
+        /// </summary>
+        public uint StyleNew;
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/TrackMouseEvent.cs b/Crow/src/backends/win32/User32/Structs/TrackMouseEvent.cs
new file mode 100644 (file)
index 0000000..e1b5cce
--- /dev/null
@@ -0,0 +1,44 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Used by the <see cref="User32.Mouse.TrackMouseEvent(ref TrackMouseEvent)"/> function to track
+    /// when the mouse pointer leaves a window or hovers over a window for a specified amount of time.
+    /// </summary>
+    public struct TrackMouseEvent
+    {
+        /// <summary>
+        /// Set <see cref="HoverTime"/> to this value to use the system default hover time-out.
+        /// </summary>
+        public const uint DefaultHoverTime = 0xFFFFFFFF;
+
+        /// <summary>
+        /// The size of the <see cref="TrackMouseEvent"/> structure, in bytes.<para/>
+        /// Set this to <see cref="SizeInBytes"/>.
+        /// </summary>
+        public uint Size;
+
+        /// <summary>
+        /// The services requested.
+        /// </summary>
+        public TrackMouseEvents Flags;
+
+        /// <summary>
+        /// A handle to the window to track.
+        /// </summary>
+        public IntPtr TrackWindowHandle;
+
+        /// <summary>
+        /// The hover time-out (if <see cref="TrackMouseEvents.Hover"/> was specified in <see cref="Flags"/>), in
+        /// milliseconds. Can be <see cref="DefaultHoverTime"/>, which means to use the system default hover time-out.
+        /// </summary>
+        public uint HoverTime;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<TrackMouseEvent>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/WindowClass.cs b/Crow/src/backends/win32/User32/Structs/WindowClass.cs
new file mode 100644 (file)
index 0000000..57f1a6f
--- /dev/null
@@ -0,0 +1,78 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains the window class attributes that are registered by the RegisterClass function.
+    /// </summary>
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+    public struct WindowClass
+    {
+        /// <summary>
+        /// The class style(s). This member can be any combination of <see cref="WindowClassStyles"/>.
+        /// </summary>
+        public WindowClassStyles Style;
+
+        /// <summary>
+        /// A pointer to the window procedure. You must use the CallWindowProc function to call the window procedure.
+        /// </summary>
+        public WindowProc WindowProc;
+
+        /// <summary>
+        /// The number of extra bytes to allocate following the window-class structure.
+        /// The system initializes the bytes to zero.
+        /// </summary>
+        public int ClassExtra;
+
+        /// <summary>
+        /// The number of extra bytes to allocate following the window instance. The system initializes the bytes
+        /// to zero. If an application uses <see cref="WindowClass"/> to register a dialog box created by
+        /// using the CLASS directive in the resource file, it must set this member to DLGWINDOWEXTRA.
+        /// </summary>
+        public int WindowExtra;
+
+        /// <summary>
+        /// A handle to the instance that contains the window procedure for the class.
+        /// </summary>
+        public IntPtr Instance;
+
+        /// <summary>
+        /// A handle to the class icon. This member must be a handle to an icon resource.
+        /// If this member is <see cref="IntPtr.Zero"/>, the system provides a default icon.
+        /// </summary>
+        public IntPtr Icon;
+
+        /// <summary>
+        /// A handle to the class cursor. This member must be a handle to a cursor resource.
+        /// If this member is <see cref="IntPtr.Zero"/>, an application must explicitly set the cursor shape
+        /// whenever the mouse moves into the application's window.
+        /// </summary>
+        public IntPtr Cursor;
+
+        /// <summary>
+        /// A handle to the class background brush. This member can be a handle to the brush to be used for
+        /// painting the background, or it can be a color value.<para/>
+        /// For more information on setting this to a color value, check the official documentation.
+        /// </summary>
+        public IntPtr Background;
+
+        /// <summary>
+        /// Pointer to a string that specifies the resource name of the class menu, as the name appears in the
+        /// resource file. If this member is null, windows belonging to this class have no default menu.
+        /// </summary>
+        public string MenuName;
+
+        /// <summary>
+        /// A string specifying the window class name. The class name can be any name registered with
+        /// RegisterClass or <see cref="User32.WindowClass.RegisterClassEx(ref ExtendedWindowClass)"/>,
+        /// or any of the predefined control-class names.
+        /// </summary>
+        public string ClassName;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<WindowClass>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/WindowInfo.cs b/Crow/src/backends/win32/User32/Structs/WindowInfo.cs
new file mode 100644 (file)
index 0000000..e5df1d3
--- /dev/null
@@ -0,0 +1,66 @@
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains window information.
+    /// </summary>
+    public struct WindowInfo
+    {
+        /// <summary>
+        /// The size of the structure, in bytes.
+        /// </summary>
+        public uint Size;
+
+        /// <summary>
+        /// Pointer to a RECT structure that specifies the coordinates of the window.
+        /// </summary>
+        public Rect Window;
+
+        /// <summary>
+        /// Pointer to a RECT structure that specifies the coordinates of the client area.
+        /// </summary>
+        public Rect Client;
+
+        /// <summary>
+        /// The window styles. For a table of window styles, see CreateWindowEx.
+        /// </summary>
+        public WindowStyles Style;
+
+        /// <summary>
+        /// The extended window styles. For a table of extended window styles, see CreateWindowEx.
+        /// </summary>
+        public ExtendedWindowStyles ExtendedStyle;
+
+        /// <summary>
+        /// The window status. If this member is WS_ACTIVECAPTION, the window is active.
+        /// Otherwise, this member is zero.
+        /// </summary>
+        public uint WindowStatus;
+
+        /// <summary>
+        /// The width of the window border, in pixels.
+        /// </summary>
+        public uint WindowBordersX;
+
+        /// <summary>
+        /// The height of the window border, in pixels.
+        /// </summary>
+        public uint WindowBordersY;
+
+        /// <summary>
+        /// The window class atom (see RegisterClass).
+        /// </summary>
+        public ushort WindowType;
+
+        /// <summary>
+        /// The Microsoft Windows version of the application that created the window.
+        /// </summary>
+        public ushort CreatorVersion;
+
+        /// <summary>
+        /// The size of this structure in bytes.
+        /// </summary>
+        public static readonly uint SizeInBytes = (uint)Marshal.SizeOf<WindowInfo>();
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Structs/WindowPosition.cs b/Crow/src/backends/win32/User32/Structs/WindowPosition.cs
new file mode 100644 (file)
index 0000000..1e3d89e
--- /dev/null
@@ -0,0 +1,49 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Contains information about the size and position of a window.
+    /// </summary>
+    [StructLayout(LayoutKind.Sequential)]
+    public struct WindowPosition
+    {
+        /// <summary>
+        /// Handle to the window.
+        /// </summary>
+        public IntPtr HWnd;
+
+        /// <summary>
+        /// Specifies the position of the window in Z order (front-to-back position).
+        /// This member can be a handle to the window behind which this window is placed,
+        /// or can be one of the special values listed with the SetWindowPos function.
+        /// </summary>
+        public IntPtr HWndInsertAfter;
+
+        /// <summary>
+        /// Specifies the position of the left edge of the window.
+        /// </summary>
+        public int X;
+
+        /// <summary>
+        /// Specifies the position of the top edge of the window.
+        /// </summary>
+        public int Y;
+
+        /// <summary>
+        /// Specifies the window width, in pixels.
+        /// </summary>
+        public int Width;
+
+        /// <summary>
+        /// Specifies the window height, in pixels.
+        /// </summary>
+        public int Height;
+
+        /// <summary>
+        /// Specifies the window position.
+        /// </summary>
+        public SetWindowPosFlags Flags;
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Timer.cs b/Crow/src/backends/win32/User32/Timer.cs
new file mode 100644 (file)
index 0000000..9266e81
--- /dev/null
@@ -0,0 +1,88 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with timers.
+        /// </summary>
+        public static class Timer
+        {
+            /// <summary>
+            /// Creates a timer with the specified time-out value.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window to be associated with the timer. This window must be owned
+            /// by the calling thread. If a <see cref="IntPtr.Zero"/> value for <paramref name="window"/> is passed
+            /// in along with an <paramref name="timerID"/> of an existing timer, that timer will be replaced in the
+            /// same way that an existing non-zero <paramref name="window"/> timer will be.
+            /// </param>
+            /// <param name="timerID">
+            /// A nonzero timer identifier. If the <paramref name="window"/> parameter is <see cref="IntPtr.Zero"/>,
+            /// and the <paramref name="timerID"/> does not match an existing timer then it is ignored and a new
+            /// timer ID is generated.<para/>
+            /// If the <paramref name="window"/> parameter is not <see cref="IntPtr.Zero"/>
+            /// and the window specified by <paramref name="window"/> already has a timer with the value
+            /// <paramref name="timerID"/>, then the existing timer is replaced by the new timer. When
+            /// <see cref="SetTimer(IntPtr, UIntPtr, uint, TimerProc)"/> replaces a timer, the timer is reset.
+            /// Therefore, a message will be sent after the current time-out value elapses, but the previously set
+            /// time-out value is ignored.<para/>
+            /// If the call is not intended to replace an existing timer,
+            /// <paramref name="timerID"/> should be 0 if the <paramref name="window"/> is <see cref="IntPtr.Zero"/>.
+            /// </param>
+            /// <param name="elapse">The time-out value, in milliseconds.</param>
+            /// <param name="timerFunc">
+            /// A pointer to the function to be notified when the time-out value elapses. For more information about
+            /// the function, see <see cref="TimerProc"/>. If <paramref name="timerFunc"/> is null, the system posts
+            /// a <see cref="WindowMessage.Timer"/> message to the application queue. The <see cref="Msg.HWnd"/>
+            /// member of the message's <see cref="Msg"/> structure contains
+            /// the value of the <paramref name="window"/> parameter.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds and the <paramref name="window"/> parameter is <see cref="IntPtr.Zero"/>,
+            /// the return value is an integer identifying the new timer. An application can pass this value to the
+            /// <see cref="KillTimer(IntPtr, UIntPtr)"/> function to destroy the timer.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            public static extern UIntPtr SetTimer
+            (
+                [In] [Optional] IntPtr window,
+                [In] UIntPtr timerID,
+                [In] uint elapse,
+                [In] [Optional] TimerProc timerFunc
+            );
+
+            /// <summary>
+            /// Destroys the specified timer.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window associated with the specified timer. This value must be the same as the window
+            /// value passed to the <see cref="SetTimer(IntPtr, UIntPtr, uint, TimerProc)"/>
+            /// function that created the timer.
+            /// </param>
+            /// <param name="timerID">
+            /// The timer to be destroyed. If the window handle passed to
+            /// <see cref="SetTimer(IntPtr, UIntPtr, uint, TimerProc)"/> is valid, this parameter must be the same as
+            /// the timerID value passed to <see cref="SetTimer(IntPtr, UIntPtr, uint, TimerProc)"/>. If the application
+            /// calls <see cref="SetTimer(IntPtr, UIntPtr, uint, TimerProc)"/> with window set to
+            /// <see cref="IntPtr.Zero"/>, this parameter must be the timer identifier returned by
+            /// <see cref="SetTimer(IntPtr, UIntPtr, uint, TimerProc)"/>.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool KillTimer
+            (
+                [In] [Optional] IntPtr window,
+                [In] UIntPtr timerID
+            );
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/User32.cs b/Crow/src/backends/win32/User32/User32.cs
new file mode 100644 (file)
index 0000000..a4883d0
--- /dev/null
@@ -0,0 +1,13 @@
+namespace OpenToolkit.NT.Native
+{
+    /// <summary>
+    /// Provides a subset of functions from the Windows API, specifically those that are imported from user32.dll.
+    /// </summary>
+    public static partial class User32
+    {
+        /// <summary>
+        /// The filename of the dynamic link library (DLL) that contains these functions.
+        /// </summary>
+        public const string Library = "user32.dll";
+    }
+}
diff --git a/Crow/src/backends/win32/User32/Window.cs b/Crow/src/backends/win32/User32/Window.cs
new file mode 100644 (file)
index 0000000..4aa9b21
--- /dev/null
@@ -0,0 +1,969 @@
+using System;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+using System.Security;
+using System.Text;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with windows.
+        /// </summary>
+        public static class Window
+        {
+            /// <summary>
+            /// Calculates the required size of the window rectangle, based on the desired client-rectangle size.
+            /// The window rectangle can then be passed to the CreateWindow function to create a window whose
+            /// client area is the desired size.
+            /// </summary>
+            /// <param name="rect">
+            /// A pointer to a <see cref="Rect"/> structure that contains the coordinates of the top-left and
+            /// bottom-right corners of the desired client area. When the function returns, the structure contains
+            /// the coordinates of the top-left and bottom-right corners of the window to accommodate the desired
+            /// client area.
+            /// </param>
+            /// <param name="style">
+            /// The window style of the window whose required size is to be calculated.
+            /// Note that you cannot specify the <see cref="WindowStyles.Overlapped"/> style.
+            /// </param>
+            /// <param name="hasMenu">Indicates whether the window has a menu.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is nonzero.
+            /// If the function fails, the return value is zero.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool AdjustWindowRect
+            (
+                [In] [Out] ref Rect rect,
+                [In] WindowStyles style,
+                [In] bool hasMenu
+            );
+
+            /// <summary>
+            /// Calculates the required size of the window rectangle, based on the desired client-rectangle size.
+            /// The window rectangle can then be passed to the
+            /// <see cref="CreateWindowEx(ExtendedWindowStyles, string, string, WindowStyles, int, int, int, int, IntPtr, IntPtr, IntPtr, IntPtr)"/>
+            /// function to create a window whose client area is the desired size.
+            /// </summary>
+            /// <param name="rect">
+            /// A pointer to a <see cref="Rect"/> structure that contains the coordinates of the top-left and
+            /// bottom-right corners of the desired client area. When the function returns, the structure contains
+            /// the coordinates of the top-left and bottom-right corners of the window to accommodate the
+            /// desired client area.
+            /// </param>
+            /// <param name="style">
+            /// The window style of the window whose required size is to be calculated.
+            /// Note that you cannot specify the <see cref="WindowStyles.Overlapped"/> style.
+            /// </param>
+            /// <param name="hasMenu">Indicates whether the window has a menu.</param>
+            /// <param name="extendedStyle">
+            /// The extended window style of the window whose required size is to be calculated.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is nonzero.
+            /// If the function fails, the return value is zero.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool AdjustWindowRectEx
+            (
+                [In] [Out] ref Rect rect,
+                [In] WindowStyles style,
+                [In] bool hasMenu,
+                [In] ExtendedWindowStyles extendedStyle
+            );
+
+            /// <summary>
+            /// A constant that can be used in all CreateWindowEx overloads to specify special behavior.<para/>
+            /// For more information, see any CreateWindowEx overload.
+            /// </summary>
+            public const int UseDefault = unchecked((int)0x80000000);
+
+            /// <summary>
+            /// Creates an overlapped, pop-up, or child window with an extended window style; otherwise,
+            /// this function is identical to the CreateWindow function.
+            /// </summary>
+            /// <param name="extendedStyle">The extended window style of the window being created.</param>
+            /// <param name="className">A string specifying the window class name.</param>
+            /// <param name="windowName">
+            /// The window name. If the window style specifies a title bar,
+            /// the window title pointed to by <paramref name="windowName"/> is displayed in the title bar.
+            /// </param>
+            /// <param name="style">The style of the window being created.</param>
+            /// <param name="x">
+            /// The initial horizontal position of the window. For an overlapped or pop-up window, the x parameter is
+            /// the initial x-coordinate of the window's upper-left corner, in screen coordinates. For a child window,
+            /// x is the x-coordinate of the upper-left corner of the window relative to the upper-left corner
+            /// of the parent window's client area.<para/>
+            /// If x is set to <see cref="int.MinValue"/>, the system selects the default position for the window's
+            /// upper-left corner and ignores the y parameter. <see cref="int.MinValue"/> is valid only for overlapped
+            /// windows; if it is specified for a pop-up or child window, the x and y parameters are set to zero.
+            /// </param>
+            /// <param name="y">
+            /// The initial vertical position of the window. For an overlapped or pop-up window, the y parameter is
+            /// the initial y-coordinate of the window's upper-left corner, in screen coordinates. For a child window,
+            /// y is the initial y-coordinate of the upper-left corner of the child window relative to the upper-left
+            /// corner of the parent window's client area. For a list box y is the initial y-coordinate of the
+            /// upper-left corner of the list box's client area relative to the upper-left corner of the parent
+            /// window's client area.<para/>
+            /// If an overlapped window is created with the <see cref="WindowStyles.Visible"/> style bit set and
+            /// the x parameter is set to <see cref="int.MinValue"/>, then the y parameter determines how the window
+            /// is shown. If the y parameter is <see cref="int.MinValue"/>, then the window manager calls
+            /// <see cref="ShowWindow(IntPtr, ShowWindowCommand)"/> with the <see cref="ShowWindowCommand.Show"/>
+            /// flag after the window has been created. If the y parameter is some other value, then the window manager
+            /// calls <see cref="ShowWindow(IntPtr, ShowWindowCommand)"/> with that value as the nCmdShow parameter.
+            /// </param>
+            /// <param name="width">
+            /// The width, in device units, of the window. For overlapped windows, nWidth is the window's width, in
+            /// screen coordinates, or <see cref="UseDefault"/>.<para/>
+            /// If nWidth is <see cref="UseDefault"/>, the system selects a default width and height for the window;
+            /// the default width extends from the initial x-coordinates to the right edge of the screen; the default
+            /// height extends from the initial y-coordinate to the top of the icon area.<para/>
+            /// <see cref="UseDefault"/> is valid only for overlapped windows; if <see cref="UseDefault"/> is
+            /// specified for a pop-up or child window, the <paramref name="width"/> and <paramref name="height"/>
+            /// parameter are set to zero.
+            /// </param>
+            /// <param name="height">
+            /// The height, in device units, of the window. For overlapped windows, <paramref name="height"/> is the
+            /// window's height, in screen coordinates.<para/>
+            /// If the <paramref name="width"/> parameter is set to <see cref="UseDefault"/>,
+            /// the system ignores <paramref name="height"/>.
+            /// </param>
+            /// <param name="parentWindow">
+            /// A handle to the parent or owner window of the window being created. To create a child window or an
+            /// owned window, supply a valid window handle. This parameter is optional for pop-up windows.<para/>
+            /// </param>
+            /// <param name="menu">
+            /// A handle to a menu, or specifies a child-window identifier, depending on the window style.<para/>
+            /// For an overlapped or pop-up window, <paramref name="menu"/> identifies the menu to be used with the
+            /// window; it can be <see cref="IntPtr.Zero"/> if the class menu is to be used.<para/>
+            /// For a child window, <paramref name="menu"/> specifies the child-window identifier, an integer value
+            /// used by a dialog box control to notify its parent about events. The application determines the
+            /// child-window identifier; it must be unique for all child windows with the same parent window.
+            /// </param>
+            /// <param name="moduleInstance">
+            /// A handle to the instance of the module to be associated with the window.
+            /// </param>
+            /// <param name="createParam">
+            /// Pointer to a value to be passed to the window through the <see cref="CreateStruct"/> structure
+            /// (<see cref="CreateStruct.CreateParams"/> member) pointed to by the lParam param of the
+            /// <see cref="WindowMessage.Create"/> message.<para/>
+            /// This message is sent to the created window by this function before it returns.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is a handle to the new window.
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true, CharSet = CharSet.Unicode)]
+            public static extern IntPtr CreateWindowEx
+            (
+                [In] ExtendedWindowStyles extendedStyle,
+                [In] [Optional] string className,
+                [In] [Optional] string windowName,
+                [In] WindowStyles style,
+                [In] int x,
+                [In] int y,
+                [In] int width,
+                [In] int height,
+                [In] [Optional] IntPtr parentWindow,
+                [In] [Optional] IntPtr menu,
+                [In] [Optional] IntPtr moduleInstance,
+                [In] [Optional] IntPtr createParam
+            );
+
+            /// <summary>
+            /// Creates an overlapped, pop-up, or child window with an extended window style; otherwise,
+            /// this function is identical to the CreateWindow function.
+            /// </summary>
+            /// <param name="extendedStyle">The extended window style of the window being created.</param>
+            /// <param name="className">A pointer to a string specifying the window class name.</param>
+            /// <param name="windowName">
+            /// The window name. If the window style specifies a title bar,
+            /// the window title pointed to by <paramref name="windowName"/> is displayed in the title bar.
+            /// </param>
+            /// <param name="style">The style of the window being created.</param>
+            /// <param name="x">
+            /// The initial horizontal position of the window. For an overlapped or pop-up window, the x parameter is
+            /// the initial x-coordinate of the window's upper-left corner, in screen coordinates. For a child window,
+            /// x is the x-coordinate of the upper-left corner of the window relative to the upper-left corner
+            /// of the parent window's client area.<para/>
+            /// If x is set to <see cref="int.MinValue"/>, the system selects the default position for the window's
+            /// upper-left corner and ignores the y parameter. <see cref="int.MinValue"/> is valid only for overlapped
+            /// windows; if it is specified for a pop-up or child window, the x and y parameters are set to zero.
+            /// </param>
+            /// <param name="y">
+            /// The initial vertical position of the window. For an overlapped or pop-up window, the y parameter is
+            /// the initial y-coordinate of the window's upper-left corner, in screen coordinates. For a child window,
+            /// y is the initial y-coordinate of the upper-left corner of the child window relative to the upper-left
+            /// corner of the parent window's client area. For a list box y is the initial y-coordinate of the
+            /// upper-left corner of the list box's client area relative to the upper-left corner of the parent
+            /// window's client area.<para/>
+            /// If an overlapped window is created with the <see cref="WindowStyles.Visible"/> style bit set and
+            /// the x parameter is set to <see cref="int.MinValue"/>, then the y parameter determines how the window
+            /// is shown. If the y parameter is <see cref="int.MinValue"/>, then the window manager calls
+            /// <see cref="ShowWindow(IntPtr, ShowWindowCommand)"/> with the <see cref="ShowWindowCommand.Show"/>
+            /// flag after the window has been created. If the y parameter is some other value, then the window manager
+            /// calls <see cref="ShowWindow(IntPtr, ShowWindowCommand)"/> with that value as the nCmdShow parameter.
+            /// </param>
+            /// <param name="width">
+            /// The width, in device units, of the window. For overlapped windows, nWidth is the window's width, in
+            /// screen coordinates, or <see cref="UseDefault"/>.<para/>
+            /// If nWidth is <see cref="UseDefault"/>, the system selects a default width and height for the window;
+            /// the default width extends from the initial x-coordinates to the right edge of the screen; the default
+            /// height extends from the initial y-coordinate to the top of the icon area.<para/>
+            /// <see cref="UseDefault"/> is valid only for overlapped windows; if <see cref="UseDefault"/> is
+            /// specified for a pop-up or child window, the <paramref name="width"/> and <paramref name="height"/>
+            /// parameter are set to zero.
+            /// </param>
+            /// <param name="height">
+            /// The height, in device units, of the window. For overlapped windows, <paramref name="height"/> is the
+            /// window's height, in screen coordinates.<para/>
+            /// If the <paramref name="width"/> parameter is set to <see cref="UseDefault"/>,
+            /// the system ignores <paramref name="height"/>.
+            /// </param>
+            /// <param name="parentWindow">
+            /// A handle to the parent or owner window of the window being created. To create a child window or an
+            /// owned window, supply a valid window handle. This parameter is optional for pop-up windows.<para/>
+            /// </param>
+            /// <param name="menu">
+            /// A handle to a menu, or specifies a child-window identifier, depending on the window style.<para/>
+            /// For an overlapped or pop-up window, <paramref name="menu"/> identifies the menu to be used with the
+            /// window; it can be <see cref="IntPtr.Zero"/> if the class menu is to be used.<para/>
+            /// For a child window, <paramref name="menu"/> specifies the child-window identifier, an integer value
+            /// used by a dialog box control to notify its parent about events. The application determines the
+            /// child-window identifier; it must be unique for all child windows with the same parent window.
+            /// </param>
+            /// <param name="moduleInstance">
+            /// A handle to the instance of the module to be associated with the window.
+            /// </param>
+            /// <param name="createParam">
+            /// Pointer to a value to be passed to the window through the <see cref="CreateStruct"/> structure
+            /// (<see cref="CreateStruct.CreateParams"/> member) pointed to by the lParam param of the
+            /// <see cref="WindowMessage.Create"/> message.<para/>
+            /// This message is sent to the created window by this function before it returns.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is a handle to the new window.
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true, CharSet = CharSet.Unicode)]
+            public static extern IntPtr CreateWindowEx
+            (
+                [In] ExtendedWindowStyles extendedStyle,
+                [In] [Optional] IntPtr className,
+                [In] [Optional] string windowName,
+                [In] WindowStyles style,
+                [In] int x,
+                [In] int y,
+                [In] int width,
+                [In] int height,
+                [In] [Optional] IntPtr parentWindow,
+                [In] [Optional] IntPtr menu,
+                [In] [Optional] IntPtr moduleInstance,
+                [In] [Optional] IntPtr createParam
+            );
+
+            /// <summary>
+            /// Creates an overlapped, pop-up, or child window with an extended window style; otherwise,
+            /// this function is identical to the CreateWindow function.
+            /// </summary>
+            /// <param name="extendedStyle">The extended window style of the window being created.</param>
+            /// <param name="classAtom">
+            /// A class atom created by a previous call to RegisterClass or
+            /// <see cref="WindowClass.RegisterClassEx(ref ExtendedWindowClass)"/>.
+            /// </param>
+            /// <param name="windowName">
+            /// The window name. If the window style specifies a title bar,
+            /// the window title pointed to by <paramref name="windowName"/> is displayed in the title bar.
+            /// </param>
+            /// <param name="style">The style of the window being created.</param>
+            /// <param name="x">
+            /// The initial horizontal position of the window. For an overlapped or pop-up window, the x parameter is
+            /// the initial x-coordinate of the window's upper-left corner, in screen coordinates. For a child window,
+            /// x is the x-coordinate of the upper-left corner of the window relative to the upper-left corner
+            /// of the parent window's client area.<para/>
+            /// If x is set to <see cref="int.MinValue"/>, the system selects the default position for the window's
+            /// upper-left corner and ignores the y parameter. <see cref="int.MinValue"/> is valid only for overlapped
+            /// windows; if it is specified for a pop-up or child window, the x and y parameters are set to zero.
+            /// </param>
+            /// <param name="y">
+            /// The initial vertical position of the window. For an overlapped or pop-up window, the y parameter is
+            /// the initial y-coordinate of the window's upper-left corner, in screen coordinates. For a child window,
+            /// y is the initial y-coordinate of the upper-left corner of the child window relative to the upper-left
+            /// corner of the parent window's client area. For a list box y is the initial y-coordinate of the
+            /// upper-left corner of the list box's client area relative to the upper-left corner of the parent
+            /// window's client area.<para/>
+            /// If an overlapped window is created with the <see cref="WindowStyles.Visible"/> style bit set and
+            /// the x parameter is set to <see cref="int.MinValue"/>, then the y parameter determines how the window
+            /// is shown. If the y parameter is <see cref="int.MinValue"/>, then the window manager calls
+            /// <see cref="ShowWindow(IntPtr, ShowWindowCommand)"/> with the <see cref="ShowWindowCommand.Show"/>
+            /// flag after the window has been created. If the y parameter is some other value, then the window manager
+            /// calls <see cref="ShowWindow(IntPtr, ShowWindowCommand)"/> with that value as the nCmdShow parameter.
+            /// </param>
+            /// <param name="width">
+            /// The width, in device units, of the window. For overlapped windows, nWidth is the window's width, in
+            /// screen coordinates, or <see cref="UseDefault"/>.<para/>
+            /// If nWidth is <see cref="UseDefault"/>, the system selects a default width and height for the window;
+            /// the default width extends from the initial x-coordinates to the right edge of the screen; the default
+            /// height extends from the initial y-coordinate to the top of the icon area.<para/>
+            /// <see cref="UseDefault"/> is valid only for overlapped windows; if <see cref="UseDefault"/> is
+            /// specified for a pop-up or child window, the <paramref name="width"/> and <paramref name="height"/>
+            /// parameter are set to zero.
+            /// </param>
+            /// <param name="height">
+            /// The height, in device units, of the window. For overlapped windows, <paramref name="height"/> is the
+            /// window's height, in screen coordinates.<para/>
+            /// If the <paramref name="width"/> parameter is set to <see cref="UseDefault"/>,
+            /// the system ignores <paramref name="height"/>.
+            /// </param>
+            /// <param name="parentWindow">
+            /// A handle to the parent or owner window of the window being created. To create a child window or an
+            /// owned window, supply a valid window handle. This parameter is optional for pop-up windows.<para/>
+            /// </param>
+            /// <param name="menu">
+            /// A handle to a menu, or specifies a child-window identifier, depending on the window style.<para/>
+            /// For an overlapped or pop-up window, <paramref name="menu"/> identifies the menu to be used with the
+            /// window; it can be <see cref="IntPtr.Zero"/> if the class menu is to be used.<para/>
+            /// For a child window, <paramref name="menu"/> specifies the child-window identifier, an integer value
+            /// used by a dialog box control to notify its parent about events. The application determines the
+            /// child-window identifier; it must be unique for all child windows with the same parent window.
+            /// </param>
+            /// <param name="moduleInstance">
+            /// A handle to the instance of the module to be associated with the window.
+            /// </param>
+            /// <param name="createParam">
+            /// Pointer to a value to be passed to the window through the <see cref="CreateStruct"/> structure
+            /// (<see cref="CreateStruct.CreateParams"/> member) pointed to by the lParam param of the
+            /// <see cref="WindowMessage.Create"/> message.<para/>
+            /// This message is sent to the created window by this function before it returns.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is a handle to the new window.
+            /// If the function fails, the return value is <see cref="IntPtr.Zero"/>.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            public static IntPtr CreateWindowEx
+            (
+                [In] ExtendedWindowStyles extendedStyle,
+                [In] [Optional] ushort classAtom,
+                [In] [Optional] string windowName,
+                [In] WindowStyles style,
+                [In] int x,
+                [In] int y,
+                [In] int width,
+                [In] int height,
+                [In] [Optional] IntPtr parentWindow,
+                [In] [Optional] IntPtr menu,
+                [In] [Optional] IntPtr moduleInstance,
+                [In] [Optional] IntPtr createParam
+            )
+            {
+                return CreateWindowEx
+                (
+                    extendedStyle,
+                    new IntPtr(classAtom),
+                    windowName,
+                    style,
+                    x,
+                    y,
+                    width,
+                    height,
+                    parentWindow,
+                    menu,
+                    moduleInstance,
+                    createParam
+                );
+            }
+
+            /// <summary>
+            /// Destroys the specified window. The function sends <see cref="WindowMessage.Destroy"/>
+            /// and <see cref="WindowMessage.NCDestroy"/> messages to the window to deactivate it and remove the
+            /// keyboard focus from it. The function also destroys the window's menu, flushes the thread message queue,
+            /// destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain
+            /// (if the window is at the top of the viewer chain).<para/>
+            /// If the specified window is a parent or owner window, <see cref="DestroyWindow(IntPtr)"/> automatically
+            /// destroys the associated child or owned windows when it destroys the parent or owner window. The
+            /// function first destroys child or owned windows, and then it destroys the parent or owner window.
+            /// </summary>
+            /// <param name="window">A handle to the window to be destroyed.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool DestroyWindow([In] IntPtr window);
+
+            /// <summary>
+            /// Passes message information to the specified window procedure.
+            /// </summary>
+            /// <param name="previousWindowFunc">
+            /// The previous window procedure. If this value is obtained by calling the
+            /// <see cref="GetWindowLong(IntPtr, GetWindowLongIndex)"/> function with the index parameter set to
+            /// <see cref="GetWindowLongIndex.WindowProcedure"/> or DWL_DLGPROC, it is actually either the address of
+            /// a window or dialog box procedure, or a special internal value meaningful only to
+            /// <see cref="CallWindowProc(IntPtr, IntPtr, WindowMessage, IntPtr, IntPtr)"/>.
+            /// </param>
+            /// <param name="window">A handle to the window procedure to receive the message.</param>
+            /// <param name="msg">The message.</param>
+            /// <param name="wparam">
+            /// Additional message-specific information.
+            /// The contents of this parameter depend on the value of the <paramref name="msg"/> parameter.
+            /// </param>
+            /// <param name="lparam">
+            /// Additional message-specific information.
+            /// The contents of this parameter depend on the value of the <paramref name="msg"/> parameter.
+            /// </param>
+            /// <returns>
+            /// The return value specifies the result of the message processing and depends on the message sent.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            public static extern IntPtr CallWindowProc
+            (
+                [In] IntPtr previousWindowFunc,
+                [In] IntPtr window,
+                [In] WindowMessage msg,
+                [In] IntPtr wparam,
+                [In] IntPtr lparam
+            );
+
+            /// <summary>
+            /// Sets the current process as dots per inch (dpi) aware. Note: <see cref="SetProcessDPIAware"/> is
+            /// subject to a possible race condition if a DLL caches dpi settings during initialization.
+            /// For this reason, it is recommended that dpi-aware be set through the application (.exe) manifest
+            /// rather than by calling <see cref="SetProcessDPIAware"/>.
+            /// </summary>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// Otherwise, the return value is false.
+            /// </returns>
+            [DllImport(Library)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool SetProcessDPIAware();
+
+            /// <summary>
+            /// Changes the window procedure of the specified window.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window and, indirectly, the class to which the window belongs.
+            /// </param>
+            /// <param name="newProc">The replacement window procedure.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is the previous value
+            /// of the specified 32-bit integer.<para/>
+            /// If the function fails, the return value is zero.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            public static IntPtr SetWindowLong(IntPtr window, WindowProc newProc)
+            {
+                return SetWindowLong
+                (
+                    window,
+                    GetWindowLongIndex.WindowProcedure,
+                    Marshal.GetFunctionPointerForDelegate(newProc)
+                );
+            }
+
+            /// <summary>
+            /// Changes an attribute of the specified window.
+            /// The function also sets a value at the specified offset in the extra window memory.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window and, indirectly, the class to which the window belongs.
+            /// </param>
+            /// <param name="index">
+            /// One of the pre-defined values specifying the offset to the value to be set.
+            /// </param>
+            /// <param name="newLong">The replacement value.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is the previous value of the
+            /// specified 32-bit integer.<para/>
+            /// If the function fails, the return value is zero.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            public static IntPtr SetWindowLong(IntPtr window, GetWindowLongIndex index, IntPtr newLong)
+            {
+                return SetWindowLong(window, (int)index, newLong);
+            }
+
+            /// <summary>
+            /// Changes an attribute of the specified window. The function also sets a value at the specified offset
+            /// in the extra window memory.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window and, indirectly, the class to which the window belongs.
+            /// </param>
+            /// <param name="index">
+            /// The zero-based offset to the value to be set. Valid values are in the range zero through the number
+            /// of bytes of extra window memory, minus the size of an <see cref="IntPtr"/>.
+            /// </param>
+            /// <param name="newLong">The replacement value.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is the previous value of the
+            /// specified 32-bit integer.<para/>
+            /// If the function fails, the return value is zero.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            /// <remarks>
+            /// This method is a wrapper around both the SetWindowLong (32-bit) and the SetWindowLongPtr (64-bit)
+            /// version of these functions.<para/>
+            /// This method will always call the "correct" function for this machine,
+            /// and return the value wrapped in an <see cref="IntPtr"/>.
+            /// This method will throw a <see cref="Win32Exception"/> if the Windows API function returns a value
+            /// that indicates failure.
+            /// </remarks>
+            /// <exception cref="Win32Exception">An error occurs in the native function call.</exception>
+            public static IntPtr SetWindowLong(IntPtr window, int index, IntPtr newLong)
+            {
+                //Kernel32.SetLastError(0);
+
+                IntPtr result;
+                if (IntPtr.Size == 8)
+                {
+                    result = SetWindowLongPtr(window, index, newLong);
+                }
+                else
+                {
+                    result = new IntPtr(SetWindowLong(window, index, newLong.ToInt32()));
+                }
+
+                int error;
+                if (result == IntPtr.Zero && (error = Marshal.GetLastWin32Error()) != 0)
+                {
+                    throw new Win32Exception(error, "Failed to modify window border.");
+                }
+
+                return result;
+            }
+
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            private static extern int SetWindowLong
+            (
+                [In] IntPtr window,
+                [In] int index,
+                [In] int newLong
+            );
+
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            private static extern IntPtr SetWindowLongPtr
+            (
+                [In] IntPtr window,
+                [In] int index,
+                [In] IntPtr newLong
+            );
+
+            /// <summary>
+            /// Retrieves information about the specified window. The function also retrieves the value at a
+            /// specified offset into the extra window memory.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window and, indirectly, the class to which the window belongs.
+            /// </param>
+            /// <param name="index">
+            /// One of the pre-defined values specifying the offset to the value to be retrieved.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is the requested value.<para/>
+            /// If the function fails, the return value is zero. To get extended error information, call
+            /// <see cref="Marshal.GetLastWin32Error"/>.<para/>
+            /// If SetWindowLong or SetWindowLongPtr has not been called previously,
+            /// GetWindowLongPtr returns zero for values in the extra window or class memory.
+            /// </returns>
+            /// <remarks>
+            /// This method is a wrapper around both the GetWindowLong (32-bit) and the GetWindowLongPtr
+            /// (64-bit) version of these functions.<para/>
+            /// This method will always call the "correct" function for this machine,
+            /// and return the value wrapped in an <see cref="IntPtr"/>.
+            /// </remarks>
+            public static IntPtr GetWindowLong(IntPtr window, GetWindowLongIndex index)
+            {
+                return GetWindowLong(window, (int)index);
+            }
+
+            /// <summary>
+            /// Retrieves information about the specified window. The function also retrieves the value at a specified
+            /// offset into the extra window memory.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window and, indirectly, the class to which the window belongs.
+            /// </param>
+            /// <param name="index">
+            /// The zero-based offset to the value to be retrieved. Valid values are in the range zero through the
+            /// number of bytes of extra window memory, minus the size of a <see cref="IntPtr"/>.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is the requested value.<para/>
+            /// If the function fails, the return value is zero. To get extended error information,
+            /// call <see cref="Marshal.GetLastWin32Error"/>.<para/>
+            /// If SetWindowLong or SetWindowLongPtr has not been called previously, GetWindowLongPtr returns zero for
+            /// values in the extra window or class memory.
+            /// </returns>
+            /// <remarks>
+            /// This method is a wrapper around both the GetWindowLong (32-bit) and the GetWindowLongPtr (64-bit)
+            /// version of these functions.<para/>
+            /// This method will always call the "correct" function for this machine,
+            /// and return the value wrapped in an <see cref="IntPtr"/>.
+            /// </remarks>
+            public static IntPtr GetWindowLong(IntPtr window, int index)
+            {
+                if (IntPtr.Size == 8)
+                {
+                    return GetWindowLongPtr(window, index);
+                }
+                else
+                {
+                    return new IntPtr(GetWindowLongPrivate(window, index));
+                }
+            }
+
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            private static extern int GetWindowLongPrivate([In] IntPtr window, [In] int index);
+
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            private static extern IntPtr GetWindowLongPtr([In] IntPtr window, [In] int index);
+
+            /// <summary>
+            /// Calls the default window procedure to provide default processing for any window messages that an
+            /// application does not process. This function ensures that every message is processed.
+            /// </summary>
+            /// <param name="window">A handle to the window procedure that received the message.</param>
+            /// <param name="msg">The message.</param>
+            /// <param name="wparam">
+            /// Additional message information. The content of this parameter depends on the value of the
+            /// <paramref name="msg"/> parameter.
+            /// </param>
+            /// <param name="lparam">
+            /// Additional message information. The content of this parameter depends on the value of the
+            /// <paramref name="msg"/> parameter.
+            /// </param>
+            /// <returns>The return value is the result of the message processing and depends on the message.</returns>
+            [DllImport(Library, CharSet = CharSet.Unicode)]
+            public static extern IntPtr DefWindowProc
+            (
+                [In] IntPtr window,
+                [In] WindowMessage msg,
+                [In] IntPtr wparam,
+                [In] IntPtr lparam
+            );
+
+            /// <summary>
+            /// Sets the specified window's show state.
+            /// </summary>
+            /// <param name="window">A handle to the window.</param>
+            /// <param name="showCommand">Controls how the window is to be shown.</param>
+            /// <returns>If the window was previously visible, the return value is true. Otherwise false.</returns>
+            [DllImport(Library, SetLastError = true)]
+            [SuppressUnmanagedCodeSecurity]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool ShowWindow([In] IntPtr window, [In] ShowWindowCommand showCommand);
+
+            [DllImport(Library, SetLastError = true)]
+            [SuppressUnmanagedCodeSecurity]
+            public static extern IntPtr BeginPaint(IntPtr hwnd, out PAINTSTRUCT lpPaint);
+
+            [DllImport(Library, SetLastError = true)]
+            [SuppressUnmanagedCodeSecurity]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool EndPaint(IntPtr hWnd, [In] ref PAINTSTRUCT lpPaint);
+
+            [DllImport(Library, SetLastError = true)]
+            [SuppressUnmanagedCodeSecurity]
+            public static extern IntPtr GetDC(IntPtr hWnd);
+
+            [DllImport(Library, SetLastError = true)]
+            [SuppressUnmanagedCodeSecurity]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool ReleaseDC(IntPtr hWnd, IntPtr hDC);
+
+            /// <summary>
+            /// Copies the text of the specified window's title bar (if it has one) into a buffer. If the specified
+            /// window is a control, the text of the control is copied. However,
+            /// <see cref="GetWindowText(IntPtr, StringBuilder, int)"/> cannot retrieve the text of a control in another
+            /// application.
+            /// </summary>
+            /// <param name="window">A handle to the window or control containing the text.</param>
+            /// <param name="windowText">
+            /// The buffer that will receive the text. If the string is as long or longer than the buffer,
+            /// the string is truncated and terminated with a null character.
+            /// </param>
+            /// <param name="maxCharCount">
+            /// The maximum number of characters to copy to the buffer, including the null character.
+            /// If the text exceeds this limit, it is truncated.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is the length, in characters, of the copied string, not
+            /// including the terminating null character. If the window has no title bar or text, if the title bar
+            /// is empty, or if the window or control handle is invalid, the return value is zero. To get extended
+            /// error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true, CharSet = CharSet.Unicode)]
+            public static extern int GetWindowText
+            (
+                [In] IntPtr window,
+                [In] [Out] StringBuilder windowText,
+                [In] int maxCharCount
+            );
+
+            /// <summary>
+            /// Changes the text of the specified window's title bar (if it has one). If the specified window is a
+            /// control, the text of the control is changed. However, <see cref="SetWindowText(IntPtr, string)"/>
+            /// cannot change the text of a control in another application.
+            /// </summary>
+            /// <param name="window">A handle to the window or control whose text is to be changed.</param>
+            /// <param name="newText">The new title or control text.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is nonzero.<para/>
+            /// If the function fails, the return value is zero.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true, CharSet = CharSet.Unicode)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool SetWindowText
+            (
+                [In] IntPtr window,
+                [In] [Optional] string newText
+            );
+
+            /// <summary>
+            /// Changes the size, position, and Z order of a child, pop-up, or top-level window. These windows are
+            /// ordered according to their appearance on the screen. The topmost window receives the highest rank
+            /// and is the first window in the Z order.
+            /// </summary>
+            /// <param name="window">A handle to the window.</param>
+            /// <param name="windowInsertAfter">
+            /// A handle to the window to precede the positioned window in the Z order.
+            /// This parameter must be a window handle.
+            /// </param>
+            /// <param name="x">The new position of the left side of the window, in client coordinates.</param>
+            /// <param name="y">The new position of the top of the window, in client coordinates.</param>
+            /// <param name="cx">The new width of the window, in pixels.</param>
+            /// <param name="cy">The new height of the window, in pixels.</param>
+            /// <param name="flags">The window sizing and positioning flags.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool SetWindowPos
+            (
+                [In] IntPtr window,
+                [In] [Optional] IntPtr windowInsertAfter,
+                [In] int x,
+                [In] int y,
+                [In] int cx,
+                [In] int cy,
+                [In] SetWindowPosFlags flags
+            );
+
+            /// <summary>
+            /// Changes the size, position, and Z order of a child, pop-up, or top-level window.
+            /// These windows are ordered according to their appearance on the screen. The topmost window receives
+            /// the highest rank and is the first window in the Z order.
+            /// </summary>
+            /// <param name="window">One of the pre-defined values for window Z order positioning.</param>
+            /// <param name="windowInsertAfter">
+            /// A handle to the window to precede the positioned window in the Z order.
+            /// This parameter must be a window handle.
+            /// </param>
+            /// <param name="x">The new position of the left side of the window, in client coordinates.</param>
+            /// <param name="y">The new position of the top of the window, in client coordinates.</param>
+            /// <param name="cx">The new width of the window, in pixels.</param>
+            /// <param name="cy">The new height of the window, in pixels.</param>
+            /// <param name="flags">The window sizing and positioning flags.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool SetWindowPos
+            (
+                [In] IntPtr window,
+                [In] [Optional] SetWindowPosHwndEnum windowInsertAfter,
+                [In] int x,
+                [In] int y,
+                [In] int cx,
+                [In] int cy,
+                [In] SetWindowPosFlags flags
+            );
+
+            /// <summary>
+            /// Brings the thread that created the specified window into the foreground and activates the window.
+            /// Keyboard input is directed to the window, and various visual cues are changed for the user.
+            /// The system assigns a slightly higher priority to the thread that created the foreground window
+            /// than it does to other threads.
+            /// </summary>
+            /// <param name="window">
+            /// A handle to the window that should be activated and brought to the foreground.
+            /// </param>
+            /// <returns>
+            /// If the window was brought to the foreground, the return value is true.<para/>
+            /// If the window was not brought to the foreground, the return value is false.
+            /// </returns>
+            [DllImport(Library)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool SetForegroundWindow([In] IntPtr window);
+
+            /// <summary>
+            /// Brings the specified window to the top of the Z order. If the window is a top-level window, it is
+            /// activated. If the window is a child window, the top-level parent window associated with the child
+            /// window is activated.
+            /// </summary>
+            /// <param name="window">A handle to the window to bring to the top of the Z order.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool BringWindowToTop([In] IntPtr window);
+
+            /// <summary>
+            /// Changes the parent window of the specified child window.
+            /// </summary>
+            /// <param name="childWindow">A handle to the child window.</param>
+            /// <param name="newParent">
+            /// A handle to the new parent window. If this parameter is
+            /// <see cref="IntPtr.Zero"/>, the desktop window becomes the new parent window.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is a handle to the previous parent window.<para/>
+            /// If the function fails, the return value is null.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            public static extern IntPtr SetParent
+            (
+                [In] IntPtr childWindow,
+                [In] [Optional] IntPtr newParent
+            );
+
+            /// <summary>
+            /// Retrieves information about the specified window.
+            /// </summary>
+            /// <param name="hwnd">A handle to the window whose information is to be retrieved.</param>
+            /// <param name="wi">
+            /// A pointer to a <see cref="WindowInfo"/> structure to receive the information.
+            /// Note that you must set the <see cref="WindowInfo.Size"/> member to
+            /// <see cref="WindowInfo.SizeInBytes"/> before calling this function.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool GetWindowInfo([In] IntPtr hwnd, [In] [Out] ref WindowInfo wi);
+
+            /// <summary>
+            /// Determines the visibility state of the specified window.
+            /// </summary>
+            /// <param name="window">A handle to the window to be tested.</param>
+            /// <returns>
+            /// If the specified window, its parent window, its parent's parent window, and so forth, have the
+            /// <see cref="WindowStyles.Visible"/> style, the return value is true. Otherwise,
+            /// the return value is false.<para/>
+            /// Because the return value specifies whether the window has the <see cref="WindowStyles.Visible"/>
+            /// style, it may be true even if the window is totally obscured by other windows.
+            /// </returns>
+            [DllImport(Library)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool IsWindowVisible([In] IntPtr window);
+
+            /// <summary>
+            /// Retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given
+            /// in screen coordinates that are relative to the upper-left corner of the screen.
+            /// </summary>
+            /// <param name="windowHandle">Handle to the window whose client coordinates are to be retrieved.</param>
+            /// <param name="windowRectangle">
+            /// Pointer to a structure that receives the screen coordinates of the upper-left and
+            /// lower-right corners of the window.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool GetWindowRect([In] IntPtr windowHandle, [Out] out Rect windowRectangle);
+
+            /// <summary>
+            /// Retrieves the coordinates of a window's client area. The client coordinates specify the upper-left
+            /// and lower-right corners of the client area. Because client coordinates are relative to the upper-left
+            /// corner of a window's client area, the coordinates of the upper-left corner are (0,0).
+            /// </summary>
+            /// <param name="windowHandle">Handle to the window whose client coordinates are to be retrieved.</param>
+            /// <param name="clientRectangle">
+            /// Pointer to a <see cref="Rect"/> structure that receives the client coordinates.
+            /// The <see cref="Rect.Left"/> and <see cref="Rect.Top"/> members are zero. The <see cref="Rect.Right"/>
+            /// and <see cref="Rect.Bottom"/> members contain the width and height of the window.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool GetClientRect([In] IntPtr windowHandle, [Out] out Rect clientRectangle);
+
+            /// <summary>
+            /// Converts the screen coordinates of a specified point on the screen to client-area coordinates.
+            /// </summary>
+            /// <param name="window">Handle to the window whose client area will be used for the conversion.</param>
+            /// <param name="point">
+            /// Pointer to a <see cref="Point"/> structure that specifies the screen coordinates to be converted.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool ScreenToClient([In] IntPtr window, ref Point point);
+
+            /// <summary>
+            /// Converts the client-area coordinates of a specified point to screen coordinates.
+            /// </summary>
+            /// <param name="window">Handle to the window whose client area will be used for the conversion.</param>
+            /// <param name="point">
+            /// Pointer to a <see cref="Point"/> structure that contains the client coordinates to be converted.
+            /// The new screen coordinates are copied into this structure if the function succeeds.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the function fails, the return value is false.
+            /// </returns>
+            [SuppressUnmanagedCodeSecurity]
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool ClientToScreen([In] IntPtr window, [In] [Out] ref Point point);
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/User32/WindowClass.cs b/Crow/src/backends/win32/User32/WindowClass.cs
new file mode 100644 (file)
index 0000000..b046207
--- /dev/null
@@ -0,0 +1,210 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace OpenToolkit.NT.Native
+{
+    public static partial class User32
+    {
+        /// <summary>
+        /// Provides a subset of functions from the Windows API,
+        /// specifically those imported from user32.dll that deal with window classes.
+        /// </summary>
+        public static class WindowClass
+        {
+            /// <summary>
+            /// Retrieves information about a window class,
+            /// including a handle to the small icon associated with the window class.
+            /// </summary>
+            /// <param name="instance">
+            /// A handle to the instance of the application that created the class.
+            /// To retrieve information about classes defined by the system (such as buttons or list boxes),
+            /// set this parameter to <see cref="IntPtr.Zero"/>.
+            /// </param>
+            /// <param name="className">
+            /// A string containing the class name. The name must be that of a preregistered class or a class
+            /// registered by a previous call to the RegisterClass or
+            /// <see cref="RegisterClassEx(ref ExtendedWindowClass)"/> function.
+            /// </param>
+            /// <param name="extendedWindowClass">
+            /// A pointer to a <see cref="ExtendedWindowClass"/> structure
+            /// that receives the information about the class.
+            /// </param>
+            /// <returns>
+            /// If the function finds a matching class and successfully copies the data, the return value is
+            /// true.<para/>
+            /// If the function does not find a matching class and successfully copy the data, the return value is
+            /// false. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true, CharSet = CharSet.Unicode)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool GetClassInfoEx
+            (
+                [In] [Optional] IntPtr instance,
+                [In] string className,
+                [Out] out ExtendedWindowClass extendedWindowClass
+            );
+
+            /// <summary>
+            /// Retrieves information about a window class,
+            /// including a handle to the small icon associated with the window class.
+            /// </summary>
+            /// <param name="instance">
+            /// A handle to the instance of the application that created the class.
+            /// To retrieve information about classes defined by the system (such as buttons or list boxes),
+            /// set this parameter to <see cref="IntPtr.Zero"/>.
+            /// </param>
+            /// <param name="className">
+            /// A pointer to a string containing the class name.
+            /// The name must be that of a preregistered class or a class registered by a previous call to the
+            /// RegisterClass or <see cref="RegisterClassEx(ref ExtendedWindowClass)"/> function.
+            /// </param>
+            /// <param name="extendedWindowClass">
+            /// A pointer to a <see cref="ExtendedWindowClass"/> structure
+            /// that receives the information about the class.
+            /// </param>
+            /// <returns>
+            /// If the function finds a matching class and successfully copies the data, the return value is
+            /// true.<para/>
+            /// If the function does not find a matching class and successfully copy the data, the return value
+            /// is false. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool GetClassInfoEx
+            (
+                [In] IntPtr instance,
+                [In] IntPtr className,
+                [Out] out ExtendedWindowClass extendedWindowClass
+            );
+
+            /// <summary>
+            /// Retrieves information about a window class,
+            /// including a handle to the small icon associated with the window class.
+            /// </summary>
+            /// <param name="instance">
+            /// A handle to the instance of the application that created the class.
+            /// To retrieve information about classes defined by the system (such as buttons or list boxes),
+            /// set this parameter to <see cref="IntPtr.Zero"/>.
+            /// </param>
+            /// <param name="classAtom">
+            /// A class atom created by a previous call to RegisterClass
+            /// or <see cref="RegisterClassEx(ref ExtendedWindowClass)"/>.
+            /// </param>
+            /// <param name="extendedWindowStyle">
+            /// A pointer to a <see cref="ExtendedWindowClass"/> structure
+            /// that receives the information about the class.
+            /// </param>
+            /// <returns>
+            /// If the function finds a matching class and successfully copies the data, the return value is
+            /// true.<para/>
+            /// If the function does not find a matching class and successfully copy the data, the return value is
+            /// false. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            public static bool GetClassInfoEx
+            (
+                [In] IntPtr instance,
+                [In] ushort classAtom,
+                [Out] out ExtendedWindowClass extendedWindowStyle
+            )
+            {
+                return GetClassInfoEx(instance, new IntPtr(classAtom), out extendedWindowStyle);
+            }
+
+            /// <summary>
+            /// Registers a window class for subsequent use in calls to the CreateWindow or
+            /// <see cref="Window.CreateWindowEx(ExtendedWindowStyles, IntPtr, string,
+            /// WindowStyles, int, int, int, int, IntPtr, IntPtr, IntPtr, IntPtr)"/> function.
+            /// </summary>
+            /// <param name="extendedWindowClass">
+            /// A pointer to a <see cref="ExtendedWindowClass"/> structure. You must fill the structure with the
+            /// appropriate class attributes before passing it to the function.
+            /// </param>
+            /// <returns>
+            /// If the function succeeds, the return value is a class atom that uniquely identifies the class being
+            /// registered. This atom can only be used by the CreateWindow,
+            /// <see cref="Window.CreateWindowEx(ExtendedWindowStyles, IntPtr, string,
+            /// WindowStyles, int, int, int, int, IntPtr, IntPtr, IntPtr, IntPtr)"/>,
+            /// GetClassInfo, <see cref="GetClassInfoEx(IntPtr, IntPtr, out ExtendedWindowClass)"/>, FindWindow,
+            /// FindWindowEx, and <see cref="UnregisterClass(string, IntPtr)"/> functions
+            /// and the IActiveIMMap::FilterClientWindows method.<para/>
+            /// If the function fails, the return value is zero.
+            /// To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            [DllImport(Library, SetLastError = true, CharSet = CharSet.Unicode)]
+            public static extern ushort RegisterClassEx([In] ref ExtendedWindowClass extendedWindowClass);
+
+            /// <summary>
+            /// Unregisters a window class, freeing the memory required for the class.
+            /// </summary>
+            /// <param name="className">
+            /// A string specifying the window class name. This class name must have been
+            /// registered by a previous call to the RegisterClass or
+            /// <see cref="RegisterClassEx(ref ExtendedWindowClass)"/> function.
+            /// </param>
+            /// <param name="moduleInstance">A handle to the instance of the module that created the class.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the class could not be found or if a window still exists that was created with the class, the return
+            /// value is false. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            /// <remarks>
+            /// Before calling this function, an application must destroy all windows created with the
+            /// specified class.<para/>
+            /// All window classes that an application registers are unregistered when it terminates.
+            /// </remarks>
+            [DllImport(Library, SetLastError = true, CharSet = CharSet.Unicode)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool UnregisterClass([In] string className, [In] [Optional] IntPtr moduleInstance);
+
+            /// <summary>
+            /// Unregisters a window class, freeing the memory required for the class.
+            /// </summary>
+            /// <param name="className">
+            /// A pointer to a string specifying the window class name. This class name must
+            /// have been registered by a previous call to the RegisterClass or
+            /// <see cref="RegisterClassEx(ref ExtendedWindowClass)"/> function.
+            /// </param>
+            /// <param name="moduleInstance">A handle to the instance of the module that created the class.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the class could not be found or if a window still exists that was created with the class, the return
+            /// value is false. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            /// <remarks>
+            /// Before calling this function, an application must destroy all windows created with the
+            /// specified class.<para/>
+            /// All window classes that an application registers are unregistered when it terminates.
+            /// </remarks>
+            [DllImport(Library, SetLastError = true)]
+            [return: MarshalAs(UnmanagedType.Bool)]
+            public static extern bool UnregisterClass
+            (
+                [In] IntPtr className,
+                [In] [Optional] IntPtr moduleInstance
+            );
+
+            /// <summary>
+            /// Unregisters a window class, freeing the memory required for the class.
+            /// </summary>
+            /// <param name="classAtom">
+            /// A class atom created by a previous call to the RegisterClass or
+            /// <see cref="RegisterClassEx(ref ExtendedWindowClass)"/> function.
+            /// </param>
+            /// <param name="moduleInstance">A handle to the instance of the module that created the class.</param>
+            /// <returns>
+            /// If the function succeeds, the return value is true.<para/>
+            /// If the class could not be found or if a window still exists that was created with the class, the return
+            /// value is false. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
+            /// </returns>
+            /// <remarks>
+            /// Before calling this function, an application must destroy all windows created with the
+            /// specified class.<para/>
+            /// All window classes that an application registers are unregistered when it terminates.
+            /// </remarks>
+            public static bool UnregisterClass([In] ushort classAtom, [In] [Optional] IntPtr moduleInstance)
+            {
+                return UnregisterClass(new IntPtr(classAtom), moduleInstance);
+            }
+        }
+    }
+}
diff --git a/Crow/src/backends/win32/WinBackend.cs b/Crow/src/backends/win32/WinBackend.cs
new file mode 100755 (executable)
index 0000000..183adc1
--- /dev/null
@@ -0,0 +1,469 @@
+//
+// XLibBackend.cs
+//
+// Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+using System.Text;
+using OpenToolkit.NT.Native;
+
+namespace Crow.Win32
+{
+
+    public class Win32Backend : IBackend
+    {
+        public void CleanUp()
+        {
+            User32.Window.ReleaseDC(handle, hdc);
+            User32.Window.DestroyWindow(handle);
+        }
+
+        public void Flush()
+        {
+                       iFace.surf.Flush ();
+            //throw new NotImplementedException();
+        }
+
+        WindowProc WindowProcedureDelegate;
+        string className = "myWindowClass";
+        IntPtr instance = Marshal.GetHINSTANCE(typeof(Win32Backend).Module);
+        IntPtr handle = IntPtr.Zero;
+        IntPtr hdc = IntPtr.Zero;
+               Interface iFace;
+
+        public void Init(Interface _iFace)
+        {
+                       iFace = _iFace;
+
+            WindowProcedureDelegate = WindowProcedure;
+
+            Rect rect = new Rect
+            {
+                Left = iFace.ClientRectangle.Left,
+                Top = iFace.ClientRectangle.Top,
+                Right = iFace.ClientRectangle.Right,
+                Bottom = iFace.ClientRectangle.Bottom
+            };
+
+            User32.Window.AdjustWindowRectEx(ref rect, 0, false, 0);
+
+            ExtendedWindowClass wc = new ExtendedWindowClass
+            {
+                Size = ExtendedWindowClass.SizeInBytes,
+                Style = 0,
+                WindowProc = WindowProcedureDelegate,
+                ClassExtra = 0,
+                WindowExtra = 0,
+                Instance = instance,
+                Icon = IntPtr.Zero,
+                Cursor = User32.Cursor.LoadCursor(CursorName.Arrow),
+                //Background = Gdi32.GetStockObject(GetStockObjectType.BlackBrush),
+                MenuName = null,
+                ClassName = className,
+            };
+
+            ushort atom = User32.WindowClass.RegisterClassEx(ref wc);
+
+            handle = User32.Window.CreateWindowEx(
+                ExtendedWindowStyles.ClientEdge,
+                className,
+                "The title of my window",
+                WindowStyles.OverlappedWindow,
+
+                rect.Left,
+                rect.Top,
+                rect.Width,
+                rect.Height,
+                IntPtr.Zero,
+                IntPtr.Zero,
+                instance,
+                IntPtr.Zero
+            );
+
+            User32.Window.ShowWindow(handle, ShowWindowCommand.Show);
+
+            hdc = User32.Window.GetDC(handle);
+            iFace.surf = new Cairo.Win32Surface(hdc);
+
+        }
+
+        public void ProcessEvents()
+        {
+                       Msg msg;
+            while (User32.Message.PeekMessage(out msg, IntPtr.Zero, 0, 0, PeekMessageActions.Remove))
+            {
+                User32.Message.TranslateMessage(ref msg);
+                User32.Message.DispatchMessage(ref msg);
+            }
+        }
+
+               public bool IsDown (Key key) {
+                       return false;
+               }
+               public bool Shift {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public bool Ctrl {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public bool Alt {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               void HandleWindowPositionChanged(IntPtr handle, WindowMessage message, IntPtr wParam, IntPtr lParam)
+               {
+                       var pos = Marshal.PtrToStructure<WindowPosition>(lParam);
+                       if (pos.HWnd == handle)
+                       {
+                               Rectangle bounds = new Rectangle(pos.X, pos.Y, pos.Width, pos.Height);
+
+                               User32.Window.SetWindowPos
+                               (
+                                       handle, 
+                                       IntPtr.Zero, 
+                                       bounds.X, 
+                                       bounds.Y, 
+                                       bounds.Width,
+                                       bounds.Height,
+                                       SetWindowPosFlags.NoZOrder | SetWindowPosFlags.NoOwnerZOrder |
+                                       SetWindowPosFlags.NoActivate | SetWindowPosFlags.NoSendChanging
+                               );
+                               bounds.Left = bounds.Top = 0;
+                               iFace.ProcessResize (bounds);
+                       }
+               }
+
+               static Key GetKey(int code)
+               {
+                       switch (code)
+                       {
+                       // 0 - 15
+                       case 0: return Key.NoSymbol;
+                       case 1: return Key.Escape;
+                       case 2: return Key.key_1;
+                       case 3: return Key.key_2;
+                       case 4: return Key.key_3;
+                       case 5: return Key.key_4;
+                       case 6: return Key.key_5;
+                       case 7: return Key.key_6;
+                       case 8: return Key.key_7;
+                       case 9: return Key.key_8;
+                       case 10: return Key.key_9;
+                       case 11: return Key.key_0;
+                       case 12: return Key.minus;
+                       case 13: return Key.plus;
+                       case 14: return Key.BackSpace;
+                       case 15: return Key.Tab;
+
+                               // 16-31
+                       case 16: return Key.Q;
+                       case 17: return Key.W;
+                       case 18: return Key.E;
+                       case 19: return Key.R;
+                       case 20: return Key.T;
+                       case 21: return Key.Y;
+                       case 22: return Key.U;
+                       case 23: return Key.I;
+                       case 24: return Key.O;
+                       case 25: return Key.P;
+                       case 26: return Key.bracketleft;
+                       case 27: return Key.bracketright;
+                       case 28: return Key.Return;
+                       case 29: return Key.Control_L;
+                       case 30: return Key.A;
+                       case 31: return Key.S;
+
+                               // 32 - 47
+                       case 32: return Key.D;
+                       case 33: return Key.F;
+                       case 34: return Key.G;
+                       case 35: return Key.H;
+                       case 36: return Key.J;
+                       case 37: return Key.K;
+                       case 38: return Key.L;
+                       case 39: return Key.semicolon;
+                       case 40: return Key.quotedbl;
+                       case 41: return Key.grave;
+                       case 42: return Key.Shift_L;
+                       case 43: return Key.backslash;
+                       case 44: return Key.Z;
+                       case 45: return Key.X;
+                       case 46: return Key.C;
+                       case 47: return Key.V;
+
+                               // 48 - 63
+                       case 48: return Key.B;
+                       case 49: return Key.N;
+                       case 50: return Key.M;
+                       case 51: return Key.comma;
+                       case 52: return Key.period;
+                       case 53: return Key.slash;
+                       case 54: return Key.Shift_R;
+                       case 55: return Key.Print;
+                       case 56: return Key.Alt_L;
+                       case 57: return Key.space;
+                       case 58: return Key.Caps_Lock;
+                       case 59: return Key.F1;
+                       case 60: return Key.F2;
+                       case 61: return Key.F3;
+                       case 62: return Key.F4;
+                       case 63: return Key.F5;
+
+                               // 64 - 79
+                       case 64: return Key.F6;
+                       case 65: return Key.F7;
+                       case 66: return Key.F8;
+                       case 67: return Key.F9;
+                       case 68: return Key.F10;
+                       case 69: return Key.Num_Lock;
+                       case 70: return Key.Scroll_Lock;
+                       case 71: return Key.Home;
+                       case 72: return Key.Up;
+                       case 73: return Key.Page_Up;
+                       case 74: return Key.KP_Subtract;
+                       case 75: return Key.Left;
+                       case 76: return Key.KP_5;
+                       case 77: return Key.Right;
+                       case 78: return Key.KP_Add;
+                       case 79: return Key.End;
+
+                               // 80 - 95
+                       case 80: return Key.Down;
+                       case 81: return Key.Page_Down;
+                       case 82: return Key.Insert;
+                       case 83: return Key.Delete;
+                       case 84: return Key.NoSymbol;
+                       case 85: return Key.NoSymbol;
+                       case 86: return Key.NoSymbol;
+                       case 87: return Key.F11;
+                       case 88: return Key.F12;
+                       case 89: return Key.Pause;
+                       case 90: return Key.NoSymbol;
+                       case 91: return Key.Meta_L;
+                       case 92: return Key.Meta_R;
+                       case 93: return Key.Menu;
+                       case 94: return Key.NoSymbol;
+                       case 95: return Key.NoSymbol;
+
+                               // 96 - 106
+                       case 96: return Key.NoSymbol;
+                       case 97: return Key.NoSymbol;
+                       case 98: return Key.NoSymbol;
+                       case 99: return Key.NoSymbol;
+                       case 100: return Key.F13;
+                       case 101: return Key.F14;
+                       case 102: return Key.F15;
+                       case 103: return Key.F16;
+                       case 104: return Key.F17;
+                       case 105: return Key.F18;
+                       case 106: return Key.F19;
+
+                       default: return Key.NoSymbol;
+                       }
+               }
+               const long ExtendedBit = 1 << 24; // Used to distinguish left and right control, alt and enter keys.
+
+               void handleKeyboard (IntPtr lParam, IntPtr wParam, bool pressed) {
+                       bool extended = (lParam.ToInt64() & ExtendedBit) != 0;
+                       uint scancode = (uint)((lParam.ToInt64() >> 16) & 0xFF);
+                       //ushort repeat_count = unchecked((ushort)((ulong)lParam.ToInt64() & 0xffffu));
+//                     VirtualKey vkey = (VirtualKey)wParam;
+//                     var key = WinKeyMap.TranslateKey(scancode, vkey, extended, false, out bool is_valid);
+                       Key k = GetKey ((int)scancode);
+
+                       if (pressed) 
+                               iFace.ProcessKeyDown (k);
+                       else
+                               iFace.ProcessKeyUp (k);                 
+               }
+               void handleChar (IntPtr lParam, IntPtr wParam) {
+                       char c = IntPtr.Size == 4 ?
+                               (char)wParam.ToInt32() :
+                               (char)wParam.ToInt64();
+
+                       if (!char.IsControl (c))
+                               iFace.ProcessKeyPress (c);
+               }
+
+
+
+        IntPtr WindowProcedure(IntPtr handle, WindowMessage message, IntPtr wParam, IntPtr lParam)
+        {
+            var result = IntPtr.Zero;
+
+
+            switch (message)
+            {
+            case WindowMessage.MouseMove:
+                iFace.ProcessMouseMove
+                ((int)((uint)lParam.ToInt32() & 0x0000FFFF), (int)(((uint)lParam.ToInt32() & 0xFFFF0000) >> 16));
+                break;
+            case WindowMessage.LButtonDown:
+                iFace.ProcessMouseButtonDown(Crow.MouseButton.Left);
+                return IntPtr.Zero;
+            case WindowMessage.RButtonDown:
+                iFace.ProcessMouseButtonDown(Crow.MouseButton.Right);
+                return IntPtr.Zero;
+            case WindowMessage.MButtonDown:
+                iFace.ProcessMouseButtonDown(Crow.MouseButton.Middle);
+                return IntPtr.Zero;
+            case WindowMessage.LButtonUp:
+                iFace.ProcessMouseButtonUp(Crow.MouseButton.Left);
+                return IntPtr.Zero;
+            case WindowMessage.RButtonUp:
+                iFace.ProcessMouseButtonUp(Crow.MouseButton.Right);
+                return IntPtr.Zero;
+            case WindowMessage.MButtonUp:
+                iFace.ProcessMouseButtonUp(Crow.MouseButton.Middle);
+                return IntPtr.Zero;
+                       case WindowMessage.MouseWheel:
+                               iFace.ProcessMouseWheelChanged ((((long)wParam << 32) >> 48) / 120.0f);                                 
+                               return IntPtr.Zero;                                     
+                       case WindowMessage.MouseHWheel:
+                               iFace.ProcessMouseWheelChanged ((((long)wParam << 32) >> 48) / 120.0f);
+                               return IntPtr.Zero;                                     
+                       case WindowMessage.KeyDown:
+                       case WindowMessage.SystemKeyDown:
+                               handleKeyboard (lParam, wParam, true);
+                               return IntPtr.Zero;
+                       case WindowMessage.KeyUp:
+                       case WindowMessage.SystemKeyUp:                                 
+                               handleKeyboard (lParam, wParam, false);
+                               return IntPtr.Zero;
+                       case WindowMessage.Char:
+                               handleChar (lParam, wParam);
+                               break;
+                       case WindowMessage.WindowPosChanged:
+                               HandleWindowPositionChanged(handle, message, wParam, lParam);
+                               break;
+
+
+            /*case WindowMessage.Activate:
+                HandleActivate(handle, message, wParam, lParam);
+                break;
+
+            case WindowMessage.EnterMenuLoop:
+            case WindowMessage.EnterSizeMove:
+                HandleEnterModalLoop(handle, message, wParam, lParam);
+                break;
+
+            case WindowMessage.ExitMenuLoop:
+            case WindowMessage.ExitSizeMove:
+                HandleExitModalLoop(handle, message, wParam, lParam);
+                break;
+
+            case WindowMessage.EraseBackground:
+                // This is triggered only when the client area changes.
+                // As such it does not affect steady-state performance.
+                break;
+
+
+            case WindowMessage.StyleChanged:
+                HandleStyleChanged(handle, message, wParam, lParam);
+                break;
+
+            case WindowMessage.Size:
+                HandleSize(handle, message, wParam, lParam);
+                break;
+
+            case WindowMessage.SetCursor:
+                result = HandleSetCursor(handle, message, wParam, lParam);
+                break;
+
+            case WindowMessage.CaptureChanged:
+                HandleCaptureChanged(handle, message, wParam, lParam);
+                break;
+
+            case WindowMessage.Char:
+                HandleChar(handle, message, wParam, lParam);
+                break;
+
+
+
+            case WindowMessage.MouseLeave:
+                HandleMouseLeave(handle, message, wParam, lParam);
+                break;
+
+            case WindowMessage.MouseWheel:
+                HandleMouseWheel(handle, message, wParam, lParam);
+                return IntPtr.Zero;
+
+            case WindowMessage.MouseHWheel:
+                HandleMouseHWheel(handle, message, wParam, lParam);
+                return IntPtr.Zero;
+
+
+            // Keyboard events:
+            case WindowMessage.KeyDown:
+            case WindowMessage.KeyUp:
+            case WindowMessage.SystemKeyDown:
+            case WindowMessage.SystemKeyUp:
+                HandleKeyboard(handle, message, wParam, lParam);
+                return IntPtr.Zero;
+
+            case WindowMessage.SystemChar:
+                return IntPtr.Zero;
+
+            case WindowMessage.KillFocus:
+                HandleKillFocus(handle, message, wParam, lParam);
+                break;
+
+            case WindowMessage.DropFiles:
+                HandleDropFiles(handle, message, wParam, lParam);
+                break;
+
+            case WindowMessage.Create:
+                HandleCreate(handle, message, wParam, lParam);
+                break;
+            case WindowMessage.Paint:
+                dc = User32.Window.BeginPaint(handle, out paintStruct);
+
+                return IntPtr.Zero;*/
+            case WindowMessage.Close:
+                User32.Window.DestroyWindow(handle);                   
+                return IntPtr.Zero;
+            case WindowMessage.Destroy:
+                User32.Message.PostQuitMessage(0);
+                //User32.WindowClass.UnregisterClass(className, instance);
+                break;
+            }
+
+            if (result != IntPtr.Zero)
+                return result;
+
+            return User32.Window.DefWindowProc(handle, message, wParam, lParam);
+        }
+
+    }
+}
+
index 4d0a2a824b74a1677a10220a12c5bcfc44a9f580..a3ccab91466f18ab10a3f4a7eb40b76d4c219e2f 100644 (file)
@@ -365,6 +365,8 @@ namespace Crow.XCB
 
                IntPtr conn;
 
+               XKB.XCBKeyboard Keyboard;
+
 
                #region IBackend implementation
                public void Init (Interface _iFace)
@@ -374,7 +376,7 @@ namespace Crow.XCB
                        conn = xcb_connect (null, IntPtr.Zero);
 
 
-                       iFace.Keyboard = new  XKB.XCBKeyboard (conn);
+                       Keyboard = new  XKB.XCBKeyboard (conn, iFace);
 
                        xcb_iterator_t scr_it = xcb_setup_roots_iterator (xcb_get_setup (conn));
                        IntPtr screen = scr_it.data;
@@ -420,7 +422,7 @@ namespace Crow.XCB
 
                public void CleanUp ()
                {
-                       iFace.Keyboard.Destroy ();
+                       Keyboard.Destroy ();
 
                        xcb_disconnect (conn);  
                }
@@ -449,25 +451,36 @@ namespace Crow.XCB
                                else if(evt.button == xcb_button_t.WheelDown)
                                        iFace.ProcessMouseWheelChanged (-Interface.WheelIncrement);
                                else
-                                       iFace.ProcessMouseButtonDown (evt.detail - 1);                          
+                                       iFace.ProcessMouseButtonDown ((MouseButton)(evt.detail - 1));                           
                                break;
                        case xcb_event_type.BUTTON_RELEASE:
                                if (evt.button == xcb_button_t.WheelUp || evt.button == xcb_button_t.WheelDown)
                                        break;
-                               iFace.ProcessMouseButtonUp (evt.detail - 1);
+                               iFace.ProcessMouseButtonUp ((MouseButton)(evt.detail - 1));
                                break;
                        case xcb_event_type.KEY_PRESS:
-                               iFace.Keyboard.HandleEvent (evt.keycode, true);
+                               Keyboard.HandleEvent (evt.keycode, true);
                                break;
                        case xcb_event_type.KEY_RELEASE:
-                               iFace.Keyboard.HandleEvent (evt.keycode, false);
+                               Keyboard.HandleEvent (evt.keycode, false);
                                break;
                        default:
                                Console.WriteLine ("unknown event");
                                break;
                        }
                }
-
+               public bool IsDown (Key key) {
+                       return false;
+               }
+               public bool Shift {
+                       get { return Keyboard.Shift; }
+               }
+               public bool Ctrl {
+                       get { return Keyboard.Ctrl; }
+               }
+               public bool Alt {
+                       get { return Keyboard.Alt;}
+               }
                #endregion
 
                static IntPtr findVisual (xcb_iterator_t scr_it, xcb_visualid_t visualId){
index c7484f50ea327d187dd93dd370cce1697b43ac5d..5043ec37998ca2cbfb694839b217d4fa2b5f5aa2 100644 (file)
@@ -31,7 +31,7 @@ namespace Crow.XKB
        using xkb_keycode_t = System.UInt32;
        using xkb_mod_index_t = System.UInt32;
 
-       public class XCBKeyboard : IKeyboard
+       public class XCBKeyboard 
        {
                enum xkb_keysym : uint {
                        NoSymbol                                                = 0x000000,
@@ -2527,22 +2527,18 @@ namespace Crow.XKB
 
                IntPtr xkbCtx, xkbKeymap, xkbState;
 
-               #region IKeyboard implementation
+               Interface iFace;
 
-               public event EventHandler<KeyEventArgs> KeyDown;
-               public event EventHandler<KeyEventArgs> KeyUp;
-               public event EventHandler<KeyPressEventArgs> KeyPress;
 
                public void HandleEvent (uint keycode, bool pressed) {
                        xkb_keysym ks = xkb_state_key_get_one_sym (xkbState, keycode);
                        xkb_key_direction keyDir = xkb_key_direction.KEY_DOWN;
 
                        if (pressed) {
-                               KeyDown.Raise (this, new KeyEventArgs ((Key)ks, false));
+                               iFace.ProcessKeyDown ((Key)ks);
 
                                IntPtr ptrKeySyms = IntPtr.Zero;
 
-
                                int nbKeySyms = xkb_state_key_get_syms (xkbState, keycode, ref ptrKeySyms);
                                int[] keySyms = new int[nbKeySyms];
                                Marshal.Copy (ptrKeySyms, keySyms, 0, nbKeySyms);
@@ -2550,11 +2546,11 @@ namespace Crow.XKB
                                uint utf32 = xkb_state_key_get_utf32 (xkbState, keycode);
                                char c = char.ConvertFromUtf32 ((int)utf32) [0];
 
-                               if (!char.IsControl(c))
-                                       KeyPress.Raise (this, new KeyPressEventArgs (c));
+                               if (!char.IsControl (c))
+                                       iFace.ProcessKeyPress (c);
                        } else {
                                keyDir = xkb_key_direction.KEY_UP;
-                               KeyUp.Raise (this, new KeyEventArgs ((Key)ks, false));
+                               iFace.ProcessKeyUp ((Key)ks);
                        }
 
                        xkb_state_update_key (xkbState, keycode, keyDir);
@@ -2582,11 +2578,12 @@ namespace Crow.XKB
                        xkb_keymap_unref (xkbKeymap);
                        xkb_context_unref (xkbCtx);
                }
-               #endregion
 
 
-               public XCBKeyboard (IntPtr xcbConnection)
+               public XCBKeyboard (IntPtr xcbConnection, Interface _iface)
                {
+                       iFace = _iface;
+
                        ushort xkb_maj, xkb_min;
                        byte base_evt, base_err;
 
index 78eef4ea67591050fb2673eaa676931e0ea3062a..2af86d3ffc493cc8078e935f6be1a060471a96f3 100644 (file)
@@ -28,7 +28,7 @@ using System.Runtime.InteropServices;
 
 namespace Crow.XLib
 {
-       public class X11Keyboard : IKeyboard
+       public class X11Keyboard
        {
                #region PInvoke
                [DllImportAttribute("X11")]
index a123e2046f8877c878d26f32e375a0d3f5389d6b..111296e3f4a002c2f8f99a559c28a5ca2df95969 100644 (file)
@@ -78,6 +78,7 @@ namespace Crow.XLib
                XErrorHandler errorHnd;
 
                Interface iFace;
+               X11Keyboard keyboard;
 
                #region IBackend implementation
 
@@ -106,7 +107,7 @@ namespace Crow.XLib
 
                        XMapWindow (xDisp, xwinHnd);
 
-                       iFace.Keyboard = new Crow.XLib.X11Keyboard (xDisp);
+                       keyboard = new Crow.XLib.X11Keyboard (xDisp);
 
                        iFace.surf = new Cairo.XlibSurface (xDisp, xwinHnd, xDefaultVisual, iFace.ClientRectangle.Width, iFace.ClientRectangle.Height);
 
@@ -116,7 +117,7 @@ namespace Crow.XLib
 
                public void CleanUp ()
                {
-                       iFace.Keyboard.Destroy ();
+                       keyboard.Destroy ();
 
                        XCloseDisplay (xDisp);
                }
@@ -134,10 +135,10 @@ namespace Crow.XLib
                                        iFace.ProcessResize (new Rectangle (0, 0, xevent.ExposeEvent.width, xevent.ExposeEvent.height));
                                        break;
                                case XEventName.KeyPress:
-                                       iFace.Keyboard.HandleEvent ((uint)xevent.KeyEvent.keycode, true);
+                                       keyboard.HandleEvent ((uint)xevent.KeyEvent.keycode, true);
                                        break;
                                case XEventName.KeyRelease:
-                                       iFace.Keyboard.HandleEvent ((uint)xevent.KeyEvent.keycode, false);
+                                       keyboard.HandleEvent ((uint)xevent.KeyEvent.keycode, false);
                                        break;
                                case XEventName.MotionNotify:
                                        //Debug.WriteLine ("motion: ({0},{1})", xevent.MotionEvent.x, xevent.MotionEvent.y);
@@ -150,17 +151,36 @@ namespace Crow.XLib
                                        else if(xevent.ButtonEvent.button == 5)
                                                iFace.ProcessMouseWheelChanged (-Interface.WheelIncrement);
                                        else
-                                               iFace.ProcessMouseButtonDown (xevent.ButtonEvent.button - 1);
+                                               iFace.ProcessMouseButtonDown ((MouseButton)(xevent.ButtonEvent.button - 1));
                                        break;
                                case XEventName.ButtonRelease:
                                        //Debug.WriteLine ("button release: {0}", xevent.ButtonEvent.button);
-                                       iFace.ProcessMouseButtonUp (xevent.ButtonEvent.button - 1);
+                                       iFace.ProcessMouseButtonUp ((MouseButton)(xevent.ButtonEvent.button - 1));
                                        break;
 
                                }
                        }
                }
+               public bool IsDown (Key key) {
+                       return false;
+               }
+               public bool Shift {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public bool Ctrl {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
 
+               public bool Alt {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
                #endregion
 
                int HandleError (IntPtr display, ref XErrorEvent error_event)
index 6124d6f98e9ecd90820df61a317481805eecdf32..c10cfdf60c2e34eb7caa5254347af2fdec0c2c35 100644 (file)
@@ -605,9 +605,9 @@ namespace Crow
                {                       
                        //base.onMouseWheel (sender, e);
 
-                       if (IFace.Keyboard.Shift)
+                       if (IFace.Shift)
                                ScrollX -= (int)((double)(e.Delta * MouseWheelSpeed) / xScale);
-                       else if (IFace.Keyboard.Ctrl) {
+                       else if (IFace.Ctrl) {
                                if (e.Delta > 0) {
                                        XScale *= 2.0;
                                } else {
diff --git a/Crow/src/win32/Win32.cs b/Crow/src/win32/Win32.cs
deleted file mode 100644 (file)
index 3249fce..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.Diagnostics;
-
-namespace Crow
-{
-    public static class Win32
-    {
-        [DllImport("user32.dll")]
-        public static extern IntPtr GetDC(IntPtr hWnd);
-        #region  mouse winApi
-
-        [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
-        public struct Point
-        {
-
-            /// LONG->int
-            public int x;
-
-            /// LONG->int
-            public int y;
-        }
-        [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
-        public struct HICON__
-        {
-
-            /// int
-            public int unused;
-        }
-
-#if _WIN32 || _WIN64
-        /// Return Type: HCURSOR->HICON->HICON__*
-        ///hCursor: HCURSOR->HICON->HICON__*
-        [System.Runtime.InteropServices.DllImportAttribute("user32.dll", EntryPoint = "SetCursor")]
-        public static extern System.IntPtr SetCursor([System.Runtime.InteropServices.InAttribute()] System.IntPtr hCursor);
-#elif __linux__
-               public static System.IntPtr SetCursor(System.IntPtr hCursor)
-               {
-
-                       return (IntPtr)0;
-               }
-#endif
-
-        /// Return Type: BOOL->int
-        ///lpPoint: LPPOINT->tagPOINT*
-        [System.Runtime.InteropServices.DllImportAttribute("user32.dll", EntryPoint = "GetCursorPos")]
-        [return: System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
-        public static extern bool GetCursorPos([System.Runtime.InteropServices.OutAttribute()] out Point lpPoint);
-
-        /// Return Type: BOOL->int
-        ///X: int
-        ///Y: int
-        [System.Runtime.InteropServices.DllImportAttribute("user32.dll", EntryPoint = "SetCursorPos")]
-        [return: System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
-        public static extern bool SetCursorPos(int X, int Y);
-
-        #endregion
-    }
-}
diff --git a/Crow/src/win32/winApi.cs b/Crow/src/win32/winApi.cs
deleted file mode 100755 (executable)
index 7ed9f90..0000000
+++ /dev/null
@@ -1,1238 +0,0 @@
-   /// <summary>
-  /// Windows Messages
-  /// Defined in winuser.h from Windows SDK v6.1
-  /// Documentation pulled from MSDN.
-  /// </summary>
-using System;
-
-public enum WM : uint
-  {
-    /// <summary>
-    /// The WM_NULL message performs no operation. An application sends the WM_NULL message if it wants to post a message that the recipient window will ignore.
-    /// </summary>
-    NULL = 0x0000,
-    /// <summary>
-    /// The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window receives this message after the window is created, but before the window becomes visible.
-    /// </summary>
-    CREATE = 0x0001,
-    /// <summary>
-    /// The WM_DESTROY message is sent when a window is being destroyed. It is sent to the window procedure of the window being destroyed after the window is removed from the screen.
-    /// This message is sent first to the window being destroyed and then to the child windows (if any) as they are destroyed. During the processing of the message, it can be assumed that all child windows still exist.
-    /// /// </summary>
-    DESTROY = 0x0002,
-    /// <summary>
-    /// The WM_MOVE message is sent after a window has been moved.
-    /// </summary>
-    MOVE = 0x0003,
-    /// <summary>
-    /// The WM_SIZE message is sent to a window after its size has changed.
-    /// </summary>
-    SIZE = 0x0005,
-    /// <summary>
-    /// The WM_ACTIVATE message is sent to both the window being activated and the window being deactivated. If the windows use the same input queue, the message is sent synchronously, first to the window procedure of the top-level window being deactivated, then to the window procedure of the top-level window being activated. If the windows use different input queues, the message is sent asynchronously, so the window is activated immediately.
-    /// </summary>
-    ACTIVATE = 0x0006,
-    /// <summary>
-    /// The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus.
-    /// </summary>
-    SETFOCUS = 0x0007,
-    /// <summary>
-    /// The WM_KILLFOCUS message is sent to a window immediately before it loses the keyboard focus.
-    /// </summary>
-    KILLFOCUS = 0x0008,
-    /// <summary>
-    /// The WM_ENABLE message is sent when an application changes the enabled state of a window. It is sent to the window whose enabled state is changing. This message is sent before the EnableWindow function returns, but after the enabled state (WS_DISABLED style bit) of the window has changed.
-    /// </summary>
-    ENABLE = 0x000A,
-    /// <summary>
-    /// An application sends the WM_SETREDRAW message to a window to allow changes in that window to be redrawn or to prevent changes in that window from being redrawn.
-    /// </summary>
-    SETREDRAW = 0x000B,
-    /// <summary>
-    /// An application sends a WM_SETTEXT message to set the text of a window.
-    /// </summary>
-    SETTEXT = 0x000C,
-    /// <summary>
-    /// An application sends a WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller.
-    /// </summary>
-    GETTEXT = 0x000D,
-    /// <summary>
-    /// An application sends a WM_GETTEXTLENGTH message to determine the length, in characters, of the text associated with a window.
-    /// </summary>
-    GETTEXTLENGTH = 0x000E,
-    /// <summary>
-    /// The WM_PAINT message is sent when the system or another application makes a request to paint a portion of an application's window. The message is sent when the UpdateWindow or RedrawWindow function is called, or by the DispatchMessage function when the application obtains a WM_PAINT message by using the GetMessage or PeekMessage function.
-    /// </summary>
-    PAINT = 0x000F,
-    /// <summary>
-    /// The WM_CLOSE message is sent as a signal that a window or an application should terminate.
-    /// </summary>
-    CLOSE = 0x0010,
-    /// <summary>
-    /// The WM_QUERYENDSESSION message is sent when the user chooses to end the session or when an application calls one of the system shutdown functions. If any application returns zero, the session is not ended. The system stops sending WM_QUERYENDSESSION messages as soon as one application returns zero.
-    /// After processing this message, the system sends the WM_ENDSESSION message with the wParam parameter set to the results of the WM_QUERYENDSESSION message.
-    /// </summary>
-    QUERYENDSESSION = 0x0011,
-    /// <summary>
-    /// The WM_QUERYOPEN message is sent to an icon when the user requests that the window be restored to its previous size and position.
-    /// </summary>
-    QUERYOPEN = 0x0013,
-    /// <summary>
-    /// The WM_ENDSESSION message is sent to an application after the system processes the results of the WM_QUERYENDSESSION message. The WM_ENDSESSION message informs the application whether the session is ending.
-    /// </summary>
-    ENDSESSION = 0x0016,
-    /// <summary>
-    /// The WM_QUIT message indicates a request to terminate an application and is generated when the application calls the PostQuitMessage function. It causes the GetMessage function to return zero.
-    /// </summary>
-    QUIT = 0x0012,
-    /// <summary>
-    /// The WM_ERASEBKGND message is sent when the window background must be erased (for example, when a window is resized). The message is sent to prepare an invalidated portion of a window for painting.
-    /// </summary>
-    ERASEBKGND = 0x0014,
-    /// <summary>
-    /// This message is sent to all top-level windows when a change is made to a system color setting.
-    /// </summary>
-    SYSCOLORCHANGE = 0x0015,
-    /// <summary>
-    /// The WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown.
-    /// </summary>
-    SHOWWINDOW = 0x0018,
-    /// <summary>
-    /// An application sends the WM_WININICHANGE message to all top-level windows after making a change to the WIN.INI file. The SystemParametersInfo function sends this message after an application uses the function to change a setting in WIN.INI.
-    /// Note  The WM_WININICHANGE message is provided only for compatibility with earlier versions of the system. Applications should use the WM_SETTINGCHANGE message.
-    /// </summary>
-    WININICHANGE = 0x001A,
-    /// <summary>
-    /// An application sends the WM_WININICHANGE message to all top-level windows after making a change to the WIN.INI file. The SystemParametersInfo function sends this message after an application uses the function to change a setting in WIN.INI.
-    /// Note  The WM_WININICHANGE message is provided only for compatibility with earlier versions of the system. Applications should use the WM_SETTINGCHANGE message.
-    /// </summary>
-    SETTINGCHANGE = WININICHANGE,
-    /// <summary>
-    /// The WM_DEVMODECHANGE message is sent to all top-level windows whenever the user changes device-mode settings.
-    /// </summary>
-    DEVMODECHANGE = 0x001B,
-    /// <summary>
-    /// The WM_ACTIVATEAPP message is sent when a window belonging to a different application than the active window is about to be activated. The message is sent to the application whose window is being activated and to the application whose window is being deactivated.
-    /// </summary>
-    ACTIVATEAPP = 0x001C,
-    /// <summary>
-    /// An application sends the WM_FONTCHANGE message to all top-level windows in the system after changing the pool of font resources.
-    /// </summary>
-    FONTCHANGE = 0x001D,
-    /// <summary>
-    /// A message that is sent whenever there is a change in the system time.
-    /// </summary>
-    TIMECHANGE = 0x001E,
-    /// <summary>
-    /// The WM_CANCELMODE message is sent to cancel certain modes, such as mouse capture. For example, the system sends this message to the active window when a dialog box or message box is displayed. Certain functions also send this message explicitly to the specified window regardless of whether it is the active window. For example, the EnableWindow function sends this message when disabling the specified window.
-    /// </summary>
-    CANCELMODE = 0x001F,
-    /// <summary>
-    /// The WM_SETCURSOR message is sent to a window if the mouse causes the cursor to move within a window and mouse input is not captured.
-    /// </summary>
-    SETCURSOR = 0x0020,
-    /// <summary>
-    /// The WM_MOUSEACTIVATE message is sent when the cursor is in an inactive window and the user presses a mouse button. The parent window receives this message only if the child window passes it to the DefWindowProc function.
-    /// </summary>
-    MOUSEACTIVATE = 0x0021,
-    /// <summary>
-    /// The WM_CHILDACTIVATE message is sent to a child window when the user clicks the window's title bar or when the window is activated, moved, or sized.
-    /// </summary>
-    CHILDACTIVATE = 0x0022,
-    /// <summary>
-    /// The WM_QUEUESYNC message is sent by a computer-based training (CBT) application to separate user-input messages from other messages sent through the WH_JOURNALPLAYBACK Hook procedure.
-    /// </summary>
-    QUEUESYNC = 0x0023,
-    /// <summary>
-    /// The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size.
-    /// </summary>
-    GETMINMAXINFO = 0x0024,
-    /// <summary>
-    /// Windows NT 3.51 and earlier: The WM_PAINTICON message is sent to a minimized window when the icon is to be painted. This message is not sent by newer versions of Microsoft Windows, except in unusual circumstances explained in the Remarks.
-    /// </summary>
-    PAINTICON = 0x0026,
-    /// <summary>
-    /// Windows NT 3.51 and earlier: The WM_ICONERASEBKGND message is sent to a minimized window when the background of the icon must be filled before painting the icon. A window receives this message only if a class icon is defined for the window; otherwise, WM_ERASEBKGND is sent. This message is not sent by newer versions of Windows.
-    /// </summary>
-    ICONERASEBKGND = 0x0027,
-    /// <summary>
-    /// The WM_NEXTDLGCTL message is sent to a dialog box procedure to set the keyboard focus to a different control in the dialog box.
-    /// </summary>
-    NEXTDLGCTL = 0x0028,
-    /// <summary>
-    /// The WM_SPOOLERSTATUS message is sent from Print Manager whenever a job is added to or removed from the Print Manager queue.
-    /// </summary>
-    SPOOLERSTATUS = 0x002A,
-    /// <summary>
-    /// The WM_DRAWITEM message is sent to the parent window of an owner-drawn button, combo box, list box, or menu when a visual aspect of the button, combo box, list box, or menu has changed.
-    /// </summary>
-    DRAWITEM = 0x002B,
-    /// <summary>
-    /// The WM_MEASUREITEM message is sent to the owner window of a combo box, list box, list view control, or menu item when the control or menu is created.
-    /// </summary>
-    MEASUREITEM = 0x002C,
-    /// <summary>
-    /// Sent to the owner of a list box or combo box when the list box or combo box is destroyed or when items are removed by the LB_DELETESTRING, LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT message. The system sends a WM_DELETEITEM message for each deleted item. The system sends the WM_DELETEITEM message for any deleted list box or combo box item with nonzero item data.
-    /// </summary>
-    DELETEITEM = 0x002D,
-    /// <summary>
-    /// Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_KEYDOWN message.
-    /// </summary>
-    VKEYTOITEM = 0x002E,
-    /// <summary>
-    /// Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_CHAR message.
-    /// </summary>
-    CHARTOITEM = 0x002F,
-    /// <summary>
-    /// An application sends a WM_SETFONT message to specify the font that a control is to use when drawing text.
-    /// </summary>
-    SETFONT = 0x0030,
-    /// <summary>
-    /// An application sends a WM_GETFONT message to a control to retrieve the font with which the control is currently drawing its text.
-    /// </summary>
-    GETFONT = 0x0031,
-    /// <summary>
-    /// An application sends a WM_SETHOTKEY message to a window to associate a hot key with the window. When the user presses the hot key, the system activates the window.
-    /// </summary>
-    SETHOTKEY = 0x0032,
-    /// <summary>
-    /// An application sends a WM_GETHOTKEY message to determine the hot key associated with a window.
-    /// </summary>
-    GETHOTKEY = 0x0033,
-    /// <summary>
-    /// The WM_QUERYDRAGICON message is sent to a minimized (iconic) window. The window is about to be dragged by the user but does not have an icon defined for its class. An application can return a handle to an icon or cursor. The system displays this cursor or icon while the user drags the icon.
-    /// </summary>
-    QUERYDRAGICON = 0x0037,
-    /// <summary>
-    /// The system sends the WM_COMPAREITEM message to determine the relative position of a new item in the sorted list of an owner-drawn combo box or list box. Whenever the application adds a new item, the system sends this message to the owner of a combo box or list box created with the CBS_SORT or LBS_SORT style.
-    /// </summary>
-    COMPAREITEM = 0x0039,
-    /// <summary>
-    /// Active Accessibility sends the WM_GETOBJECT message to obtain information about an accessible object contained in a server application.
-    /// Applications never send this message directly. It is sent only by Active Accessibility in response to calls to AccessibleObjectFromPoint, AccessibleObjectFromEvent, or AccessibleObjectFromWindow. However, server applications handle this message.
-    /// </summary>
-    GETOBJECT = 0x003D,
-    /// <summary>
-    /// The WM_COMPACTING message is sent to all top-level windows when the system detects more than 12.5 percent of system time over a 30- to 60-second interval is being spent compacting memory. This indicates that system memory is low.
-    /// </summary>
-    COMPACTING = 0x0041,
-    /// <summary>
-    /// WM_COMMNOTIFY is Obsolete for Win32-Based Applications
-    /// </summary>
-    [Obsolete]
-    COMMNOTIFY = 0x0044,
-    /// <summary>
-    /// The WM_WINDOWPOSCHANGING message is sent to a window whose size, position, or place in the Z order is about to change as a result of a call to the SetWindowPos function or another window-management function.
-    /// </summary>
-    WINDOWPOSCHANGING = 0x0046,
-    /// <summary>
-    /// The WM_WINDOWPOSCHANGED message is sent to a window whose size, position, or place in the Z order has changed as a result of a call to the SetWindowPos function or another window-management function.
-    /// </summary>
-    WINDOWPOSCHANGED = 0x0047,
-    /// <summary>
-    /// Notifies applications that the system, typically a battery-powered personal computer, is about to enter a suspended mode.
-    /// Use: POWERBROADCAST
-    /// </summary>
-    [Obsolete]
-    POWER = 0x0048,
-    /// <summary>
-    /// An application sends the WM_COPYDATA message to pass data to another application.
-    /// </summary>
-    COPYDATA = 0x004A,
-    /// <summary>
-    /// The WM_CANCELJOURNAL message is posted to an application when a user cancels the application's journaling activities. The message is posted with a NULL window handle.
-    /// </summary>
-    CANCELJOURNAL = 0x004B,
-    /// <summary>
-    /// Sent by a common control to its parent window when an event has occurred or the control requires some information.
-    /// </summary>
-    NOTIFY = 0x004E,
-    /// <summary>
-    /// The WM_INPUTLANGCHANGEREQUEST message is posted to the window with the focus when the user chooses a new input language, either with the hotkey (specified in the Keyboard control panel application) or from the indicator on the system taskbar. An application can accept the change by passing the message to the DefWindowProc function or reject the change (and prevent it from taking place) by returning immediately.
-    /// </summary>
-    INPUTLANGCHANGEREQUEST = 0x0050,
-    /// <summary>
-    /// The WM_INPUTLANGCHANGE message is sent to the topmost affected window after an application's input language has been changed. You should make any application-specific settings and pass the message to the DefWindowProc function, which passes the message to all first-level child windows. These child windows can pass the message to DefWindowProc to have it pass the message to their child windows, and so on.
-    /// </summary>
-    INPUTLANGCHANGE = 0x0051,
-    /// <summary>
-    /// Sent to an application that has initiated a training card with Microsoft Windows Help. The message informs the application when the user clicks an authorable button. An application initiates a training card by specifying the HELP_TCARD command in a call to the WinHelp function.
-    /// </summary>
-    TCARD = 0x0052,
-    /// <summary>
-    /// Indicates that the user pressed the F1 key. If a menu is active when F1 is pressed, WM_HELP is sent to the window associated with the menu; otherwise, WM_HELP is sent to the window that has the keyboard focus. If no window has the keyboard focus, WM_HELP is sent to the currently active window.
-    /// </summary>
-    HELP = 0x0053,
-    /// <summary>
-    /// The WM_USERCHANGED message is sent to all windows after the user has logged on or off. When the user logs on or off, the system updates the user-specific settings. The system sends this message immediately after updating the settings.
-    /// </summary>
-    USERCHANGED = 0x0054,
-    /// <summary>
-    /// Determines if a window accepts ANSI or Unicode structures in the WM_NOTIFY notification message. WM_NOTIFYFORMAT messages are sent from a common control to its parent window and from the parent window to the common control.
-    /// </summary>
-    NOTIFYFORMAT = 0x0055,
-    /// <summary>
-    /// The WM_CONTEXTMENU message notifies a window that the user clicked the right mouse button (right-clicked) in the window.
-    /// </summary>
-    CONTEXTMENU = 0x007B,
-    /// <summary>
-    /// The WM_STYLECHANGING message is sent to a window when the SetWindowLong function is about to change one or more of the window's styles.
-    /// </summary>
-    STYLECHANGING = 0x007C,
-    /// <summary>
-    /// The WM_STYLECHANGED message is sent to a window after the SetWindowLong function has changed one or more of the window's styles
-    /// </summary>
-    STYLECHANGED = 0x007D,
-    /// <summary>
-    /// The WM_DISPLAYCHANGE message is sent to all windows when the display resolution has changed.
-    /// </summary>
-    DISPLAYCHANGE = 0x007E,
-    /// <summary>
-    /// The WM_GETICON message is sent to a window to retrieve a handle to the large or small icon associated with a window. The system displays the large icon in the ALT+TAB dialog, and the small icon in the window caption.
-    /// </summary>
-    GETICON = 0x007F,
-    /// <summary>
-    /// An application sends the WM_SETICON message to associate a new large or small icon with a window. The system displays the large icon in the ALT+TAB dialog box, and the small icon in the window caption.
-    /// </summary>
-    SETICON = 0x0080,
-    /// <summary>
-    /// The WM_NCCREATE message is sent prior to the WM_CREATE message when a window is first created.
-    /// </summary>
-    NCCREATE = 0x0081,
-    /// <summary>
-    /// The WM_NCDESTROY message informs a window that its nonclient area is being destroyed. The DestroyWindow function sends the WM_NCDESTROY message to the window following the WM_DESTROY message. WM_DESTROY is used to free the allocated memory object associated with the window.
-    /// The WM_NCDESTROY message is sent after the child windows have been destroyed. In contrast, WM_DESTROY is sent before the child windows are destroyed.
-    /// </summary>
-    NCDESTROY = 0x0082,
-    /// <summary>
-    /// The WM_NCCALCSIZE message is sent when the size and position of a window's client area must be calculated. By processing this message, an application can control the content of the window's client area when the size or position of the window changes.
-    /// </summary>
-    NCCALCSIZE = 0x0083,
-    /// <summary>
-    /// The WM_NCHITTEST message is sent to a window when the cursor moves, or when a mouse button is pressed or released. If the mouse is not captured, the message is sent to the window beneath the cursor. Otherwise, the message is sent to the window that has captured the mouse.
-    /// </summary>
-    NCHITTEST = 0x0084,
-    /// <summary>
-    /// The WM_NCPAINT message is sent to a window when its frame must be painted.
-    /// </summary>
-    NCPAINT = 0x0085,
-    /// <summary>
-    /// The WM_NCACTIVATE message is sent to a window when its nonclient area needs to be changed to indicate an active or inactive state.
-    /// </summary>
-    NCACTIVATE = 0x0086,
-    /// <summary>
-    /// The WM_GETDLGCODE message is sent to the window procedure associated with a control. By default, the system handles all keyboard input to the control; the system interprets certain types of keyboard input as dialog box navigation keys. To override this default behavior, the control can respond to the WM_GETDLGCODE message to indicate the types of input it wants to process itself.
-    /// </summary>
-    GETDLGCODE = 0x0087,
-    /// <summary>
-    /// The WM_SYNCPAINT message is used to synchronize painting while avoiding linking independent GUI threads.
-    /// </summary>
-    SYNCPAINT = 0x0088,
-    /// <summary>
-    /// The WM_NCMOUSEMOVE message is posted to a window when the cursor is moved within the nonclient area of the window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCMOUSEMOVE = 0x00A0,
-    /// <summary>
-    /// The WM_NCLBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCLBUTTONDOWN = 0x00A1,
-    /// <summary>
-    /// The WM_NCLBUTTONUP message is posted when the user releases the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCLBUTTONUP = 0x00A2,
-    /// <summary>
-    /// The WM_NCLBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCLBUTTONDBLCLK = 0x00A3,
-    /// <summary>
-    /// The WM_NCRBUTTONDOWN message is posted when the user presses the right mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCRBUTTONDOWN = 0x00A4,
-    /// <summary>
-    /// The WM_NCRBUTTONUP message is posted when the user releases the right mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCRBUTTONUP = 0x00A5,
-    /// <summary>
-    /// The WM_NCRBUTTONDBLCLK message is posted when the user double-clicks the right mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCRBUTTONDBLCLK = 0x00A6,
-    /// <summary>
-    /// The WM_NCMBUTTONDOWN message is posted when the user presses the middle mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCMBUTTONDOWN = 0x00A7,
-    /// <summary>
-    /// The WM_NCMBUTTONUP message is posted when the user releases the middle mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCMBUTTONUP = 0x00A8,
-    /// <summary>
-    /// The WM_NCMBUTTONDBLCLK message is posted when the user double-clicks the middle mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCMBUTTONDBLCLK = 0x00A9,
-    /// <summary>
-    /// The WM_NCXBUTTONDOWN message is posted when the user presses the first or second X button while the cursor is in the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCXBUTTONDOWN = 0x00AB,
-    /// <summary>
-    /// The WM_NCXBUTTONUP message is posted when the user releases the first or second X button while the cursor is in the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCXBUTTONUP = 0x00AC,
-    /// <summary>
-    /// The WM_NCXBUTTONDBLCLK message is posted when the user double-clicks the first or second X button while the cursor is in the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
-    /// </summary>
-    NCXBUTTONDBLCLK = 0x00AD,
-    /// <summary>
-    /// The WM_INPUT_DEVICE_CHANGE message is sent to the window that registered to receive raw input. A window receives this message through its WindowProc function.
-    /// </summary>
-    INPUT_DEVICE_CHANGE = 0x00FE,
-    /// <summary>
-    /// The WM_INPUT message is sent to the window that is getting raw input.
-    /// </summary>
-    INPUT = 0x00FF,
-    /// <summary>
-    /// This message filters for keyboard messages.
-    /// </summary>
-    KEYFIRST = 0x0100,
-    /// <summary>
-    /// The WM_KEYDOWN message is posted to the window with the keyboard focus when a nonsystem key is pressed. A nonsystem key is a key that is pressed when the ALT key is not pressed.
-    /// </summary>
-    KEYDOWN = 0x0100,
-    /// <summary>
-    /// The WM_KEYUP message is posted to the window with the keyboard focus when a nonsystem key is released. A nonsystem key is a key that is pressed when the ALT key is not pressed, or a keyboard key that is pressed when a window has the keyboard focus.
-    /// </summary>
-    KEYUP = 0x0101,
-    /// <summary>
-    /// The WM_CHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage function. The WM_CHAR message contains the character code of the key that was pressed.
-    /// </summary>
-    CHAR = 0x0102,
-    /// <summary>
-    /// The WM_DEADCHAR message is posted to the window with the keyboard focus when a WM_KEYUP message is translated by the TranslateMessage function. WM_DEADCHAR specifies a character code generated by a dead key. A dead key is a key that generates a character, such as the umlaut (double-dot), that is combined with another character to form a composite character. For example, the umlaut-O character (Ö) is generated by typing the dead key for the umlaut character, and then typing the O key.
-    /// </summary>
-    DEADCHAR = 0x0103,
-    /// <summary>
-    /// The WM_SYSKEYDOWN message is posted to the window with the keyboard focus when the user presses the F10 key (which activates the menu bar) or holds down the ALT key and then presses another key. It also occurs when no window currently has the keyboard focus; in this case, the WM_SYSKEYDOWN message is sent to the active window. The window that receives the message can distinguish between these two contexts by checking the context code in the lParam parameter.
-    /// </summary>
-    SYSKEYDOWN = 0x0104,
-    /// <summary>
-    /// The WM_SYSKEYUP message is posted to the window with the keyboard focus when the user releases a key that was pressed while the ALT key was held down. It also occurs when no window currently has the keyboard focus; in this case, the WM_SYSKEYUP message is sent to the active window. The window that receives the message can distinguish between these two contexts by checking the context code in the lParam parameter.
-    /// </summary>
-    SYSKEYUP = 0x0105,
-    /// <summary>
-    /// The WM_SYSCHAR message is posted to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated by the TranslateMessage function. It specifies the character code of a system character key — that is, a character key that is pressed while the ALT key is down.
-    /// </summary>
-    SYSCHAR = 0x0106,
-    /// <summary>
-    /// The WM_SYSDEADCHAR message is sent to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated by the TranslateMessage function. WM_SYSDEADCHAR specifies the character code of a system dead key — that is, a dead key that is pressed while holding down the ALT key.
-    /// </summary>
-    SYSDEADCHAR = 0x0107,
-    /// <summary>
-    /// The WM_UNICHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage function. The WM_UNICHAR message contains the character code of the key that was pressed.
-    /// The WM_UNICHAR message is equivalent to WM_CHAR, but it uses Unicode Transformation Format (UTF)-32, whereas WM_CHAR uses UTF-16. It is designed to send or post Unicode characters to ANSI windows and it can can handle Unicode Supplementary Plane characters.
-    /// </summary>
-    UNICHAR = 0x0109,
-    /// <summary>
-    /// This message filters for keyboard messages.
-    /// </summary>
-    KEYLAST = 0x0109,
-    /// <summary>
-    /// Sent immediately before the IME generates the composition string as a result of a keystroke. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_STARTCOMPOSITION = 0x010D,
-    /// <summary>
-    /// Sent to an application when the IME ends composition. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_ENDCOMPOSITION = 0x010E,
-    /// <summary>
-    /// Sent to an application when the IME changes composition status as a result of a keystroke. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_COMPOSITION = 0x010F,
-    IME_KEYLAST = 0x010F,
-    /// <summary>
-    /// The WM_INITDIALOG message is sent to the dialog box procedure immediately before a dialog box is displayed. Dialog box procedures typically use this message to initialize controls and carry out any other initialization tasks that affect the appearance of the dialog box.
-    /// </summary>
-    INITDIALOG = 0x0110,
-    /// <summary>
-    /// The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated.
-    /// </summary>
-    COMMAND = 0x0111,
-    /// <summary>
-    /// A window receives this message when the user chooses a command from the Window menu, clicks the maximize button, minimize button, restore button, close button, or moves the form. You can stop the form from moving by filtering this out.
-    /// </summary>
-    SYSCOMMAND = 0x0112,
-    /// <summary>
-    /// The WM_TIMER message is posted to the installing thread's message queue when a timer expires. The message is posted by the GetMessage or PeekMessage function.
-    /// </summary>
-    TIMER = 0x0113,
-    /// <summary>
-    /// The WM_HSCROLL message is sent to a window when a scroll event occurs in the window's standard horizontal scroll bar. This message is also sent to the owner of a horizontal scroll bar control when a scroll event occurs in the control.
-    /// </summary>
-    HSCROLL = 0x0114,
-    /// <summary>
-    /// The WM_VSCROLL message is sent to a window when a scroll event occurs in the window's standard vertical scroll bar. This message is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control.
-    /// </summary>
-    VSCROLL = 0x0115,
-    /// <summary>
-    /// The WM_INITMENU message is sent when a menu is about to become active. It occurs when the user clicks an item on the menu bar or presses a menu key. This allows the application to modify the menu before it is displayed.
-    /// </summary>
-    INITMENU = 0x0116,
-    /// <summary>
-    /// The WM_INITMENUPOPUP message is sent when a drop-down menu or submenu is about to become active. This allows an application to modify the menu before it is displayed, without changing the entire menu.
-    /// </summary>
-    INITMENUPOPUP = 0x0117,
-    /// <summary>
-    /// The WM_MENUSELECT message is sent to a menu's owner window when the user selects a menu item.
-    /// </summary>
-    MENUSELECT = 0x011F,
-    /// <summary>
-    /// The WM_MENUCHAR message is sent when a menu is active and the user presses a key that does not correspond to any mnemonic or accelerator key. This message is sent to the window that owns the menu.
-    /// </summary>
-    MENUCHAR = 0x0120,
-    /// <summary>
-    /// The WM_ENTERIDLE message is sent to the owner window of a modal dialog box or menu that is entering an idle state. A modal dialog box or menu enters an idle state when no messages are waiting in its queue after it has processed one or more previous messages.
-    /// </summary>
-    ENTERIDLE = 0x0121,
-    /// <summary>
-    /// The WM_MENURBUTTONUP message is sent when the user releases the right mouse button while the cursor is on a menu item.
-    /// </summary>
-    MENURBUTTONUP = 0x0122,
-    /// <summary>
-    /// The WM_MENUDRAG message is sent to the owner of a drag-and-drop menu when the user drags a menu item.
-    /// </summary>
-    MENUDRAG = 0x0123,
-    /// <summary>
-    /// The WM_MENUGETOBJECT message is sent to the owner of a drag-and-drop menu when the mouse cursor enters a menu item or moves from the center of the item to the top or bottom of the item.
-    /// </summary>
-    MENUGETOBJECT = 0x0124,
-    /// <summary>
-    /// The WM_UNINITMENUPOPUP message is sent when a drop-down menu or submenu has been destroyed.
-    /// </summary>
-    UNINITMENUPOPUP = 0x0125,
-    /// <summary>
-    /// The WM_MENUCOMMAND message is sent when the user makes a selection from a menu.
-    /// </summary>
-    MENUCOMMAND = 0x0126,
-    /// <summary>
-    /// An application sends the WM_CHANGEUISTATE message to indicate that the user interface (UI) state should be changed.
-    /// </summary>
-    CHANGEUISTATE = 0x0127,
-    /// <summary>
-    /// An application sends the WM_UPDATEUISTATE message to change the user interface (UI) state for the specified window and all its child windows.
-    /// </summary>
-    UPDATEUISTATE = 0x0128,
-    /// <summary>
-    /// An application sends the WM_QUERYUISTATE message to retrieve the user interface (UI) state for a window.
-    /// </summary>
-    QUERYUISTATE = 0x0129,
-    /// <summary>
-    /// The WM_CTLCOLORMSGBOX message is sent to the owner window of a message box before Windows draws the message box. By responding to this message, the owner window can set the text and background colors of the message box by using the given display device context handle.
-    /// </summary>
-    CTLCOLORMSGBOX = 0x0132,
-    /// <summary>
-    /// An edit control that is not read-only or disabled sends the WM_CTLCOLOREDIT message to its parent window when the control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to set the text and background colors of the edit control.
-    /// </summary>
-    CTLCOLOREDIT = 0x0133,
-    /// <summary>
-    /// Sent to the parent window of a list box before the system draws the list box. By responding to this message, the parent window can set the text and background colors of the list box by using the specified display device context handle.
-    /// </summary>
-    CTLCOLORLISTBOX = 0x0134,
-    /// <summary>
-    /// The WM_CTLCOLORBTN message is sent to the parent window of a button before drawing the button. The parent window can change the button's text and background colors. However, only owner-drawn buttons respond to the parent window processing this message.
-    /// </summary>
-    CTLCOLORBTN = 0x0135,
-    /// <summary>
-    /// The WM_CTLCOLORDLG message is sent to a dialog box before the system draws the dialog box. By responding to this message, the dialog box can set its text and background colors using the specified display device context handle.
-    /// </summary>
-    CTLCOLORDLG = 0x0136,
-    /// <summary>
-    /// The WM_CTLCOLORSCROLLBAR message is sent to the parent window of a scroll bar control when the control is about to be drawn. By responding to this message, the parent window can use the display context handle to set the background color of the scroll bar control.
-    /// </summary>
-    CTLCOLORSCROLLBAR = 0x0137,
-    /// <summary>
-    /// A static control, or an edit control that is read-only or disabled, sends the WM_CTLCOLORSTATIC message to its parent window when the control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to set the text and background colors of the static control.
-    /// </summary>
-    CTLCOLORSTATIC = 0x0138,
-    /// <summary>
-    /// Use WM_MOUSEFIRST to specify the first mouse message. Use the PeekMessage() Function.
-    /// </summary>
-    MOUSEFIRST = 0x0200,
-    /// <summary>
-    /// The WM_MOUSEMOVE message is posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    MOUSEMOVE = 0x0200,
-    /// <summary>
-    /// The WM_LBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    LBUTTONDOWN = 0x0201,
-    /// <summary>
-    /// The WM_LBUTTONUP message is posted when the user releases the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    LBUTTONUP = 0x0202,
-    /// <summary>
-    /// The WM_LBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    LBUTTONDBLCLK = 0x0203,
-    /// <summary>
-    /// The WM_RBUTTONDOWN message is posted when the user presses the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    RBUTTONDOWN = 0x0204,
-    /// <summary>
-    /// The WM_RBUTTONUP message is posted when the user releases the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    RBUTTONUP = 0x0205,
-    /// <summary>
-    /// The WM_RBUTTONDBLCLK message is posted when the user double-clicks the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    RBUTTONDBLCLK = 0x0206,
-    /// <summary>
-    /// The WM_MBUTTONDOWN message is posted when the user presses the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    MBUTTONDOWN = 0x0207,
-    /// <summary>
-    /// The WM_MBUTTONUP message is posted when the user releases the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    MBUTTONUP = 0x0208,
-    /// <summary>
-    /// The WM_MBUTTONDBLCLK message is posted when the user double-clicks the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    MBUTTONDBLCLK = 0x0209,
-    /// <summary>
-    /// The WM_MOUSEWHEEL message is sent to the focus window when the mouse wheel is rotated. The DefWindowProc function propagates the message to the window's parent. There should be no internal forwarding of the message, since DefWindowProc propagates it up the parent chain until it finds a window that processes it.
-    /// </summary>
-    MOUSEWHEEL = 0x020A,
-    /// <summary>
-    /// The WM_XBUTTONDOWN message is posted when the user presses the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-   /// </summary>
-    XBUTTONDOWN = 0x020B,
-    /// <summary>
-    /// The WM_XBUTTONUP message is posted when the user releases the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    XBUTTONUP = 0x020C,
-    /// <summary>
-    /// The WM_XBUTTONDBLCLK message is posted when the user double-clicks the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
-    /// </summary>
-    XBUTTONDBLCLK = 0x020D,
-    /// <summary>
-    /// The WM_MOUSEHWHEEL message is sent to the focus window when the mouse's horizontal scroll wheel is tilted or rotated. The DefWindowProc function propagates the message to the window's parent. There should be no internal forwarding of the message, since DefWindowProc propagates it up the parent chain until it finds a window that processes it.
-    /// </summary>
-    MOUSEHWHEEL = 0x020E,
-    /// <summary>
-    /// Use WM_MOUSELAST to specify the last mouse message. Used with PeekMessage() Function.
-    /// </summary>
-    MOUSELAST = 0x020E,
-    /// <summary>
-    /// The WM_PARENTNOTIFY message is sent to the parent of a child window when the child window is created or destroyed, or when the user clicks a mouse button while the cursor is over the child window. When the child window is being created, the system sends WM_PARENTNOTIFY just before the CreateWindow or CreateWindowEx function that creates the window returns. When the child window is being destroyed, the system sends the message before any processing to destroy the window takes place.
-    /// </summary>
-    PARENTNOTIFY = 0x0210,
-    /// <summary>
-    /// The WM_ENTERMENULOOP message informs an application's main window procedure that a menu modal loop has been entered.
-    /// </summary>
-    ENTERMENULOOP = 0x0211,
-    /// <summary>
-    /// The WM_EXITMENULOOP message informs an application's main window procedure that a menu modal loop has been exited.
-    /// </summary>
-    EXITMENULOOP = 0x0212,
-    /// <summary>
-    /// The WM_NEXTMENU message is sent to an application when the right or left arrow key is used to switch between the menu bar and the system menu.
-    /// </summary>
-    NEXTMENU = 0x0213,
-    /// <summary>
-    /// The WM_SIZING message is sent to a window that the user is resizing. By processing this message, an application can monitor the size and position of the drag rectangle and, if needed, change its size or position.
-    /// </summary>
-    SIZING = 0x0214,
-    /// <summary>
-    /// The WM_CAPTURECHANGED message is sent to the window that is losing the mouse capture.
-    /// </summary>
-    CAPTURECHANGED = 0x0215,
-    /// <summary>
-    /// The WM_MOVING message is sent to a window that the user is moving. By processing this message, an application can monitor the position of the drag rectangle and, if needed, change its position.
-    /// </summary>
-    MOVING = 0x0216,
-    /// <summary>
-    /// Notifies applications that a power-management event has occurred.
-    /// </summary>
-    POWERBROADCAST = 0x0218,
-    /// <summary>
-    /// Notifies an application of a change to the hardware configuration of a device or the computer.
-    /// </summary>
-    DEVICECHANGE = 0x0219,
-    /// <summary>
-    /// An application sends the WM_MDICREATE message to a multiple-document interface (MDI) client window to create an MDI child window.
-    /// </summary>
-    MDICREATE = 0x0220,
-    /// <summary>
-    /// An application sends the WM_MDIDESTROY message to a multiple-document interface (MDI) client window to close an MDI child window.
-    /// </summary>
-    MDIDESTROY = 0x0221,
-    /// <summary>
-    /// An application sends the WM_MDIACTIVATE message to a multiple-document interface (MDI) client window to instruct the client window to activate a different MDI child window.
-    /// </summary>
-    MDIACTIVATE = 0x0222,
-    /// <summary>
-    /// An application sends the WM_MDIRESTORE message to a multiple-document interface (MDI) client window to restore an MDI child window from maximized or minimized size.
-    /// </summary>
-    MDIRESTORE = 0x0223,
-    /// <summary>
-    /// An application sends the WM_MDINEXT message to a multiple-document interface (MDI) client window to activate the next or previous child window.
-    /// </summary>
-    MDINEXT = 0x0224,
-    /// <summary>
-    /// An application sends the WM_MDIMAXIMIZE message to a multiple-document interface (MDI) client window to maximize an MDI child window. The system resizes the child window to make its client area fill the client window. The system places the child window's window menu icon in the rightmost position of the frame window's menu bar, and places the child window's restore icon in the leftmost position. The system also appends the title bar text of the child window to that of the frame window.
-    /// </summary>
-    MDIMAXIMIZE = 0x0225,
-    /// <summary>
-    /// An application sends the WM_MDITILE message to a multiple-document interface (MDI) client window to arrange all of its MDI child windows in a tile format.
-    /// </summary>
-    MDITILE = 0x0226,
-    /// <summary>
-    /// An application sends the WM_MDICASCADE message to a multiple-document interface (MDI) client window to arrange all its child windows in a cascade format.
-    /// </summary>
-    MDICASCADE = 0x0227,
-    /// <summary>
-    /// An application sends the WM_MDIICONARRANGE message to a multiple-document interface (MDI) client window to arrange all minimized MDI child windows. It does not affect child windows that are not minimized.
-    /// </summary>
-    MDIICONARRANGE = 0x0228,
-    /// <summary>
-    /// An application sends the WM_MDIGETACTIVE message to a multiple-document interface (MDI) client window to retrieve the handle to the active MDI child window.
-    /// </summary>
-    MDIGETACTIVE = 0x0229,
-    /// <summary>
-    /// An application sends the WM_MDISETMENU message to a multiple-document interface (MDI) client window to replace the entire menu of an MDI frame window, to replace the window menu of the frame window, or both.
-    /// </summary>
-    MDISETMENU = 0x0230,
-    /// <summary>
-    /// The WM_ENTERSIZEMOVE message is sent one time to a window after it enters the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns.
-    /// The system sends the WM_ENTERSIZEMOVE message regardless of whether the dragging of full windows is enabled.
-    /// </summary>
-    ENTERSIZEMOVE = 0x0231,
-    /// <summary>
-    /// The WM_EXITSIZEMOVE message is sent one time to a window, after it has exited the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns.
-    /// </summary>
-    EXITSIZEMOVE = 0x0232,
-    /// <summary>
-    /// Sent when the user drops a file on the window of an application that has registered itself as a recipient of dropped files.
-    /// </summary>
-    DROPFILES = 0x0233,
-    /// <summary>
-    /// An application sends the WM_MDIREFRESHMENU message to a multiple-document interface (MDI) client window to refresh the window menu of the MDI frame window.
-    /// </summary>
-    MDIREFRESHMENU = 0x0234,
-    /// <summary>
-    /// Sent to an application when a window is activated. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_SETCONTEXT = 0x0281,
-    /// <summary>
-    /// Sent to an application to notify it of changes to the IME window. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_NOTIFY = 0x0282,
-    /// <summary>
-    /// Sent by an application to direct the IME window to carry out the requested command. The application uses this message to control the IME window that it has created. To send this message, the application calls the SendMessage function with the following parameters.
-    /// </summary>
-    IME_CONTROL = 0x0283,
-    /// <summary>
-    /// Sent to an application when the IME window finds no space to extend the area for the composition window. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_COMPOSITIONFULL = 0x0284,
-    /// <summary>
-    /// Sent to an application when the operating system is about to change the current IME. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_SELECT = 0x0285,
-    /// <summary>
-    /// Sent to an application when the IME gets a character of the conversion result. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_CHAR = 0x0286,
-    /// <summary>
-    /// Sent to an application to provide commands and request information. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_REQUEST = 0x0288,
-    /// <summary>
-    /// Sent to an application by the IME to notify the application of a key press and to keep message order. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_KEYDOWN = 0x0290,
-    /// <summary>
-    /// Sent to an application by the IME to notify the application of a key release and to keep message order. A window receives this message through its WindowProc function.
-    /// </summary>
-    IME_KEYUP = 0x0291,
-    /// <summary>
-    /// The WM_MOUSEHOVER message is posted to a window when the cursor hovers over the client area of the window for the period of time specified in a prior call to TrackMouseEvent.
-    /// </summary>
-    MOUSEHOVER = 0x02A1,
-    /// <summary>
-    /// The WM_MOUSELEAVE message is posted to a window when the cursor leaves the client area of the window specified in a prior call to TrackMouseEvent.
-    /// </summary>
-    MOUSELEAVE = 0x02A3,
-    /// <summary>
-    /// The WM_NCMOUSEHOVER message is posted to a window when the cursor hovers over the nonclient area of the window for the period of time specified in a prior call to TrackMouseEvent.
-    /// </summary>
-    NCMOUSEHOVER = 0x02A0,
-    /// <summary>
-    /// The WM_NCMOUSELEAVE message is posted to a window when the cursor leaves the nonclient area of the window specified in a prior call to TrackMouseEvent.
-    /// </summary>
-    NCMOUSELEAVE = 0x02A2,
-    /// <summary>
-    /// The WM_WTSSESSION_CHANGE message notifies applications of changes in session state.
-    /// </summary>
-    WTSSESSION_CHANGE = 0x02B1,
-    TABLET_FIRST = 0x02c0,
-    TABLET_LAST = 0x02df,
-    /// <summary>
-    /// An application sends a WM_CUT message to an edit control or combo box to delete (cut) the current selection, if any, in the edit control and copy the deleted text to the clipboard in CF_TEXT format.
-    /// </summary>
-    CUT = 0x0300,
-    /// <summary>
-    /// An application sends the WM_COPY message to an edit control or combo box to copy the current selection to the clipboard in CF_TEXT format.
-    /// </summary>
-    COPY = 0x0301,
-    /// <summary>
-    /// An application sends a WM_PASTE message to an edit control or combo box to copy the current content of the clipboard to the edit control at the current caret position. Data is inserted only if the clipboard contains data in CF_TEXT format.
-    /// </summary>
-    PASTE = 0x0302,
-    /// <summary>
-    /// An application sends a WM_CLEAR message to an edit control or combo box to delete (clear) the current selection, if any, from the edit control.
-    /// </summary>
-    CLEAR = 0x0303,
-    /// <summary>
-    /// An application sends a WM_UNDO message to an edit control to undo the last operation. When this message is sent to an edit control, the previously deleted text is restored or the previously added text is deleted.
-    /// </summary>
-    UNDO = 0x0304,
-    /// <summary>
-    /// The WM_RENDERFORMAT message is sent to the clipboard owner if it has delayed rendering a specific clipboard format and if an application has requested data in that format. The clipboard owner must render data in the specified format and place it on the clipboard by calling the SetClipboardData function.
-    /// </summary>
-    RENDERFORMAT = 0x0305,
-    /// <summary>
-    /// The WM_RENDERALLFORMATS message is sent to the clipboard owner before it is destroyed, if the clipboard owner has delayed rendering one or more clipboard formats. For the content of the clipboard to remain available to other applications, the clipboard owner must render data in all the formats it is capable of generating, and place the data on the clipboard by calling the SetClipboardData function.
-    /// </summary>
-    RENDERALLFORMATS = 0x0306,
-    /// <summary>
-    /// The WM_DESTROYCLIPBOARD message is sent to the clipboard owner when a call to the EmptyClipboard function empties the clipboard.
-    /// </summary>
-    DESTROYCLIPBOARD = 0x0307,
-    /// <summary>
-    /// The WM_DRAWCLIPBOARD message is sent to the first window in the clipboard viewer chain when the content of the clipboard changes. This enables a clipboard viewer window to display the new content of the clipboard.
-    /// </summary>
-    DRAWCLIPBOARD = 0x0308,
-    /// <summary>
-    /// The WM_PAINTCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY format and the clipboard viewer's client area needs repainting.
-    /// </summary>
-    PAINTCLIPBOARD = 0x0309,
-    /// <summary>
-    /// The WM_VSCROLLCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's vertical scroll bar. The owner should scroll the clipboard image and update the scroll bar values.
-    /// </summary>
-    VSCROLLCLIPBOARD = 0x030A,
-    /// <summary>
-    /// The WM_SIZECLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY format and the clipboard viewer's client area has changed size.
-    /// </summary>
-    SIZECLIPBOARD = 0x030B,
-    /// <summary>
-    /// The WM_ASKCBFORMATNAME message is sent to the clipboard owner by a clipboard viewer window to request the name of a CF_OWNERDISPLAY clipboard format.
-    /// </summary>
-    ASKCBFORMATNAME = 0x030C,
-    /// <summary>
-    /// The WM_CHANGECBCHAIN message is sent to the first window in the clipboard viewer chain when a window is being removed from the chain.
-    /// </summary>
-    CHANGECBCHAIN = 0x030D,
-    /// <summary>
-    /// The WM_HSCROLLCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window. This occurs when the clipboard contains data in the CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's horizontal scroll bar. The owner should scroll the clipboard image and update the scroll bar values.
-    /// </summary>
-    HSCROLLCLIPBOARD = 0x030E,
-    /// <summary>
-    /// This message informs a window that it is about to receive the keyboard focus, giving the window the opportunity to realize its logical palette when it receives the focus.
-    /// </summary>
-    QUERYNEWPALETTE = 0x030F,
-    /// <summary>
-    /// The WM_PALETTEISCHANGING message informs applications that an application is going to realize its logical palette.
-    /// </summary>
-    PALETTEISCHANGING = 0x0310,
-    /// <summary>
-    /// This message is sent by the OS to all top-level and overlapped windows after the window with the keyboard focus realizes its logical palette.
-    /// This message enables windows that do not have the keyboard focus to realize their logical palettes and update their client areas.
-    /// </summary>
-    PALETTECHANGED = 0x0311,
-    /// <summary>
-    /// The WM_HOTKEY message is posted when the user presses a hot key registered by the RegisterHotKey function. The message is placed at the top of the message queue associated with the thread that registered the hot key.
-    /// </summary>
-    HOTKEY = 0x0312,
-    /// <summary>
-    /// The WM_PRINT message is sent to a window to request that it draw itself in the specified device context, most commonly in a printer device context.
-    /// </summary>
-    PRINT = 0x0317,
-    /// <summary>
-    /// The WM_PRINTCLIENT message is sent to a window to request that it draw its client area in the specified device context, most commonly in a printer device context.
-    /// </summary>
-    PRINTCLIENT = 0x0318,
-    /// <summary>
-    /// The WM_APPCOMMAND message notifies a window that the user generated an application command event, for example, by clicking an application command button using the mouse or typing an application command key on the keyboard.
-    /// </summary>
-    APPCOMMAND = 0x0319,
-    /// <summary>
-    /// The WM_THEMECHANGED message is broadcast to every window following a theme change event. Examples of theme change events are the activation of a theme, the deactivation of a theme, or a transition from one theme to another.
-    /// </summary>
-    THEMECHANGED = 0x031A,
-    /// <summary>
-    /// Sent when the contents of the clipboard have changed.
-    /// </summary>
-    CLIPBOARDUPDATE = 0x031D,
-    /// <summary>
-    /// The system will send a window the WM_DWMCOMPOSITIONCHANGED message to indicate that the availability of desktop composition has changed.
-    /// </summary>
-    DWMCOMPOSITIONCHANGED = 0x031E,
-    /// <summary>
-    /// WM_DWMNCRENDERINGCHANGED is called when the non-client area rendering status of a window has changed. Only windows that have set the flag DWM_BLURBEHIND.fTransitionOnMaximized to true will get this message.
-    /// </summary>
-    DWMNCRENDERINGCHANGED = 0x031F,
-    /// <summary>
-    /// Sent to all top-level windows when the colorization color has changed.
-    /// </summary>
-    DWMCOLORIZATIONCOLORCHANGED = 0x0320,
-    /// <summary>
-    /// WM_DWMWINDOWMAXIMIZEDCHANGE will let you know when a DWM composed window is maximized. You also have to register for this message as well. You'd have other windowd go opaque when this message is sent.
-    /// </summary>
-    DWMWINDOWMAXIMIZEDCHANGE = 0x0321,
-    /// <summary>
-    /// Sent to request extended title bar information. A window receives this message through its WindowProc function.
-    /// </summary>
-    GETTITLEBARINFOEX = 0x033F,
-    HANDHELDFIRST = 0x0358,
-    HANDHELDLAST = 0x035F,
-    AFXFIRST = 0x0360,
-    AFXLAST = 0x037F,
-    PENWINFIRST = 0x0380,
-    PENWINLAST = 0x038F,
-    /// <summary>
-    /// The WM_APP constant is used by applications to help define private messages, usually of the form WM_APP+X, where X is an integer value.
-    /// </summary>
-    APP = 0x8000,
-    /// <summary>
-    /// The WM_USER constant is used by applications to help define private messages for use by private window classes, usually of the form WM_USER+X, where X is an integer value.
-    /// </summary>
-    USER = 0x0400,
-
-    /// <summary>
-    /// An application sends the WM_CPL_LAUNCH message to Windows Control Panel to request that a Control Panel application be started.
-    /// </summary>
-    CPL_LAUNCH = USER+0x1000,
-    /// <summary>
-    /// The WM_CPL_LAUNCHED message is sent when a Control Panel application, started by the WM_CPL_LAUNCH message, has closed. The WM_CPL_LAUNCHED message is sent to the window identified by the wParam parameter of the WM_CPL_LAUNCH message that started the application.
-    /// </summary>
-    CPL_LAUNCHED = USER+0x1001,
-    /// <summary>
-    /// WM_SYSTIMER is a well-known yet still undocumented message. Windows uses WM_SYSTIMER for internal actions like scrolling.
-    /// </summary>
-    SYSTIMER = 0x118,
-
-    /// <summary>
-    /// The accessibility state has changed.
-    /// </summary>
-    HSHELL_ACCESSIBILITYSTATE = 11,
-    /// <summary>
-    /// The shell should activate its main window.
-    /// </summary>
-    HSHELL_ACTIVATESHELLWINDOW = 3,
-    /// <summary>
-    /// The user completed an input event (for example, pressed an application command button on the mouse or an application command key on the keyboard), and the application did not handle the WM_APPCOMMAND message generated by that input.
-    /// If the Shell procedure handles the WM_COMMAND message, it should not call CallNextHookEx. See the Return Value section for more information.
-    /// </summary>
-    HSHELL_APPCOMMAND = 12,
-    /// <summary>
-    /// A window is being minimized or maximized. The system needs the coordinates of the minimized rectangle for the window.
-    /// </summary>
-    HSHELL_GETMINRECT = 5,
-    /// <summary>
-    /// Keyboard language was changed or a new keyboard layout was loaded.
-    /// </summary>
-    HSHELL_LANGUAGE = 8,
-    /// <summary>
-    /// The title of a window in the task bar has been redrawn.
-    /// </summary>
-    HSHELL_REDRAW = 6,
-    /// <summary>
-    /// The user has selected the task list. A shell application that provides a task list should return TRUE to prevent Windows from starting its task list.
-    /// </summary>
-    HSHELL_TASKMAN = 7,
-    /// <summary>
-    /// A top-level, unowned window has been created. The window exists when the system calls this hook.
-    /// </summary>
-    HSHELL_WINDOWCREATED = 1,
-    /// <summary>
-    /// A top-level, unowned window is about to be destroyed. The window still exists when the system calls this hook.
-    /// </summary>
-    HSHELL_WINDOWDESTROYED = 2,
-    /// <summary>
-    /// The activation has changed to a different top-level, unowned window.
-    /// </summary>
-    HSHELL_WINDOWACTIVATED = 4,
-    /// <summary>
-    /// A top-level window is being replaced. The window exists when the system calls this hook.
-    /// </summary>
-    HSHELL_WINDOWREPLACED = 13
-}
-
-/// <summary>
-/// Window Styles.
-/// The following styles can be specified wherever a window style is required. After the control has been created, these styles cannot be modified, except as noted.
-/// </summary>
-[Flags()]
-public enum WindowStyles : uint
-{
-    /// <summary>The window has a thin-line border.</summary>
-    WS_BORDER = 0x800000,
-
-    /// <summary>The window has a title bar (includes the WS_BORDER style).</summary>
-    WS_CAPTION = 0xc00000,
-
-    /// <summary>The window is a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS_POPUP style.</summary>
-    WS_CHILD = 0x40000000,
-
-    /// <summary>Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.</summary>
-    WS_CLIPCHILDREN = 0x2000000,
-
-    /// <summary>
-    /// Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated.
-    /// If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.
-    /// </summary>
-    WS_CLIPSIBLINGS = 0x4000000,
-
-    /// <summary>The window is initially disabled. A disabled window cannot receive input from the user. To change this after a window has been created, use the EnableWindow function.</summary>
-    WS_DISABLED = 0x8000000,
-
-    /// <summary>The window has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.</summary>
-    WS_DLGFRAME = 0x400000,
-
-    /// <summary>
-    /// The window is the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style.
-    /// The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.
-    /// You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use the SetWindowLong function.
-    /// </summary>
-    WS_GROUP = 0x20000,
-
-    /// <summary>The window has a horizontal scroll bar.</summary>
-    WS_HSCROLL = 0x100000,
-
-    /// <summary>The window is initially maximized.</summary>
-    WS_MAXIMIZE = 0x1000000,
-
-    /// <summary>The window has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.</summary>
-    WS_MAXIMIZEBOX = 0x10000,
-
-    /// <summary>The window is initially minimized.</summary>
-    WS_MINIMIZE = 0x20000000,
-
-    /// <summary>The window has a minimize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.</summary>
-    WS_MINIMIZEBOX = 0x20000,
-
-    /// <summary>The window is an overlapped window. An overlapped window has a title bar and a border.</summary>
-    WS_OVERLAPPED = 0x0,
-
-    /// <summary>The window is an overlapped window.</summary>
-    WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_SIZEFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
-
-    /// <summary>The window is a pop-up window. This style cannot be used with the WS_CHILD style.</summary>
-    WS_POPUP = 0x80000000u,
-
-    /// <summary>The window is a pop-up window. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible.</summary>
-    WS_POPUPWINDOW = WS_POPUP | WS_BORDER | WS_SYSMENU,
-
-    /// <summary>The window has a sizing border.</summary>
-    WS_SIZEFRAME = 0x40000,
-
-    /// <summary>The window has a window menu on its title bar. The WS_CAPTION style must also be specified.</summary>
-    WS_SYSMENU = 0x80000,
-
-    /// <summary>
-    /// The window is a control that can receive the keyboard focus when the user presses the TAB key.
-    /// Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style.  
-    /// You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use the SetWindowLong function.
-    /// For user-created windows and modeless dialogs to work with tab stops, alter the message loop to call the IsDialogMessage function.
-    /// </summary>
-    WS_TABSTOP = 0x10000,
-
-    /// <summary>The window is initially visible. This style can be turned on and off by using the ShowWindow or SetWindowPos function.</summary>
-    WS_VISIBLE = 0x10000000,
-
-    /// <summary>The window has a vertical scroll bar.</summary>
-    WS_VSCROLL = 0x200000
-}
-
-[Flags]
-public enum WindowStylesEx : uint
-{
-    /// <summary>
-    /// Specifies that a window created with this style accepts drag-drop files.
-    /// </summary>
-    WS_EX_ACCEPTFILES = 0x00000010,
-    /// <summary>
-    /// Forces a top-level window onto the taskbar when the window is visible.
-    /// </summary>
-    WS_EX_APPWINDOW = 0x00040000,
-    /// <summary>
-    /// Specifies that a window has a border with a sunken edge.
-    /// </summary>
-    WS_EX_CLIENTEDGE = 0x00000200,
-    /// <summary>
-    /// Windows XP: Paints all descendants of a window in bottom-to-top painting order using double-buffering. For more information, see Remarks. This cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC.
-    /// </summary>
-    WS_EX_COMPOSITED = 0x02000000,
-    /// <summary>
-    /// Includes a question mark in the title bar of the window. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a child window, the child receives a WM_HELP message. The child window should pass the message to the parent window procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the child window.
-    /// WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles.
-    /// </summary>
-    WS_EX_CONTEXTHELP = 0x00000400,
-    /// <summary>
-    /// The window itself contains child windows that should take part in dialog box navigation. If this style is specified, the dialog manager recurses into children of this window when performing navigation operations such as handling the TAB key, an arrow key, or a keyboard mnemonic.
-    /// </summary>
-    WS_EX_CONTROLPARENT = 0x00010000,
-    /// <summary>
-    /// Creates a window that has a double border; the window can, optionally, be created with a title bar by specifying the WS_CAPTION style in the dwStyle parameter.
-    /// </summary>
-    WS_EX_DLGMODALFRAME = 0x00000001,
-    /// <summary>
-    /// Windows 2000/XP: Creates a layered window. Note that this cannot be used for child windows. Also, this cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC.
-    /// </summary>
-    WS_EX_LAYERED = 0x00080000,
-    /// <summary>
-    /// Arabic and Hebrew versions of Windows 98/Me, Windows 2000/XP: Creates a window whose horizontal origin is on the right edge. Increasing horizontal values advance to the left.
-    /// </summary>
-    WS_EX_LAYOUTRTL = 0x00400000,
-    /// <summary>
-    /// Creates a window that has generic left-aligned properties. This is the default.
-    /// </summary>
-    WS_EX_LEFT = 0x00000000,
-    /// <summary>
-    /// If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored.
-    /// </summary>
-    WS_EX_LEFTSCROLLBAR = 0x00004000,
-    /// <summary>
-    /// The window text is displayed using left-to-right reading-order properties. This is the default.
-    /// </summary>
-    WS_EX_LTRREADING = 0x00000000,
-    /// <summary>
-    /// Creates a multiple-document interface (MDI) child window.
-    /// </summary>
-    WS_EX_MDICHILD = 0x00000040,
-    /// <summary>
-    /// Windows 2000/XP: A top-level window created with this style does not become the foreground window when the user clicks it. The system does not bring this window to the foreground when the user minimizes or closes the foreground window.
-    /// To activate the window, use the SetActiveWindow or SetForegroundWindow function.
-    /// The window does not appear on the taskbar by default. To force the window to appear on the taskbar, use the WS_EX_APPWINDOW style.
-    /// </summary>
-    WS_EX_NOACTIVATE = 0x08000000,
-    /// <summary>
-    /// Windows 2000/XP: A window created with this style does not pass its window layout to its child windows.
-    /// </summary>
-    WS_EX_NOINHERITLAYOUT = 0x00100000,
-    /// <summary>
-    /// Specifies that a child window created with this style does not send the WM_PARENTNOTIFY message to its parent window when it is created or destroyed.
-    /// </summary>
-    WS_EX_NOPARENTNOTIFY = 0x00000004,
-    /// <summary>
-    /// Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles.
-    /// </summary>
-    WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
-    /// <summary>
-    /// Combines the WS_EX_WINDOWEDGE, WS_EX_TOOLWINDOW, and WS_EX_TOPMOST styles.
-    /// </summary>
-    WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST,
-    /// <summary>
-    /// The window has generic "right-aligned" properties. This depends on the window class. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading-order alignment; otherwise, the style is ignored.
-    /// Using the WS_EX_RIGHT style for static or edit controls has the same effect as using the SS_RIGHT or ES_RIGHT style, respectively. Using this style with button controls has the same effect as using BS_RIGHT and BS_RIGHTBUTTON styles.
-    /// </summary>
-    WS_EX_RIGHT = 0x00001000,
-    /// <summary>
-    /// Vertical scroll bar (if present) is to the right of the client area. This is the default.
-    /// </summary>
-    WS_EX_RIGHTSCROLLBAR = 0x00000000,
-    /// <summary>
-    /// If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the window text is displayed using right-to-left reading-order properties. For other languages, the style is ignored.
-    /// </summary>
-    WS_EX_RTLREADING = 0x00002000,
-    /// <summary>
-    /// Creates a window with a three-dimensional border style intended to be used for items that do not accept user input.
-    /// </summary>
-    WS_EX_STATICEDGE = 0x00020000,
-    /// <summary>
-    /// Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE.
-    /// </summary>
-    WS_EX_TOOLWINDOW = 0x00000080,
-    /// <summary>
-    /// Specifies that a window created with this style should be placed above all non-topmost windows and should stay above them, even when the window is deactivated. To add or remove this style, use the SetWindowPos function.
-    /// </summary>
-    WS_EX_TOPMOST = 0x00000008,
-    /// <summary>
-    /// Specifies that a window created with this style should not be painted until siblings beneath the window (that were created by the same thread) have been painted. The window appears transparent because the bits of underlying sibling windows have already been painted.
-    /// To achieve transparency without these restrictions, use the SetWindowRgn function.
-    /// </summary>
-    WS_EX_TRANSPARENT = 0x00000020,
-    /// <summary>
-    /// Specifies that a window has a border with a raised edge.
-    /// </summary>
-    WS_EX_WINDOWEDGE = 0x00000100
-}
-
-public enum ShowWindowCommands
-{
-    /// <summary>
-    /// Hides the window and activates another window.
-    /// </summary>
-    Hide = 0,
-    /// <summary>
-    /// Activates and displays a window. If the window is minimized or
-    /// maximized, the system restores it to its original size and position.
-    /// An application should specify this flag when displaying the window
-    /// for the first time.
-    /// </summary>
-    Normal = 1,
-    /// <summary>
-    /// Activates the window and displays it as a minimized window.
-    /// </summary>
-    ShowMinimized = 2,
-    /// <summary>
-    /// Maximizes the specified window.
-    /// </summary>
-    Maximize = 3, // is this the right value?
-    /// <summary>
-    /// Activates the window and displays it as a maximized window.
-    /// </summary>      
-    ShowMaximized = 3,
-    /// <summary>
-    /// Displays a window in its most recent size and position. This value
-    /// is similar to <see cref="Win32.ShowWindowCommand.Normal"/>, except
-    /// the window is not activated.
-    /// </summary>
-    ShowNoActivate = 4,
-    /// <summary>
-    /// Activates the window and displays it in its current size and position.
-    /// </summary>
-    Show = 5,
-    /// <summary>
-    /// Minimizes the specified window and activates the next top-level
-    /// window in the Z order.
-    /// </summary>
-    Minimize = 6,
-    /// <summary>
-    /// Displays the window as a minimized window. This value is similar to
-    /// <see cref="Win32.ShowWindowCommand.ShowMinimized"/>, except the
-    /// window is not activated.
-    /// </summary>
-    ShowMinNoActive = 7,
-    /// <summary>
-    /// Displays the window in its current size and position. This value is
-    /// similar to <see cref="Win32.ShowWindowCommand.Show"/>, except the
-    /// window is not activated.
-    /// </summary>
-    ShowNA = 8,
-    /// <summary>
-    /// Activates and displays the window. If the window is minimized or
-    /// maximized, the system restores it to its original size and position.
-    /// An application should specify this flag when restoring a minimized window.
-    /// </summary>
-    Restore = 9,
-    /// <summary>
-    /// Sets the show state based on the SW_* value specified in the
-    /// STARTUPINFO structure passed to the CreateProcess function by the
-    /// program that started the application.
-    /// </summary>
-    ShowDefault = 10,
-    /// <summary>
-    ///  <b>Windows 2000/XP:</b> Minimizes a window, even if the thread
-    /// that owns the window is not responding. This flag should only be
-    /// used when minimizing windows from a different thread.
-    /// </summary>
-    ForceMinimize = 11
-}
index a06ae4e1a678082ee62694ba390cc506290d13cd..22e65166f8d6de1876b7b38ca3ba0f2796ec5da1 100644 (file)
@@ -35,9 +35,7 @@
 
     <EmbeddedResource Include="ui\**\*.crow" />
     <EmbeddedResource Include="ui\**\*.itemp" />
-<!--      <LogicalName>ui.%(Filename)</LogicalName>-->
-<!--      <LogicalName>%(Identity)</LogicalName>
-    </EmbeddedResource>   -->     
+  
     <EmbeddedResource Include="ui\**\*.template">
       <LogicalName>Crow.Coding.%(Filename).template</LogicalName>
     </EmbeddedResource> 
index d88145061db2fbf91b17810fe562abfccb94ddde..95dfc9e414c10bfcd5d2c09e7f28a39e4eac5dfc 100644 (file)
@@ -16,8 +16,9 @@
         <Command type="Execute" command="${TargetName}" workingdir="${SolutionDir}/build/${ProjectConfigName}" />
       </CustomCommands>
     </CustomCommands>
-    <ReleaseVersion>0.5</ReleaseVersion>
+    <ReleaseVersion>0.8.0</ReleaseVersion>
     <StartupObject>Crow.Coding.CrowIDE</StartupObject>
+    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
index e398af8db1c63a321e5b4fd3e531191ab952c8e8..9d643a9af748f68743f4ca4094018788bfabd42c 100644 (file)
@@ -119,7 +119,7 @@ namespace Crow.Coding
                        using (app = new CrowIDE ()) {
                                MainIFace = app;
 
-                               app.Keyboard.KeyDown += App_KeyboardKeyDown;
+                               //app.Keyboard.KeyDown += App_KeyboardKeyDown;
                                app.initIde ();
 
                                app.reloadWinConfigs ();
index feef6b410609045f69b153308776665d3c1f506b..3faa15f1ce644ff65b919444a8b2ca516c9e7bee 100644 (file)
@@ -530,14 +530,14 @@ namespace Crow.Text
 
                        Key key = e.Key;
 
-                       if (IFace.Keyboard.Ctrl) {
+                       if (IFace.Ctrl) {
                                switch (key) {
                                case Key.S:
                                        projFile.Save ();
                                        break;
                                case Key.W:
                                        editorMutex.EnterWriteLock ();
-                                       if (IFace.Keyboard.Shift)
+                                       if (IFace.Shift)
                                                projFile.Redo (null);
                                        else
                                                projFile.Undo (null);
@@ -573,46 +573,46 @@ namespace Crow.Text
                                buffer.ResetSelection ();
                                break;
                        case Key.Home:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                buffer.CurrentLine = 0;
                                        buffer.CurrentColumn = 0;
                                        buffer.SetSelEndPos ();
                                        break;
                                }
                                buffer.ResetSelection ();
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        buffer.CurrentLine = 0;
                                buffer.CurrentColumn = 0;
                                break;
                        case Key.End:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                buffer.CurrentLine = int.MaxValue;
                                        buffer.CurrentColumn = int.MaxValue;
                                        buffer.SetSelEndPos ();
                                        break;
                                }
                                buffer.ResetSelection ();
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        buffer.CurrentLine = int.MaxValue;
                                buffer.CurrentColumn = int.MaxValue;
                                break;
                        case Key.Insert:
-                               if (IFace.Keyboard.Shift)
+                               if (IFace.Shift)
                                        buffer.InsertAt (IFace.Clipboard);
-                               else if (IFace.Keyboard.Ctrl && !buffer.SelectionIsEmpty)
+                               else if (IFace.Ctrl && !buffer.SelectionIsEmpty)
                                        IFace.Clipboard = buffer.SelectedText;
                                break;
                        case Key.Left:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                buffer.GotoWordStart ();
                                        else
                                                buffer.MoveLeft ();
@@ -620,16 +620,16 @@ namespace Crow.Text
                                        break;
                                }
                                buffer.ResetSelection ();
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        buffer.GotoWordStart ();
                                else
                                        buffer.MoveLeft();
                                break;
                        case Key.Right:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                buffer.GotoWordEnd ();
                                        else
                                                buffer.MoveRight ();
@@ -637,13 +637,13 @@ namespace Crow.Text
                                        break;
                                }
                                buffer.ResetSelection ();
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        buffer.GotoWordEnd ();
                                else
                                        buffer.MoveRight ();
                                break;
                        case Key.Up:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
                                        CurrentLine--;
@@ -654,7 +654,7 @@ namespace Crow.Text
                                CurrentLine--;
                                break;
                        case Key.Down:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
                                        CurrentLine++;
@@ -669,7 +669,7 @@ namespace Crow.Text
                        case Key.Num_Lock:
                                break;
                        case Key.Page_Down:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
                                        CurrentLine += visibleLines;
@@ -680,7 +680,7 @@ namespace Crow.Text
                                CurrentLine += visibleLines;
                                break;
                        case Key.Page_Up:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
                                        CurrentLine -= visibleLines;
index 4e8bcccd51fdc2a650a9eb59c68a90461853306b..0be5cfc6d25ed6bf2e8bf91e9c4d61efa49f6463 100644 (file)
@@ -1011,14 +1011,14 @@ namespace Crow.Coding
 
                        Key key = e.Key;
 
-                       if (IFace.Keyboard.Ctrl) {
+                       if (IFace.Ctrl) {
                                switch (key) {
                                case Key.S:
                                        projFile.Save ();
                                        break;
                                case Key.W:
                                        editorMutex.EnterWriteLock ();
-                                       if (IFace.Keyboard.Shift)
+                                       if (IFace.Shift)
                                                projFile.Redo (null);
                                        else
                                                projFile.Undo (null);
@@ -1040,7 +1040,7 @@ namespace Crow.Coding
                        case Key.Delete:
                                if (buffer.SelectionIsEmpty)
                                        MoveRight ();
-                               else if (IFace.Keyboard.Shift)
+                               else if (IFace.Shift)
                                        IFace.Clipboard = buffer.SelectedText;
                                buffer.DeleteChar ();
                                break;
@@ -1054,46 +1054,46 @@ namespace Crow.Coding
                                buffer.ResetSelection ();
                                break;
                        case Key.Home:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                buffer.CurrentLine = 0;
                                        buffer.CurrentColumn = 0;
                                        buffer.SetSelEndPos ();
                                        break;
                                }
                                buffer.ResetSelection ();
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        buffer.CurrentLine = 0;
                                buffer.CurrentColumn = 0;
                                break;
                        case Key.End:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                buffer.CurrentLine = int.MaxValue;
                                        buffer.CurrentColumn = int.MaxValue;
                                        buffer.SetSelEndPos ();
                                        break;
                                }
                                buffer.ResetSelection ();
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        buffer.CurrentLine = int.MaxValue;
                                buffer.CurrentColumn = int.MaxValue;
                                break;
                        case Key.Insert:
-                               if (IFace.Keyboard.Shift)
+                               if (IFace.Shift)
                                        buffer.Insert (IFace.Clipboard);
-                               else if (IFace.Keyboard.Ctrl && !buffer.SelectionIsEmpty)
+                               else if (IFace.Ctrl && !buffer.SelectionIsEmpty)
                                        IFace.Clipboard = buffer.SelectedText;
                                break;
                        case Key.Left:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                buffer.GotoWordStart ();
                                        else
                                                MoveLeft ();
@@ -1101,16 +1101,16 @@ namespace Crow.Coding
                                        break;
                                }
                                buffer.ResetSelection ();
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        buffer.GotoWordStart ();
                                else
                                        MoveLeft();
                                break;
                        case Key.Right:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
-                                       if (IFace.Keyboard.Ctrl)
+                                       if (IFace.Ctrl)
                                                buffer.GotoWordEnd ();
                                        else
                                                MoveRight ();
@@ -1118,13 +1118,13 @@ namespace Crow.Coding
                                        break;
                                }
                                buffer.ResetSelection ();
-                               if (IFace.Keyboard.Ctrl)
+                               if (IFace.Ctrl)
                                        buffer.GotoWordEnd ();
                                else
                                        MoveRight ();
                                break;
                        case Key.Up:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
                                        PrintedCurrentLine--;
@@ -1135,7 +1135,7 @@ namespace Crow.Coding
                                PrintedCurrentLine--;
                                break;
                        case Key.Down:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
                                        PrintedCurrentLine++;
@@ -1150,7 +1150,7 @@ namespace Crow.Coding
                        case Key.Num_Lock:
                                break;
                        case Key.Page_Down:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
                                        PrintedCurrentLine += visibleLines;
@@ -1161,7 +1161,7 @@ namespace Crow.Coding
                                PrintedCurrentLine += visibleLines;
                                break;
                        case Key.Page_Up:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty)
                                                buffer.SetSelStartPos ();
                                        PrintedCurrentLine -= visibleLines;
@@ -1172,7 +1172,7 @@ namespace Crow.Coding
                                PrintedCurrentLine -= visibleLines;
                                break;
                        case Key.Tab:
-                               if (IFace.Keyboard.Shift) {
+                               if (IFace.Shift) {
                                        if (buffer.SelectionIsEmpty ||
                                                (buffer.SelectionStart.Y == buffer.SelectionEnd.Y)) {
                                                //TODO
index a724b92e818892408fb3aa7fb47d4f4f6a32f85e..e7318b8cb7fdcd5b35349ba2cfeb65d1faf6c55f 100644 (file)
@@ -21,7 +21,7 @@
                        </HorizontalStack>
                </VerticalStack>
                <Splitter/>
-               <IMLContainer Path="#Crow.Coding.ui.SourceEditor.crow"/>
+               <IMLContainer Path="#Crow.Coding.ui.editors.SourceEditor.crow"/>
                <Label DataSource="{../editor.Error}" Text="{Message}"
                        Visible="{../editor.HasError}"
                        Height="Fit" Width="Stretched" Background="DarkRed" Foreground="White"
index 63336d41c98f59ee00d1d4ea924913143b2f5660..b8e985670b4cf3b34685fb6f1f76e3737bcc189f 100644 (file)
@@ -86,7 +86,7 @@ namespace tests
                protected override void InitBackend ()
                {
                        base.InitBackend ();
-                       Keyboard.KeyDown += App_KeyboardKeyDown;
+                       //Keyboard.KeyDown += App_KeyboardKeyDown;
                }
                public static void Main(string[] args)
                {
index 46a91ed400c124c03ee1039caa93b2b7ef3f285c..ca72bf10a40b79639b2e67eb8426738ce6b9a946 100644 (file)
@@ -43,7 +43,7 @@ namespace tests
                static void Main ()
                {
                        using (Showcase app = new Showcase ()) {
-                               app.Keyboard.KeyDown += App_KeyboardKeyDown;
+                               //app.Keyboard.KeyDown += App_KeyboardKeyDown;
 
                                GraphicObject g = app.AddWidget ("#Tests.ui.showcase.crow");
                                g.DataSource = app;
@@ -52,7 +52,7 @@ namespace tests
                                //widgets are added to the interface
                                app.crowContainer.DataSource = new object ();
                                app.hideError ();
-
+                app.LoadIMLFragment(@"<Window Width='150' Height='150' Name='dock1'/>");
                 app.Run();
 
                        }
index 44888058e1a7c33521f920f358d2248e92d76782..69437acc43a0f13564ea3f6215b91ed43f30d31f 100644 (file)
@@ -10,7 +10,7 @@
     <AssemblyName>Tests</AssemblyName>
     <StartupObject>tests.Showcase</StartupObject>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ReleaseVersion>0.5</ReleaseVersion>
+    <ReleaseVersion>0.8.0</ReleaseVersion>
     <OutputPath>$(SolutionDir)build/$(Configuration)</OutputPath>
     <IntermediateOutputPath>$(SolutionDir)build/obj/$(Configuration)</IntermediateOutputPath>
     <CustomCommands>
@@ -18,6 +18,7 @@
         <Command type="Execute" command="${TargetName}" workingdir="${SolutionDir}/build/${ProjectConfigName}" />
       </CustomCommands>
     </CustomCommands>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>