1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/gg/gg_darwin.m

15 lines
464 B
Mathematica
Raw Normal View History

2020-12-04 01:17:00 +03:00
#include <Cocoa/Cocoa.h>
gg__Size gg_get_screen_size() {
NSScreen *screen = [NSScreen mainScreen];
NSDictionary *description = [screen deviceDescription];
NSSize displayPixelSize = [[description objectForKey:NSDeviceSize] sizeValue];
CGSize displayPhysicalSize = CGDisplayScreenSize(
[[description objectForKey:@"NSScreenNumber"] unsignedIntValue]);
gg__Size res;
res.width = displayPixelSize.width;
res.height = displayPixelSize.height;
return res;
}