diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-10 10:31:41 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-10 10:31:41 +0000 |
commit | 8229fdd4902012c2d87cdd0264ad30de5cd7e0fa (patch) | |
tree | 83c7138949312de0ba2d89557807ff555f23a907 /indra/llwindow/llwindowmacosx-objc.mm | |
parent | d6547a9b84695b994eef5425d62d19929478109a (diff) | |
parent | bc852b9a5dcffcec4cbf15b5cc4e571f8970c125 (diff) |
merge from viewer-2-0
Diffstat (limited to 'indra/llwindow/llwindowmacosx-objc.mm')
-rw-r--r-- | indra/llwindow/llwindowmacosx-objc.mm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 59b25e1726..5cab2619fd 100644 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -116,3 +116,22 @@ OSErr setImageCursor(CursorRef ref) return noErr; } +void getScreenSize(int* width, int* height) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSRect screen_rect = [[NSScreen mainScreen] frame]; + if (width) *width = (int)(screen_rect.size.width); + if (height) *height = (int)(screen_rect.size.height); + [pool release]; +} + +void getVisibleScreen(int *x, int *y, int* width, int* height) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSRect visible_rect = [[NSScreen mainScreen] visibleFrame]; + if (width) *width = (int)(visible_rect.size.width); + if (height) *height = (int)(visible_rect.size.height); + if (x) *x = (int)(visible_rect.origin.x); + if (y) *y = (int)(visible_rect.origin.y); + [pool release]; +} |