2018-04-19 07:53:12 +00:00
|
|
|
// Copyright (c) 2018 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef ATOM_BROWSER_UI_COCOA_ATOM_NS_WINDOW_H_
|
|
|
|
#define ATOM_BROWSER_UI_COCOA_ATOM_NS_WINDOW_H_
|
|
|
|
|
2018-10-19 13:50:30 +00:00
|
|
|
#include "atom/browser/ui/cocoa/event_dispatching_window.h"
|
2018-04-19 07:53:12 +00:00
|
|
|
#include "ui/views/cocoa/native_widget_mac_nswindow.h"
|
2018-09-06 23:47:31 +00:00
|
|
|
#include "ui/views/widget/native_widget_mac.h"
|
2018-04-19 07:53:12 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
class NativeWindowMac;
|
|
|
|
|
|
|
|
// Prevents window from resizing during the scope.
|
|
|
|
class ScopedDisableResize {
|
|
|
|
public:
|
|
|
|
ScopedDisableResize() { disable_resize_ = true; }
|
|
|
|
~ScopedDisableResize() { disable_resize_ = false; }
|
|
|
|
|
|
|
|
static bool IsResizeDisabled() { return disable_resize_; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
static bool disable_resize_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
2018-04-24 08:23:08 +00:00
|
|
|
@interface AtomNSWindow : NativeWidgetMacNSWindow {
|
2018-04-19 07:53:12 +00:00
|
|
|
@private
|
|
|
|
atom::NativeWindowMac* shell_;
|
2018-06-20 12:27:55 +00:00
|
|
|
CGFloat windowButtonsInterButtonSpacing_;
|
2018-04-19 07:53:12 +00:00
|
|
|
}
|
|
|
|
@property BOOL acceptsFirstMouse;
|
|
|
|
@property BOOL enableLargerThanScreen;
|
|
|
|
@property BOOL disableAutoHideCursor;
|
|
|
|
@property BOOL disableKeyOrMainWindow;
|
2018-06-20 12:27:55 +00:00
|
|
|
@property NSPoint windowButtonsOffset;
|
2018-05-02 11:43:45 +00:00
|
|
|
@property(nonatomic, retain) NSView* vibrantView;
|
2018-05-02 12:28:28 +00:00
|
|
|
- (id)initWithShell:(atom::NativeWindowMac*)shell
|
|
|
|
styleMask:(NSUInteger)styleMask;
|
2018-05-02 11:43:45 +00:00
|
|
|
- (atom::NativeWindowMac*)shell;
|
2018-09-06 23:47:31 +00:00
|
|
|
- (id)accessibilityFocusedUIElement;
|
2018-05-02 12:28:28 +00:00
|
|
|
- (NSRect)originalContentRectForFrameRect:(NSRect)frameRect;
|
2018-06-20 12:27:55 +00:00
|
|
|
- (void)enableWindowButtonsOffset;
|
2018-04-19 07:53:12 +00:00
|
|
|
- (void)toggleFullScreenMode:(id)sender;
|
|
|
|
@end
|
|
|
|
|
|
|
|
#endif // ATOM_BROWSER_UI_COCOA_ATOM_NS_WINDOW_H_
|