_ZoomWindowIdeal() private méthode

private _ZoomWindowIdeal ( IntPtr windowRef, short inPartCode, IntPtr toIdealSize ) : OSStatus
windowRef System.IntPtr
inPartCode short
toIdealSize System.IntPtr
Résultat OSStatus
Exemple #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);
            }
        }