Make dynamic buttons work along with click events

This commit is contained in:
Samuel Attard 2016-11-27 22:54:12 +11:00 committed by Kevin Sawicki
parent 703b5738c8
commit 7857c83ea1
11 changed files with 203 additions and 20 deletions

View file

@ -13,6 +13,7 @@
#include "atom/browser/native_window.h"
#include "base/mac/scoped_nsobject.h"
#include "content/public/browser/render_widget_host.h"
#include "native_mate/constructor.h"
@class AtomNSWindow;
@class AtomNSWindowDelegate;
@ -100,7 +101,9 @@ class NativeWindowMac : public NativeWindow,
void SetAutoHideCursor(bool auto_hide) override;
void SetVibrancy(const std::string& type) override;
void InitTouchBar() override;
void DestroyTouchBar() override;
void SetTouchBar(mate::Arguments* args) override;
std::vector<mate::Dictionary> GetTouchBarItems();
// content::RenderWidgetHost::InputEventObserver:
void OnInputEvent(const blink::WebInputEvent& event) override;
@ -155,6 +158,8 @@ class NativeWindowMac : public NativeWindow,
base::scoped_nsobject<AtomNSWindow> window_;
base::scoped_nsobject<AtomNSWindowDelegate> window_delegate_;
std::vector<mate::Dictionary> touch_bar_items_;
// Event monitor for scroll wheel event.
id wheel_event_monitor_;