Patch: More TextComponent fixes

Thomas Fitzsimmons fitzsim@redhat.com
Fri Jul 11 00:54:00 GMT 2003


Hello,

This patch improves KeyEvent generation, and fixes some problems with
the AWT TextComponents.  With this patch, the text components can listen
for key events, including KEY_TYPED events.

It made most sense to trigger KEY_TYPED events in response to the text
widgets' IMContext "commit" signals.  Doing so allows the user to input
any Unicode character using any input method available on the widget. 
The downside to this approach is that it discards some event
information.  However, that information is likely not very useful in
general.

Please review and comment.

Thanks,
Tom

2003-07-10  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkTextComponentPeer.java
	(connectHooks): New method.
	(handleEvent): Remove.
	* gnu/java/awt/peer/gtk/GtkTextFieldPeer.java
	(createHooks): Remove declaration.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
	(generates_key_typed_event): Change to handle only certain
	keyvals.
	(awt_event_handler): Add special handling for GtkTextView.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c
	(textcomponent_commit_cb): New function.
	(textcomponent_changed_cb): Likewise.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c
	(connectHooks): Wrap in ifdef 0.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: textcomp.diff
Type: text/x-patch
Size: 12324 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20030711/d604ff60/attachment.bin>


More information about the Java-patches mailing list