mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* setter * getter * specs and docs * fixup Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
@@ -808,6 +808,16 @@ void TopLevelWindow::SetVibrancy(v8::Isolate* isolate,
|
||||
window_->SetVibrancy(type);
|
||||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
void TopLevelWindow::SetTrafficLightPosition(const gfx::Point& position) {
|
||||
window_->SetTrafficLightPosition(position);
|
||||
}
|
||||
|
||||
gfx::Point TopLevelWindow::GetTrafficLightPosition() const {
|
||||
return window_->GetTrafficLightPosition();
|
||||
}
|
||||
#endif
|
||||
|
||||
void TopLevelWindow::SetTouchBar(
|
||||
std::vector<gin_helper::PersistentDictionary> items) {
|
||||
window_->SetTouchBar(std::move(items));
|
||||
@@ -1178,6 +1188,12 @@ void TopLevelWindow::BuildPrototype(v8::Isolate* isolate,
|
||||
.SetMethod("setAutoHideCursor", &TopLevelWindow::SetAutoHideCursor)
|
||||
#endif
|
||||
.SetMethod("setVibrancy", &TopLevelWindow::SetVibrancy)
|
||||
#if defined(OS_MACOSX)
|
||||
.SetMethod("setTrafficLightPosition",
|
||||
&TopLevelWindow::SetTrafficLightPosition)
|
||||
.SetMethod("getTrafficLightPosition",
|
||||
&TopLevelWindow::GetTrafficLightPosition)
|
||||
#endif
|
||||
.SetMethod("_setTouchBarItems", &TopLevelWindow::SetTouchBar)
|
||||
.SetMethod("_refreshTouchBarItem", &TopLevelWindow::RefreshTouchBarItem)
|
||||
.SetMethod("_setEscapeTouchBarItem",
|
||||
|
||||
@@ -185,6 +185,12 @@ class TopLevelWindow : public gin_helper::TrackableObject<TopLevelWindow>,
|
||||
bool IsVisibleOnAllWorkspaces();
|
||||
void SetAutoHideCursor(bool auto_hide);
|
||||
virtual void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value);
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
void SetTrafficLightPosition(const gfx::Point& position);
|
||||
gfx::Point GetTrafficLightPosition() const;
|
||||
#endif
|
||||
|
||||
void SetTouchBar(std::vector<gin_helper::PersistentDictionary> items);
|
||||
void RefreshTouchBarItem(const std::string& item_id);
|
||||
void SetEscapeTouchBarItem(gin_helper::PersistentDictionary item);
|
||||
|
||||
Reference in New Issue
Block a user