electron/atom/browser/mac/atom_application.h

55 lines
1.8 KiB
C
Raw Normal View History

// Copyright (c) 2013 GitHub, Inc.
2014-04-25 09:49:37 +00:00
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
2018-02-05 07:13:35 +00:00
#include "base/callback.h"
#include "base/mac/scoped_nsobject.h"
2018-04-18 01:44:10 +00:00
#include "base/mac/scoped_sending_event.h"
// Forward Declare Appareance APIs
@interface NSApplication (HighSierraSDK)
@property(copy, readonly)
NSAppearance* effectiveAppearance API_AVAILABLE(macosx(10.14));
@property(copy, readonly) NSAppearance* appearance API_AVAILABLE(macosx(10.14));
- (void)setAppearance:(NSAppearance*)appearance API_AVAILABLE(macosx(10.14));
@end
extern "C" {
#if !defined(MAC_OS_X_VERSION_10_14) || \
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14
BASE_EXPORT extern NSString* const NSAppearanceNameDarkAqua;
#endif // MAC_OS_X_VERSION_10_14
} // extern "C"
2018-04-18 01:44:10 +00:00
@interface AtomApplication : NSApplication <CrAppProtocol,
CrAppControlProtocol,
NSUserActivityDelegate> {
@private
BOOL handlingSendEvent_;
base::scoped_nsobject<NSUserActivity> currentActivity_
API_AVAILABLE(macosx(10.10));
2017-09-14 07:12:34 +00:00
NSCondition* handoffLock_;
BOOL updateReceived_;
2018-02-05 07:13:35 +00:00
base::Callback<bool()> shouldShutdown_;
}
+ (AtomApplication*)sharedApplication;
2018-02-05 07:13:35 +00:00
- (void)setShutdownHandler:(base::Callback<bool()>)handler;
// CrAppProtocol:
- (BOOL)isHandlingSendEvent;
// CrAppControlProtocol:
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent;
- (NSUserActivity*)getCurrentActivity API_AVAILABLE(macosx(10.10));
2016-05-23 15:49:46 +00:00
- (void)setCurrentActivity:(NSString*)type
withUserInfo:(NSDictionary*)userInfo
withWebpageURL:(NSURL*)webpageURL;
- (void)invalidateCurrentActivity;
2017-09-14 07:12:34 +00:00
- (void)updateCurrentActivity:(NSString*)type
withUserInfo:(NSDictionary*)userInfo;
@end