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];
|
2015-12-30 06:41:46 +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];
|
2015-12-30 06:41:46 +00:00
|
|
|
return {(int)area.origin.x, (int)(screen.height() - area.size.height - 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
|