From 6da365d9d3aa29070afa1a1c82996ec7f92a690b Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Tue, 31 Dec 2013 16:54:07 +0100
Subject: Bug 935: NEWT PointerIcon: Add size, hotspot 'getter' and String
representation
PointerIcon's size and hotspot maybe be useful for certain user-app calculation.
---
src/newt/classes/com/jogamp/newt/Display.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
(limited to 'src/newt/classes/com')
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java
index ee6dfd080..cf1099c85 100644
--- a/src/newt/classes/com/jogamp/newt/Display.java
+++ b/src/newt/classes/com/jogamp/newt/Display.java
@@ -37,6 +37,8 @@ import java.util.Iterator;
import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.util.DimensionImmutable;
+import javax.media.nativewindow.util.PointImmutable;
import jogamp.newt.Debug;
@@ -71,7 +73,15 @@ public abstract class Display {
* PointerIcons can be used via {@link Window#setPointerIcon(PointerIcon)}.
*
*/
- public static interface PointerIcon { }
+ public static interface PointerIcon {
+ /** Returns the size, i.e. width and height. */
+ DimensionImmutable getSize();
+ /** Returns the hotspot. */
+ PointImmutable getHotspot();
+
+ @Override
+ String toString();
+ }
/**
* Returns the created {@link PointerIcon} or null
if not implemented on platform.
--
cgit v1.2.3