gdipStructs.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // System.Drawing.gdipStructs.cs
  3. //
  4. // Author:
  5. // Alexandre Pigolkine ([email protected])
  6. //
  7. using System;
  8. using System.Runtime.InteropServices;
  9. using System.Text;
  10. using System.Drawing.Imaging;
  11. using System.Drawing;
  12. namespace System.Drawing {
  13. [StructLayout(LayoutKind.Sequential)]
  14. internal struct GdiplusStartupInput
  15. {
  16. uint GdiplusVersion;
  17. IntPtr DebugEventCallback;
  18. int SuppressBackgroundThread;
  19. int SuppressExternalCodecs;
  20. internal static GdiplusStartupInput MakeGdiplusStartupInput ()
  21. {
  22. GdiplusStartupInput result = new GdiplusStartupInput ();
  23. result.GdiplusVersion = 1;
  24. result.DebugEventCallback = IntPtr.Zero;
  25. result.SuppressBackgroundThread = 0;
  26. result.SuppressExternalCodecs = 0;
  27. return result;
  28. }
  29. }
  30. [StructLayout(LayoutKind.Sequential)]
  31. internal struct GdiplusStartupOutput
  32. {
  33. internal IntPtr NotificationHook;
  34. internal IntPtr NotificationUnhook;
  35. internal static GdiplusStartupOutput MakeGdiplusStartupOutput ()
  36. {
  37. GdiplusStartupOutput result = new GdiplusStartupOutput ();
  38. result.NotificationHook = result.NotificationUnhook = IntPtr.Zero;
  39. return result;
  40. }
  41. }
  42. [StructLayout(LayoutKind.Sequential)]
  43. internal struct GdiColorPalette
  44. {
  45. internal int Flags; // Palette flags
  46. internal int Count; // Number of color entries
  47. //internal int[] Entries;
  48. }
  49. [StructLayout(LayoutKind.Sequential)]
  50. internal struct GdiColorMap
  51. {
  52. internal int from;
  53. internal int to;
  54. }
  55. }