Initial TouchBar Magic
* Make the AtomNSWindow also a NSTouchbarDelegate * Implement basic makeTouchBar and makeItemForIdentifier methods * Initial sending of touch / update events through IPC to BrowserWindowObjects TODO: * JS API * JS Object Converters * Generalize methods so that popovers can work
This commit is contained in:
parent
e027f4aacf
commit
703b5738c8
7 changed files with 105 additions and 0 deletions
|
@ -282,6 +282,10 @@ void Window::OnExecuteWindowsCommand(const std::string& command_name) {
|
|||
Emit("app-command", command_name);
|
||||
}
|
||||
|
||||
void Window::OnTouchBarItemResult(const std::string& item_type, const std::string& item_id) {
|
||||
Emit("_touch-bar-interaction", item_type, item_id);
|
||||
}
|
||||
|
||||
#if defined(OS_WIN)
|
||||
void Window::OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) {
|
||||
if (IsWindowMessageHooked(message)) {
|
||||
|
@ -840,6 +844,10 @@ void Window::SetVibrancy(mate::Arguments* args) {
|
|||
window_->SetVibrancy(type);
|
||||
}
|
||||
|
||||
void Window::InitTouchBar() {
|
||||
window_->InitTouchBar();
|
||||
}
|
||||
|
||||
int32_t Window::ID() const {
|
||||
return weak_map_id();
|
||||
}
|
||||
|
@ -960,6 +968,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("setAutoHideCursor", &Window::SetAutoHideCursor)
|
||||
#endif
|
||||
.SetMethod("setVibrancy", &Window::SetVibrancy)
|
||||
.SetMethod("initTouchBar", &Window::InitTouchBar)
|
||||
#if defined(OS_WIN)
|
||||
.SetMethod("hookWindowMessage", &Window::HookWindowMessage)
|
||||
.SetMethod("isWindowMessageHooked", &Window::IsWindowMessageHooked)
|
||||
|
|
|
@ -85,6 +85,7 @@ class Window : public mate::TrackableObject<Window>,
|
|||
void OnRendererUnresponsive() override;
|
||||
void OnRendererResponsive() override;
|
||||
void OnExecuteWindowsCommand(const std::string& command_name) override;
|
||||
void OnTouchBarItemResult(const std::string& item_type, const std::string& item_id) override;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
void OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) override;
|
||||
|
@ -203,6 +204,7 @@ class Window : public mate::TrackableObject<Window>,
|
|||
void SetAutoHideCursor(bool auto_hide);
|
||||
|
||||
void SetVibrancy(mate::Arguments* args);
|
||||
void InitTouchBar();
|
||||
|
||||
v8::Local<v8::Value> WebContents(v8::Isolate* isolate);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue