/// <summary>
        /// Disposes any platform-specific resources.
        /// </summary>
        partial void DisposePlatformResources()
        {
            lock (typeof(UltravioletApplication))
            {
                Instance = null;

                Native.SDL_UV_SetMainProc(IntPtr.Zero);

                mainProcDelegate = null;
                mainProcPtr      = IntPtr.Zero;
            }

            SafeDispose.DisposeRef(ref orientationDidChangeNotification);
        }
        /// <summary>
        /// Disposes any platform-specific resources.
        /// </summary>
partial         void DisposePlatformResources()
        {
            lock (typeof(UltravioletApplication))
            {
                Instance = null;

                Native.SDL_UV_SetMainProc(IntPtr.Zero);

                mainProcDelegate = null;
                mainProcPtr = IntPtr.Zero;
            }

            SafeDispose.DisposeRef(ref orientationDidChangeNotification);
        }
        /// <summary>
        /// Initializes the application's state.
        /// </summary>
        partial void InitializeApplication()
        {
            lock (typeof(UltravioletApplication))
            {
                if (Instance != null)
                {
                    throw new InvalidOperationException();
                }

                Instance = this;

                mainProcDelegate = new Func <Int32>(SDLMainProcThunk);
                mainProcPtr      = Marshal.GetFunctionPointerForDelegate(mainProcDelegate);

                Native.SDL_UV_SetMainProc(mainProcPtr);
            }

            UIApplication.Main(new String[0], null, nameof(UltravioletAppDelegate));
        }
        /// <summary>
        /// Initializes the application's state.
        /// </summary>
partial         void InitializeApplication()
        {
            lock (typeof(UltravioletApplication))
            {
                if (Instance != null)
                    throw new InvalidOperationException();

                Instance = this;

                mainProcDelegate = new Func<Int32>(SDLMainProcThunk);
                mainProcPtr = Marshal.GetFunctionPointerForDelegate(mainProcDelegate);

                Native.SDL_UV_SetMainProc(mainProcPtr);
            }

            UIApplication.Main(new String[0], null, nameof(UltravioletAppDelegate));
        }