Patch: add ActionEvent and TextEvent handling to TextComponent peers
Thomas Fitzsimmons
fitzsim@redhat.com
Fri Jul 4 21:11:00 GMT 2003
Hello,
This patch adds functionality to GtkTextComponentPeer and
GtkTextFieldPeer so that TextField objects may react to ActionEvents and
TextComponents to TextEvents.
KeyEvent generation still needs more work, but it can be done as a
separate patch.
Please review/comment.
Thanks,
Tom
* gnu/java/awt/peer/gtk/GtkTextComponentPeer.java
(setCaretPosition, setEditable): Rely entirely on native
implementation.
(getArgs): Remove.
(postTextEvent): New method.
(handleEvent): New method.
* gnu/java/awt/peer/gtk/GtkTextFieldPeer.java (handleEvent): New
method.
* java/awt/event/ActionEvent.java (paramString): Fix formatting.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(keysym_to_awt_keycode): Fix range checks.
(generates_key_typed_event): New function.
(awt_event_handler): Post AWT_KEY_RELEASED events to event
queue.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c
(gtkInit): Store TextComponent's postTextEvent method ID.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c
(setText): Post TEXT_VALUE_CHANGED event to event queue.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: textcomp.diff
Type: text/x-patch
Size: 10859 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20030704/5a3f2cf2/attachment.bin>
More information about the Java-patches
mailing list