aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/javax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-04 17:18:47 +0100
committerSven Gothel <[email protected]>2014-01-04 17:18:47 +0100
commitbec29cf970e6a55eb8f720afdae5a3bdc97c1ba2 (patch)
treeb94db19188923dc674b5a594de9cbed4c298fd9c /src/nativewindow/classes/javax
parentfcc0e7397bb6f3ceb1fe143667f8c59b5bf63874 (diff)
Bug 935: NEWT OSX PointerIcon/Pointer-Visibility: Impl. OffscreenLayerSurface (OSX CALayer) w/ JAWTWindow Path
Add setCursor(..) and hideCursor() to OffscreenLayerSurface interface, impl. in JAWTWindow w/ AWT. This allows an OSX NEWT Window using CALayer (i.e. NewtCanvasAWT) to have setPointerIcon(..) and setPointerVisible(..) functionality!
Diffstat (limited to 'src/nativewindow/classes/javax')
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/OffscreenLayerSurface.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/OffscreenLayerSurface.java b/src/nativewindow/classes/javax/media/nativewindow/OffscreenLayerSurface.java
index 8681422ef..81983a7c2 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/OffscreenLayerSurface.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/OffscreenLayerSurface.java
@@ -27,6 +27,11 @@
*/
package javax.media.nativewindow;
+import java.io.IOException;
+
+import javax.media.nativewindow.util.PointImmutable;
+
+import com.jogamp.common.util.IOUtil;
import com.jogamp.common.util.locks.RecursiveLock;
/**
@@ -65,4 +70,19 @@ public interface OffscreenLayerSurface {
/** Returns the recursive lock object of this surface, which synchronizes multithreaded access. */
public RecursiveLock getLock();
+ /**
+ * Optional method setting cursor in the corresponding on-screen surface/window, if exists.
+ *
+ * @param resources maybe null for default cursor
+ * @param hotSpot maybe null for default cursor
+ * @return true if successful, i.e. on-screen surface/window w/ cursor capabilities exists. Otherwise false.
+ * @throws IOException
+ */
+ public boolean setCursor(IOUtil.ClassResources resources, PointImmutable hotSpot) throws IOException;
+ /**
+ * Optional method hiding the cursor in the corresponding on-screen surface/window, if exists.
+ *
+ * @return true if successful, i.e. on-screen surface/window w/ cursor capabilities exists. Otherwise false.
+ */
+ public boolean hideCursor();
}