2019-09-22 17:15:01 +00:00
|
|
|
//
|
|
|
|
// CSApplication.h
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 22/09/2019.
|
|
|
|
// Copyright © 2019 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef CSApplication_h
|
|
|
|
#define CSApplication_h
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
2019-09-25 02:31:20 +00:00
|
|
|
@class CSApplication;
|
|
|
|
|
|
|
|
@protocol CSApplicationEventDelegate
|
|
|
|
- (BOOL)application:(nonnull CSApplication *)application shouldSendEvent:(nonnull NSEvent *)event;
|
2019-09-22 17:15:01 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
/*!
|
2019-09-25 02:31:20 +00:00
|
|
|
CSApplication differs from NSApplication in only one regard: it supports an eventDelegate.
|
2019-09-22 17:15:01 +00:00
|
|
|
|
2019-09-25 02:31:20 +00:00
|
|
|
If conected, an eventDelegate will be offered all application events prior to their propagation
|
|
|
|
into the application proper. It may opt to remove those events from the queue. This primarily
|
|
|
|
provides a way to divert things like the command key that will otherwise trigger menu
|
|
|
|
shortcuts, for periods when it is appropriate to do so.
|
2019-09-22 17:15:01 +00:00
|
|
|
*/
|
|
|
|
@interface CSApplication: NSApplication
|
2019-09-25 02:31:20 +00:00
|
|
|
@property(nonatomic, weak, nullable) id<CSApplicationEventDelegate> eventDelegate;
|
2019-09-22 17:15:01 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* CSApplication_h */
|