Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Shingarov2002-02-14 05:05:09 +0000
committerBoris Shingarov2002-02-14 05:05:09 +0000
commit11b9498eacf465f18eae7753f5f1032ae4915049 (patch)
tree27226d452d4fa559c07bf719172699395fe9441d
parent03db710b6a31cff67037ef13ba33832d99700aa9 (diff)
downloadeclipse.platform.swt-11b9498eacf465f18eae7753f5f1032ae4915049.tar.gz
eclipse.platform.swt-11b9498eacf465f18eae7753f5f1032ae4915049.tar.xz
eclipse.platform.swt-11b9498eacf465f18eae7753f5f1032ae4915049.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt-gtkwidget.c6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt-gtkwindow.c24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt.c42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBox.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkObject.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWidget.java27
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt-gtkwidget.c6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt-gtkwindow.c24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt.c42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkBox.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkObject.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkWidget.java27
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/OS.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk1x/org/eclipse/swt/widgets/Button.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk1x/org/eclipse/swt/widgets/Widget.java6
18 files changed, 126 insertions, 160 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt-gtkwidget.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt-gtkwidget.c
index 2c08830777..a263233c88 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt-gtkwidget.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt-gtkwidget.c
@@ -91,6 +91,12 @@ JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_gtk_OS_GTK_1WIDGET_1REA
return (jboolean) GTK_WIDGET_REALISED((GtkWidget*)wid);
}
+JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_gtk_OS_GTK_1WIDGET_1VISIBLE
+ (JNIEnv *env, jclass that, jint wid)
+{
+ return (jboolean) GTK_WIDGET_VISIBLE((GtkWidget*)wid);
+}
+
/* Functions */
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1widget_1destroy
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt-gtkwindow.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt-gtkwindow.c
index 7867b4f882..14b41a8943 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt-gtkwindow.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt-gtkwindow.c
@@ -59,6 +59,30 @@ JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1window_1set_1re
gtk_window_set_resizable((GtkWindow*)window, (gboolean)resizable);
}
+JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1window_1get_1position
+ (JNIEnv *env, jclass that, jint window, jintArray px, jintArray py)
+{
+ jint *px1 = NULL;
+ jint *py1 = NULL;
+ if (px) px1 = (*env)->GetIntArrayElements(env, px, NULL);
+ if (py) py1 = (*env)->GetIntArrayElements(env, py, NULL);
+ gtk_window_get_position((GtkWindow*)window, (gint*)px1, (gint*)py1);
+ if (px) (*env)->ReleaseByteArrayElements(env, px, px1, 0);
+ if (py) (*env)->ReleaseByteArrayElements(env, py, py1, 0);
+}
+
+JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1window_1get_1size
+ (JNIEnv *env, jclass that, jint window, jintArray px, jintArray py)
+{
+ jint *px1 = NULL;
+ jint *py1 = NULL;
+ if (px) px1 = (*env)->GetIntArrayElements(env, px, NULL);
+ if (py) py1 = (*env)->GetIntArrayElements(env, py, NULL);
+ gtk_window_get_size((GtkWindow*)window, (gint*)px1, (gint*)py1);
+ if (px) (*env)->ReleaseByteArrayElements(env, px, px1, 0);
+ if (py) (*env)->ReleaseByteArrayElements(env, py, py1, 0);
+}
+
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1window_1move
(JNIEnv *env, jclass that, jint window, jint x, jint y)
{
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt.c
index 3870646c6a..f2bde57ce5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt.c
@@ -22,19 +22,13 @@
#include <assert.h>
-
/*
- * Class: org_eclipse_swt_internal_gtk_OS
- * Method: gtk_check_version
- * Signature:
+ * General
*/
+
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1check_1version
(JNIEnv *env, jclass that, jint required_major, jint required_minor, jint required_micro)
{
-#ifdef DEBUG_CALL_PRINTS
- fprintf(stderr, "gtk_check_version");
-#endif
-
return (jint)gtk_check_version(required_major, required_minor, required_micro);
}
@@ -109,25 +103,33 @@ JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1main_1quit
gtk_main_quit();
}
-/*
- * Class: org_eclipse_swt_internal_gtk_OS
- * Method: gtk_main_iteration
- * Signature:
- */
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1main_1iteration
(JNIEnv *env, jclass that)
{
-#ifdef DEBUG_CALL_PRINTS
- fprintf(stderr, "gtk_main_iteration");
-#endif
-
return (jint)gtk_main_iteration();
}
+
/*
- * Class: org_eclipse_swt_internal_gtk_OS
- * Method: gtk_grab_add
- * Signature:
+ * GLIB
+ */
+
+JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_g_1signal_1connect
+ (JNIEnv *env, jclass that, jint instance, jstring signel, jint handler, jint data)
+{
+ jbyte *signal1;
+ signal1 = (*env)->GetStringUTFChars(env, signal, NULL);
+ g_signal_connect(instance, signal, handler, data);
+ (*env)->ReleaseStringUTFChars(env, signal, signal1);
+}
+
+
+
+
+
+
+/*
+ * Others - FIXME: please classify
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1grab_1add
(JNIEnv *env, jclass that, jint widget)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBox.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBox.java
deleted file mode 100644
index 48f8364363..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBox.java
+++ /dev/null
@@ -1,3 +0,0 @@
-package org.eclipse.swt.internal.gtk;
-
-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkObject.java
deleted file mode 100644
index cad5c7d122..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkObject.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkObject {
- public int klass;
- public int flags;
- public int ref_count;
- public int object_data;
-
- private GtkObject() {}
- public GtkObject(int ptr) {
- OS.memmove(this, ptr);
- }
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWidget.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWidget.java
deleted file mode 100644
index 965e7c3bda..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWidget.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkWidget {
- public short alloc_x;
- public short alloc_y;
- public short alloc_width;
- public short alloc_height;
-
- private GtkWidget() {}
- public GtkWidget(int ptr) {
- OS.memmove(this, ptr);
-
- }
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index be5881c0dc..10d9f90149 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -231,6 +231,11 @@ public class OS {
* Native methods.
*/
+/* GLIB */
+
+public static final native void g_signal_connect (int handle, String eventName, int proc, int swtEvent);
+public static final native void g_signal_connect_after (int handle, String eventName, int proc, int swtEvent);
+
/*
* Main loop
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt-gtkwidget.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt-gtkwidget.c
index 2c08830777..a263233c88 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt-gtkwidget.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt-gtkwidget.c
@@ -91,6 +91,12 @@ JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_gtk_OS_GTK_1WIDGET_1REA
return (jboolean) GTK_WIDGET_REALISED((GtkWidget*)wid);
}
+JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_gtk_OS_GTK_1WIDGET_1VISIBLE
+ (JNIEnv *env, jclass that, jint wid)
+{
+ return (jboolean) GTK_WIDGET_VISIBLE((GtkWidget*)wid);
+}
+
/* Functions */
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1widget_1destroy
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt-gtkwindow.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt-gtkwindow.c
index 7867b4f882..14b41a8943 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt-gtkwindow.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt-gtkwindow.c
@@ -59,6 +59,30 @@ JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1window_1set_1re
gtk_window_set_resizable((GtkWindow*)window, (gboolean)resizable);
}
+JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1window_1get_1position
+ (JNIEnv *env, jclass that, jint window, jintArray px, jintArray py)
+{
+ jint *px1 = NULL;
+ jint *py1 = NULL;
+ if (px) px1 = (*env)->GetIntArrayElements(env, px, NULL);
+ if (py) py1 = (*env)->GetIntArrayElements(env, py, NULL);
+ gtk_window_get_position((GtkWindow*)window, (gint*)px1, (gint*)py1);
+ if (px) (*env)->ReleaseByteArrayElements(env, px, px1, 0);
+ if (py) (*env)->ReleaseByteArrayElements(env, py, py1, 0);
+}
+
+JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1window_1get_1size
+ (JNIEnv *env, jclass that, jint window, jintArray px, jintArray py)
+{
+ jint *px1 = NULL;
+ jint *py1 = NULL;
+ if (px) px1 = (*env)->GetIntArrayElements(env, px, NULL);
+ if (py) py1 = (*env)->GetIntArrayElements(env, py, NULL);
+ gtk_window_get_size((GtkWindow*)window, (gint*)px1, (gint*)py1);
+ if (px) (*env)->ReleaseByteArrayElements(env, px, px1, 0);
+ if (py) (*env)->ReleaseByteArrayElements(env, py, py1, 0);
+}
+
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1window_1move
(JNIEnv *env, jclass that, jint window, jint x, jint y)
{
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt.c
index 3870646c6a..f2bde57ce5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/library/swt.c
@@ -22,19 +22,13 @@
#include <assert.h>
-
/*
- * Class: org_eclipse_swt_internal_gtk_OS
- * Method: gtk_check_version
- * Signature:
+ * General
*/
+
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1check_1version
(JNIEnv *env, jclass that, jint required_major, jint required_minor, jint required_micro)
{
-#ifdef DEBUG_CALL_PRINTS
- fprintf(stderr, "gtk_check_version");
-#endif
-
return (jint)gtk_check_version(required_major, required_minor, required_micro);
}
@@ -109,25 +103,33 @@ JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1main_1quit
gtk_main_quit();
}
-/*
- * Class: org_eclipse_swt_internal_gtk_OS
- * Method: gtk_main_iteration
- * Signature:
- */
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1main_1iteration
(JNIEnv *env, jclass that)
{
-#ifdef DEBUG_CALL_PRINTS
- fprintf(stderr, "gtk_main_iteration");
-#endif
-
return (jint)gtk_main_iteration();
}
+
/*
- * Class: org_eclipse_swt_internal_gtk_OS
- * Method: gtk_grab_add
- * Signature:
+ * GLIB
+ */
+
+JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_g_1signal_1connect
+ (JNIEnv *env, jclass that, jint instance, jstring signel, jint handler, jint data)
+{
+ jbyte *signal1;
+ signal1 = (*env)->GetStringUTFChars(env, signal, NULL);
+ g_signal_connect(instance, signal, handler, data);
+ (*env)->ReleaseStringUTFChars(env, signal, signal1);
+}
+
+
+
+
+
+
+/*
+ * Others - FIXME: please classify
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_gtk_OS_gtk_1grab_1add
(JNIEnv *env, jclass that, jint widget)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkBox.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkBox.java
deleted file mode 100644
index 48f8364363..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkBox.java
+++ /dev/null
@@ -1,3 +0,0 @@
-package org.eclipse.swt.internal.gtk;
-
-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkObject.java
deleted file mode 100644
index cad5c7d122..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkObject.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkObject {
- public int klass;
- public int flags;
- public int ref_count;
- public int object_data;
-
- private GtkObject() {}
- public GtkObject(int ptr) {
- OS.memmove(this, ptr);
- }
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkWidget.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkWidget.java
deleted file mode 100644
index 965e7c3bda..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/GtkWidget.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkWidget {
- public short alloc_x;
- public short alloc_y;
- public short alloc_width;
- public short alloc_height;
-
- private GtkWidget() {}
- public GtkWidget(int ptr) {
- OS.memmove(this, ptr);
-
- }
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/OS.java
index be5881c0dc..10d9f90149 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk1x/org/eclipse/swt/internal/gtk/OS.java
@@ -231,6 +231,11 @@ public class OS {
* Native methods.
*/
+/* GLIB */
+
+public static final native void g_signal_connect (int handle, String eventName, int proc, int swtEvent);
+public static final native void g_signal_connect_after (int handle, String eventName, int proc, int swtEvent);
+
/*
* Main loop
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
index 5b2ed54401..fa1f91cb0d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
@@ -145,8 +145,8 @@ void hookEvents () {
OS.gtk_widget_add_events (boxHandle, mask);
signal_connect_after (boxHandle, "motion_notify_event", SWT.MouseMove, 3);
signal_connect_after (boxHandle, "key_release_event", SWT.KeyUp, 3);
- }
- signal_connect (handle, "clicked", SWT.Selection, 2);*/
+ }*/
+ signal_connect (handle, "clicked", SWT.Selection, 2);
}
void createWidget (int index) {
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 7ee66f7080..b11763fb1f 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
@@ -550,6 +550,7 @@ void postEvent (int eventType, Event event) {
}
int processEvent (int eventNumber, int int0, int int1, int int2) {
+ System.out.println("event: "+eventNumber);
switch (eventNumber) {
case SWT.Arm: return processArm (int0, int1, int2);
case SWT.Collapse: return processCollapse (int0, int1, int2);
@@ -680,7 +681,6 @@ int processVerify (int int0, int int1, int int2) {
}
void signal_connect (int handle, String eventName, int swtEvent, int numArgs) {
- byte [] buffer = Converter.wcsToMbcs (null, eventName, true);
int proc=0;
switch (numArgs) {
case 2: proc=getDisplay().windowProc2; break;
@@ -689,7 +689,9 @@ void signal_connect (int handle, String eventName, int swtEvent, int numArgs) {
case 5: proc=getDisplay().windowProc5; break;
default: error(SWT.ERROR_INVALID_ARGUMENT);
}
- OS.gtk_signal_connect (handle, buffer, proc, swtEvent);
+ /*OS.g_signal_connect (handle, eventName, proc, swtEvent);*/
+ byte [] buffer = Converter.wcsToMbcs (null, eventName, true);
+ OS.gtk_signal_connect(handle, buffer, proc, swtEvent);
}
void signal_connect_after (int handle, String eventName, int swtEvent, int numArgs) {
byte [] buffer = Converter.wcsToMbcs (null, eventName, true);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk1x/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk1x/org/eclipse/swt/widgets/Button.java
index 5b2ed54401..fa1f91cb0d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk1x/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk1x/org/eclipse/swt/widgets/Button.java
@@ -145,8 +145,8 @@ void hookEvents () {
OS.gtk_widget_add_events (boxHandle, mask);
signal_connect_after (boxHandle, "motion_notify_event", SWT.MouseMove, 3);
signal_connect_after (boxHandle, "key_release_event", SWT.KeyUp, 3);
- }
- signal_connect (handle, "clicked", SWT.Selection, 2);*/
+ }*/
+ signal_connect (handle, "clicked", SWT.Selection, 2);
}
void createWidget (int index) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk1x/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk1x/org/eclipse/swt/widgets/Widget.java
index 7ee66f7080..b11763fb1f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk1x/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk1x/org/eclipse/swt/widgets/Widget.java
@@ -550,6 +550,7 @@ void postEvent (int eventType, Event event) {
}
int processEvent (int eventNumber, int int0, int int1, int int2) {
+ System.out.println("event: "+eventNumber);
switch (eventNumber) {
case SWT.Arm: return processArm (int0, int1, int2);
case SWT.Collapse: return processCollapse (int0, int1, int2);
@@ -680,7 +681,6 @@ int processVerify (int int0, int int1, int int2) {
}
void signal_connect (int handle, String eventName, int swtEvent, int numArgs) {
- byte [] buffer = Converter.wcsToMbcs (null, eventName, true);
int proc=0;
switch (numArgs) {
case 2: proc=getDisplay().windowProc2; break;
@@ -689,7 +689,9 @@ void signal_connect (int handle, String eventName, int swtEvent, int numArgs) {
case 5: proc=getDisplay().windowProc5; break;
default: error(SWT.ERROR_INVALID_ARGUMENT);
}
- OS.gtk_signal_connect (handle, buffer, proc, swtEvent);
+ /*OS.g_signal_connect (handle, eventName, proc, swtEvent);*/
+ byte [] buffer = Converter.wcsToMbcs (null, eventName, true);
+ OS.gtk_signal_connect(handle, buffer, proc, swtEvent);
}
void signal_connect_after (int handle, String eventName, int swtEvent, int numArgs) {
byte [] buffer = Converter.wcsToMbcs (null, eventName, true);

Back to the top