Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.swt.cocoa.macosx.aarch64" version="2">
<resource path="Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java" type="org.eclipse.swt.awt.SWT_AWT">
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.awt.SWT_AWT"/>
<message_argument value="embeddedFrameClass"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java" type="org.eclipse.swt.widgets.Composite">
<filter id="576778288">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.swt.cocoa.macosx.x86_64" version="2">
<resource path="Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java" type="org.eclipse.swt.awt.SWT_AWT">
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.awt.SWT_AWT"/>
<message_argument value="embeddedFrameClass"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java" type="org.eclipse.swt.widgets.Composite">
<filter id="576778288">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.swt.gtk.linux.aarch64" version="2">
<resource path="Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java" type="org.eclipse.swt.awt.SWT_AWT">
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.awt.SWT_AWT"/>
<message_argument value="embeddedFrameClass"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java" type="org.eclipse.swt.widgets.Composite">
<filter id="576778288">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.swt.gtk.linux.loongarch64" version="2">
<resource path="Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java" type="org.eclipse.swt.awt.SWT_AWT">
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.awt.SWT_AWT"/>
<message_argument value="embeddedFrameClass"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java" type="org.eclipse.swt.widgets.Composite">
<filter id="576778288">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.swt.gtk.linux.ppc64le" version="2">
<resource path="Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java" type="org.eclipse.swt.awt.SWT_AWT">
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.awt.SWT_AWT"/>
<message_argument value="embeddedFrameClass"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java" type="org.eclipse.swt.widgets.Composite">
<filter id="576778288">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.swt.gtk.linux.riscv64" version="2">
<resource path="Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java" type="org.eclipse.swt.awt.SWT_AWT">
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.awt.SWT_AWT"/>
<message_argument value="embeddedFrameClass"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java" type="org.eclipse.swt.widgets.Composite">
<filter id="576778288">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.swt.gtk.linux.x86_64" version="2">
<resource path="Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java" type="org.eclipse.swt.awt.SWT_AWT">
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.awt.SWT_AWT"/>
<message_argument value="embeddedFrameClass"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT Printing/common/org/eclipse/swt/printing/PageSize.java" type="org.eclipse.swt.printing.PageSize">
<filter id="338944126">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.swt.win32.win32.aarch64" version="2">
<resource path="Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java" type="org.eclipse.swt.awt.SWT_AWT">
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.awt.SWT_AWT"/>
<message_argument value="embeddedFrameClass"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT Printing/common/org/eclipse/swt/printing/PageSize.java" type="org.eclipse.swt.printing.PageSize">
<filter id="338944126">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.swt.win32.win32.x86_64" version="2">
<resource path="Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java" type="org.eclipse.swt.awt.SWT_AWT">
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.awt.SWT_AWT"/>
<message_argument value="embeddedFrameClass"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT Printing/common/org/eclipse/swt/printing/PageSize.java" type="org.eclipse.swt.printing.PageSize">
<filter id="338944126">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#ifndef NO_initFrame
JNIEXPORT jobject JNICALL Java_org_eclipse_swt_awt_SWT_1AWT_initFrame
(JNIEnv *env, jclass that, jlong handle, const char *className)
(JNIEnv *env, jclass that, jlong handle)
{
jobject object;
jmethodID constructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ public class SWT_AWT {
/**
* The name of the embedded Frame class. The default class name
* for the platform will be used if <code>null</code>.
*
* @noreference This field is not intended to be referenced by clients.
* @deprecated The class named here is never instantiated: the platform's
* default embedded Frame class is always used. This field will
* be removed in a future release.
*/
@Deprecated(forRemoval = true, since = "2026-12")
public static String embeddedFrameClass;

/**
Expand All @@ -61,11 +67,9 @@ public class SWT_AWT {
*/
static final String RUN_AWT_INVOKE_LATER_KEY = "org.eclipse.swt.internal.runAWTInvokeLater"; //$NON-NLS-1$

static final String JDK17_FRAME = "sun.lwawt.macosx.CViewEmbeddedFrame";

static boolean loaded, swingInitialized;

static native final Object initFrame (long handle, String className);
static native final Object initFrame (long handle);
static native final void validateWithBounds (Frame frame, int x, int y, int w, int h);
static native final void synthesizeWindowActivation (Frame frame, boolean doActivate);

Expand Down Expand Up @@ -135,10 +139,9 @@ public static Frame new_Frame(final Composite parent) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
final long handle = parent.view.id;
final String className = embeddedFrameClass != null ? embeddedFrameClass : JDK17_FRAME;
try {
if (embeddedFrameClass != null) {
Class.forName(className);
Class.forName(embeddedFrameClass);
}
loadLibrary();
} catch (ClassNotFoundException cne) {
Expand All @@ -158,7 +161,7 @@ public static Frame new_Frame(final Composite parent) {
public void run() {
if (run) return;
run = true;
Object obj = initFrame(handle, className);
Object obj = initFrame(handle);
if (obj == null || !(obj instanceof Frame)) {
exception [0] = new Throwable("[Error while creating AWT embedded frame]");
SWT.error (SWT.ERROR_UNSPECIFIED, exception[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ public class SWT_AWT {
/**
* The name of the embedded Frame class. The default class name
* for the platform will be used if <code>null</code>.
*
* @noreference This field is not intended to be referenced by clients.
* @deprecated The class named here is never instantiated: the platform's
* default embedded Frame class is always used. This field will
* be removed in a future release.
*/
@Deprecated(forRemoval = true, since = "2026-12")
public static String embeddedFrameClass;

/**
Expand All @@ -59,7 +65,7 @@ public class SWT_AWT {

static native final long getAWTHandle (Object canvas);
static native final void setDebug (Frame canvas, boolean debug);
static native final Object initFrame (long handle, String className);
static native final Object initFrame (long handle);
static native final void validateWithBounds (Frame frame, int x, int y, int w, int h);
static native final void synthesizeWindowActivation (Frame frame, boolean doActivate);
static native final void registerListeners (Frame frame);
Expand Down Expand Up @@ -155,10 +161,9 @@ public static Frame new_Frame (final Composite parent) {
* and other JREs take a long. To handle this binary incompatibility, use
* reflection to create the embedded frame.
*/
String className = embeddedFrameClass != null ? embeddedFrameClass : "sun.awt.X11.XEmbeddedFrame";
try {
if (embeddedFrameClass != null) {
Class.forName(className);
Class.forName(embeddedFrameClass);
}
loadLibrary();
} catch (ClassNotFoundException cne) {
Expand All @@ -168,7 +173,7 @@ public static Frame new_Frame (final Composite parent) {
}
initializeSwing ();
final Frame [] frame = new Frame [1];
Object object = initFrame(handle, className);
Object object = initFrame(handle);
if (object == null || !(object instanceof Frame)) {
SWT.error (SWT.ERROR_UNSPECIFIED , new Throwable(), " [Error while starting AWT]");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ JNIEXPORT jlong JNICALL SWT_AWT_NATIVE(getAWTHandle)

#ifndef NO_initFrame
JNIEXPORT jobject JNICALL SWT_AWT_NATIVE(initFrame)
(JNIEnv *env, jclass that, jlong handle, jstring className)
(JNIEnv *env, jclass that, jlong handle)
{
/* Suppress warnings about unreferenced parameters */
(void)className;
(void)that;

jobject object;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ public class SWT_AWT {
/**
* The name of the embedded Frame class. The default class name
* for the platform will be used if <code>null</code>.
*
* @noreference This field is not intended to be referenced by clients.
* @deprecated The class named here is never instantiated: the platform's
* default embedded Frame class is always used. This field will
* be removed in a future release.
*/
@Deprecated(forRemoval = true, since = "2026-12")
public static String embeddedFrameClass;

/**
Expand All @@ -54,7 +60,7 @@ public class SWT_AWT {
static boolean loaded, swingInitialized;

static native final long getAWTHandle (Canvas canvas);
static native final Object initFrame (long handle, String className);
static native final Object initFrame (long handle);
static native final void synthesizeWindowActivation (Frame frame, boolean doActivate);

static synchronized void loadLibrary () {
Expand Down Expand Up @@ -141,10 +147,9 @@ public static Frame new_Frame (final Composite parent) {
* and other JREs take a long. To handle this binary incompatibility, use
* reflection to create the embedded frame.
*/
String className = embeddedFrameClass != null ? embeddedFrameClass : "sun.awt.windows.WEmbeddedFrame";
try {
if (embeddedFrameClass != null) {
Class.forName(className);
Class.forName(embeddedFrameClass);
}
loadLibrary();
} catch (ClassNotFoundException cne) {
Expand All @@ -154,7 +159,7 @@ public static Frame new_Frame (final Composite parent) {
return;
}
initializeSwing ();
Object value = initFrame(handle, className);
Object value = initFrame(handle);
if (value == null || !(value instanceof Frame)) {
exception [0] = new Throwable("[Error while creating AWT embedded frame]");
SWT.error (SWT.ERROR_UNSPECIFIED, exception[0]);
Expand Down
Loading