FLTK logo

Re: [fltk.coredev] Gesture progress for 1.4?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Gesture progress for 1.4? Albrecht Schlosser Oct 10, 2021  
 
Progress report:

On 10/10/21 3:17 PM Albrecht Schlosser wrote:
On 10/9/21 10:58 PM Albrecht Schlosser wrote:
On 10/9/21 7:22 AM Rob McDonald wrote:
Thanks to Albrecht's direction, I parroted this commit by Matthias Melcher to add support for a couple other MacOS gestures, two-finger rotate and two-finger scroll.  I can add three finger swype, but my application does not need it, so I'll hold off to see how this is received first.

Changes pushed up here:


Thanks, I took a quick look ... looks good, thank you very much!

I still need to test it though.

Unfortunately I can't test it. My MacBook Air doesn't generate gesture events on the built-in touchpad (trackpad), I don't have an external tablet device for testing, and the MacBook Air doesn't have a touchscreen. :-(

Sorry, that statement above was an error. Testing with the built-in touchpad works fine. :-(

I can now see the events and proceed...

One issue I noticed so far is as I wrote before: using the touchpad with two-finger scroll gestures does no longer scroll in the FLTK test apps with the proposed macOS patch. Mouse wheel spinning does still scroll fine. This is because the touchpad gestures send the event "FL_SCROLL_GESTURE" which is unknown/ignored rather than sending "FL_MOUSEWHEEL" which would do the scrolling in, for instance, Fl_Text_Display in test/editor.

This is something we need to find a solution for (backwards compatibility).

The next part would be to create a suitable cross-platform FLTK event system that is able to provide the user with compatible events on all platforms.

To clarify the above statement: before we can develop cross-platform events for multi-touch gestures we need to investigate what the different platforms offer. AFAICT the Windows and macOS platforms are slightly different (Linux not yet investigated).

We need a specification that can be used for all platforms. As I wrote before, the events, types, variables and values (units, magnitude, etc.) should be as close as possible on all supported platforms.

So far I can imagine two generally different approaches:

(1) We define only one FL_MULTI_TOUCH[_GESTURE] (?) event (like Microsoft does) and send different event types (pan, zoom, rotate, ...) together with some corresponding variables (maybe a struct). The user code needs to handle only one additional event but needs to dispatch the different types.

(2) We define one FLTK event per multi-touch event type. This is like the early "FL_ZOOM_GESTURE" event and the proposed patch has been done with additional events: "FL_ZOOM_GESTURE", "FL_ROTATE_GESTURE", "FL_SCROLL_GESTURE", ... and maybe more in the future.

Currently I tend to prefer (1), but I'd like to read about others' opinions.

I don't know yet how Linux/Unix provides multi-touch events to the user program, i.e. FLTK.

This is under investigation but links to documentation (or even code snippets) would be appreciated.

I'll keep you updated.

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/3c3c2133-aec2-36b3-966b-c222e74fa012%40online.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.