You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2 KiB

  1. using System;
  2. using System.Runtime.InteropServices;
  3. namespace Apewer.Internals.Interop
  4. {
  5. [System.Security.SecuritySafeCritical]
  6. internal class Gdi32
  7. {
  8. [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
  9. public static extern IntPtr CreateCompatibleDC(IntPtr hdc);
  10. [DllImport("gdi32.dll")]
  11. public static extern int CreateRoundRectRgn(int x1, int y1, int x2, int y2, int x3, int y3);
  12. [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
  13. public static extern int DeleteDC(IntPtr hdc);
  14. [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
  15. public static extern int DeleteObject(IntPtr hobj);
  16. [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
  17. public static extern IntPtr ExtCreateRegion(IntPtr lpxform, uint ncount, IntPtr rgndata);
  18. [DllImport("gdi32.dll", ExactSpelling = true)]
  19. public static extern IntPtr SelectObject(IntPtr hdc, IntPtr hobj);
  20. [DllImport("gdi32.dll", EntryPoint = "GetGlyphIndicesW")]
  21. public static extern uint GetGlyphIndices([In] IntPtr hdc, [In][MarshalAs(UnmanagedType.LPTStr)] string lpsz, int c, [Out] ushort[] pgi, uint fl);
  22. }
  23. }