summaryrefslogtreecommitdiff
path: root/indra/llwindow/llopenglview-objc.h
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-01-22 15:37:01 -0500
committerGeenz <geenz@geenzo.com>2013-01-22 15:37:01 -0500
commit29e747c4f17818816c502a3aa653b828e689be4a (patch)
tree4bb9ed177ca1d03777560c121173a361b7118e91 /indra/llwindow/llopenglview-objc.h
parent1bbbaf8dd69a08a3e7c570e6ad14f57a4f6e91cb (diff)
And thus, the demonic mouse position conversions from view space to screen space were tamed.
Diffstat (limited to 'indra/llwindow/llopenglview-objc.h')
-rw-r--r--indra/llwindow/llopenglview-objc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h
index 8412621392..dd2f35aafc 100644
--- a/indra/llwindow/llopenglview-objc.h
+++ b/indra/llwindow/llopenglview-objc.h
@@ -39,4 +39,26 @@
unsigned int mModifiers;
}
+- (NSPoint)convertToScreenFromLocalPoint:(NSPoint)point relativeToView:(NSView *)view;
+- (NSPoint)flipPoint:(NSPoint)aPoint;
+
+@end
+
+@interface NSScreen (PointConversion)
+
+/*
+ Returns the screen where the mouse resides
+ */
++ (NSScreen *)currentScreenForMouseLocation;
+
+/*
+ Allows you to convert a point from global coordinates to the current screen coordinates.
+ */
+- (NSPoint)convertPointToScreenCoordinates:(NSPoint)aPoint;
+
+/*
+ Allows to flip the point coordinates, so y is 0 at the top instead of the bottom. x remains the same
+ */
+- (NSPoint)flipPoint:(NSPoint)aPoint;
+
@end