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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.6 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 ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_
#define ELECTRON_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 {
class NativeWindowMac;
// Prevents window from resizing during the scope.
class ScopedDisableResize {
public:
ScopedDisableResize() { disable_resize_++; }
~ScopedDisableResize() { disable_resize_--; }
2018-04-19 07:53:12 +00:00
// True if there are 1+ nested ScopedDisableResize objects in the scope
static bool IsResizeDisabled() { return disable_resize_ > 0; }
2018-04-19 07:53:12 +00:00
private:
static int disable_resize_;
2018-04-19 07:53:12 +00:00
};
} // namespace electron
2018-04-24 08:23:08 +00:00
@interface ElectronNSWindow : NativeWidgetMacNSWindow {
2018-04-19 07:53:12 +00:00
@private
electron::NativeWindowMac* shell_;
}
@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;
2018-05-02 11:43:45 +00:00
- (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 // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_