<AWT Dev> AWT event to XEvent
mitulagrawal at ge.com
Mon Feb 1 00:31:48 PST 2010
Have been working on JAVA for quite some time and have been using the Nabble
forums quite frequently for any JAVA related issues. Although this time
around for the issue I have in hand am not sure if it is possible to solve
or not. Am actually working on an application for which part of its UI is
developed in C++ and uses Motif while part of the UI is developed in JAVA
which uses the standard AWT package. CORBA is used to communicate between
C++ and JAVA. Now in a particular case I am generating an AWT event on the
JAVA UI and need to capture that as an XEvent on the C++ side for some
reason. Both these UI have there individual event handlers i.e.
ActionListeners on the JAVA side and XEventLoop on the C++ side to handle
the events occuring on them individually. But in this particular case I want
to capture an AWT event by the XEventLoop on the C++ side.
Am sure this is a not a very peculiar case and there are instances where an
AWT Event needs to be converted to an native event. Have come across a
couple of ideas for doing the same:
1) Re-Design my XEventLoop to listen/process the AWT events as well and
register the Java application as an observable for the XEventLoop. The
problem with this approach is that am not sure if that is possible (dont
have so much experience in working with XEvents) and even if it is possible
this will require re-designing the entire XEvent mechanism which I hate to
2) Somehow convert the AWT event to the native XEVent since an AWT event is
generated by XEvent so I believe converting it back to an XEvent should be
possible. Again am not sure if this is the right thing to do since I may
loose some information in doing so and am also not aware of any direct way
of doing this.
This task seems to be very challenging and have spent a lot of time on this
but am not able to come up with a concrete solution. Hope to get some help
from you all.
Any help in this regard is appreciated.
View this message in context: http://old.nabble.com/AWT-event-to-XEvent-tp27401020p27401020.html
Sent from the OpenJDK AWT Development mailing list archive at Nabble.com.
More information about the awt-dev