public int CompareTo(object obj) { VideoMode other = (VideoMode)obj; if (other.w > w) { return(-1); } else if (other.w < w) { return(1); } else if (other.h > h) { return(-1); } else if (other.h < h) { return(1); } else if (other.bpp > bpp) { return(-1); } else if (other.bpp < bpp) { return(1); } else if (other.refresh > refresh) { return(-1); } else if (other.refresh < refresh) { return(1); } else { return(0); } }
//------------------------------------------------------------------------ public Display(VideoMode mode) : this(wxDisplay_ctor(ref mode), true) { }
[DllImport("wx-c"), System.Security.SuppressUnmanagedCodeSecurity] static extern void wxDisplay_GetModes(IntPtr self, VideoMode mode, [In, Out] VideoMode[] modes);
[DllImport("wx-c"), System.Security.SuppressUnmanagedCodeSecurity] static extern int wxDisplay_GetNumModes(IntPtr self, VideoMode mode);
[DllImport("wx-c"), System.Security.SuppressUnmanagedCodeSecurity] static extern bool wxDisplay_ChangeMode(IntPtr self, VideoMode mode);
[DllImport("wx-c"), System.Security.SuppressUnmanagedCodeSecurity] static extern void wxDisplay_GetCurrentMode(IntPtr self, out VideoMode mode);
[DllImport("wx-c"), System.Security.SuppressUnmanagedCodeSecurity] static extern IntPtr wxDisplay_ctor(ref VideoMode mode);
//------------------------------------------------------------------------ virtual public bool ChangeMode(VideoMode mode) { return(wxDisplay_ChangeMode(wxObject, mode)); }