Debian Codegraph @

phoenix/cocoa/monitor.cpp

raw
1 namespace phoenix {
2
3 unsigned pMonitor::count() {
4 @autoreleasepool {
5 return [[NSScreen screens] count];
6 }
7 }
8
9 Geometry pMonitor::geometry(unsigned monitor) {
10 @autoreleasepool {
11 NSRect rectangle = [[[NSScreen screens] objectAtIndex:monitor] frame];
12 return {rectangle.origin.x, rectangle.origin.y, rectangle.size.width, rectangle.size.height};
13 }
14 }
15
16 unsigned pMonitor::primary() {
17 //on OS X, the primary monitor is always the first monitor
18 return 0;
19 }
20
21 }