using System.Runtime.InteropServices; namespace EC.Util.Platform; public static class LinuxUtil { #region const private const string libX11 = "libX11.so.6"; private const string libX11Randr = "libXrandr.so.2"; private const string libX11Ext = "libXext.so.6"; private const string libXInput = "libXi.so.6"; private const string libXCursor = "libXcursor.so.1"; private enum PropertyMode { Replace = 0, Prepend = 1, Append = 2 } [Flags] private enum MotifFlags { Functions = 1, Decorations = 2, InputMode = 4, Status = 8 } [Flags] private enum MotifFunctions { All = 0x01, Resize = 0x02, Move = 0x04, Minimize = 0x08, Maximize = 0x10, Close = 0x20 } [Flags] private enum MotifDecorations { All = 0x01, Border = 0x02, ResizeH = 0x04, Title = 0x08, Menu = 0x10, Minimize = 0x20, Maximize = 0x40, } [Flags] private enum MotifInputMode { Modeless = 0, ApplicationModal = 1, SystemModal = 2, FullApplicationModal = 3 } #endregion const #region struct [StructLayout(LayoutKind.Sequential)] private struct MotifWmHints { public IntPtr flags; public IntPtr functions; public IntPtr decorations; public IntPtr input_mode; public IntPtr status; public override string ToString() { return string.Format("MotifWmHints