System.Windows.Forms.XplatUICarbon.ConvertScreenPointToClient C# (CSharp) Method

ConvertScreenPointToClient() private method

private ConvertScreenPointToClient ( IntPtr handle, Point point ) : Point
handle System.IntPtr
point Point
return Point
		private Point ConvertScreenPointToClient (IntPtr handle, Point point) {
			Point converted_point = new Point ();
			Carbon.Rect window_bounds = new Carbon.Rect ();
			Carbon.CGPoint native_point = new Carbon.CGPoint ();

			GetWindowBounds (HIViewGetWindow (handle), 32, ref window_bounds);
			
			native_point.x = (point.X - window_bounds.left);
			native_point.y = (point.Y - window_bounds.top);

			HIViewConvertPoint (ref native_point, IntPtr.Zero, handle);

			converted_point.X = (int)native_point.x;
			converted_point.Y = (int)native_point.y;

			return converted_point;
		}
		
XplatUICarbon