From bec29cf970e6a55eb8f720afdae5a3bdc97c1ba2 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 4 Jan 2014 17:18:47 +0100 Subject: 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! --- .../media/nativewindow/OffscreenLayerSurface.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/nativewindow/classes/javax') 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(); } -- cgit v1.2.3