@@ -14,10 +14,11 @@ */ #include #import "OFObject.h" +#import "OFNotification.h" OF_ASSUME_NONNULL_BEGIN /** @file */ @@ -26,10 +27,15 @@ @class OFMutableArray OF_GENERIC(ObjectType); @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); @class OFSandbox; @class OFString; +/** + * @brief A notification that will be sent when the application will terminate. + */ +extern const OFNotificationName OFApplicationWillTerminateNotification; + /** * @brief Specify the class to be used as the application delegate. * * An instance of this class will be created and act as the application * delegate. @@ -143,10 +149,14 @@ * @brief A class which represents the application as an object. * * In order to create a new OFApplication, you should create a class conforming * to the optional @ref OFApplicationDelegate protocol and put * `OF_APPLICATION_DELEGATE(NameOfYourClass)` in the .m file of that class. + * + * When the application is about to be terminated, + * @ref OFApplicationDelegate#applicationWillTerminate will be called on the + * delegate and an @ref OFApplicationWillTerminateNotification will be sent. */ OF_SUBCLASSING_RESTRICTED @interface OFApplication: OFObject { OFString *_programName;