summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx-objc.mm
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-07 15:27:17 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-07 15:27:17 +0000
commit0775e919018a8246e7af03f00b94f50abd84dd96 (patch)
tree530fcb0473adacde42f9c3df2258f1c26a6bcc62 /indra/llwindow/llwindowmacosx-objc.mm
parent93051dc23cb3252af327a9b113abc45de154ff4e (diff)
parentf499260782a0c94c4f164a743da9d2690240dad7 (diff)
PE merge.
Diffstat (limited to 'indra/llwindow/llwindowmacosx-objc.mm')
-rw-r--r--indra/llwindow/llwindowmacosx-objc.mm19
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];
+}