GetWindowBounds() private method

private GetWindowBounds ( IntPtr window, WindowRegionCode regionCode, Rect &globalBounds ) : OSStatus
window System.IntPtr
regionCode WindowRegionCode
globalBounds Rect
return OSStatus
コード例 #1
0
        internal static Rect GetWindowBounds(IntPtr window, WindowRegionCode regionCode)
        {
            Rect     globalBounds;
            OSStatus windowBounds = API.GetWindowBounds(window, regionCode, out globalBounds);

            if (windowBounds != OSStatus.NoError)
            {
                throw new MacOSException(windowBounds);
            }
            else
            {
                return(globalBounds);
            }
        }