aboutsummaryrefslogtreecommitdiff
path: root/libjava/gnu/java
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@redhat.com>2003-08-05 18:04:09 +0000
committerThomas Fitzsimmons <fitzsim@gcc.gnu.org>2003-08-05 18:04:09 +0000
commitd0b8b6fbf6e961b01b13c0b3aacb9202ca209c1b (patch)
treecbcff4299691a1f97a60baf437371dc24fdd7022 /libjava/gnu/java
parentb3c3af2f63dac9ca424ea3c1a456ef689159d3ae (diff)
downloadgcc-d0b8b6fbf6e961b01b13c0b3aacb9202ca209c1b.zip
gcc-d0b8b6fbf6e961b01b13c0b3aacb9202ca209c1b.tar.gz
gcc-d0b8b6fbf6e961b01b13c0b3aacb9202ca209c1b.tar.bz2
GtkComponentPeer.java (postKeyEvent): Add keyLocation parameter.
2003-08-05 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/awt/peer/gtk/GtkComponentPeer.java (postKeyEvent): Add keyLocation parameter. * java/awt/event/KeyEvent.java (getKeyText): Fix "NumPad-" string. (paramString): Generate keyChar string according to keyChar, not keyCode. * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (state_to_awt_mods): Handle ALT key. (keyevent_state_to_awt_mods): New function. (get_first_keyval_from_keymap): New function. (keysym_to_awt_keycode): Get virtual key code from keymap. Handle missing VK_ values. (keysym_to_awt_keylocation): New function. (keyevent_to_awt_keychar): New function. (generates_key_typed_event): Handle non-text-component case. Handle GDK_KP_Delete and GDK_KP_Enter. (awt_event_handler): Call new functions to get postKeyEvent parameters. * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c (gtkInit): Update postKeyEvent method signature. * jni/gtk-peer/gtkpeer.h: Add KEY_LOCATION defines. Add missing VK_ defines. From-SVN: r70178
Diffstat (limited to 'libjava/gnu/java')
-rw-r--r--libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java10
-rw-r--r--libjava/gnu/java/awt/peer/gtk/GtkTextComponentPeer.java3
2 files changed, 7 insertions, 6 deletions
diff --git a/libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java b/libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java
index 43ada95..ac092c8 100644
--- a/libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java
+++ b/libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java
@@ -350,13 +350,13 @@ public class GtkComponentPeer extends GtkGenericPeer
new Rectangle (x, y, width, height)));
}
- protected void postKeyEvent (int id, long when, int mods,
- int keyCode, char keyChar)
+ protected void postKeyEvent (int id, long when, int mods,
+ int keyCode, char keyChar, int keyLocation)
{
- q.postEvent (new KeyEvent (awtComponent, id, when, mods,
- keyCode, keyChar));
+ q.postEvent (new KeyEvent (awtComponent, id, when, mods,
+ keyCode, keyChar, keyLocation));
}
-
+
protected void postFocusEvent (int id, boolean temporary)
{
q.postEvent (new FocusEvent (awtComponent, id, temporary));
diff --git a/libjava/gnu/java/awt/peer/gtk/GtkTextComponentPeer.java b/libjava/gnu/java/awt/peer/gtk/GtkTextComponentPeer.java
index 7439f20..b3199d8 100644
--- a/libjava/gnu/java/awt/peer/gtk/GtkTextComponentPeer.java
+++ b/libjava/gnu/java/awt/peer/gtk/GtkTextComponentPeer.java
@@ -55,8 +55,9 @@ public class GtkTextComponentPeer extends GtkComponentPeer
setText (tc.getText ());
}
-
+
public native void connectHooks ();
+
public native int getCaretPosition ();
public native void setCaretPosition (int pos);
public native int getSelectionStart ();