electron/shell/browser/ui/cocoa/electron_ns_window_delegate.h
Samuel Maddock f9d2a7077e
feat: include resize edge with will-resize event (#29199)
* feat: emit resize edge with will-resize event

fix: wparam type

fix: private member usage on mac

docs: will-resize event edge option

refactor: 'info' -> 'details' for better type gen

* Update docs/api/browser-window.md

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* Update docs/api/browser-window.md

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-06-02 11:37:10 +09:00

33 lines
1 KiB
Objective-C

// 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_DELEGATE_H_
#define SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_
#include <Quartz/Quartz.h>
#include "components/remote_cocoa/app_shim/views_nswindow_delegate.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace electron {
class NativeWindowMac;
}
@interface ElectronNSWindowDelegate
: ViewsNSWindowDelegate <NSTouchBarDelegate, QLPreviewPanelDataSource> {
@private
electron::NativeWindowMac* shell_;
bool is_zooming_;
int level_;
bool is_resizable_;
// Only valid during a live resize.
// Used to keep track of whether a resize is happening horizontally or
// vertically, even if physically the user is resizing in both directions.
absl::optional<bool> resizingHorizontally_;
}
- (id)initWithShell:(electron::NativeWindowMac*)shell;
@end
#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_