Skip to content

Commit

Permalink
Add comment for clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
mfakane committed May 1, 2021
1 parent ffb74b1 commit fd5c600
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 1 deletion.
15 changes: 15 additions & 0 deletions RawInput.Sharp/Native/RawKeyboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,27 @@ public override string ToString() =>
$"{{Key: {VirutalKey}, ScanCode: {ScanCode}, Flags: {Flags}}}";
}

/// <summary>
/// RI_KEY_*
/// </summary>
[Flags]
public enum RawKeyboardFlags : ushort
{
/// <summary>
/// RI_KEY_MAKE
/// </summary>
None = 0,
/// <summary>
/// RI_KEY_BREAK
/// </summary>
Up = 1,
/// <summary>
/// RI_KEY_E0
/// </summary>
KeyE0 = 2,
/// <summary>
/// RI_KEY_E1
/// </summary>
KeyE1 = 4,
}
}
54 changes: 54 additions & 0 deletions RawInput.Sharp/Native/RawMouse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,84 @@ public override string ToString() =>
$"{{X: {LastX}, Y: {LastY}, Flags: {Flags}, Buttons: {Buttons}, Data: {ButtonData}}}";
}

/// <summary>
/// MOUSE_*
/// </summary>
[Flags]
public enum RawMouseFlags : ushort
{
/// <summary>
/// MOUSE_MOVE_RELATIVE
/// </summary>
None = 0,
/// <summary>
/// MOUSE_MOVE_ABSOLUTE
/// </summary>
MoveAbsolute = 1,
/// <summary>
/// MOUSE_VIRTUAL_DESKTOP
/// </summary>
VirtualDesktop = 2,
/// <summary>
/// MOUSE_ATTRIBUTES_CHANGED
/// </summary>
AttributesChanged = 4,
}

/// <summary>
/// RI_MOUSE_*
/// </summary>
[Flags]
public enum RawMouseButtonFlags : ushort
{
None,
/// <summary>
/// RI_MOUSE_LEFT_BUTTON_DOWN
/// </summary>
LeftButtonDown = 0x0001,
/// <summary>
/// RI_MOUSE_LEFT_BUTTON_UP
/// </summary>
LeftButtonUp = 0x0002,
/// <summary>
/// RI_MOUSE_RIGHT_BUTTON_DOWN
/// </summary>
RightButtonDown = 0x0004,
/// <summary>
/// RI_MOUSE_RIGHT_BUTTON_UP
/// </summary>
RightButtonUp = 0x0008,
/// <summary>
/// RI_MOUSE_MIDDLE_BUTTON_DOWN
/// </summary>
MiddleButtonDown = 0x0010,
/// <summary>
/// RI_MOUSE_MIDDLE_BUTTON_UP
/// </summary>
MiddleButtonUp = 0x0020,
/// <summary>
/// RI_MOUSE_BUTTON_4_DOWN
/// </summary>
Button4Down = 0x0040,
/// <summary>
/// RI_MOUSE_BUTTON_4_UP
/// </summary>
Button4Up = 0x0080,
/// <summary>
/// RI_MOUSE_BUTTON_5_DOWN
/// </summary>
Button5Down = 0x0100,
/// <summary>
/// RI_MOUSE_BUTTON_5_UP
/// </summary>
Button5Up = 0x0200,
/// <summary>
/// RI_MOUSE_WHEEL
/// </summary>
MouseWheel = 0x0400,
/// <summary>
/// RI_MOUSE_HWHEEL
/// </summary>
MouseHorizontalWheel = 0x0800,
}
}
2 changes: 1 addition & 1 deletion RawInput.Sharp/RawInput.Sharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Copyright>Copyright (c) 2019 mfakane</Copyright>
<Authors>mfakane</Authors>
<PackageLicenseExpression>Zlib</PackageLicenseExpression>
<Version>0.0.3</Version>
<Version>0.0.4</Version>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<FileVersion>0.0.0.0</FileVersion>
<PackageTags>Windows RawInput</PackageTags>
Expand Down

0 comments on commit fd5c600

Please sign in to comment.