ObjFW
Toggle main menu visibility
Loading...
Searching...
No Matches
OFNotification.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008-2026 Jonathan Schleifer <js@nil.im>
3
*
4
* All rights reserved.
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU Lesser General Public License version 3.0 only,
8
* as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13
* version 3.0 for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public License
16
* version 3.0 along with this program. If not, see
17
* <https://www.gnu.org/licenses/>.
18
*/
19
20
#import "
OFObject.h
"
21
22
OF_ASSUME_NONNULL_BEGIN
23
25
26
@class
OFConstantString
;
27
@class
OFDictionary
OF_GENERIC(KeyType, ObjectType);
28
32
typedef
OFConstantString
*
OFNotificationName
;
33
40
@interface
OFNotification
:
OFObject
<
OFCopying
>
41
{
42
OFNotificationName
_name;
43
id
_Nullable _object;
44
OFDictionary
*_Nullable _userInfo;
45
OF_RESERVE_IVARS(
OFNotification
, 4)
46
}
47
51
@property
(readonly, nonatomic)
OFNotificationName
name;
52
57
@property
OF_NULLABLE_PROPERTY (readonly, nonatomic)
id
object
;
58
62
@property
OF_NULLABLE_PROPERTY (readonly, nonatomic)
OFDictionary
*
userInfo
;
63
72
+ (instancetype)notificationWithName: (
OFNotificationName
)name
73
object: (nullable
id
)object;
74
85
+ (instancetype)notificationWithName: (
OFNotificationName
)name
86
object: (nullable
id
)object
87
userInfo: (nullable
OFDictionary
*)userInfo;
88
98
- (instancetype)initWithName: (
OFNotificationName
)name
99
object: (nullable
id
)object;
100
111
- (instancetype)initWithName: (
OFNotificationName
)name
112
object: (nullable
id
)object
113
userInfo: (nullable
OFDictionary
*)userInfo
114
OF_DESIGNATED_INITIALIZER;
115
116
- (instancetype)
init
OF_UNAVAILABLE;
117
@end
118
119
OF_ASSUME_NONNULL_END
OFNotificationName
OFConstantString * OFNotificationName
A name for a notification.
Definition
OFNotification.h:32
OFObject.h
OFConstantString
A class for storing constant strings using the @"" literal.
Definition
OFConstantString.h:42
OFDictionary
An abstract class for storing objects in a dictionary.
Definition
OFDictionary.h:85
OFNotification
A class to represent a notification for or from OFNotificationCenter.
Definition
OFNotification.h:42
OFNotification::userInfo
OFDictionary * userInfo
Additional information about the notification.
Definition
OFNotification.h:63
OFNotification::object
id object
The object of the notification. This is commonly the sender of the notification.
Definition
OFNotification.h:58
OFObject
The root class for all other classes inside ObjFW.
Definition
OFObject.h:956
-[OFObject init]
instancetype init()
Initializes an already allocated object.
Definition
OFObject.m:671
OFCopying-p
A protocol for the creation of copies.
Definition
OFObject.h:1618
src
OFNotification.h
Generated by
1.17.0