Hi, On Thu, Aug 25, 2022 at 12:16 PM Povilas Kanapickas <povi...@radix.lt> wrote:
> Hello, > > I would like to implement support for touchpad gesture handling to > LibreOffice. This is useful e.g. for zooming views using two-finger > pinch touchpad gesture or rotating objects using two-finger rotate gesture. > > I have implemented this functionality in GIMP and would like to do the > same for LibreOffice. In LibreOffice case the implementation will be > more complex, as there are more backends than just GTK, but this will > just require more work. > > There is a proof of concept implementation that wires touchpad gestures > on GTK to the ViewShell widget. As a result it's possible to use > touchpad pinch gesture to zoom in-out the main slide in Impress. > > https://gerrit.libreoffice.org/c/core/+/138791/1 (note that > implementation is split across 5 changes in the chain). > > Please let me know what do you think about this problem and the proof of > concept solution. > Looks great. The reason why GestureEvent is called so generally is that there should only be one common gesture event for all types of gestures - even if that would also mean it would have all the member variables of all the gestures - for simplicity. But I guess that approach is also ok... > I would like to eventually add touchpad gesture support to all UI > elements of LibreOffice where that makes sense. > I have experimented with panning support years ago - maybe some code pointers will be useful. https://pastebin.com/2xHfSe8B > Cheers, > Povilas > Tomaž