Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-09-19 16:12:19 -0400
committerEric Williams2018-09-19 16:12:19 -0400
commitba7dfc05c5d6a2b88e3407b2f82706e4573d3755 (patch)
treef84f9c986a7c05d9241201d6f8e311690014fdb8
parent0d385bd06a71de635ad635a1571a996429147f0b (diff)
downloadeclipse.platform.swt-ba7dfc05c5d6a2b88e3407b2f82706e4573d3755.tar.gz
eclipse.platform.swt-ba7dfc05c5d6a2b88e3407b2f82706e4573d3755.tar.xz
eclipse.platform.swt-ba7dfc05c5d6a2b88e3407b2f82706e4573d3755.zip
Bug 530841: [GTK2] Remove GTK 2.x supportY20180919-2200I20180919-1800
Remove *_IM_CONTEXT functions that do nothing on GTK3. Change-Id: I5e52ec98acf5b26e3f695da920163940df4b8f5e Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java5
8 files changed, 3 insertions, 42 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index a9d566c31d..c686bf2f79 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -2805,30 +2805,6 @@ JNIEXPORT void JNICALL GTK_NATIVE(GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING)
}
#endif
-#ifndef NO_GTK_1ENTRY_1IM_1CONTEXT
-JNIEXPORT jintLong JNICALL GTK_NATIVE(GTK_1ENTRY_1IM_1CONTEXT)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, GTK_1ENTRY_1IM_1CONTEXT_FUNC);
- rc = (jintLong)GTK_ENTRY_IM_CONTEXT((GtkEntry *)arg0);
- GTK_NATIVE_EXIT(env, that, GTK_1ENTRY_1IM_1CONTEXT_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GTK_1TEXTVIEW_1IM_1CONTEXT
-JNIEXPORT jintLong JNICALL GTK_NATIVE(GTK_1TEXTVIEW_1IM_1CONTEXT)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, GTK_1TEXTVIEW_1IM_1CONTEXT_FUNC);
- rc = (jintLong)GTK_TEXTVIEW_IM_CONTEXT((GtkTextView *)arg0);
- GTK_NATIVE_EXIT(env, that, GTK_1TEXTVIEW_1IM_1CONTEXT_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE
JNIEXPORT jintLong JNICALL GTK_NATIVE(GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE)
(JNIEnv *env, jclass that)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
index 7d06f1faa8..19cd65f0f3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
@@ -158,10 +158,6 @@ X#define NO__1XWarpPointer
#endif
-// TODO: the following are still called in code even on GTK3.
-#define NO_GTK_1ENTRY_1IM_1CONTEXT
-#define NO_GTK_1TEXTVIEW_1IM_1CONTEXT
-
#include "os_custom.h"
#endif /* INC_os_H */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
index 554ee0f27b..c22c7ada78 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
@@ -229,8 +229,6 @@ JNIEXPORT jint JNICALL STATS_NATIVE(GDK_1GetFunctionCallCount)
char * GTK_nativeFunctionNames[] = {
"GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING",
"GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING",
- "GTK_1ENTRY_1IM_1CONTEXT",
- "GTK_1TEXTVIEW_1IM_1CONTEXT",
"GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE",
"GTK_1WIDGET_1GET_1CLASS",
"GtkAllocation_1sizeof",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index 7166f0b276..571ce092db 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
@@ -227,8 +227,6 @@ extern char* GTK_nativeFunctionNames[];
typedef enum {
GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING_FUNC,
GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING_FUNC,
- GTK_1ENTRY_1IM_1CONTEXT_FUNC,
- GTK_1TEXTVIEW_1IM_1CONTEXT_FUNC,
GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE_FUNC,
GTK_1WIDGET_1GET_1CLASS_FUNC,
GtkAllocation_1sizeof_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
index 8e173d9cb6..cbf5b0bd34 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
@@ -253,10 +253,6 @@ public class GTK extends OS {
public static final native void GTK_ACCEL_LABEL_SET_ACCEL_STRING(long /*int*/ acce_label, long /*int*/ string);
/** @param acce_label cast=(GtkAccelLabel *) */
public static final native long /*int*/ GTK_ACCEL_LABEL_GET_ACCEL_STRING(long /*int*/ acce_label);
- /** @param widget cast=(GtkEntry *) */
- public static final native long /*int*/ GTK_ENTRY_IM_CONTEXT(long /*int*/ widget);
- /** @param widget cast=(GtkTextView *) */
- public static final native long /*int*/ GTK_TEXTVIEW_IM_CONTEXT(long /*int*/ widget);
/** @method flags=const */
public static final native long /*int*/ GTK_TYPE_TEXT_VIEW_ACCESSIBLE ();
public static final native long /*int*/ _GTK_ACCESSIBLE (long /*int*/ handle);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
index 6bd2c943e9..fffaa4331c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
@@ -819,7 +819,7 @@ void hookEvents(long /*int*/ [] handles) {
long /*int*/ imContext () {
if (imContext != 0) return imContext;
- return entryHandle != 0 ? GTK.GTK_ENTRY_IM_CONTEXT (entryHandle) : 0;
+ return 0;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
index 3d54b5a4bc..c5ab9df4d7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
@@ -789,7 +789,7 @@ void hookEvents () {
long /*int*/ imContext () {
if (imContext != 0) return imContext;
- return GTK.GTK_ENTRY_IM_CONTEXT (handle);
+ return 0;
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
index 7ed48789b5..baccd88761 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
@@ -1840,10 +1840,7 @@ void hookEvents () {
long /*int*/ imContext () {
if (imContext != 0) return imContext;
- if ((style & SWT.SINGLE) != 0) {
- return GTK.GTK_ENTRY_IM_CONTEXT (handle);
- }
- return GTK.GTK_TEXTVIEW_IM_CONTEXT (handle);
+ return 0;
}

Back to the top