mirror of
https://github.com/darlinghq/darling-foundation.git
synced 2024-11-23 03:39:44 +00:00
Add stubs for NSUserNotificationCenter
This commit is contained in:
parent
ffedc7bda0
commit
afc6f99931
@ -25,10 +25,19 @@
|
||||
@interface NSUserNotificationAction : NSObject <NSCopying>
|
||||
@end
|
||||
|
||||
@interface NSUserNotificationCenter : NSObject
|
||||
@end
|
||||
|
||||
@protocol NSUserNotificationCenterDelegate <NSObject>
|
||||
@end
|
||||
|
||||
@interface NSUserNotificationCenter : NSObject {
|
||||
id<NSUserNotificationCenterDelegate> _delegate;
|
||||
}
|
||||
|
||||
@property(class, readonly, strong) NSUserNotificationCenter *defaultUserNotificationCenter;
|
||||
@property(assign) id<NSUserNotificationCenterDelegate> delegate;
|
||||
|
||||
- (void)deliverNotification:(NSUserNotification *)notification;
|
||||
- (void)removeDeliveredNotification:(NSUserNotification *)notification;
|
||||
|
||||
@end
|
||||
|
||||
FOUNDATION_EXPORT NSString * const NSUserNotificationDefaultSoundName;
|
||||
|
@ -40,6 +40,27 @@
|
||||
@end
|
||||
|
||||
@implementation NSUserNotificationCenter
|
||||
|
||||
static NSUserNotificationCenter *_defaultUserNotificationCenter = nil;
|
||||
|
||||
@synthesize delegate = _delegate;
|
||||
|
||||
+ (NSUserNotificationCenter *)defaultUserNotificationCenter {
|
||||
if (_defaultUserNotificationCenter == nil) {
|
||||
_defaultUserNotificationCenter = [[NSUserNotificationCenter alloc] init];
|
||||
}
|
||||
|
||||
return _defaultUserNotificationCenter;
|
||||
}
|
||||
|
||||
- (void)deliverNotification:(NSUserNotification *)notification {
|
||||
NSLog(@"[NSUserNotificationCenter deliverNotification:]");
|
||||
}
|
||||
|
||||
- (void)removeDeliveredNotification:(NSUserNotification *)notification {
|
||||
NSLog(@"[NSUserNotificationCenter removeDeliveredNotification:]");
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
NSString * const NSUserNotificationDefaultSoundName = @"DefaultSoundName";
|
||||
|
Loading…
Reference in New Issue
Block a user