提交 7d6cee72 编写于 作者: L lana

Merge

此差异已折叠。
...@@ -90,6 +90,12 @@ else # PLATFORM unix ...@@ -90,6 +90,12 @@ else # PLATFORM unix
endif # PLATFORM endif # PLATFORM
# Turn off aliasing with GCC for ExtensionSubtables.cpp
ifeq ($(PLATFORM), linux)
CXXFLAGS += $(CXXFLAGS_$(@F))
CXXFLAGS_ExtensionSubtables.o = -fno-strict-aliasing
endif
#In the non-OpenJDK mode we need to build T2K #In the non-OpenJDK mode we need to build T2K
ifndef OPENJDK ifndef OPENJDK
t2k: t2k:
......
...@@ -28,9 +28,13 @@ package apple.laf; ...@@ -28,9 +28,13 @@ package apple.laf;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import javax.tools.annotation.GenerateNativeHeader;
public final class JRSUIConstants { public final class JRSUIConstants {
private static native long getPtrForConstant(final int constant); private static native long getPtrForConstant(final int constant);
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
static class Key { static class Key {
protected static final int _value = 20; protected static final int _value = 20;
public static final Key VALUE = new Key(_value); public static final Key VALUE = new Key(_value);
...@@ -66,6 +70,8 @@ public final class JRSUIConstants { ...@@ -66,6 +70,8 @@ public final class JRSUIConstants {
} }
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
static class DoubleValue { static class DoubleValue {
protected static final byte TYPE_CODE = 1; protected static final byte TYPE_CODE = 1;
...@@ -133,6 +139,8 @@ public final class JRSUIConstants { ...@@ -133,6 +139,8 @@ public final class JRSUIConstants {
} }
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class Size extends Property { public static class Size extends Property {
private static final byte SHIFT = 0; private static final byte SHIFT = 0;
private static final byte SIZE = 3; private static final byte SIZE = 3;
...@@ -153,6 +161,8 @@ public final class JRSUIConstants { ...@@ -153,6 +161,8 @@ public final class JRSUIConstants {
public static final Size LARGE = new Size(_large); public static final Size LARGE = new Size(_large);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class State extends Property { public static class State extends Property {
private static final byte SHIFT = Size.SHIFT + Size.SIZE; private static final byte SHIFT = Size.SHIFT + Size.SIZE;
private static final byte SIZE = 4; private static final byte SIZE = 4;
...@@ -179,6 +189,8 @@ public final class JRSUIConstants { ...@@ -179,6 +189,8 @@ public final class JRSUIConstants {
public static final State DRAG = new State(_drag); public static final State DRAG = new State(_drag);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class Direction extends Property { public static class Direction extends Property {
private static final byte SHIFT = State.SHIFT + State.SIZE; private static final byte SHIFT = State.SHIFT + State.SIZE;
private static final byte SIZE = 4; private static final byte SIZE = 4;
...@@ -209,6 +221,8 @@ public final class JRSUIConstants { ...@@ -209,6 +221,8 @@ public final class JRSUIConstants {
public static final Direction WEST = new Direction(_west); public static final Direction WEST = new Direction(_west);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class Orientation extends Property { public static class Orientation extends Property {
private static final byte SHIFT = Direction.SHIFT + Direction.SIZE; private static final byte SHIFT = Direction.SHIFT + Direction.SIZE;
private static final byte SIZE = 2; private static final byte SIZE = 2;
...@@ -225,6 +239,8 @@ public final class JRSUIConstants { ...@@ -225,6 +239,8 @@ public final class JRSUIConstants {
public static final Orientation VERTICAL = new Orientation(_vertical); public static final Orientation VERTICAL = new Orientation(_vertical);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class AlignmentVertical extends Property { public static class AlignmentVertical extends Property {
private static final byte SHIFT = Orientation.SHIFT + Orientation.SIZE; private static final byte SHIFT = Orientation.SHIFT + Orientation.SIZE;
private static final byte SIZE = 2; private static final byte SIZE = 2;
...@@ -243,6 +259,8 @@ public final class JRSUIConstants { ...@@ -243,6 +259,8 @@ public final class JRSUIConstants {
public static final AlignmentVertical BOTTOM = new AlignmentVertical(_bottom); public static final AlignmentVertical BOTTOM = new AlignmentVertical(_bottom);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class AlignmentHorizontal extends Property { public static class AlignmentHorizontal extends Property {
private static final byte SHIFT = AlignmentVertical.SHIFT + AlignmentVertical.SIZE; private static final byte SHIFT = AlignmentVertical.SHIFT + AlignmentVertical.SIZE;
private static final byte SIZE = 2; private static final byte SIZE = 2;
...@@ -261,6 +279,8 @@ public final class JRSUIConstants { ...@@ -261,6 +279,8 @@ public final class JRSUIConstants {
public static final AlignmentHorizontal RIGHT = new AlignmentHorizontal(_right); public static final AlignmentHorizontal RIGHT = new AlignmentHorizontal(_right);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class SegmentPosition extends Property { public static class SegmentPosition extends Property {
private static final byte SHIFT = AlignmentHorizontal.SHIFT + AlignmentHorizontal.SIZE; private static final byte SHIFT = AlignmentHorizontal.SHIFT + AlignmentHorizontal.SIZE;
private static final byte SIZE = 3; private static final byte SIZE = 3;
...@@ -281,6 +301,8 @@ public final class JRSUIConstants { ...@@ -281,6 +301,8 @@ public final class JRSUIConstants {
public static final SegmentPosition ONLY = new SegmentPosition(_only); public static final SegmentPosition ONLY = new SegmentPosition(_only);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class ScrollBarPart extends Property { public static class ScrollBarPart extends Property {
private static final byte SHIFT = SegmentPosition.SHIFT + SegmentPosition.SIZE; private static final byte SHIFT = SegmentPosition.SHIFT + SegmentPosition.SIZE;
private static final byte SIZE = 4; private static final byte SIZE = 4;
...@@ -309,6 +331,8 @@ public final class JRSUIConstants { ...@@ -309,6 +331,8 @@ public final class JRSUIConstants {
public static final ScrollBarPart TRACK_MAX = new ScrollBarPart(_trackMax); public static final ScrollBarPart TRACK_MAX = new ScrollBarPart(_trackMax);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class Variant extends Property { public static class Variant extends Property {
private static final byte SHIFT = ScrollBarPart.SHIFT + ScrollBarPart.SIZE; private static final byte SHIFT = ScrollBarPart.SHIFT + ScrollBarPart.SIZE;
private static final byte SIZE = 4; private static final byte SIZE = 4;
...@@ -340,6 +364,8 @@ public final class JRSUIConstants { ...@@ -340,6 +364,8 @@ public final class JRSUIConstants {
public static final Variant GRADIENT_SIDE_BAR_FOCUSED_SELECTION = new Variant(_gradientSideBarFocusedSelection); public static final Variant GRADIENT_SIDE_BAR_FOCUSED_SELECTION = new Variant(_gradientSideBarFocusedSelection);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class WindowType extends Property { public static class WindowType extends Property {
private static final byte SHIFT = Variant.SHIFT + Variant.SIZE; private static final byte SHIFT = Variant.SHIFT + Variant.SIZE;
private static final byte SIZE = 2; private static final byte SIZE = 2;
...@@ -358,6 +384,8 @@ public final class JRSUIConstants { ...@@ -358,6 +384,8 @@ public final class JRSUIConstants {
public static final WindowType TITLELESS_UTILITY = new WindowType(_titlelessUtility); public static final WindowType TITLELESS_UTILITY = new WindowType(_titlelessUtility);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class Focused extends Property { public static class Focused extends Property {
private static final byte SHIFT = WindowType.SHIFT + WindowType.SIZE; private static final byte SHIFT = WindowType.SHIFT + WindowType.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -374,6 +402,8 @@ public final class JRSUIConstants { ...@@ -374,6 +402,8 @@ public final class JRSUIConstants {
public static final Focused YES = new Focused(_yes); public static final Focused YES = new Focused(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class IndicatorOnly extends Property { public static class IndicatorOnly extends Property {
private static final byte SHIFT = Focused.SHIFT + Focused.SIZE; private static final byte SHIFT = Focused.SHIFT + Focused.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -390,6 +420,8 @@ public final class JRSUIConstants { ...@@ -390,6 +420,8 @@ public final class JRSUIConstants {
public static final IndicatorOnly YES = new IndicatorOnly(_yes); public static final IndicatorOnly YES = new IndicatorOnly(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class NoIndicator extends Property { public static class NoIndicator extends Property {
private static final byte SHIFT = IndicatorOnly.SHIFT + IndicatorOnly.SIZE; private static final byte SHIFT = IndicatorOnly.SHIFT + IndicatorOnly.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -406,6 +438,8 @@ public final class JRSUIConstants { ...@@ -406,6 +438,8 @@ public final class JRSUIConstants {
public static final NoIndicator YES = new NoIndicator(_yes); public static final NoIndicator YES = new NoIndicator(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class ArrowsOnly extends Property { public static class ArrowsOnly extends Property {
private static final byte SHIFT = NoIndicator.SHIFT + NoIndicator.SIZE; private static final byte SHIFT = NoIndicator.SHIFT + NoIndicator.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -422,6 +456,8 @@ public final class JRSUIConstants { ...@@ -422,6 +456,8 @@ public final class JRSUIConstants {
public static final ArrowsOnly YES = new ArrowsOnly(_yes); public static final ArrowsOnly YES = new ArrowsOnly(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class FrameOnly extends Property { public static class FrameOnly extends Property {
private static final byte SHIFT = ArrowsOnly.SHIFT + ArrowsOnly.SIZE; private static final byte SHIFT = ArrowsOnly.SHIFT + ArrowsOnly.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -438,6 +474,8 @@ public final class JRSUIConstants { ...@@ -438,6 +474,8 @@ public final class JRSUIConstants {
public static final FrameOnly YES = new FrameOnly(_yes); public static final FrameOnly YES = new FrameOnly(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class SegmentTrailingSeparator extends Property { public static class SegmentTrailingSeparator extends Property {
private static final byte SHIFT = FrameOnly.SHIFT + FrameOnly.SIZE; private static final byte SHIFT = FrameOnly.SHIFT + FrameOnly.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -454,6 +492,8 @@ public final class JRSUIConstants { ...@@ -454,6 +492,8 @@ public final class JRSUIConstants {
public static final SegmentTrailingSeparator YES = new SegmentTrailingSeparator(_yes); public static final SegmentTrailingSeparator YES = new SegmentTrailingSeparator(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class SegmentLeadingSeparator extends Property { public static class SegmentLeadingSeparator extends Property {
private static final byte SHIFT = SegmentTrailingSeparator.SHIFT + SegmentTrailingSeparator.SIZE; private static final byte SHIFT = SegmentTrailingSeparator.SHIFT + SegmentTrailingSeparator.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -470,6 +510,8 @@ public final class JRSUIConstants { ...@@ -470,6 +510,8 @@ public final class JRSUIConstants {
public static final SegmentLeadingSeparator YES = new SegmentLeadingSeparator(_yes); public static final SegmentLeadingSeparator YES = new SegmentLeadingSeparator(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class NothingToScroll extends Property { public static class NothingToScroll extends Property {
private static final byte SHIFT = SegmentLeadingSeparator.SHIFT + SegmentLeadingSeparator.SIZE; private static final byte SHIFT = SegmentLeadingSeparator.SHIFT + SegmentLeadingSeparator.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -486,6 +528,8 @@ public final class JRSUIConstants { ...@@ -486,6 +528,8 @@ public final class JRSUIConstants {
public static final NothingToScroll YES = new NothingToScroll(_yes); public static final NothingToScroll YES = new NothingToScroll(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class WindowTitleBarSeparator extends Property { public static class WindowTitleBarSeparator extends Property {
private static final byte SHIFT = NothingToScroll.SHIFT + NothingToScroll.SIZE; private static final byte SHIFT = NothingToScroll.SHIFT + NothingToScroll.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -502,6 +546,8 @@ public final class JRSUIConstants { ...@@ -502,6 +546,8 @@ public final class JRSUIConstants {
public static final WindowTitleBarSeparator YES = new WindowTitleBarSeparator(_yes); public static final WindowTitleBarSeparator YES = new WindowTitleBarSeparator(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class WindowClipCorners extends Property { public static class WindowClipCorners extends Property {
private static final byte SHIFT = WindowTitleBarSeparator.SHIFT + WindowTitleBarSeparator.SIZE; private static final byte SHIFT = WindowTitleBarSeparator.SHIFT + WindowTitleBarSeparator.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -518,6 +564,8 @@ public final class JRSUIConstants { ...@@ -518,6 +564,8 @@ public final class JRSUIConstants {
public static final WindowClipCorners YES = new WindowClipCorners(_yes); public static final WindowClipCorners YES = new WindowClipCorners(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class ShowArrows extends Property { public static class ShowArrows extends Property {
private static final byte SHIFT = WindowClipCorners.SHIFT + WindowClipCorners.SIZE; private static final byte SHIFT = WindowClipCorners.SHIFT + WindowClipCorners.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -534,6 +582,8 @@ public final class JRSUIConstants { ...@@ -534,6 +582,8 @@ public final class JRSUIConstants {
public static final ShowArrows YES = new ShowArrows(_yes); public static final ShowArrows YES = new ShowArrows(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class BooleanValue extends Property { public static class BooleanValue extends Property {
private static final byte SHIFT = ShowArrows.SHIFT + ShowArrows.SIZE; private static final byte SHIFT = ShowArrows.SHIFT + ShowArrows.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -550,6 +600,8 @@ public final class JRSUIConstants { ...@@ -550,6 +600,8 @@ public final class JRSUIConstants {
public static final BooleanValue YES = new BooleanValue(_yes); public static final BooleanValue YES = new BooleanValue(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class Animating extends Property { public static class Animating extends Property {
private static final byte SHIFT = BooleanValue.SHIFT + BooleanValue.SIZE; private static final byte SHIFT = BooleanValue.SHIFT + BooleanValue.SIZE;
private static final byte SIZE = 1; private static final byte SIZE = 1;
...@@ -566,6 +618,8 @@ public final class JRSUIConstants { ...@@ -566,6 +618,8 @@ public final class JRSUIConstants {
public static final Animating YES = new Animating(_yes); public static final Animating YES = new Animating(_yes);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class Widget extends Property { public static class Widget extends Property {
private static final byte SHIFT = Animating.SHIFT + Animating.SIZE; private static final byte SHIFT = Animating.SHIFT + Animating.SIZE;
private static final byte SIZE = 7; private static final byte SIZE = 7;
...@@ -755,6 +809,8 @@ public final class JRSUIConstants { ...@@ -755,6 +809,8 @@ public final class JRSUIConstants {
public static final Widget WINDOW_FRAME = new Widget(_windowFrame); public static final Widget WINDOW_FRAME = new Widget(_windowFrame);
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class Hit { public static class Hit {
private static final int _unknown = -1; private static final int _unknown = -1;
public static final Hit UNKNOWN = new Hit(_unknown); public static final Hit UNKNOWN = new Hit(_unknown);
...@@ -775,6 +831,8 @@ public final class JRSUIConstants { ...@@ -775,6 +831,8 @@ public final class JRSUIConstants {
} }
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public static class ScrollBarHit extends Hit { public static class ScrollBarHit extends Hit {
private static final int _thumb = 2; private static final int _thumb = 2;
public static final ScrollBarHit THUMB = new ScrollBarHit(_thumb); public static final ScrollBarHit THUMB = new ScrollBarHit(_thumb);
......
...@@ -33,6 +33,10 @@ import javax.swing.RootPaneContainer; ...@@ -33,6 +33,10 @@ import javax.swing.RootPaneContainer;
import com.apple.eawt.AppEvent.FullScreenEvent; import com.apple.eawt.AppEvent.FullScreenEvent;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
final class FullScreenHandler { final class FullScreenHandler {
private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalFullScreenHandler"; private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalFullScreenHandler";
......
...@@ -31,6 +31,10 @@ import java.util.List; ...@@ -31,6 +31,10 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
final class GestureHandler { final class GestureHandler {
private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalGestureHandler"; private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalGestureHandler";
......
...@@ -37,9 +37,13 @@ import sun.java2d.loops.*; ...@@ -37,9 +37,13 @@ import sun.java2d.loops.*;
import sun.java2d.pipe.*; import sun.java2d.pipe.*;
import sun.lwawt.macosx.*; import sun.lwawt.macosx.*;
import javax.tools.annotation.GenerateNativeHeader;
/* /*
* This is the SurfaceData for a CGContextRef. * This is the SurfaceData for a CGContextRef.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public abstract class OSXSurfaceData extends BufImgSurfaceData { public abstract class OSXSurfaceData extends BufImgSurfaceData {
final static float UPPER_BND = Float.MAX_VALUE / 2.0f; final static float UPPER_BND = Float.MAX_VALUE / 2.0f;
final static float LOWER_BND = -UPPER_BND; final static float LOWER_BND = -UPPER_BND;
......
...@@ -34,10 +34,14 @@ import java.awt.peer.LabelPeer; ...@@ -34,10 +34,14 @@ import java.awt.peer.LabelPeer;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* Lightweight implementation of {@link LabelPeer}. Delegates most of the work * Lightweight implementation of {@link LabelPeer}. Delegates most of the work
* to the {@link JLabel}. * to the {@link JLabel}.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
final class LWLabelPeer extends LWComponentPeer<Label, JLabel> final class LWLabelPeer extends LWComponentPeer<Label, JLabel>
implements LabelPeer { implements LabelPeer {
......
...@@ -37,6 +37,10 @@ import java.awt.peer.TextFieldPeer; ...@@ -37,6 +37,10 @@ import java.awt.peer.TextFieldPeer;
import javax.swing.JPasswordField; import javax.swing.JPasswordField;
import javax.swing.text.JTextComponent; import javax.swing.text.JTextComponent;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
final class LWTextFieldPeer final class LWTextFieldPeer
extends LWTextComponentPeer<TextField, JPasswordField> extends LWTextComponentPeer<TextField, JPasswordField>
implements TextFieldPeer, ActionListener { implements TextFieldPeer, ActionListener {
......
...@@ -132,44 +132,31 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer { ...@@ -132,44 +132,31 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
this.setDefaultDragImage(component); this.setDefaultDragImage(component);
// Get drag image (if any) as BufferedImage and convert that to CImage: // Get drag image (if any) as BufferedImage and convert that to CImage:
long dragImage;
Point dragImageOffset; Point dragImageOffset;
if (fDragImage != null) { if (fDragImage != null) {
BufferedImage bi = (fDragImage instanceof BufferedImage ? (BufferedImage) fDragImage : null); try {
fDragCImage = CImage.getCreator().createFromImageImmediately(fDragImage);
if (bi == null) { } catch(Exception e) {
// Create a new buffered image: // image creation may fail for any reason
int width = fDragImage.getWidth(null); throw new InvalidDnDOperationException("Drag image can not be created.");
int height = fDragImage.getHeight(null);
bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB_PRE);
// Draw drag image into the buffered image:
Graphics g = bi.getGraphics();
g.drawImage(fDragImage, 0, 0, null);
g.dispose();
} }
/* TODO:BG if (fDragCImage == null) {
fDragCImage = CImage.getCreator().createImage(bi); throw new InvalidDnDOperationException("Drag image is not ready.");
dragImage = fDragCImage.getNSImage(); */ }
fDragCImage = null;
dragImage = 0L;
dragImageOffset = fDragImageOffset; dragImageOffset = fDragImageOffset;
} else { } else {
fDragCImage = null; fDragCImage = null;
dragImage = 0L;
dragImageOffset = new Point(0, 0); dragImageOffset = new Point(0, 0);
} }
// Get NS drag image instance if we have a drag image:
long nsDragImage = 0L; //TODO:BG (fDragCImage != null ? fDragCImage.getNSImage() : 0L);
try { try {
// Create native dragging source: // Create native dragging source:
final long nativeDragSource = createNativeDragSource(component, peer, nativeWindowPtr, transferable, triggerEvent, final long nativeDragSource = createNativeDragSource(component, peer, nativeWindowPtr, transferable, triggerEvent,
(int) (dragOrigin.getX() + componentOffset.x), (int) (dragOrigin.getY() + componentOffset.y), extModifiers, (int) (dragOrigin.getX() + componentOffset.x), (int) (dragOrigin.getY() + componentOffset.y), extModifiers,
clickCount, timestamp, cursor, dragImage, dragImageOffset.x, dragImageOffset.y, clickCount, timestamp, cursor, fDragCImage, dragImageOffset.x, dragImageOffset.y,
getDragSourceContext().getSourceActions(), formats, formatMap); getDragSourceContext().getSourceActions(), formats, formatMap);
if (nativeDragSource == 0) if (nativeDragSource == 0)
...@@ -495,7 +482,7 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer { ...@@ -495,7 +482,7 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
// Native support: // Native support:
private native long createNativeDragSource(Component component, ComponentPeer peer, long nativePeer, Transferable transferable, private native long createNativeDragSource(Component component, ComponentPeer peer, long nativePeer, Transferable transferable,
InputEvent triggerEvent, int dragPosX, int dragPosY, int extModifiers, int clickCount, long timestamp, InputEvent triggerEvent, int dragPosX, int dragPosY, int extModifiers, int clickCount, long timestamp,
Cursor cursor, long nsDragImage, int dragImageOffsetX, int dragImageOffsetY, Cursor cursor, CImage nsDragImage, int dragImageOffsetX, int dragImageOffsetY,
int sourceActions, long[] formats, Map formatMap); int sourceActions, long[] formats, Map formatMap);
private native void doDragging(long nativeDragSource); private native void doDragging(long nativeDragSource);
......
...@@ -97,35 +97,55 @@ public class CImage extends CFRetainedResource { ...@@ -97,35 +97,55 @@ public class CImage extends CFRetainedResource {
return createImageUsingNativeSize(nativeCreateNSImageFromImageName(name)); return createImageUsingNativeSize(nativeCreateNSImageFromImageName(name));
} }
private static int[] imageToArray(Image image) { private static int[] imageToArray(Image image, boolean prepareImage) {
if (image == null) return null; if (image == null) return null;
MediaTracker mt = new MediaTracker(new Label()); if (prepareImage && !(image instanceof BufferedImage)) {
final int id = 0; final MediaTracker mt = new MediaTracker(new Label());
mt.addImage(image, id); final int id = 0;
mt.addImage(image, id);
try { try {
mt.waitForID(id); mt.waitForID(id);
} catch (InterruptedException e) { } catch (InterruptedException e) {
} return null;
}
if (mt.isErrorID(id)) { if (mt.isErrorID(id)) {
return null; return null;
}
} }
int w = image.getWidth(null); int w = image.getWidth(null);
int h = image.getHeight(null); int h = image.getHeight(null);
if (w < 0 || h < 0) {
return null;
}
BufferedImage bimg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE); BufferedImage bimg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE);
Graphics2D g2 = bimg.createGraphics(); Graphics2D g2 = bimg.createGraphics();
g2.setComposite(AlphaComposite.Src); g2.setComposite(AlphaComposite.Src);
g2.drawImage(image, 0, 0, null); g2.drawImage(image, 0, 0, null);
g2.dispose(); g2.dispose();
return ((DataBufferInt)bimg.getRaster().getDataBuffer()).getData(); return ((DataBufferInt)bimg.getRaster().getDataBuffer()).getData();
} }
public CImage createFromImageImmediately(final Image image) {
int[] buffer = imageToArray(image, false);
if (buffer == null) {
return null;
}
return new CImage(nativeCreateNSImageFromArray(buffer, image.getWidth(null),
image.getHeight(null)));
}
// This is used to create a CImage from a Image // This is used to create a CImage from a Image
public CImage createFromImage(final Image image) { public CImage createFromImage(final Image image) {
int[] buffer = imageToArray(image); int[] buffer = imageToArray(image, true);
if (buffer == null) { if (buffer == null) {
return null; return null;
} }
...@@ -146,7 +166,7 @@ public class CImage extends CFRetainedResource { ...@@ -146,7 +166,7 @@ public class CImage extends CFRetainedResource {
num = 0; num = 0;
for (Image img : images) { for (Image img : images) {
buffers[num] = imageToArray(img); buffers[num] = imageToArray(img, true);
if (buffers[num] == null) { if (buffers[num] == null) {
// Unable to process the image // Unable to process the image
continue; continue;
......
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
package sun.lwawt.macosx; package sun.lwawt.macosx;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public final class CocoaConstants { public final class CocoaConstants {
private CocoaConstants(){} private CocoaConstants(){}
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
transferable:(jobject)jtransferable triggerEvent:(jobject)jtrigger transferable:(jobject)jtransferable triggerEvent:(jobject)jtrigger
dragPosX:(jint)dragPosX dragPosY:(jint)dragPosY modifiers:(jint)extModifiers clickCount:(jint)clickCount timeStamp:(jlong)timeStamp dragPosX:(jint)dragPosX dragPosY:(jint)dragPosY modifiers:(jint)extModifiers clickCount:(jint)clickCount timeStamp:(jlong)timeStamp
cursor:(jobject)jcursor cursor:(jobject)jcursor
dragImage:(jlong)jnsdragimage dragImageOffsetX:(jint)jdragimageoffsetx dragImageOffsetY:(jint)jdragimageoffsety dragImage:(jobject)jnsdragimage dragImageOffsetX:(jint)jdragimageoffsetx dragImageOffsetY:(jint)jdragimageoffsety
sourceActions:(jint)jsourceactions formats:(jlongArray)jformats formatMap:(jobject)jformatmap; sourceActions:(jint)jsourceactions formats:(jlongArray)jformats formatMap:(jobject)jformatmap;
- (void)removeFromView:(JNIEnv *)env; - (void)removeFromView:(JNIEnv *)env;
......
...@@ -70,6 +70,7 @@ static BOOL sIsJavaDragging; ...@@ -70,6 +70,7 @@ static BOOL sIsJavaDragging;
JNF_CLASS_CACHE(DataTransfererClass, "sun/awt/datatransfer/DataTransferer"); JNF_CLASS_CACHE(DataTransfererClass, "sun/awt/datatransfer/DataTransferer");
JNF_CLASS_CACHE(CDragSourceContextPeerClass, "sun/lwawt/macosx/CDragSourceContextPeer"); JNF_CLASS_CACHE(CDragSourceContextPeerClass, "sun/lwawt/macosx/CDragSourceContextPeer");
JNF_CLASS_CACHE(CImageClass, "sun/lwawt/macosx/CImage");
static NSDragOperation sDragOperation; static NSDragOperation sDragOperation;
static NSPoint sDraggingLocation; static NSPoint sDraggingLocation;
...@@ -87,7 +88,7 @@ static BOOL sNeedsEnter; ...@@ -87,7 +88,7 @@ static BOOL sNeedsEnter;
transferable:(jobject)jtransferable triggerEvent:(jobject)jtrigger transferable:(jobject)jtransferable triggerEvent:(jobject)jtrigger
dragPosX:(jint)dragPosX dragPosY:(jint)dragPosY modifiers:(jint)extModifiers clickCount:(jint)clickCount dragPosX:(jint)dragPosX dragPosY:(jint)dragPosY modifiers:(jint)extModifiers clickCount:(jint)clickCount
timeStamp:(jlong)timeStamp cursor:(jobject)jcursor timeStamp:(jlong)timeStamp cursor:(jobject)jcursor
dragImage:(jlong)jnsdragimage dragImageOffsetX:(jint)jdragimageoffsetx dragImageOffsetY:(jint)jdragimageoffsety dragImage:(jobject)jnsdragimage dragImageOffsetX:(jint)jdragimageoffsetx dragImageOffsetY:(jint)jdragimageoffsety
sourceActions:(jint)jsourceactions formats:(jlongArray)jformats formatMap:(jobject)jformatmap sourceActions:(jint)jsourceactions formats:(jlongArray)jformats formatMap:(jobject)jformatmap
{ {
self = [super init]; self = [super init];
...@@ -107,8 +108,14 @@ static BOOL sNeedsEnter; ...@@ -107,8 +108,14 @@ static BOOL sNeedsEnter;
fTriggerEvent = JNFNewGlobalRef(env, jtrigger); fTriggerEvent = JNFNewGlobalRef(env, jtrigger);
fCursor = JNFNewGlobalRef(env, jcursor); fCursor = JNFNewGlobalRef(env, jcursor);
fDragImage = (NSImage*) jlong_to_ptr(jnsdragimage); // Double-casting prevents compiler 'different size' warning. if (jnsdragimage) {
[fDragImage retain]; JNF_MEMBER_CACHE(nsImagePtr, CImageClass, "ptr", "J");
jlong imgPtr = JNFGetLongField(env, jnsdragimage, nsImagePtr);
fDragImage = (NSImage*) jlong_to_ptr(imgPtr); // Double-casting prevents compiler 'd$|//
[fDragImage retain];
}
fDragImageOffset = NSMakePoint(jdragimageoffsetx, jdragimageoffsety); fDragImageOffset = NSMakePoint(jdragimageoffsetx, jdragimageoffsety);
fSourceActions = jsourceactions; fSourceActions = jsourceactions;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
JNIEXPORT jlong JNICALL Java_sun_lwawt_macosx_CDragSourceContextPeer_createNativeDragSource JNIEXPORT jlong JNICALL Java_sun_lwawt_macosx_CDragSourceContextPeer_createNativeDragSource
(JNIEnv *env, jobject jthis, jobject jcomponent, jobject jpeer, jlong jnativepeer, jobject jtransferable, (JNIEnv *env, jobject jthis, jobject jcomponent, jobject jpeer, jlong jnativepeer, jobject jtransferable,
jobject jtrigger, jint jdragposx, jint jdragposy, jint jextmodifiers, jint jclickcount, jlong jtimestamp, jobject jtrigger, jint jdragposx, jint jdragposy, jint jextmodifiers, jint jclickcount, jlong jtimestamp,
jobject jcursor, jlong jnsdragimage, jint jdragimageoffsetx, jint jdragimageoffsety, jobject jcursor, jobject jnsdragimage, jint jdragimageoffsetx, jint jdragimageoffsety,
jint jsourceactions, jlongArray jformats, jobject jformatmap) jint jsourceactions, jlongArray jformats, jobject jformatmap)
{ {
id controlObj = (id) jlong_to_ptr(jnativepeer); id controlObj = (id) jlong_to_ptr(jnativepeer);
......
...@@ -27,6 +27,8 @@ package java.awt; ...@@ -27,6 +27,8 @@ package java.awt;
import java.awt.event.*; import java.awt.event.*;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The interface for objects which have an adjustable numeric value * The interface for objects which have an adjustable numeric value
* contained within a bounded range of values. * contained within a bounded range of values.
...@@ -34,7 +36,8 @@ import java.awt.event.*; ...@@ -34,7 +36,8 @@ import java.awt.event.*;
* @author Amy Fowler * @author Amy Fowler
* @author Tim Prinzing * @author Tim Prinzing
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public interface Adjustable { public interface Adjustable {
/** /**
......
...@@ -27,6 +27,8 @@ package java.awt; ...@@ -27,6 +27,8 @@ package java.awt;
import java.beans.ConstructorProperties; import java.beans.ConstructorProperties;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The <code>BasicStroke</code> class defines a basic set of rendering * The <code>BasicStroke</code> class defines a basic set of rendering
* attributes for the outlines of graphics primitives, which are rendered * attributes for the outlines of graphics primitives, which are rendered
...@@ -109,6 +111,8 @@ import java.beans.ConstructorProperties; ...@@ -109,6 +111,8 @@ import java.beans.ConstructorProperties;
* @see Graphics2D * @see Graphics2D
* @author Jim Graham * @author Jim Graham
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class BasicStroke implements Stroke { public class BasicStroke implements Stroke {
/** /**
......
...@@ -34,6 +34,8 @@ import java.io.IOException; ...@@ -34,6 +34,8 @@ import java.io.IOException;
import javax.accessibility.*; import javax.accessibility.*;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The <code>Choice</code> class presents a pop-up menu of choices. * The <code>Choice</code> class presents a pop-up menu of choices.
* The current choice is displayed as the title of the menu. * The current choice is displayed as the title of the menu.
...@@ -69,6 +71,8 @@ import javax.accessibility.*; ...@@ -69,6 +71,8 @@ import javax.accessibility.*;
* @author Arthur van Hoff * @author Arthur van Hoff
* @since JDK1.0 * @since JDK1.0
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class Choice extends Component implements ItemSelectable, Accessible { public class Choice extends Component implements ItemSelectable, Accessible {
/** /**
* The items for the <code>Choice</code>. * The items for the <code>Choice</code>.
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
package java.awt; package java.awt;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The <code>DisplayMode</code> class encapsulates the bit depth, height, * The <code>DisplayMode</code> class encapsulates the bit depth, height,
* width, and refresh rate of a <code>GraphicsDevice</code>. The ability to * width, and refresh rate of a <code>GraphicsDevice</code>. The ability to
...@@ -43,6 +45,9 @@ package java.awt; ...@@ -43,6 +45,9 @@ package java.awt;
* @author Michael Martak * @author Michael Martak
* @since 1.4 * @since 1.4
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public final class DisplayMode { public final class DisplayMode {
private Dimension size; private Dimension size;
......
...@@ -33,6 +33,8 @@ import java.awt.image.ReplicateScaleFilter; ...@@ -33,6 +33,8 @@ import java.awt.image.ReplicateScaleFilter;
import sun.awt.image.SurfaceManager; import sun.awt.image.SurfaceManager;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The abstract class <code>Image</code> is the superclass of all * The abstract class <code>Image</code> is the superclass of all
* classes that represent graphical images. The image must be * classes that represent graphical images. The image must be
...@@ -42,6 +44,8 @@ import sun.awt.image.SurfaceManager; ...@@ -42,6 +44,8 @@ import sun.awt.image.SurfaceManager;
* @author Arthur van Hoff * @author Arthur van Hoff
* @since JDK1.0 * @since JDK1.0
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public abstract class Image { public abstract class Image {
/** /**
......
...@@ -33,6 +33,7 @@ import java.io.ObjectOutputStream; ...@@ -33,6 +33,7 @@ import java.io.ObjectOutputStream;
import java.io.ObjectInputStream; import java.io.ObjectInputStream;
import java.io.IOException; import java.io.IOException;
import javax.accessibility.*; import javax.accessibility.*;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
...@@ -106,6 +107,8 @@ import javax.accessibility.*; ...@@ -106,6 +107,8 @@ import javax.accessibility.*;
* @see java.awt.event.ActionListener * @see java.awt.event.ActionListener
* @since JDK1.0 * @since JDK1.0
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class List extends Component implements ItemSelectable, Accessible { public class List extends Component implements ItemSelectable, Accessible {
/** /**
* A vector created to contain items which will become * A vector created to contain items which will become
......
...@@ -28,6 +28,8 @@ package java.awt; ...@@ -28,6 +28,8 @@ package java.awt;
import java.awt.peer.PopupMenuPeer; import java.awt.peer.PopupMenuPeer;
import javax.accessibility.*; import javax.accessibility.*;
import javax.tools.annotation.GenerateNativeHeader;
import sun.awt.AWTAccessor; import sun.awt.AWTAccessor;
/** /**
...@@ -42,6 +44,8 @@ import sun.awt.AWTAccessor; ...@@ -42,6 +44,8 @@ import sun.awt.AWTAccessor;
* *
* @author Amy Fowler * @author Amy Fowler
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class PopupMenu extends Menu { public class PopupMenu extends Menu {
private static final String base = "popup"; private static final String base = "popup";
......
...@@ -26,6 +26,8 @@ package java.awt; ...@@ -26,6 +26,8 @@ package java.awt;
import java.io.ObjectStreamException; import java.io.ObjectStreamException;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* A class to encapsulate symbolic colors representing the color of * A class to encapsulate symbolic colors representing the color of
* native GUI objects on a system. For systems which support the dynamic * native GUI objects on a system. For systems which support the dynamic
...@@ -47,6 +49,8 @@ import java.io.ObjectStreamException; ...@@ -47,6 +49,8 @@ import java.io.ObjectStreamException;
* @author Carl Quinn * @author Carl Quinn
* @author Amy Fowler * @author Amy Fowler
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public final class SystemColor extends Color implements java.io.Serializable { public final class SystemColor extends Color implements java.io.Serializable {
/** /**
......
...@@ -35,7 +35,7 @@ import java.text.BreakIterator; ...@@ -35,7 +35,7 @@ import java.text.BreakIterator;
import javax.swing.text.AttributeSet; import javax.swing.text.AttributeSet;
import javax.accessibility.*; import javax.accessibility.*;
import java.awt.im.InputMethodRequests; import java.awt.im.InputMethodRequests;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The <code>TextComponent</code> class is the superclass of * The <code>TextComponent</code> class is the superclass of
...@@ -57,6 +57,8 @@ import java.awt.im.InputMethodRequests; ...@@ -57,6 +57,8 @@ import java.awt.im.InputMethodRequests;
* @author Arthur van Hoff * @author Arthur van Hoff
* @since JDK1.0 * @since JDK1.0
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class TextComponent extends Component implements Accessible { public class TextComponent extends Component implements Accessible {
/** /**
......
...@@ -25,10 +25,14 @@ ...@@ -25,10 +25,14 @@
package java.awt; package java.awt;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The <code>Transparency</code> interface defines the common transparency * The <code>Transparency</code> interface defines the common transparency
* modes for implementing classes. * modes for implementing classes.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public interface Transparency { public interface Transparency {
/** /**
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
package java.awt.color; package java.awt.color;
import javax.tools.annotation.GenerateNativeHeader;
import sun.java2d.cmm.PCMM; import sun.java2d.cmm.PCMM;
import sun.java2d.cmm.CMSManager; import sun.java2d.cmm.CMSManager;
...@@ -93,8 +95,8 @@ import sun.java2d.cmm.CMSManager; ...@@ -93,8 +95,8 @@ import sun.java2d.cmm.CMSManager;
* @see ICC_ColorSpace * @see ICC_ColorSpace
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public abstract class ColorSpace implements java.io.Serializable { public abstract class ColorSpace implements java.io.Serializable {
static final long serialVersionUID = -409452704308689724L; static final long serialVersionUID = -409452704308689724L;
......
...@@ -58,6 +58,7 @@ import java.util.StringTokenizer; ...@@ -58,6 +58,7 @@ import java.util.StringTokenizer;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* A representation of color profile data for device independent and * A representation of color profile data for device independent and
...@@ -89,6 +90,8 @@ import java.security.PrivilegedAction; ...@@ -89,6 +90,8 @@ import java.security.PrivilegedAction;
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class ICC_Profile implements Serializable { public class ICC_Profile implements Serializable {
private static final long serialVersionUID = -3938515861990936766L; private static final long serialVersionUID = -3938515861990936766L;
......
...@@ -35,7 +35,6 @@ import java.io.IOException; ...@@ -35,7 +35,6 @@ import java.io.IOException;
import sun.awt.EventListenerAggregate; import sun.awt.EventListenerAggregate;
/** /**
* A class that implements a mechanism to transfer data using * A class that implements a mechanism to transfer data using
* cut/copy/paste operations. * cut/copy/paste operations.
......
...@@ -27,6 +27,8 @@ package java.awt.datatransfer; ...@@ -27,6 +27,8 @@ package java.awt.datatransfer;
import java.io.*; import java.io.*;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* A <code>Transferable</code> which implements the capability required * A <code>Transferable</code> which implements the capability required
* to transfer a <code>String</code>. * to transfer a <code>String</code>.
...@@ -41,6 +43,8 @@ import java.io.*; ...@@ -41,6 +43,8 @@ import java.io.*;
* @see java.awt.datatransfer.DataFlavor#stringFlavor * @see java.awt.datatransfer.DataFlavor#stringFlavor
* @see java.awt.datatransfer.DataFlavor#plainTextFlavor * @see java.awt.datatransfer.DataFlavor#plainTextFlavor
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class StringSelection implements Transferable, ClipboardOwner { public class StringSelection implements Transferable, ClipboardOwner {
private static final int STRING = 0; private static final int STRING = 0;
......
...@@ -25,12 +25,15 @@ ...@@ -25,12 +25,15 @@
package java.awt.dnd; package java.awt.dnd;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* This class contains constant values representing * This class contains constant values representing
* the type of action(s) to be performed by a Drag and Drop operation. * the type of action(s) to be performed by a Drag and Drop operation.
* @since 1.2 * @since 1.2
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public final class DnDConstants { public final class DnDConstants {
private DnDConstants() {} // define null private constructor. private DnDConstants() {} // define null private constructor.
......
...@@ -27,6 +27,7 @@ package java.awt.event; ...@@ -27,6 +27,7 @@ package java.awt.event;
import java.awt.AWTEvent; import java.awt.AWTEvent;
import java.awt.Event; import java.awt.Event;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* A semantic event which indicates that a component-defined action occurred. * A semantic event which indicates that a component-defined action occurred.
...@@ -56,6 +57,8 @@ import java.awt.Event; ...@@ -56,6 +57,8 @@ import java.awt.Event;
* @author Carl Quinn * @author Carl Quinn
* @since 1.1 * @since 1.1
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class ActionEvent extends AWTEvent { public class ActionEvent extends AWTEvent {
/** /**
......
...@@ -27,6 +27,9 @@ package java.awt.event; ...@@ -27,6 +27,9 @@ package java.awt.event;
import java.awt.Adjustable; import java.awt.Adjustable;
import java.awt.AWTEvent; import java.awt.AWTEvent;
import javax.tools.annotation.GenerateNativeHeader;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The adjustment event emitted by Adjustable objects like * The adjustment event emitted by Adjustable objects like
...@@ -54,6 +57,8 @@ import java.awt.AWTEvent; ...@@ -54,6 +57,8 @@ import java.awt.AWTEvent;
* @author Amy Fowler * @author Amy Fowler
* @since 1.1 * @since 1.1
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class AdjustmentEvent extends AWTEvent { public class AdjustmentEvent extends AWTEvent {
/** /**
......
...@@ -28,6 +28,7 @@ package java.awt.event; ...@@ -28,6 +28,7 @@ package java.awt.event;
import java.awt.AWTEvent; import java.awt.AWTEvent;
import java.awt.Component; import java.awt.Component;
import java.awt.Rectangle; import java.awt.Rectangle;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* A low-level event which indicates that a component moved, changed * A low-level event which indicates that a component moved, changed
...@@ -64,6 +65,8 @@ import java.awt.Rectangle; ...@@ -64,6 +65,8 @@ import java.awt.Rectangle;
* @author Carl Quinn * @author Carl Quinn
* @since 1.1 * @since 1.1
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class ComponentEvent extends AWTEvent { public class ComponentEvent extends AWTEvent {
/** /**
......
...@@ -33,6 +33,7 @@ import java.io.IOException; ...@@ -33,6 +33,7 @@ import java.io.IOException;
import java.io.ObjectInputStream; import java.io.ObjectInputStream;
import java.text.AttributedCharacterIterator; import java.text.AttributedCharacterIterator;
import java.text.CharacterIterator; import java.text.CharacterIterator;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* Input method events contain information about text that is being * Input method events contain information about text that is being
...@@ -55,7 +56,8 @@ import java.text.CharacterIterator; ...@@ -55,7 +56,8 @@ import java.text.CharacterIterator;
* @author JavaSoft Asia/Pacific * @author JavaSoft Asia/Pacific
* @since 1.2 * @since 1.2
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class InputMethodEvent extends AWTEvent { public class InputMethodEvent extends AWTEvent {
/** /**
......
...@@ -27,6 +27,8 @@ package java.awt.event; ...@@ -27,6 +27,8 @@ package java.awt.event;
import java.awt.Component; import java.awt.Component;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* An event which indicates that the mouse wheel was rotated in a component. * An event which indicates that the mouse wheel was rotated in a component.
* <P> * <P>
...@@ -97,6 +99,8 @@ import java.awt.Component; ...@@ -97,6 +99,8 @@ import java.awt.Component;
* @since 1.4 * @since 1.4
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class MouseWheelEvent extends MouseEvent { public class MouseWheelEvent extends MouseEvent {
/** /**
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
package java.awt.geom; package java.awt.geom;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The <code>PathIterator</code> interface provides the mechanism * The <code>PathIterator</code> interface provides the mechanism
* for objects that implement the {@link java.awt.Shape Shape} * for objects that implement the {@link java.awt.Shape Shape}
...@@ -57,6 +59,8 @@ package java.awt.geom; ...@@ -57,6 +59,8 @@ package java.awt.geom;
* *
* @author Jim Graham * @author Jim Graham
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public interface PathIterator { public interface PathIterator {
/** /**
* The winding rule constant for specifying an even-odd rule * The winding rule constant for specifying an even-odd rule
......
...@@ -34,6 +34,7 @@ import java.awt.GraphicsEnvironment; ...@@ -34,6 +34,7 @@ import java.awt.GraphicsEnvironment;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.RenderingHints; import java.awt.RenderingHints;
import java.awt.Transparency; import java.awt.Transparency;
import javax.tools.annotation.GenerateNativeHeader;
import sun.awt.image.ImagingLib; import sun.awt.image.ImagingLib;
/** /**
...@@ -62,6 +63,8 @@ import sun.awt.image.ImagingLib; ...@@ -62,6 +63,8 @@ import sun.awt.image.ImagingLib;
* @see java.awt.RenderingHints#KEY_COLOR_RENDERING * @see java.awt.RenderingHints#KEY_COLOR_RENDERING
* @see java.awt.RenderingHints#KEY_DITHERING * @see java.awt.RenderingHints#KEY_DITHERING
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class AffineTransformOp implements BufferedImageOp, RasterOp { public class AffineTransformOp implements BufferedImageOp, RasterOp {
private AffineTransform xform; private AffineTransform xform;
RenderingHints hints; RenderingHints hints;
......
...@@ -30,6 +30,7 @@ import java.awt.geom.Rectangle2D; ...@@ -30,6 +30,7 @@ import java.awt.geom.Rectangle2D;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.RenderingHints; import java.awt.RenderingHints;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import javax.tools.annotation.GenerateNativeHeader;
import sun.awt.image.ImagingLib; import sun.awt.image.ImagingLib;
/** /**
...@@ -65,6 +66,8 @@ import sun.awt.image.ImagingLib; ...@@ -65,6 +66,8 @@ import sun.awt.image.ImagingLib;
* @see java.awt.RenderingHints#KEY_COLOR_RENDERING * @see java.awt.RenderingHints#KEY_COLOR_RENDERING
* @see java.awt.RenderingHints#KEY_DITHERING * @see java.awt.RenderingHints#KEY_DITHERING
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class ConvolveOp implements BufferedImageOp, RasterOp { public class ConvolveOp implements BufferedImageOp, RasterOp {
Kernel kernel; Kernel kernel;
int edgeHint; int edgeHint;
......
...@@ -41,6 +41,8 @@ import sun.java2d.StateTrackableDelegate; ...@@ -41,6 +41,8 @@ import sun.java2d.StateTrackableDelegate;
import sun.awt.image.SunWritableRaster; import sun.awt.image.SunWritableRaster;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* This class exists to wrap one or more data arrays. Each data array in * This class exists to wrap one or more data arrays. Each data array in
* the DataBuffer is referred to as a bank. Accessor methods for getting * the DataBuffer is referred to as a bank. Accessor methods for getting
...@@ -65,6 +67,8 @@ import sun.awt.image.SunWritableRaster; ...@@ -65,6 +67,8 @@ import sun.awt.image.SunWritableRaster;
* @see java.awt.image.Raster * @see java.awt.image.Raster
* @see java.awt.image.SampleModel * @see java.awt.image.SampleModel
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public abstract class DataBuffer { public abstract class DataBuffer {
/** Tag for unsigned byte data. */ /** Tag for unsigned byte data. */
......
...@@ -27,6 +27,7 @@ package java.awt.image; ...@@ -27,6 +27,7 @@ package java.awt.image;
import java.awt.color.ColorSpace; import java.awt.color.ColorSpace;
import java.awt.Transparency; import java.awt.Transparency;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The <code>DirectColorModel</code> class is a <code>ColorModel</code> * The <code>DirectColorModel</code> class is a <code>ColorModel</code>
...@@ -106,6 +107,8 @@ import java.awt.Transparency; ...@@ -106,6 +107,8 @@ import java.awt.Transparency;
* @see ColorModel#getRGBdefault * @see ColorModel#getRGBdefault
* *
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class DirectColorModel extends PackedColorModel { public class DirectColorModel extends PackedColorModel {
private int red_mask; private int red_mask;
private int green_mask; private int green_mask;
......
...@@ -27,6 +27,8 @@ package java.awt.image; ...@@ -27,6 +27,8 @@ package java.awt.image;
import java.util.Hashtable; import java.util.Hashtable;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The interface for objects expressing interest in image data through * The interface for objects expressing interest in image data through
* the ImageProducer interfaces. When a consumer is added to an image * the ImageProducer interfaces. When a consumer is added to an image
...@@ -37,6 +39,8 @@ import java.util.Hashtable; ...@@ -37,6 +39,8 @@ import java.util.Hashtable;
* *
* @author Jim Graham * @author Jim Graham
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public interface ImageConsumer { public interface ImageConsumer {
/** /**
* The dimensions of the source image are reported using the * The dimensions of the source image are reported using the
......
...@@ -27,12 +27,16 @@ package java.awt.image; ...@@ -27,12 +27,16 @@ package java.awt.image;
import java.awt.Image; import java.awt.Image;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* An asynchronous update interface for receiving notifications about * An asynchronous update interface for receiving notifications about
* Image information as the Image is constructed. * Image information as the Image is constructed.
* *
* @author Jim Graham * @author Jim Graham
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public interface ImageObserver { public interface ImageObserver {
/** /**
* This method is called when information about an image which was * This method is called when information about an image which was
......
...@@ -32,6 +32,7 @@ import java.awt.image.ImageObserver; ...@@ -32,6 +32,7 @@ import java.awt.image.ImageObserver;
import java.awt.image.ColorModel; import java.awt.image.ColorModel;
import java.awt.image.VolatileImage; import java.awt.image.VolatileImage;
import java.awt.GraphicsConfiguration; import java.awt.GraphicsConfiguration;
import javax.tools.annotation.GenerateNativeHeader;
import sun.awt.CausedFocusEvent; import sun.awt.CausedFocusEvent;
import sun.java2d.pipe.Region; import sun.java2d.pipe.Region;
...@@ -49,6 +50,8 @@ import sun.java2d.pipe.Region; ...@@ -49,6 +50,8 @@ import sun.java2d.pipe.Region;
* nor invoke any of the peer methods directly on the peer * nor invoke any of the peer methods directly on the peer
* instances. * instances.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public interface ComponentPeer { public interface ComponentPeer {
/** /**
......
...@@ -29,10 +29,14 @@ import java.awt.geom.AffineTransform; ...@@ -29,10 +29,14 @@ import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The <code>PageFormat</code> class describes the size and * The <code>PageFormat</code> class describes the size and
* orientation of a page to be printed. * orientation of a page to be printed.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class PageFormat implements Cloneable public class PageFormat implements Cloneable
{ {
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
package java.awt.print; package java.awt.print;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The <code>Pageable</code> implementation represents a set of * The <code>Pageable</code> implementation represents a set of
* pages to be printed. The <code>Pageable</code> object returns * pages to be printed. The <code>Pageable</code> object returns
...@@ -33,6 +35,8 @@ package java.awt.print; ...@@ -33,6 +35,8 @@ package java.awt.print;
* @see java.awt.print.PageFormat * @see java.awt.print.PageFormat
* @see java.awt.print.Printable * @see java.awt.print.Printable
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public interface Pageable { public interface Pageable {
/** /**
......
...@@ -27,6 +27,8 @@ package java.awt.print; ...@@ -27,6 +27,8 @@ package java.awt.print;
import java.awt.Graphics; import java.awt.Graphics;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The <code>Printable</code> interface is implemented * The <code>Printable</code> interface is implemented
* by the <code>print</code> methods of the current * by the <code>print</code> methods of the current
...@@ -98,6 +100,8 @@ import java.awt.Graphics; ...@@ -98,6 +100,8 @@ import java.awt.Graphics;
* @see java.awt.print.PageFormat * @see java.awt.print.PageFormat
* @see java.awt.print.PrinterJob * @see java.awt.print.PrinterJob
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public interface Printable { public interface Printable {
/** /**
......
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
*/ */
package sun.awt; package sun.awt;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class CharsetString { public class CharsetString {
/** /**
* chars for this string. See also offset, length. * chars for this string. See also offset, length.
......
...@@ -40,6 +40,7 @@ import java.beans.PropertyChangeEvent; ...@@ -40,6 +40,7 @@ import java.beans.PropertyChangeEvent;
import java.util.Set; import java.util.Set;
import java.awt.AWTKeyStroke; import java.awt.AWTKeyStroke;
import java.applet.Applet; import java.applet.Applet;
import javax.tools.annotation.GenerateNativeHeader;
import sun.applet.AppletPanel; import sun.applet.AppletPanel;
/** /**
...@@ -59,6 +60,8 @@ import sun.applet.AppletPanel; ...@@ -59,6 +60,8 @@ import sun.applet.AppletPanel;
* *
* @author Thomas Ball * @author Thomas Ball
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public abstract class EmbeddedFrame extends Frame public abstract class EmbeddedFrame extends Frame
implements KeyEventDispatcher, PropertyChangeListener { implements KeyEventDispatcher, PropertyChangeListener {
......
...@@ -947,7 +947,7 @@ public abstract class FontConfiguration { ...@@ -947,7 +947,7 @@ public abstract class FontConfiguration {
public Object run() { public Object run() {
try { try {
return Class.forName(charsetName, true, return Class.forName(charsetName, true,
Thread.currentThread().getContextClassLoader()); ClassLoader.getSystemClassLoader());
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
} }
return null; return null;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
package sun.awt; package sun.awt;
import java.awt.RenderingHints; import java.awt.RenderingHints;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* This class contains rendering hints that can be used by the * This class contains rendering hints that can be used by the
...@@ -33,6 +34,8 @@ import java.awt.RenderingHints; ...@@ -33,6 +34,8 @@ import java.awt.RenderingHints;
* {@link java.awt.image.BufferedImageOp} and * {@link java.awt.image.BufferedImageOp} and
* {@link java.awt.image.Raster}. * {@link java.awt.image.Raster}.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class SunHints { public class SunHints {
/** /**
* Defines the type of all keys used to control various * Defines the type of all keys used to control various
......
...@@ -54,6 +54,8 @@ import sun.awt.SunToolkit; ...@@ -54,6 +54,8 @@ import sun.awt.SunToolkit;
import sun.awt.datatransfer.DataTransferer; import sun.awt.datatransfer.DataTransferer;
import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.DataFlavor;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* <p> * <p>
* TBC * TBC
...@@ -62,7 +64,8 @@ import java.awt.datatransfer.DataFlavor; ...@@ -62,7 +64,8 @@ import java.awt.datatransfer.DataFlavor;
* @since JDK1.3.1 * @since JDK1.3.1
* *
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public abstract class SunDragSourceContextPeer implements DragSourceContextPeer { public abstract class SunDragSourceContextPeer implements DragSourceContextPeer {
private DragGestureEvent trigger; private DragGestureEvent trigger;
......
...@@ -45,6 +45,10 @@ import sun.java2d.loops.SurfaceType; ...@@ -45,6 +45,10 @@ import sun.java2d.loops.SurfaceType;
import sun.java2d.loops.CompositeType; import sun.java2d.loops.CompositeType;
import sun.java2d.loops.RenderLoops; import sun.java2d.loops.RenderLoops;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class BufImgSurfaceData extends SurfaceData { public class BufImgSurfaceData extends SurfaceData {
BufferedImage bufImg; BufferedImage bufImg;
private BufferedImageGraphicsConfig graphicsConfig; private BufferedImageGraphicsConfig graphicsConfig;
......
...@@ -92,6 +92,8 @@ import java.util.Iterator; ...@@ -92,6 +92,8 @@ import java.util.Iterator;
import sun.java2d.DestSurfaceProvider; import sun.java2d.DestSurfaceProvider;
import sun.misc.PerformanceLogger; import sun.misc.PerformanceLogger;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* This is a the master Graphics2D superclass for all of the Sun * This is a the master Graphics2D superclass for all of the Sun
* Graphics implementations. This class relies on subclasses to * Graphics implementations. This class relies on subclasses to
...@@ -101,6 +103,8 @@ import sun.misc.PerformanceLogger; ...@@ -101,6 +103,8 @@ import sun.misc.PerformanceLogger;
* *
* @author Jim Graham * @author Jim Graham
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public final class SunGraphics2D public final class SunGraphics2D
extends Graphics2D extends Graphics2D
implements ConstrainableGraphics, Cloneable, DestSurfaceProvider implements ConstrainableGraphics, Cloneable, DestSurfaceProvider
......
...@@ -44,7 +44,10 @@ import sun.java2d.pipe.Region; ...@@ -44,7 +44,10 @@ import sun.java2d.pipe.Region;
import sun.java2d.pipe.RenderBuffer; import sun.java2d.pipe.RenderBuffer;
import sun.java2d.pipe.RenderQueue; import sun.java2d.pipe.RenderQueue;
import static sun.java2d.pipe.BufferedOpCodes.*; import static sun.java2d.pipe.BufferedOpCodes.*;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
class OGLBlitLoops { class OGLBlitLoops {
static void register() { static void register() {
......
...@@ -32,6 +32,8 @@ import sun.java2d.pipe.hw.ContextCapabilities; ...@@ -32,6 +32,8 @@ import sun.java2d.pipe.hw.ContextCapabilities;
import static sun.java2d.pipe.BufferedOpCodes.*; import static sun.java2d.pipe.BufferedOpCodes.*;
import static sun.java2d.pipe.hw.ContextCapabilities.*; import static sun.java2d.pipe.hw.ContextCapabilities.*;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* Note that the RenderQueue lock must be acquired before calling any of * Note that the RenderQueue lock must be acquired before calling any of
* the methods in this class. * the methods in this class.
...@@ -153,6 +155,8 @@ public class OGLContext extends BufferedContext { ...@@ -153,6 +155,8 @@ public class OGLContext extends BufferedContext {
rq.flushNow(); rq.flushNow();
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
static class OGLContextCaps extends ContextCapabilities { static class OGLContextCaps extends ContextCapabilities {
/** /**
* Indicates the presence of the GL_EXT_framebuffer_object extension. * Indicates the presence of the GL_EXT_framebuffer_object extension.
......
...@@ -37,6 +37,8 @@ import sun.java2d.loops.XORComposite; ...@@ -37,6 +37,8 @@ import sun.java2d.loops.XORComposite;
import static sun.java2d.pipe.BufferedOpCodes.*; import static sun.java2d.pipe.BufferedOpCodes.*;
import static sun.java2d.pipe.BufferedRenderPipe.BYTES_PER_SPAN; import static sun.java2d.pipe.BufferedRenderPipe.BYTES_PER_SPAN;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* Base context class for managing state in a single-threaded rendering * Base context class for managing state in a single-threaded rendering
* environment. Each state-setting operation (e.g. SET_COLOR) is added to * environment. Each state-setting operation (e.g. SET_COLOR) is added to
...@@ -47,6 +49,8 @@ import static sun.java2d.pipe.BufferedRenderPipe.BYTES_PER_SPAN; ...@@ -47,6 +49,8 @@ import static sun.java2d.pipe.BufferedRenderPipe.BYTES_PER_SPAN;
* *
* @see RenderQueue * @see RenderQueue
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public abstract class BufferedContext { public abstract class BufferedContext {
/* /*
......
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
package sun.java2d.pipe; package sun.java2d.pipe;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class BufferedOpCodes { public class BufferedOpCodes {
// draw ops // draw ops
public static final int DRAW_LINE = 10; public static final int DRAW_LINE = 10;
......
...@@ -46,6 +46,10 @@ import sun.java2d.loops.CompositeType; ...@@ -46,6 +46,10 @@ import sun.java2d.loops.CompositeType;
import sun.java2d.loops.SurfaceType; import sun.java2d.loops.SurfaceType;
import static sun.java2d.pipe.BufferedOpCodes.*; import static sun.java2d.pipe.BufferedOpCodes.*;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class BufferedPaints { public class BufferedPaints {
static void setPaint(RenderQueue rq, SunGraphics2D sg2d, static void setPaint(RenderQueue rq, SunGraphics2D sg2d,
......
...@@ -32,6 +32,10 @@ import sun.java2d.SunGraphics2D; ...@@ -32,6 +32,10 @@ import sun.java2d.SunGraphics2D;
import sun.java2d.SurfaceData; import sun.java2d.SurfaceData;
import static sun.java2d.pipe.BufferedOpCodes.*; import static sun.java2d.pipe.BufferedOpCodes.*;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public abstract class BufferedTextPipe extends GlyphListPipe { public abstract class BufferedTextPipe extends GlyphListPipe {
private static final int BYTES_PER_GLYPH_IMAGE = 8; private static final int BYTES_PER_GLYPH_IMAGE = 8;
......
...@@ -27,10 +27,14 @@ package sun.java2d.pipe; ...@@ -27,10 +27,14 @@ package sun.java2d.pipe;
import java.awt.Rectangle; import java.awt.Rectangle;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* This class defines the API for iterating through the bands * This class defines the API for iterating through the bands
* of a region object. * of a region object.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class RegionIterator { public class RegionIterator {
Region region; Region region;
int curIndex; int curIndex;
......
...@@ -27,6 +27,8 @@ package sun.java2d.pipe; ...@@ -27,6 +27,8 @@ package sun.java2d.pipe;
import sun.misc.Unsafe; import sun.misc.Unsafe;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The RenderBuffer class is a simplified, high-performance, Unsafe wrapper * The RenderBuffer class is a simplified, high-performance, Unsafe wrapper
* used for buffering rendering operations in a single-threaded rendering * used for buffering rendering operations in a single-threaded rendering
...@@ -42,6 +44,8 @@ import sun.misc.Unsafe; ...@@ -42,6 +44,8 @@ import sun.misc.Unsafe;
* single-threaded rendering. For example, there is no put(double[]) method * single-threaded rendering. For example, there is no put(double[]) method
* because we currently have no need for such a method in the STR classes. * because we currently have no need for such a method in the STR classes.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class RenderBuffer { public class RenderBuffer {
/** /**
......
...@@ -30,11 +30,16 @@ import java.util.HashMap; ...@@ -30,11 +30,16 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import javax.tools.annotation.GenerateNativeHeader;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* This class is used to notify listeners about accelerated device's * This class is used to notify listeners about accelerated device's
* events such as device reset or dispose that are about to occur. * events such as device reset or dispose that are about to occur.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class AccelDeviceEventNotifier { public class AccelDeviceEventNotifier {
private static AccelDeviceEventNotifier theInstance; private static AccelDeviceEventNotifier theInstance;
......
...@@ -28,9 +28,13 @@ package sun.java2d.pipe.hw; ...@@ -28,9 +28,13 @@ package sun.java2d.pipe.hw;
import java.awt.Rectangle; import java.awt.Rectangle;
import sun.java2d.Surface; import sun.java2d.Surface;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* Abstraction for a hardware accelerated surface. * Abstraction for a hardware accelerated surface.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public interface AccelSurface extends BufferedContextProvider, Surface { public interface AccelSurface extends BufferedContextProvider, Surface {
/** /**
* Undefined * Undefined
......
...@@ -25,12 +25,16 @@ ...@@ -25,12 +25,16 @@
package sun.java2d.pipe.hw; package sun.java2d.pipe.hw;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* Represents a set of capabilities of a BufferedContext and associated * Represents a set of capabilities of a BufferedContext and associated
* AccelGraphicsConfig. * AccelGraphicsConfig.
* *
* @see AccelGraphicsConfig * @see AccelGraphicsConfig
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class ContextCapabilities { public class ContextCapabilities {
/** Indicates that the context has no capabilities. */ /** Indicates that the context has no capabilities. */
public static final int CAPS_EMPTY = (0 << 0); public static final int CAPS_EMPTY = (0 << 0);
......
...@@ -32,13 +32,15 @@ import java.nio.ByteBuffer; ...@@ -32,13 +32,15 @@ import java.nio.ByteBuffer;
import java.nio.channels.*; import java.nio.channels.*;
import java.nio.channels.spi.*; import java.nio.channels.spi.*;
import java.util.*; import java.util.*;
import javax.tools.annotation.GenerateNativeHeader;
import sun.net.ResourceManager; import sun.net.ResourceManager;
/** /**
* An implementation of DatagramChannels. * An implementation of DatagramChannels.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
class DatagramChannelImpl class DatagramChannelImpl
extends DatagramChannel extends DatagramChannel
implements SelChImpl implements SelChImpl
......
...@@ -25,12 +25,9 @@ ...@@ -25,12 +25,9 @@
package sun.nio.ch; package sun.nio.ch;
import javax.tools.annotation.GenerateNativeHeader;
// Constants for reporting I/O status // Constants for reporting I/O status
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public final class IOStatus { public final class IOStatus {
private IOStatus() { } private IOStatus() { }
......
...@@ -35,6 +35,8 @@ import java.security.cert.X509Certificate; ...@@ -35,6 +35,8 @@ import java.security.cert.X509Certificate;
import sun.security.pkcs11.wrapper.*; import sun.security.pkcs11.wrapper.*;
import static sun.security.pkcs11.wrapper.PKCS11Constants.*; import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* The Secmod class defines the interface to the native NSS * The Secmod class defines the interface to the native NSS
* library and the configuration information it stores in its * library and the configuration information it stores in its
...@@ -55,6 +57,8 @@ import static sun.security.pkcs11.wrapper.PKCS11Constants.*; ...@@ -55,6 +57,8 @@ import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
* @since 1.6 * @since 1.6
* @author Andreas Sterbenz * @author Andreas Sterbenz
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public final class Secmod { public final class Secmod {
private final static boolean DEBUG = false; private final static boolean DEBUG = false;
......
...@@ -55,6 +55,7 @@ import java.security.AccessController; ...@@ -55,6 +55,7 @@ import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import static sun.security.pkcs11.wrapper.PKCS11Constants.*; import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
import javax.tools.annotation.GenerateNativeHeader;
/** /**
* This is the default implementation of the PKCS11 interface. IT connects to * This is the default implementation of the PKCS11 interface. IT connects to
...@@ -67,6 +68,8 @@ import static sun.security.pkcs11.wrapper.PKCS11Constants.*; ...@@ -67,6 +68,8 @@ import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
* @author Martin Schlaeffer <schlaeff@sbox.tugraz.at> * @author Martin Schlaeffer <schlaeff@sbox.tugraz.at>
* @invariants (pkcs11ModulePath_ <> null) * @invariants (pkcs11ModulePath_ <> null)
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class PKCS11 { public class PKCS11 {
/** /**
......
...@@ -70,6 +70,10 @@ import sun.awt.image.ToolkitImage; ...@@ -70,6 +70,10 @@ import sun.awt.image.ToolkitImage;
import sun.java2d.BackBufferCapsProvider; import sun.java2d.BackBufferCapsProvider;
import sun.java2d.pipe.Region; import sun.java2d.pipe.Region;
import javax.tools.annotation.GenerateNativeHeader;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
public class XComponentPeer extends XWindow implements ComponentPeer, DropTargetPeer, public class XComponentPeer extends XWindow implements ComponentPeer, DropTargetPeer,
BackBufferCapsProvider BackBufferCapsProvider
{ {
......
...@@ -32,6 +32,7 @@ import java.awt.image.AffineTransformOp; ...@@ -32,6 +32,7 @@ import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp; import java.awt.image.BufferedImageOp;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import javax.tools.annotation.GenerateNativeHeader;
import sun.java2d.ScreenUpdateManager; import sun.java2d.ScreenUpdateManager;
import sun.java2d.SurfaceData; import sun.java2d.SurfaceData;
import sun.java2d.loops.Blit; import sun.java2d.loops.Blit;
...@@ -47,6 +48,8 @@ import sun.java2d.pipe.RenderQueue; ...@@ -47,6 +48,8 @@ import sun.java2d.pipe.RenderQueue;
import static sun.java2d.pipe.BufferedOpCodes.*; import static sun.java2d.pipe.BufferedOpCodes.*;
import sun.java2d.windows.GDIWindowSurfaceData; import sun.java2d.windows.GDIWindowSurfaceData;
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
class D3DBlitLoops { class D3DBlitLoops {
static void register() { static void register() {
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
package sun.java2d.d3d; package sun.java2d.d3d;
import javax.tools.annotation.GenerateNativeHeader;
import sun.java2d.pipe.BufferedContext; import sun.java2d.pipe.BufferedContext;
import sun.java2d.pipe.RenderBuffer; import sun.java2d.pipe.RenderBuffer;
import sun.java2d.pipe.RenderQueue; import sun.java2d.pipe.RenderQueue;
...@@ -37,6 +38,8 @@ import static sun.java2d.d3d.D3DContext.D3DContextCaps.*; ...@@ -37,6 +38,8 @@ import static sun.java2d.d3d.D3DContext.D3DContextCaps.*;
* Note that the RenderQueue lock must be acquired before calling any of * Note that the RenderQueue lock must be acquired before calling any of
* the methods in this class. * the methods in this class.
*/ */
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
class D3DContext extends BufferedContext { class D3DContext extends BufferedContext {
private final D3DGraphicsDevice device; private final D3DGraphicsDevice device;
...@@ -140,6 +143,8 @@ class D3DContext extends BufferedContext { ...@@ -140,6 +143,8 @@ class D3DContext extends BufferedContext {
return device; return device;
} }
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
static class D3DContextCaps extends ContextCapabilities { static class D3DContextCaps extends ContextCapabilities {
/** /**
* Indicates the presence of pixel shaders (v2.0 or greater). * Indicates the presence of pixel shaders (v2.0 or greater).
......
...@@ -33,6 +33,7 @@ import java.awt.TexturePaint; ...@@ -33,6 +33,7 @@ import java.awt.TexturePaint;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.tools.annotation.GenerateNativeHeader;
import sun.java2d.SunGraphics2D; import sun.java2d.SunGraphics2D;
import sun.java2d.SurfaceData; import sun.java2d.SurfaceData;
import sun.java2d.loops.CompositeType; import sun.java2d.loops.CompositeType;
...@@ -157,6 +158,8 @@ abstract class D3DPaints { ...@@ -157,6 +158,8 @@ abstract class D3DPaints {
/****************** Shared MultipleGradientPaint support ********************/ /****************** Shared MultipleGradientPaint support ********************/
/* No native methods here, but the constants are needed in the supporting JNI code */
@GenerateNativeHeader
private static abstract class MultiGradient extends D3DPaints { private static abstract class MultiGradient extends D3DPaints {
/** /**
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "java_net_SocketOptions.h" #include "java_net_SocketOptions.h"
#include "java_net_TwoStacksPlainSocketImpl.h" #include "java_net_TwoStacksPlainSocketImpl.h"
#include "java_net_SocketImpl.h"
#include "java_net_InetAddress.h" #include "java_net_InetAddress.h"
#include "java_io_FileDescriptor.h" #include "java_io_FileDescriptor.h"
#include "java_lang_Integer.h" #include "java_lang_Integer.h"
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "awt_TextComponent.h" #include "awt_TextComponent.h"
#include <shlobj.h> #include <shlobj.h>
#include <shellapi.h> #include <shellapi.h>
#include <sun_awt_datatransfer_DataTransferer.h>
#include <sun_awt_windows_WDataTransferer.h> #include <sun_awt_windows_WDataTransferer.h>
#include "locale_str.h" #include "locale_str.h"
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <java_awt_Menu.h> #include <java_awt_Menu.h>
#include <sun_awt_windows_WMenuPeer.h> #include <sun_awt_windows_WMenuPeer.h>
#include <java_awt_MenuComponent.h> #include <java_awt_MenuComponent.h>
#include <java_awt_peer_MenuComponentPeer.h>
#include <java_awt_FontMetrics.h> #include <java_awt_FontMetrics.h>
class AwtMenu; class AwtMenu;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
/* /*
test %W% %E% test %W% %E%
@bug 4874070 @bug 4874070 7146550
@summary Tests basic DnD functionality @summary Tests basic DnD functionality
@author Your Name: Alexey Utkin area=dnd @author Your Name: Alexey Utkin area=dnd
@run applet ImageDecoratedDnDNegative.html @run applet ImageDecoratedDnDNegative.html
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册