Rockbox Development > Feature Ideas
Gestures for Touchpad / Touchscreen targets
NarcoticV:
--- Quote from: monoid on September 11, 2013, 01:53:24 PM ---The gesture layer would "eat" all gesture related touch events and pass on only the rest of events to touch key layer.
This way gesture layer could be seamlessly integrated into Rockbox structure and switched on/off. And no code change would be needed in touch key layer.
The only problém, I see, might be, that some key events might be delayed (if gesture layer "waits" whether consequtive event comes or not...). One would have to try it in real life.
--- End quote ---
I agree. There will be some challenges with this: in the current implementation, the button code gets notified immediately when the finger comes down somewhere, and can do BUTTON_REPEAT and BUTTON_REL modifiers accordingly. This is a form of gesture detection on its own. To keep it consistent that touchpad gestures are detected by the gesture code and not the button code, that existing functionality should not be used for touchpad buttons: a "tap" gesture with coordinates from the gesture code should be directly translated into an action, skipping over the button code.
Downside is that there is some re-invention of wheels: the gesture code would detect button long/double presses and taps, bahaviour that is also already in the button code. I still think this is the best way though.
To see it a bit more clearly, I used mediocre powerpoint skills to create some proposals for the new file structure. See the included PDF.
I would go for 2 or 3. I prefer 3 actually, because the only difference between a touchpad and a touchscreen is that the touchscreen is mapped to the screen resolution (and needs calibration), and the touchpad isn't and doesn't. That, in my opinion, is too small a difference to justify an entire separate API with many very similar functions.
Implementing this can be quite easily split up into multiple patches, starting with restructuring the APIs.
What do you guys think?
--edit: there is a small mistake in the last slide (proposal 3): it says it's almost the same as proposal 1. I meant proposal 2. --
metaphys:
I'll also got for 2 or 3. I'm not sure about sparing file for case that seems to be the same but could bring slight differences later and need a rewrite....
Navigation
[0] Message Index
[*] Previous page
Go to full version