_ZoomWindowIdeal() 개인적인 메소드

private _ZoomWindowIdeal ( IntPtr windowRef, short inPartCode, IntPtr toIdealSize ) : OSStatus
windowRef System.IntPtr
inPartCode short
toIdealSize System.IntPtr
리턴 OSStatus
예제 #1
0
        internal static void ZoomWindowIdeal(IntPtr windowRef, WindowPartCode inPartCode, ref CarbonPoint toIdealSize)
        {
            IntPtr num = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CarbonPoint)));

            Marshal.StructureToPtr((object)toIdealSize, num, false);
            OSStatus errorCode = API._ZoomWindowIdeal(windowRef, (short)inPartCode, num);

            toIdealSize = (CarbonPoint)Marshal.PtrToStructure(num, typeof(CarbonPoint));
            Marshal.FreeHGlobal(num);
            if (errorCode != OSStatus.NoError)
            {
                throw new MacOSException(errorCode);
            }
        }