/* NSNotificationQueue.h Copyright (c) 1994-2019, Apple Inc. All rights reserved. */ #import #import @class NSNotification, NSNotificationCenter, NSArray, NSString; NS_HEADER_AUDIT_BEGIN(nullability, sendability) typedef NS_ENUM(NSUInteger, NSPostingStyle) { NSPostWhenIdle = 1, NSPostASAP = 2, NSPostNow = 3 }; typedef NS_OPTIONS(NSUInteger, NSNotificationCoalescing) { NSNotificationNoCoalescing = 0, NSNotificationCoalescingOnName = 1, NSNotificationCoalescingOnSender = 2 }; @interface NSNotificationQueue : NSObject @property (class, readonly, strong) NSNotificationQueue *defaultQueue; - (instancetype)initWithNotificationCenter:(NSNotificationCenter *)notificationCenter NS_DESIGNATED_INITIALIZER; - (void)enqueueNotification:(NSNotification *)notification postingStyle:(NSPostingStyle)postingStyle; - (void)enqueueNotification:(NSNotification *)notification postingStyle:(NSPostingStyle)postingStyle coalesceMask:(NSNotificationCoalescing)coalesceMask forModes:(nullable NSArray *)modes; - (void)dequeueNotificationsMatching:(NSNotification *)notification coalesceMask:(NSUInteger)coalesceMask; @end NS_HEADER_AUDIT_END(nullability, sendability)