2018-04-19 07:01:19 +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.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_
|
|
|
|
#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_
|
2018-04-19 07:01:19 +00:00
|
|
|
|
2018-04-19 07:41:36 +00:00
|
|
|
#include <Quartz/Quartz.h>
|
|
|
|
|
2019-05-15 22:04:23 +00:00
|
|
|
#include "components/remote_cocoa/app_shim/views_nswindow_delegate.h"
|
2021-06-02 02:37:10 +00:00
|
|
|
#include "third_party/abseil-cpp/absl/types/optional.h"
|
2018-04-19 07:01:19 +00:00
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
namespace electron {
|
2018-04-19 07:01:19 +00:00
|
|
|
class NativeWindowMac;
|
|
|
|
}
|
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
@interface ElectronNSWindowDelegate
|
2018-09-19 11:10:26 +00:00
|
|
|
: ViewsNSWindowDelegate <NSTouchBarDelegate, QLPreviewPanelDataSource> {
|
2018-04-19 07:01:19 +00:00
|
|
|
@private
|
2019-06-19 21:23:04 +00:00
|
|
|
electron::NativeWindowMac* shell_;
|
2018-04-19 07:01:19 +00:00
|
|
|
bool is_zooming_;
|
|
|
|
int level_;
|
|
|
|
bool is_resizable_;
|
2021-06-02 02:37:10 +00:00
|
|
|
|
|
|
|
// 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_;
|
2018-04-19 07:01:19 +00:00
|
|
|
}
|
2019-06-19 21:23:04 +00:00
|
|
|
- (id)initWithShell:(electron::NativeWindowMac*)shell;
|
2018-04-19 07:01:19 +00:00
|
|
|
@end
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_
|