Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-09-17 19:31:46 +0000
committerEric Williams2018-09-17 19:51:20 +0000
commita4765265e60b6e3ff36b162f819bba2fcee3c9ff (patch)
treebc2e60802df8b2599b578505e2d6ab47f2368ad7
parent33aa065f03b6051f5dd09471f3107409cd45b74c (diff)
downloadeclipse.platform.swt-a4765265e60b6e3ff36b162f819bba2fcee3c9ff.tar.gz
eclipse.platform.swt-a4765265e60b6e3ff36b162f819bba2fcee3c9ff.tar.xz
eclipse.platform.swt-a4765265e60b6e3ff36b162f819bba2fcee3c9ff.zip
Bug 530841: [GTK2] Remove GTK 2.x support
Remove gtk_expose_event callback. Change-Id: I7ededef607eba36009e442962585873d88c7bccd Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c95
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java46
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java35
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java21
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java31
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java27
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java27
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java4
15 files changed, 0 insertions, 351 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 cb27ef61ff..a91dd6ff9b 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
@@ -1652,31 +1652,6 @@ fail:
}
#endif
-#ifndef NO__1gdk_1region_1get_1rectangles
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1region_1get_1rectangles)
- (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintArray arg2)
-{
- jintLong *lparg1=NULL;
- jint *lparg2=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1region_1get_1rectangles_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
-/*
- gdk_region_get_rectangles(arg0, lparg1, (gint *)lparg2);
-*/
- {
- GDK_LOAD_FUNCTION(fp, gdk_region_get_rectangles)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, jintLong *, gint *))fp)(arg0, lparg1, (gint *)lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1region_1get_1rectangles_FUNC);
-}
-#endif
-
#ifndef NO__1gdk_1region_1intersect
JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1region_1intersect)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -7615,56 +7590,6 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1page_1setup_1set_1top_1margin)
}
#endif
-#ifndef NO__1gtk_1paint_1box
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1paint_1box)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jintLong arg5, jbyteArray arg6, jint arg7, jint arg8, jint arg9, jint arg10)
-{
- GdkRectangle _arg4, *lparg4=NULL;
- jbyte *lparg6=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paint_1box_FUNC);
- if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
- if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-/*
- gtk_paint_box(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_paint_box)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
- }
- }
-fail:
- if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
- if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paint_1box_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1paint_1flat_1box
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1paint_1flat_1box)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jintLong arg5, jbyteArray arg6, jint arg7, jint arg8, jint arg9, jint arg10)
-{
- GdkRectangle _arg4, *lparg4=NULL;
- jbyte *lparg6=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paint_1flat_1box_FUNC);
- if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
- if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-/*
- gtk_paint_flat_box(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_paint_flat_box)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
- }
- }
-fail:
- if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
- if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paint_1flat_1box_FUNC);
-}
-#endif
-
#ifndef NO__1gtk_1paper_1size_1free
JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1paper_1size_1free)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -12041,26 +11966,6 @@ JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1state_1flags)
}
#endif
-#ifndef NO__1gtk_1widget_1get_1style
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1style)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1style_FUNC);
-/*
- rc = (jintLong)gtk_widget_get_style((GtkWidget *)arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_get_style)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1style_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1gtk_1widget_1get_1style_1context
JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1style_1context)
(JNIEnv *env, jclass that, jintLong arg0)
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 4d897b8a2a..e53f8cc818 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
@@ -125,7 +125,6 @@ char * GDK_nativeFunctionNames[] = {
"_1gdk_1region_1destroy",
"_1gdk_1region_1empty",
"_1gdk_1region_1get_1clipbox",
- "_1gdk_1region_1get_1rectangles",
"_1gdk_1region_1intersect",
"_1gdk_1region_1new",
"_1gdk_1region_1offset",
@@ -616,8 +615,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1page_1setup_1set_1paper_1size",
"_1gtk_1page_1setup_1set_1right_1margin",
"_1gtk_1page_1setup_1set_1top_1margin",
- "_1gtk_1paint_1box",
- "_1gtk_1paint_1flat_1box",
"_1gtk_1paper_1size_1free",
"_1gtk_1paper_1size_1get_1display_1name",
"_1gtk_1paper_1size_1get_1height",
@@ -989,7 +986,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1widget_1get_1sensitive",
"_1gtk_1widget_1get_1size_1request",
"_1gtk_1widget_1get_1state_1flags",
- "_1gtk_1widget_1get_1style",
"_1gtk_1widget_1get_1style_1context",
"_1gtk_1widget_1get_1tooltip_1text",
"_1gtk_1widget_1get_1toplevel",
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 57b7c66fc6..991eb19a12 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
@@ -135,7 +135,6 @@ typedef enum {
_1gdk_1region_1destroy_FUNC,
_1gdk_1region_1empty_FUNC,
_1gdk_1region_1get_1clipbox_FUNC,
- _1gdk_1region_1get_1rectangles_FUNC,
_1gdk_1region_1intersect_FUNC,
_1gdk_1region_1new_FUNC,
_1gdk_1region_1offset_FUNC,
@@ -614,8 +613,6 @@ typedef enum {
_1gtk_1page_1setup_1set_1paper_1size_FUNC,
_1gtk_1page_1setup_1set_1right_1margin_FUNC,
_1gtk_1page_1setup_1set_1top_1margin_FUNC,
- _1gtk_1paint_1box_FUNC,
- _1gtk_1paint_1flat_1box_FUNC,
_1gtk_1paper_1size_1free_FUNC,
_1gtk_1paper_1size_1get_1display_1name_FUNC,
_1gtk_1paper_1size_1get_1height_FUNC,
@@ -987,7 +984,6 @@ typedef enum {
_1gtk_1widget_1get_1sensitive_FUNC,
_1gtk_1widget_1get_1size_1request_FUNC,
_1gtk_1widget_1get_1state_1flags_FUNC,
- _1gtk_1widget_1get_1style_FUNC,
_1gtk_1widget_1get_1style_1context_FUNC,
_1gtk_1widget_1get_1tooltip_1text_FUNC,
_1gtk_1widget_1get_1toplevel_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
index 0b7282aa25..e41a78fe44 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
@@ -1380,19 +1380,6 @@ public class GDK extends OS {
}
}
/**
- * @method flags=dynamic
- * @param n_rectangles cast=(gint *)
- */
- public static final native void _gdk_region_get_rectangles(long /*int*/ region, long /*int*/[] rectangles, int[] n_rectangles);
- public static final void gdk_region_get_rectangles(long /*int*/ region, long /*int*/[] rectangles, int[] n_rectangles) {
- lock.lock();
- try {
- _gdk_region_get_rectangles(region, rectangles, n_rectangles);
- } finally {
- lock.unlock();
- }
- }
- /**
* @param source1 cast=(GdkRegion *)
* @param source2 cast=(GdkRegion *)
*/
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 49ba14e373..0deabd0fa6 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
@@ -4308,22 +4308,6 @@ public class GTK extends OS {
}
}
/**
- * @method flags=dynamic
- * @param window cast=(GdkWindow *)
- * @param widget cast=(GtkWidget *)
- * @param detail cast=(const gchar *)
- */
- public static final native void _gtk_paint_flat_box(long /*int*/ style, long /*int*/ window, int state_type, int shadow_type, GdkRectangle area, long /*int*/ widget, byte[] detail, int x , int y, int width, int height);
- /** [GTK2/GTK3; 3.0 deprecated] */
- public static final void gtk_paint_flat_box(long /*int*/ style, long /*int*/ window, int state_type, int shadow_type, GdkRectangle area, long /*int*/ widget, byte[] detail, int x , int y, int width, int height) {
- lock.lock();
- try {
- _gtk_paint_flat_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
- } finally {
- lock.unlock();
- }
- }
- /**
* @method flags=dynamic
* @param x cast=(gdouble)
* @param y cast=(gdouble)
@@ -4340,22 +4324,6 @@ public class GTK extends OS {
}
}
/**
- * @method flags=dynamic
- * @param window cast=(GdkWindow *)
- * @param widget cast=(GtkWidget *)
- * @param detail cast=(const gchar *)
- */
- public static final native void _gtk_paint_box(long /*int*/ style, long /*int*/ window, int state_type, int shadow_type, GdkRectangle area, long /*int*/ widget, byte[] detail, int x , int y, int width, int height);
- /** [GTK2/GTK3; 3.0 deprecated] */
- public static final void gtk_paint_box(long /*int*/ style, long /*int*/ window, int state_type, int shadow_type, GdkRectangle area, long /*int*/ widget, byte[] detail, int x , int y, int width, int height) {
- lock.lock();
- try {
- _gtk_paint_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
- } finally {
- lock.unlock();
- }
- }
- /**
* @param size cast=(GtkPaperSize *)
*/
public static final native void _gtk_paper_size_free(long /*int*/ size);
@@ -8080,20 +8048,6 @@ public class GTK extends OS {
}
}
/**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- */
- public static final native long /*int*/ _gtk_widget_get_style(long /*int*/ widget);
- /** [GTK2/GTK3; 3.0 deprecated] */
- public static final long /*int*/ gtk_widget_get_style(long /*int*/ widget) {
- lock.lock();
- try {
- return _gtk_widget_get_style(widget);
- } finally {
- lock.unlock();
- }
- }
- /**
* @param widget cast=(GtkWidget *)
* @param width cast=(gint *)
* @param height cast=(gint *)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
index 23f0e2d052..36895aad19 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
@@ -236,16 +236,6 @@ private void drawCaret (long /*int*/ widget, long /*int*/ cairo) {
}
@Override
-long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ event) {
- if ((state & OBSCURED) != 0) return 0;
- boolean isFocus = caret != null && caret.isFocusCaret ();
- if (isFocus) caret.killFocus ();
- long /*int*/ result = super.gtk_expose_event (widget, event);
- if (isFocus) caret.setFocus ();
- return result;
-}
-
-@Override
long /*int*/ gtk_focus_in_event (long /*int*/ widget, long /*int*/ event) {
long /*int*/ result = super.gtk_focus_in_event (widget, event);
if (caret != null) caret.setFocus ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
index 554eb7caa1..f2c6658937 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
@@ -811,41 +811,6 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) {
}
@Override
-long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) {
- if ((state & OBSCURED) != 0) return 0;
- if ((state & CANVAS) == 0) {
- return super.gtk_expose_event (widget, eventPtr);
- }
- if ((style & SWT.NO_MERGE_PAINTS) == 0) {
- return super.gtk_expose_event (widget, eventPtr);
- }
- if (!hooksPaint ()) return 0;
- GdkEventExpose gdkEvent = new GdkEventExpose ();
- OS.memmove(gdkEvent, eventPtr, GdkEventExpose.sizeof);
- long /*int*/ [] rectangles = new long /*int*/ [1];
- int [] n_rectangles = new int [1];
- GDK.gdk_region_get_rectangles (gdkEvent.region, rectangles, n_rectangles);
- GdkRectangle rect = new GdkRectangle ();
- for (int i=0; i<n_rectangles[0]; i++) {
- Event event = new Event ();
- OS.memmove (rect, rectangles [0] + i * GdkRectangle.sizeof, GdkRectangle.sizeof);
- event.setBounds (DPIUtil.autoScaleDown (new Rectangle(rect.x, rect.y, rect.width, rect.height)));
- if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth ()) - event.width - event.x;
- long /*int*/ damageRgn = GDK.gdk_region_new ();
- GDK.gdk_region_union_with_rect (damageRgn, rect);
- GCData data = new GCData ();
- data.damageRgn = damageRgn;
- GC gc = event.gc = GC.gtk_new (this, data);
- sendEvent (SWT.Paint, event);
- gc.dispose ();
- GDK.gdk_region_destroy (damageRgn);
- event.gc = null;
- }
- OS.g_free (rectangles [0]);
- return 0;
-}
-
-@Override
long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) {
long /*int*/ result = super.gtk_key_press_event (widget, event);
if (result != 0) return result;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 9136e184b4..c2626f891f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -3512,27 +3512,6 @@ long /*int*/ gtk_draw (long /*int*/ widget, long /*int*/ cairo) {
}
@Override
-long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) {
- if ((state & OBSCURED) != 0) return 0;
- if (!hooksPaint ()) return 0;
- GdkEventExpose gdkEvent = new GdkEventExpose ();
- OS.memmove(gdkEvent, eventPtr, GdkEventExpose.sizeof);
- Event event = new Event ();
- event.count = gdkEvent.count;
- Rectangle eventRect = new Rectangle (gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height);
- event.setBounds (DPIUtil.autoScaleDown (eventRect));
- if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth ()) - event.width - event.x;
- GCData data = new GCData ();
- data.damageRgn = gdkEvent.region;
- GC gc = event.gc = GC.gtk_new (this, data);
- drawWidget (gc);
- sendEvent (SWT.Paint, event);
- gc.dispose ();
- event.gc = null;
- return 0;
-}
-
-@Override
long /*int*/ gtk_focus (long /*int*/ widget, long /*int*/ directionType) {
/* Stop GTK traversal for every widget */
return 1;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
index d70b87f49d..268fb68d32 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
@@ -781,26 +781,6 @@ long /*int*/ gtk_changed (long /*int*/ widget) {
}
@Override
-long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) {
- switch (GDK.GDK_EVENT_TYPE (gdkEvent)) {
- case GDK.GDK_EXPOSE: {
- /*
- * Bug in GTK. SWT connects the expose-event 'after' the default
- * handler of the signal. If the tree has no children, then GTK
- * sends expose signal only 'before' the default signal handler.
- * The fix is to detect this case in 'event_after' and send the
- * expose event.
- */
- if (GTK.gtk_tree_model_iter_n_children (modelHandle, 0) == 0) {
- gtk_expose_event (widget, gdkEvent);
- }
- break;
- }
- }
- return super.gtk_event_after (widget, gdkEvent);
-}
-
-@Override
long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) {
long /*int*/ result = super.gtk_button_press_event (widget, event);
if (result != 0) return result;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index fe67120f91..fe57296b34 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -1378,37 +1378,6 @@ long /*int*/ gtk_draw (long /*int*/ widget, long /*int*/ cairo) {
}
@Override
-long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ event) {
- if (widget == shellHandle) {
- if (isCustomResize ()) {
- GdkEventExpose gdkEventExpose = new GdkEventExpose ();
- OS.memmove (gdkEventExpose, event, GdkEventExpose.sizeof);
- long /*int*/ style = GTK.gtk_widget_get_style (widget);
- long /*int*/ window = gtk_widget_get_window (widget);
- int [] width = new int [1];
- int [] height = new int [1];
- gdk_window_get_size (window, width, height);
- GdkRectangle area = new GdkRectangle ();
- area.x = gdkEventExpose.area_x;
- area.y = gdkEventExpose.area_y;
- area.width = gdkEventExpose.area_width;
- area.height = gdkEventExpose.area_height;
- byte [] detail = Converter.wcsToMbcs ("base", true); //$NON-NLS-1$
- int border = GTK.gtk_container_get_border_width (widget);
- int state = display.activeShell == this ? GTK.GTK_STATE_SELECTED : GTK.GTK_STATE_PRELIGHT;
- GTK.gtk_paint_flat_box (style, window, state, GTK.GTK_SHADOW_NONE, area, widget, detail, 0, 0, width [0], border);
- GTK.gtk_paint_flat_box (style, window, state, GTK.GTK_SHADOW_NONE, area, widget, detail, 0, height [0] - border, width [0], border);
- GTK.gtk_paint_flat_box (style, window, state, GTK.GTK_SHADOW_NONE, area, widget, detail, 0, border, border, height [0] - border - border);
- GTK.gtk_paint_flat_box (style, window, state, GTK.GTK_SHADOW_NONE, area, widget, detail, width [0] - border, border, border, height [0] - border - border);
- GTK.gtk_paint_box (style, window, state, GTK.GTK_SHADOW_OUT, area, widget, detail, 0, 0, width [0], height [0]);
- return 1;
- }
- return 0;
- }
- return super.gtk_expose_event (widget, event);
-}
-
-@Override
long /*int*/ gtk_focus (long /*int*/ widget, long /*int*/ directionType) {
switch ((int)/*64*/directionType) {
case GTK.GTK_DIR_TAB_FORWARD:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 6c0967cacf..f0c2b00ac3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -2152,26 +2152,6 @@ long /*int*/ gtk_changed (long /*int*/ widget) {
return 0;
}
-@Override
-long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) {
- switch (GDK.GDK_EVENT_TYPE (gdkEvent)) {
- case GDK.GDK_EXPOSE: {
- /*
- * Bug in GTK. SWT connects the expose-event 'after' the default
- * handler of the signal. If the tree has no children, then GTK
- * sends expose signal only 'before' the default signal handler.
- * The fix is to detect this case in 'event_after' and send the
- * expose event.
- */
- if (GTK.gtk_tree_model_iter_n_children (modelHandle, 0) == 0) {
- gtk_expose_event (widget, gdkEvent);
- }
- break;
- }
- }
- return super.gtk_event_after (widget, gdkEvent);
-}
-
void drawInheritedBackground (long /*int*/ eventPtr, long /*int*/ cairo) {
if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
Control control = findBackgroundControl ();
@@ -2227,13 +2207,6 @@ long /*int*/ gtk_draw (long /*int*/ widget, long /*int*/ cairo) {
}
@Override
-long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) {
- if ((state & OBSCURED) != 0) return 0;
- drawInheritedBackground (eventPtr, 0);
- return super.gtk_expose_event (widget, eventPtr);
-}
-
-@Override
long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) {
long /*int*/ window = GDK.GDK_EVENT_WINDOW (event);
if (window != GTK.gtk_tree_view_get_bin_window (handle)) return 0;
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 cc5169c895..62013e7928 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
@@ -1644,13 +1644,6 @@ long /*int*/ gtk_draw (long /*int*/ widget, long /*int*/ cairo) {
}
@Override
-long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ event) {
- if ((state & OBSCURED) != 0) return 0;
- long /*int*/ result = super.gtk_expose_event (widget, event);
- return result;
-}
-
-@Override
long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) {
fixIM ();
return super.gtk_focus_out_event (widget, event);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
index 5b6f830ff3..048e500063 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
@@ -527,13 +527,6 @@ long /*int*/ gtk_draw (long /*int*/ widget, long /*int*/ cairo) {
}
@Override
-long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) {
- if ((state & OBSCURED) != 0) return 0;
- drawTooltip (0);
- return 0;
-}
-
-@Override
long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) {
Point point = getLocation ();
int x = point.x;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index 0f319fea39..33d6a30dde 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -2222,26 +2222,6 @@ long /*int*/ gtk_changed (long /*int*/ widget) {
}
@Override
-long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) {
- switch (GDK.GDK_EVENT_TYPE (gdkEvent)) {
- case GDK.GDK_EXPOSE: {
- /*
- * Bug in GTK. SWT connects the expose-event 'after' the default
- * handler of the signal. If the tree has no children, then GTK
- * sends expose signal only 'before' the default signal handler.
- * The fix is to detect this case in 'event_after' and send the
- * expose event.
- */
- if (GTK.gtk_tree_model_iter_n_children (modelHandle, 0) == 0) {
- gtk_expose_event (widget, gdkEvent);
- }
- break;
- }
- }
- return super.gtk_event_after (widget, gdkEvent);
-}
-
-@Override
long /*int*/ gtk_expand_collapse_cursor_row (long /*int*/ widget, long /*int*/ logical, long /*int*/ expand, long /*int*/ open_all) {
// FIXME - this flag is never cleared. It should be cleared when the expand all operation completes.
if (expand != 0 && open_all != 0) expandAll = true;
@@ -2308,13 +2288,6 @@ long /*int*/ gtk_draw (long /*int*/ widget, long /*int*/ cairo) {
}
@Override
-long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) {
- if ((state & OBSCURED) != 0) return 0;
- drawInheritedBackground (eventPtr, 0);
- return super.gtk_expose_event (widget, eventPtr);
-}
-
-@Override
long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) {
long /*int*/ window = GDK.GDK_EVENT_WINDOW (event);
if (window != GTK.gtk_tree_view_get_bin_window (handle)) return 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
index 92902298dd..74e6d50ddb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
@@ -745,10 +745,6 @@ long /*int*/ gtk_draw (long /*int*/ widget, long /*int*/ cairo) {
return 0;
}
-long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ event) {
- return 0;
-}
-
long /*int*/ gtk_focus (long /*int*/ widget, long /*int*/ event) {
return 0;
}

Back to the top