1
/** Interface for NSNotification and NSNotificationCenter for GNUstep
2
Copyright (C) 1996,1999 Free Software Foundation, Inc.
4
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
5
Rewrite by: Richard Frith-Macdonald <rfm@gnu.org>
8
This file is part of the GNUstep Base Library.
10
This library is free software; you can redistribute it and/or
11
modify it under the terms of the GNU Library General Public
12
License as published by the Free Software Foundation; either
13
version 2 of the License, or (at your option) any later version.
15
This library is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
Library General Public License for more details.
20
You should have received a copy of the GNU Library General Public
21
License along with this library; if not, write to the Free
22
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
24
AutogsdocSource: NSNotification.m
25
AutogsdocSource: NSNotificationCenter.m
28
#ifndef __NSNotification_h_GNUSTEP_BASE_INCLUDE
29
#define __NSNotification_h_GNUSTEP_BASE_INCLUDE
31
#include <Foundation/NSObject.h>
32
#include <Foundation/NSMapTable.h>
38
@interface NSNotification : NSObject <NSCopying, NSCoding>
42
/* Creating a Notification Object */
43
+ (NSNotification*) notificationWithName: (NSString*)name
46
+ (NSNotification*) notificationWithName: (NSString*)name
48
userInfo: (NSDictionary*)info;
50
/* Querying a Notification Object */
54
- (NSDictionary*) userInfo;
60
@interface NSNotificationCenter : NSObject <GCFinalization>
65
+ (NSNotificationCenter*) defaultCenter;
67
- (void) addObserver: (id)observer
68
selector: (SEL)selector
72
- (void) removeObserver: (id)observer;
73
- (void) removeObserver: (id)observer
77
- (void) postNotification: (NSNotification*)notification;
78
- (void) postNotificationName: (NSString*)name
80
- (void) postNotificationName: (NSString*)name
82
userInfo: (NSDictionary*)info;
89
* Defines an extension for maximising posting performance - this option
90
* is NOT adjustable for the default notification center.
92
@interface NSNotificationCenter (GNUstep)
95
* You can disable locking in a multi-threaded program if you KNOW that only
96
* one thread will ever use the notification center.
98
- (BOOL) setLockingDisabled: (BOOL)flag;
102
#endif /*__NSNotification_h_GNUSTEP_BASE_INCLUDE */