2015-12-30 06:41:46 +00:00
|
|
|
#if defined(Hiro_Desktop)
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
namespace hiro {
|
|
|
|
|
|
|
|
auto pDesktop::size() -> Size {
|
2013-03-15 13:11:33 +00:00
|
|
|
@autoreleasepool {
|
|
|
|
NSRect primary = [[[NSScreen screens] objectAtIndex:0] frame];
|
2018-07-16 06:16:26 +00:00
|
|
|
return {
|
|
|
|
(int)primary.size.width,
|
|
|
|
(int)primary.size.height
|
|
|
|
};
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
auto pDesktop::workspace() -> Geometry {
|
2013-03-15 13:11:33 +00:00
|
|
|
@autoreleasepool {
|
|
|
|
auto screen = Desktop::size();
|
|
|
|
NSRect area = [[[NSScreen screens] objectAtIndex:0] visibleFrame];
|
2018-07-16 06:16:26 +00:00
|
|
|
return {
|
|
|
|
(int)area.origin.x,
|
|
|
|
(int)area.origin.y,
|
|
|
|
(int)area.size.width,
|
|
|
|
(int)area.size.height
|
|
|
|
};
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
|
|
|
|
#endif
|