| Modifier and Type | Field and Description |
|---|---|
| private static Runnable | |
| private static final boolean | |
| private static boolean | |
| public static final int | MAX_PIXELSCALE
FIXME HiDPI: OSX unique and maximum value |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | AddCASublayer(final long rootCALayer, final long subCALayer, final int
x-coord of the sub-CALayer in window units (points) x, final int y-coord of the sub-CALayer in window units (points) y, final int width of the sub-CALayer in window units (points) width, final int height of the sub-CALayer in window units (points) height, final float scale for HiDPI support: pixel-dim = window-dim x scale contentsScale, final int caLayerQuirks)Attach a sub CALayer to the root CALayer
Method will trigger a |
| private static native void | AddCASublayer0(long rootCALayer, long subCALayer, int x, int y, int width, int height, float contentsScale, int caLayerQuirks)
|
| public static long | Returns: the new CALayer objectwidth of the CALayer in window units (points) width, final int height of the CALayer in window units (points) height, final float scale for HiDPI support: pixel-dim = window-dim x scale contentsScale)Create a CALayer suitable to act as a root CALayer. |
| private static native long | |
| public static long | |
| private static native long | |
| public static void | |
| private static native void | |
| public static void | |
| private static native void | |
| public static void | FixCALayerLayout(final long
the root surface layer, maybe null. rootCALayer, final long the client surface layer, maybe null. subCALayer, final boolean TODO visible, final int x, final int y, final int the expected width in window units (points) width, final int the expected height in window units (points) height, final int TODO caLayerQuirks)Fix root and sub CALayer position to 0/0 and size If the sub CALayer implements the Objective-C NativeWindow protocol NWDedicatedSize (e.g. JOGL's MyNSOpenGLLayer), the dedicated size is passed to the layer, which propagates it appropriately. |
| private static native void | FixCALayerLayout0(long rootCALayer, long subCALayer, boolean visible, int x, int y, int width, int height, int caLayerQuirks)
|
| public static Insets | |
| private static native Object | |
| public static Point | Returns: top-left client-area position in window units
|
| private static native Object | |
| public static long | |
| private static native long | |
| public static long | |
| private static native long | |
| public static double | |
| private static native double | |
| private static native double | |
| public static double | |
| public static int | |
| private static native int | |
| public static final boolean | |
| private static native boolean | initIDs0()
private static boolean isAWTEDTMainThreadInit = false; private static boolean isAWTEDTMainThread; public synchronized static boolean isAWTEDTMainThread() { if(!isAWTEDTMainThreadInit) { isAWTEDTMainThreadInit = true; if(Platform.AWT_AVAILABLE) { AWTEDTExecutor.singleton.invoke(true, new Runnable() { public void run() { isAWTEDTMainThread = IsMainThread(); System.err.println("XXX: "+Thread.currentThread().getName()+" - isAWTEDTMainThread "+isAWTEDTMainThread); } }); } else { isAWTEDTMainThread = false; } } return isAWTEDTMainThread; } |
| public static synchronized void | |
| public static boolean | |
| private static native boolean | |
| public static boolean | |
| private static native boolean | |
| public static boolean | |
| private static native boolean | |
| public static void | |
| private static native void | |
| public static void | RemoveCASublayer(final long rootCALayer, final long subCALayer)
Detach a sub CALayer from the root CALayer. |
| private static native void | |
| public static boolean | |
| public static void | |
| private static native void | |
| public static void | RunOnMainThread(final boolean waitUntilDone, final boolean
if kickNSApp, final Runnable runnable)true issues KickNSApp()Run on OSX UI main thread. |
| public static <R, A> R | RunOnMainThread(final boolean waitUntilDone, final boolean
if kickNSApp, final Function<R, A> func, final A... args)true issues KickNSApp()Run on OSX UI main thread. |
| private static native void | |
| public static void | SetCALayerPixelScale(final long
the root surface layer, maybe null. rootCALayer, final long the client surface layer, maybe null. subCALayer, final float scale for HiDPI support: pixel-dim = window-dim x scale contentsScale)Set root and sub CALayer pixelScale / contentScale for HiDPI |
| private static native void | |
| public static void | |
| public static void | WaitUntilFinish()
Issues a |
| _nop | back to summary |
|---|---|
| private static Runnable _nop | |
| DEBUG | back to summary |
|---|---|
| private static final boolean DEBUG | |
| isInit | back to summary |
|---|---|
| private static boolean isInit | |
| MAX_PIXELSCALE | back to summary |
|---|---|
| public static final int MAX_PIXELSCALE FIXME HiDPI: OSX unique and maximum value | |
| OSXUtil | back to summary |
|---|---|
| public OSXUtil() | |
| AddCASublayer | back to summary |
|---|---|
| public static void AddCASublayer(final long rootCALayer, final long subCALayer, final int x, final int y, final int width, final int height, final float contentsScale, final int caLayerQuirks) Attach a sub CALayer to the root CALayer
Method will trigger a Hence it is important that related resources are not locked if they will be used for creation.
| |
| AddCASublayer0 | back to summary |
|---|---|
| private static native void AddCASublayer0(long rootCALayer, long subCALayer, int x, int y, int width, int height, float contentsScale, int caLayerQuirks) | |
| CreateCALayer | back to summary |
|---|---|
| public static long CreateCALayer(final int width, final int height, final float contentsScale) Create a CALayer suitable to act as a root CALayer.
| |
| CreateCALayer0 | back to summary |
|---|---|
| private static native long CreateCALayer0(int width, int height, float contentsScale) | |
| CreateNSWindow | back to summary |
|---|---|
| public static long CreateNSWindow(final int x, final int y, final int width, final int height) | |
| CreateNSWindow0 | back to summary |
|---|---|
| private static native long CreateNSWindow0(int x, int y, int width, int height) | |
| DestroyCALayer | back to summary |
|---|---|
| public static void DestroyCALayer(final long caLayer) Destroy a CALayer.
| |
| DestroyCALayer0 | back to summary |
|---|---|
| private static native void DestroyCALayer0(long caLayer) | |
| DestroyNSWindow | back to summary |
|---|---|
| public static void DestroyNSWindow(final long nsWindow) | |
| DestroyNSWindow0 | back to summary |
|---|---|
| private static native void DestroyNSWindow0(long nsWindow) | |
| FixCALayerLayout | back to summary |
|---|---|
| public static void FixCALayerLayout(final long rootCALayer, final long subCALayer, final boolean visible, final int x, final int y, final int width, final int height, final int caLayerQuirks) Fix root and sub CALayer position to 0/0 and size If the sub CALayer implements the Objective-C NativeWindow protocol NWDedicatedSize (e.g. JOGL's MyNSOpenGLLayer), the dedicated size is passed to the layer, which propagates it appropriately. On OSX/Java7 our root CALayer's frame position and size gets corrupted by its NSView, hence we have created the NWDedicatedSize protocol.
| |
| FixCALayerLayout0 | back to summary |
|---|---|
| private static native void FixCALayerLayout0(long rootCALayer, long subCALayer, boolean visible, int x, int y, int width, int height, int caLayerQuirks) | |
| GetInsets | back to summary |
|---|---|
| public static Insets GetInsets(final long windowOrView) | |
| GetInsets0 | back to summary |
|---|---|
| private static native Object GetInsets0(long windowOrView) | |
| GetLocationOnScreen | back to summary |
|---|---|
public static Point GetLocationOnScreen(final long windowOrView, final int src_x, final int src_y)
| |
| GetLocationOnScreen0 | back to summary |
|---|---|
| private static native Object GetLocationOnScreen0(long windowOrView, int src_x, int src_y) | |
| GetNSView | back to summary |
|---|---|
| public static long GetNSView(final long nsWindow) | |
| GetNSView0 | back to summary |
|---|---|
| private static native long GetNSView0(long nsWindow) | |
| GetNSWindow | back to summary |
|---|---|
| public static long GetNSWindow(final long nsView) | |
| GetNSWindow0 | back to summary |
|---|---|
| private static native long GetNSWindow0(long nsView) | |
| GetPixelScale | back to summary |
|---|---|
| public static double GetPixelScale(final long windowOrView) | |
| GetPixelScale1 | back to summary |
|---|---|
| private static native double GetPixelScale1(int displayID) | |
| GetPixelScale2 | back to summary |
|---|---|
| private static native double GetPixelScale2(long windowOrView) | |
| GetPixelScaleByDisplayID | back to summary |
|---|---|
| public static double GetPixelScaleByDisplayID(final int displayID) | |
| GetScreenRefreshRate | back to summary |
|---|---|
| public static int GetScreenRefreshRate(final int scrn_idx) Returns the screen refresh rate in Hz. If unavailable, returns 60Hz. | |
| GetScreenRefreshRate0 | back to summary |
|---|---|
| private static native int GetScreenRefreshRate0(int scrn_idx) | |
| hasThreadingIssues | back to summary |
|---|---|
| public static final boolean hasThreadingIssues() Called by
| |
| initIDs0 | back to summary |
|---|---|
| private static native boolean initIDs0() private static boolean isAWTEDTMainThreadInit = false; private static boolean isAWTEDTMainThread; public synchronized static boolean isAWTEDTMainThread() { if(!isAWTEDTMainThreadInit) { isAWTEDTMainThreadInit = true; if(Platform.AWT_AVAILABLE) { AWTEDTExecutor.singleton.invoke(true, new Runnable() { public void run() { isAWTEDTMainThread = IsMainThread(); System.err.println("XXX: "+Thread.currentThread().getName()+" - isAWTEDTMainThread "+isAWTEDTMainThread); } }); } else { isAWTEDTMainThread = false; } } return isAWTEDTMainThread; } | |
| initSingleton | back to summary |
|---|---|
| public static synchronized void initSingleton() Called by
| |
| IsMainThread | back to summary |
|---|---|
| public static boolean IsMainThread() | |
| IsMainThread0 | back to summary |
|---|---|
| private static native boolean IsMainThread0() | |
| isNSView | back to summary |
|---|---|
| public static boolean isNSView(final long object) | |
| isNSView0 | back to summary |
|---|---|
| private static native boolean isNSView0(long object) | |
| isNSWindow | back to summary |
|---|---|
| public static boolean isNSWindow(final long object) | |
| isNSWindow0 | back to summary |
|---|---|
| private static native boolean isNSWindow0(long object) | |
| KickNSApp | back to summary |
|---|---|
| public static void KickNSApp() Wakes up NSApp thread by sending an empty NSEvent .. This is deemed important sometimes where resources shall get freed ASAP, e.g. GL context etc. The following scenarios requiring this wake-up are currently known:
| |
| KickNSApp0 | back to summary |
|---|---|
| private static native void KickNSApp0() | |
| RemoveCASublayer | back to summary |
|---|---|
| public static void RemoveCASublayer(final long rootCALayer, final long subCALayer) Detach a sub CALayer from the root CALayer. | |
| RemoveCASublayer0 | back to summary |
|---|---|
| private static native void RemoveCASublayer0(long rootCALayer, long subCALayer) | |
| requiresToolkitLock | back to summary |
|---|---|
| public static boolean requiresToolkitLock() Called by
| |
| RunLater | back to summary |
|---|---|
| public static void RunLater(final boolean onMain, final Runnable runnable, final int delay) Run later on ..
| |
| RunLater0 | back to summary |
|---|---|
| private static native void RunLater0(boolean onMain, boolean kickNSApp, Runnable runnable, int delay) | |
| RunOnMainThread | back to summary |
|---|---|
| public static void RunOnMainThread(final boolean waitUntilDone, final boolean kickNSApp, final Runnable runnable) Run on OSX UI main thread.
'waitUntilDone' is implemented on Java site via lock/wait on
| |
| RunOnMainThread | back to summary |
|---|---|
| public static <R, A> R RunOnMainThread(final boolean waitUntilDone, final boolean kickNSApp, final Function<R, A> func, final A... args) Run on OSX UI main thread.
'waitUntilDone' is implemented on Java site via lock/wait on
| |
| RunOnMainThread0 | back to summary |
|---|---|
| private static native void RunOnMainThread0(boolean kickNSApp, Runnable runnable) | |
| SetCALayerPixelScale | back to summary |
|---|---|
| public static void SetCALayerPixelScale(final long rootCALayer, final long subCALayer, final float contentsScale) Set root and sub CALayer pixelScale / contentScale for HiDPI
| |
| SetCALayerPixelScale0 | back to summary |
|---|---|
| private static native void SetCALayerPixelScale0(long rootCALayer, long subCALayer, float contentsScale) | |
| shutdown | back to summary |
|---|---|
| public static void shutdown() Called by
| |
| WaitUntilFinish | back to summary |
|---|---|
| public static void WaitUntilFinish() Issues a | |