Povilas from linked article here. The design of how libinput handles gestures is exactly like you describe - the application will get a Start event when a gesture is identified, an Update event when finger position change and an End event when the gesture completes. This will allow to implement the macOS gestures in the end. There are more complex details of course, but the basic point stands.