UnmanagedMethods.cs 640 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Runtime.InteropServices;
  3. namespace Avalonia.IntegrationTests.Win32;
  4. internal static partial class UnmanagedMethods
  5. {
  6. [LibraryImport("user32.dll", SetLastError = true)]
  7. [return: MarshalAs(UnmanagedType.Bool)]
  8. public static partial bool GetClientRect(IntPtr hwnd, out RECT lpRect);
  9. [LibraryImport("user32.dll", SetLastError = true)]
  10. [return: MarshalAs(UnmanagedType.Bool)]
  11. public static partial bool GetWindowRect(IntPtr hwnd, out RECT lpRect);
  12. public struct RECT
  13. {
  14. public int left;
  15. public int top;
  16. public int right;
  17. public int bottom;
  18. }
  19. }