using System; using System.Drawing; using System.Runtime.InteropServices; namespace Silky.NativeMethods { [StructLayout(LayoutKind.Sequential)] public struct MARGINS { public int cxLeftWidth, cxRightWidth, cyTopHeight, cyBottomHeight; public MARGINS(int cxLeftWidth, int cxRightWidth, int cyTopHeight, int cyBottomHeight) { this.cxLeftWidth = cxLeftWidth; this.cxRightWidth = cxRightWidth; this.cyTopHeight = cyTopHeight; this.cyBottomHeight = cyBottomHeight; } } [StructLayout(LayoutKind.Sequential)] internal struct BITMAPINFO { public int biSize, biWidth, biHeight, biCompression, biSizeImage, biXPelsPerMeter, biYPelsPerMeter, biClrUsed, biClrImportant; public short biPlanes, biBitCount; public byte bmiColors_rgbBlue, bmiColors_rgbGreen, bmiColors_rgbRed, bmiColors_rgbReserved; } [StructLayout(LayoutKind.Sequential)] internal struct POINT { public int x, y; public POINT(int x, int y) { this.x = x; this.y = y; } } [StructLayout(LayoutKind.Sequential)] internal struct RECT { public long left, top, right, bottom; public RECT(int left, int top, int right, int bottom) { this.left = left; this.top = top; this.right = right; this.bottom = bottom; } } [StructLayout(LayoutKind.Sequential)] internal struct DTTOPTS { public int dwSize; public int dwFlags; public int crText; public int crBorder; public int crShadow; public int iTextShadowType; public POINT ptShadowOffset; public int iBorderSize; public int iFontPropId; public int iColorPropId; public int iStateId; public bool fApplyOverlay; public int iGlowSize; public int pfnDrawTextCallback; public IntPtr lParam; } [StructLayout(LayoutKind.Sequential)] internal struct SHFILEINFO { public IntPtr hIcon; public int iIcon; public uint dwAttributes; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] public string szDisplayName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] public string szTypeName; } }