41 import sun.lwawt.LWWindowPeer.PeerType;
42 import sun.util.logging.PlatformLogger;
43
44 import com.apple.laf.*;
45 import com.apple.laf.ClientPropertyApplicator.Property;
46 import com.sun.awt.AWTUtilities;
47
48 public final class CPlatformWindow extends CFRetainedResource implements PlatformWindow {
49 private native long nativeCreateNSWindow(long nsViewPtr, long styleBits, double x, double y, double w, double h);
50 private static native void nativeSetNSWindowStyleBits(long nsWindowPtr, int mask, int data);
51 private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
52 private static native Insets nativeGetNSWindowInsets(long nsWindowPtr);
53 private static native void nativeSetNSWindowBounds(long nsWindowPtr, double x, double y, double w, double h);
54 private static native void nativeSetNSWindowMinMax(long nsWindowPtr, double minW, double minH, double maxW, double maxH);
55 private static native void nativePushNSWindowToBack(long nsWindowPtr);
56 private static native void nativePushNSWindowToFront(long nsWindowPtr);
57 private static native void nativeSetNSWindowTitle(long nsWindowPtr, String title);
58 private static native void nativeRevalidateNSWindowShadow(long nsWindowPtr);
59 private static native void nativeSetNSWindowMinimizedIcon(long nsWindowPtr, long nsImage);
60 private static native void nativeSetNSWindowRepresentedFilename(long nsWindowPtr, String representedFilename);
61 private static native void nativeSetNSWindowSecurityWarningPositioning(long nsWindowPtr, double x, double y, float biasX, float biasY);
62 private static native void nativeSetEnabled(long nsWindowPtr, boolean isEnabled);
63 private static native void nativeSynthesizeMouseEnteredExitedEvents();
64 private static native void nativeDispose(long nsWindowPtr);
65 private static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
66
67 // Loger to report issues happened during execution but that do not affect functionality
68 private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow");
69 private static final PlatformLogger focusLogger = PlatformLogger.getLogger("sun.lwawt.macosx.focus.CPlatformWindow");
70
71 // for client properties
72 public static final String WINDOW_BRUSH_METAL_LOOK = "apple.awt.brushMetalLook";
73 public static final String WINDOW_DRAGGABLE_BACKGROUND = "apple.awt.draggableWindowBackground";
74
75 public static final String WINDOW_ALPHA = "Window.alpha";
76 public static final String WINDOW_SHADOW = "Window.shadow";
77
78 public static final String WINDOW_STYLE = "Window.style";
79 public static final String WINDOW_SHADOW_REVALIDATE_NOW = "apple.awt.windowShadow.revalidateNow";
80
81 public static final String WINDOW_DOCUMENT_MODIFIED = "Window.documentModified";
|
41 import sun.lwawt.LWWindowPeer.PeerType;
42 import sun.util.logging.PlatformLogger;
43
44 import com.apple.laf.*;
45 import com.apple.laf.ClientPropertyApplicator.Property;
46 import com.sun.awt.AWTUtilities;
47
48 public final class CPlatformWindow extends CFRetainedResource implements PlatformWindow {
49 private native long nativeCreateNSWindow(long nsViewPtr, long styleBits, double x, double y, double w, double h);
50 private static native void nativeSetNSWindowStyleBits(long nsWindowPtr, int mask, int data);
51 private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
52 private static native Insets nativeGetNSWindowInsets(long nsWindowPtr);
53 private static native void nativeSetNSWindowBounds(long nsWindowPtr, double x, double y, double w, double h);
54 private static native void nativeSetNSWindowMinMax(long nsWindowPtr, double minW, double minH, double maxW, double maxH);
55 private static native void nativePushNSWindowToBack(long nsWindowPtr);
56 private static native void nativePushNSWindowToFront(long nsWindowPtr);
57 private static native void nativeSetNSWindowTitle(long nsWindowPtr, String title);
58 private static native void nativeRevalidateNSWindowShadow(long nsWindowPtr);
59 private static native void nativeSetNSWindowMinimizedIcon(long nsWindowPtr, long nsImage);
60 private static native void nativeSetNSWindowRepresentedFilename(long nsWindowPtr, String representedFilename);
61 private static native void nativeSetEnabled(long nsWindowPtr, boolean isEnabled);
62 private static native void nativeSynthesizeMouseEnteredExitedEvents();
63 private static native void nativeDispose(long nsWindowPtr);
64 private static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
65
66 // Loger to report issues happened during execution but that do not affect functionality
67 private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow");
68 private static final PlatformLogger focusLogger = PlatformLogger.getLogger("sun.lwawt.macosx.focus.CPlatformWindow");
69
70 // for client properties
71 public static final String WINDOW_BRUSH_METAL_LOOK = "apple.awt.brushMetalLook";
72 public static final String WINDOW_DRAGGABLE_BACKGROUND = "apple.awt.draggableWindowBackground";
73
74 public static final String WINDOW_ALPHA = "Window.alpha";
75 public static final String WINDOW_SHADOW = "Window.shadow";
76
77 public static final String WINDOW_STYLE = "Window.style";
78 public static final String WINDOW_SHADOW_REVALIDATE_NOW = "apple.awt.windowShadow.revalidateNow";
79
80 public static final String WINDOW_DOCUMENT_MODIFIED = "Window.documentModified";
|