mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 16:15:34 +00:00
Corrected some struct definitions in Windows.API
This commit is contained in:
parent
f2b92be34f
commit
8bbaede72e
|
@ -978,12 +978,6 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
public struct Constants
|
public struct Constants
|
||||||
{
|
{
|
||||||
// Mouse indicator flags (found in winuser.h)
|
|
||||||
public const int MOUSE_MOVE_RELATIVE = 0;
|
|
||||||
public const int MOUSE_MOVE_ABSOLUTE = 1;
|
|
||||||
public const int MOUSE_VIRTUAL_DESKTOP = 0x02; // the coordinates are mapped to the virtual desktop
|
|
||||||
public const int MOUSE_ATTRIBUTES_CHANGED = 0x04; // requery for mouse attributes
|
|
||||||
|
|
||||||
// Found in winuser.h
|
// Found in winuser.h
|
||||||
public const int KEYBOARD_OVERRUN_MAKE_CODE = 0xFF;
|
public const int KEYBOARD_OVERRUN_MAKE_CODE = 0xFF;
|
||||||
|
|
||||||
|
@ -1650,17 +1644,17 @@ namespace OpenTK.Platform.Windows
|
||||||
{
|
{
|
||||||
public RawInputHeader Header;
|
public RawInputHeader Header;
|
||||||
public RawInputData Data;
|
public RawInputData Data;
|
||||||
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct RawInputData
|
public struct RawInputData
|
||||||
{
|
{
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public RawMouse Mouse;
|
public RawMouse Mouse;
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public RawKeyboard Keyboard;
|
public RawKeyboard Keyboard;
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public RawHID HID;
|
public RawHID HID;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -1747,7 +1741,7 @@ namespace OpenTK.Platform.Windows
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains information about the state of the mouse.
|
/// Contains information about the state of the mouse.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct RawMouse
|
public struct RawMouse
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1761,45 +1755,44 @@ namespace OpenTK.Platform.Windows
|
||||||
/// MOUSE_VIRTUAL_DESKTOP
|
/// MOUSE_VIRTUAL_DESKTOP
|
||||||
/// Mouse coordinates are mapped to the virtual desktop (for a multiple monitor system).
|
/// Mouse coordinates are mapped to the virtual desktop (for a multiple monitor system).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FieldOffset(0)]
|
//[FieldOffset(0)]
|
||||||
//public USHORT Flags;
|
public RawMouseFlags Flags; // USHORT
|
||||||
public SHORT Flags;
|
// /// <summary>
|
||||||
/// <summary>
|
// /// Reserved.
|
||||||
/// Reserved.
|
// /// </summary>
|
||||||
/// </summary>
|
// [FieldOffset(2)]
|
||||||
[FieldOffset(2)]
|
// ULONG Buttons;
|
||||||
ULONG Buttons;
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Transition state of the mouse buttons.
|
/// Transition state of the mouse buttons.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FieldOffset(2)]
|
//[FieldOffset(2)]
|
||||||
public RawInputMouseState ButtonFlags;
|
public RawInputMouseState ButtonFlags;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If usButtonFlags is RI_MOUSE_WHEEL, this member is a signed value that specifies the wheel delta.
|
/// If usButtonFlags is RI_MOUSE_WHEEL, this member is a signed value that specifies the wheel delta.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FieldOffset(4)]
|
//[FieldOffset(4)]
|
||||||
//public USHORT ButtonData;
|
//public USHORT ButtonData;
|
||||||
public SHORT ButtonData;
|
public SHORT ButtonData;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raw state of the mouse buttons.
|
/// Raw state of the mouse buttons.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FieldOffset(6)]
|
//[FieldOffset(6)]
|
||||||
//public ULONG RawButtons;
|
//public ULONG RawButtons;
|
||||||
public LONG RawButtons;
|
public LONG RawButtons;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Motion in the X direction. This is signed relative motion or absolute motion, depending on the value of usFlags.
|
/// Motion in the X direction. This is signed relative motion or absolute motion, depending on the value of usFlags.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FieldOffset(10)]
|
//[FieldOffset(10)]
|
||||||
public LONG LastX;
|
public LONG LastX;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Motion in the Y direction. This is signed relative motion or absolute motion, depending on the value of usFlags.
|
/// Motion in the Y direction. This is signed relative motion or absolute motion, depending on the value of usFlags.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FieldOffset(14)]
|
//[FieldOffset(14)]
|
||||||
public LONG LastY;
|
public LONG LastY;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device-specific additional information for the event.
|
/// Device-specific additional information for the event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FieldOffset(18)]
|
//[FieldOffset(18)]
|
||||||
//public ULONG ExtraInformation;
|
//public ULONG ExtraInformation;
|
||||||
public LONG ExtraInformation;
|
public LONG ExtraInformation;
|
||||||
}
|
}
|
||||||
|
@ -2044,6 +2037,8 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
#region --- Enums ---
|
#region --- Enums ---
|
||||||
|
|
||||||
|
#region public enum WindowStyle : int
|
||||||
|
|
||||||
public enum WindowStyle : int
|
public enum WindowStyle : int
|
||||||
{
|
{
|
||||||
Overlapped = 0x00000000,
|
Overlapped = 0x00000000,
|
||||||
|
@ -2079,6 +2074,10 @@ namespace OpenTK.Platform.Windows
|
||||||
ChildWindow = Child
|
ChildWindow = Child
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public enum ExtendedWindowStyle : int
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum ExtendedWindowStyle : int
|
public enum ExtendedWindowStyle : int
|
||||||
{
|
{
|
||||||
|
@ -2130,6 +2129,8 @@ namespace OpenTK.Platform.Windows
|
||||||
// #endif /* _WIN32_WINNT >= 0x0500 */
|
// #endif /* _WIN32_WINNT >= 0x0500 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region GetWindowLongOffsets enum
|
#region GetWindowLongOffsets enum
|
||||||
|
|
||||||
public enum GetWindowLongOffsets : int
|
public enum GetWindowLongOffsets : int
|
||||||
|
@ -2350,6 +2351,34 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region RawMouseFlags
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mouse indicator flags (found in winuser.h).
|
||||||
|
/// </summary>
|
||||||
|
public enum RawMouseFlags : short
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// LastX/Y indicate relative motion.
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_MOVE_RELATIVE = 0x00,
|
||||||
|
/// <summary>
|
||||||
|
/// LastX/Y indicate absolute motion.
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_MOVE_ABSOLUTE = 0x01,
|
||||||
|
/// <summary>
|
||||||
|
/// The coordinates are mapped to the virtual desktop.
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_VIRTUAL_DESKTOP = 0x02,
|
||||||
|
/// <summary>
|
||||||
|
/// Requery for mouse attributes.
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_ATTRIBUTES_CHANGED = 0x04,
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region VirtualKeys
|
#region VirtualKeys
|
||||||
|
|
||||||
public enum VirtualKeys : short
|
public enum VirtualKeys : short
|
||||||
|
|
Loading…
Reference in a new issue