electron/shell/browser/ui/cocoa/electron_ns_window.h

50 lines
1.5 KiB
C
Raw Normal View History

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 SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_
#define SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_
2018-04-19 07:53:12 +00:00
#include "components/remote_cocoa/app_shim/native_widget_mac_nswindow.h"
#include "shell/browser/ui/cocoa/event_dispatching_window.h"
#include "ui/views/widget/native_widget_mac.h"
2018-04-19 07:53:12 +00:00
namespace electron {
2018-04-19 07:53:12 +00:00
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 electron
2018-04-19 07:53:12 +00:00
@interface ElectronNSWindow : NativeWidgetMacNSWindow {
2018-04-19 07:53:12 +00:00
@private
electron::NativeWindowMac* shell_;
2018-04-19 07:53:12 +00:00
}
@property BOOL acceptsFirstMouse;
@property BOOL enableLargerThanScreen;
@property BOOL disableAutoHideCursor;
@property BOOL disableKeyOrMainWindow;
@property(nonatomic, retain) NSVisualEffectView* vibrantView;
@property(nonatomic, retain) NSImage* cornerMask;
- (id)initWithShell:(electron::NativeWindowMac*)shell
styleMask:(NSUInteger)styleMask;
- (electron::NativeWindowMac*)shell;
- (id)accessibilityFocusedUIElement;
- (NSRect)originalContentRectForFrameRect:(NSRect)frameRect;
2018-04-19 07:53:12 +00:00
- (void)toggleFullScreenMode:(id)sender;
- (NSImage*)_cornerMask;
2018-04-19 07:53:12 +00:00
@end
#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_