mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
🎨
This commit is contained in:
@@ -39,9 +39,11 @@ class Screen : public mate::EventEmitter<Screen>,
|
|||||||
std::vector<display::Display> GetAllDisplays();
|
std::vector<display::Display> GetAllDisplays();
|
||||||
display::Display GetDisplayNearestPoint(const gfx::Point& point);
|
display::Display GetDisplayNearestPoint(const gfx::Point& point);
|
||||||
display::Display GetDisplayMatching(const gfx::Rect& match_rect);
|
display::Display GetDisplayMatching(const gfx::Rect& match_rect);
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
int getMenuBarHeight();
|
int getMenuBarHeight();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// display::DisplayObserver:
|
// display::DisplayObserver:
|
||||||
void OnDisplayAdded(const display::Display& new_display) override;
|
void OnDisplayAdded(const display::Display& new_display) override;
|
||||||
void OnDisplayRemoved(const display::Display& old_display) override;
|
void OnDisplayRemoved(const display::Display& old_display) override;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
namespace api {
|
namespace api {
|
||||||
|
|
||||||
int Screen::getMenuBarHeight() {
|
int Screen::getMenuBarHeight() {
|
||||||
return [[NSApp mainMenu] menuBarHeight];
|
return [[NSApp mainMenu] menuBarHeight];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,9 +97,7 @@ The current absolute position of the mouse pointer.
|
|||||||
|
|
||||||
### `screen.getMenuBarHeight()` _macOS_
|
### `screen.getMenuBarHeight()` _macOS_
|
||||||
|
|
||||||
Returns `Integer` - Height
|
Returns `Integer` - The height of the menu bar in pixels.
|
||||||
|
|
||||||
The height of toolbar in pixels.
|
|
||||||
|
|
||||||
### `screen.getPrimaryDisplay()`
|
### `screen.getPrimaryDisplay()`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user