Lines 95-100
public class SWTAccessor {
Link Here
|
95 |
|
95 |
|
96 |
private static final String str_OS_gtk_class = "org.eclipse.swt.internal.gtk.OS"; // used by earlier versions of SWT |
96 |
private static final String str_OS_gtk_class = "org.eclipse.swt.internal.gtk.OS"; // used by earlier versions of SWT |
97 |
private static final String str_GTK_gtk_class = "org.eclipse.swt.internal.gtk.GTK"; // used by later versions of SWT |
97 |
private static final String str_GTK_gtk_class = "org.eclipse.swt.internal.gtk.GTK"; // used by later versions of SWT |
|
|
98 |
private static final String str_GTK3_gtk_class = "org.eclipse.swt.internal.gtk3.GTK3"; // used by later versions of SWT (4.21+) |
98 |
private static final String str_GDK_gtk_class = "org.eclipse.swt.internal.gtk.GDK"; // used by later versions of SWT |
99 |
private static final String str_GDK_gtk_class = "org.eclipse.swt.internal.gtk.GDK"; // used by later versions of SWT |
99 |
public static final Class<?> OS_gtk_class; |
100 |
public static final Class<?> OS_gtk_class; |
100 |
private static final String str_OS_gtk_version = "GTK_VERSION"; |
101 |
private static final String str_OS_gtk_version = "GTK_VERSION"; |
Lines 124-129
public class SWTAccessor {
Link Here
|
124 |
private static final String str_gdk_window_set_back_pixmap = "gdk_window_set_back_pixmap"; |
125 |
private static final String str_gdk_window_set_back_pixmap = "gdk_window_set_back_pixmap"; |
125 |
private static final String str_gdk_window_set_background_pattern = "gdk_window_set_background_pattern"; |
126 |
private static final String str_gdk_window_set_background_pattern = "gdk_window_set_background_pattern"; |
126 |
|
127 |
|
|
|
128 |
private static final int SWT_VERSION_4_20 = 4944; |
129 |
|
127 |
private static final VersionNumber GTK_VERSION_2_14_0 = new VersionNumber(2, 14, 0); |
130 |
private static final VersionNumber GTK_VERSION_2_14_0 = new VersionNumber(2, 14, 0); |
128 |
private static final VersionNumber GTK_VERSION_2_24_0 = new VersionNumber(2, 24, 0); |
131 |
private static final VersionNumber GTK_VERSION_2_24_0 = new VersionNumber(2, 24, 0); |
129 |
private static final VersionNumber GTK_VERSION_2_90_0 = new VersionNumber(2, 90, 0); |
132 |
private static final VersionNumber GTK_VERSION_2_90_0 = new VersionNumber(2, 90, 0); |
Lines 261-267
public Object run() {
Link Here
|
261 |
_gtk_version = GTK_VERSION(field_OS_gtk_version.getInt(null)); |
264 |
_gtk_version = GTK_VERSION(field_OS_gtk_version.getInt(null)); |
262 |
m1 = cGTK.getDeclaredMethod(str_gtk_widget_realize, handleType); |
265 |
m1 = cGTK.getDeclaredMethod(str_gtk_widget_realize, handleType); |
263 |
if (_gtk_version.compareTo(GTK_VERSION_2_14_0) >= 0) { |
266 |
if (_gtk_version.compareTo(GTK_VERSION_2_14_0) >= 0) { |
264 |
m4 = cGTK.getDeclaredMethod(str_gtk_widget_get_window, handleType); |
267 |
if (SWT.getVersion() < SWT_VERSION_4_20) { |
|
|
268 |
m4 = cGTK.getDeclaredMethod(str_gtk_widget_get_window, handleType); |
269 |
} else { |
270 |
Class<?> cGTK3 = ReflectionUtil.getClass(str_GTK3_gtk_class, false, cl); |
271 |
m4 = cGTK3.getDeclaredMethod(str_gtk_widget_get_window, handleType); |
272 |
} |
265 |
} else { |
273 |
} else { |
266 |
m3 = cGTK.getDeclaredMethod(str_GTK_WIDGET_WINDOW, handleType); |
274 |
m3 = cGTK.getDeclaredMethod(str_GTK_WIDGET_WINDOW, handleType); |
267 |
} |
275 |
} |