Login  Register

Re: The Current State Of JOGL/SWT Integration

Posted by Sven Gothel on Oct 03, 2012; 11:08am
URL: https://forum.jogamp.org/The-Current-State-Of-JOGL-SWT-Integration-tp4026329p4026336.html

On 10/03/2012 01:25 AM, rhatcher [via jogamp] wrote:
> As always, thanks for the response.
>
> I'll give NewtCanvasSWT a try.
Great.

>
> One additional area related to SWT integration is whether there are any
> changes coming for mouse and keyboard event handling.  As we know one of the
> most heinous features of JOGL 1.1.1a was its tight coupling to the AWT.
>  JogAmp JOGL has taken some nice steps to divorce OpenGL code from having to
> know too much about the platform on which it's sitting, and along these lines
> on the AWT side of the fence there are facilities to repackage AWT mouse and
> keyboard events into corresponding newt events (e.g. AWTKeyAdapter).  I can
> always get at the SWT events as an ordinary SWT event listener, but do you
> have any plans for a similar generalization of SWT events into newt events
> (SWTKeyAdapter and so forth)?  Or... maybe it's in there and I'm not seeing
> it, which happens more often than I would like to admit :-/.
The native events being delivered by using NewtCanvasSWT
are NEWT events, since you use the native NEWT window which does
receive the native events.
So key/mouse events are covered here.

NewtCanvasAWT requires some AWT -> NEWT event dispatching due to
windowing managment etc.
NewtCanvasSWT does not need them, AFAIK.

However, ofc we like having an SWT[*]Adapter in com.jogamp.newt.event.swt.*,
similar to AWT[*]Adapter and it's AWTNewtEventFactory.

If you or others like to copy the AWT* classes
and make proper SWT* versions out of it - it would be more than welcome
for SWT users - I am sure.

I personally don't use SWT, nor clients here - and since I am currently
focusing on a few other issues, I cannot do it myself right now.
However, I will help and assist if there are any questions etc.
Ofc .. we will merge your code.

>
> At this point I'm just wanting to get clear on the project's intentions; it
> may have some bearing on how we juggle some existing code around as we
> continue the switchover to E4/SWT.

Well, intentions are to offer seamless integration of JOGL to any
windowing toolkit, native or not. Hence the SWT enhancements etc.
Only the lack of available time is able to stop us sometimes :)

Again: If you are willing to contribute, I am sure you won't be 'left alone in
the dark' :)

~Sven



signature.asc (907 bytes) Download Attachment