Esempio n. 1
0
        /// <summary>
        /// Register to receive notifications when the overlay display settings are updated.
        /// Newly registered handlers will always be called the next tick with the current state.
        /// @note must call RemoveNotifyDisplaySettingsUpdated to remove the notification.
        /// </summary>
        /// <param name="options">Structure containing information about the request.</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the NotificationFn.</param>
        /// <param name="notificationFn">A callback that is fired when the overlay display settings are updated.</param>
        /// <returns>
        /// handle representing the registered callback
        /// </returns>
        public ulong AddNotifyDisplaySettingsUpdated(AddNotifyDisplaySettingsUpdatedOptions options, object clientData, OnDisplaySettingsUpdatedCallback notificationFn)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <AddNotifyDisplaySettingsUpdatedOptionsInternal, AddNotifyDisplaySettingsUpdatedOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var notificationFnInternal = new OnDisplaySettingsUpdatedCallbackInternal(OnDisplaySettingsUpdatedCallbackInternalImplementation);

            Helper.AddCallback(ref clientDataAddress, clientData, notificationFn, notificationFnInternal);

            var funcResult = EOS_UI_AddNotifyDisplaySettingsUpdated(InnerHandle, optionsAddress, clientDataAddress, notificationFnInternal);

            Helper.TryMarshalDispose(ref optionsAddress);

            Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);

            return(funcResult);
        }
Esempio n. 2
0
 internal static extern ulong EOS_UI_AddNotifyDisplaySettingsUpdated(System.IntPtr handle, System.IntPtr options, System.IntPtr clientData, OnDisplaySettingsUpdatedCallbackInternal notificationFn);