openframeworks / openframeworks/openFrameworks
Integrate Pointer event based system into the core.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
At the developer conference at YCAM a few years back we proposed that one way to improve the cross platform experience would be to move to a unified touch/mouse/pen/pointer input event system. An implementation of a W3C Pointer-events like UI input was suggested (See "Cross Platform Experience" https://docs.google.com/document/d/1GjgjQZCHTcOD3cT9OFSl0AZ1nhfYwwvxTl5L4OJE6qA/edit).
In the few years since, the W3C specification has lost and then picked up steam again and now seems to be the way forward on the web. It's exciting!
So here's the system in a single image:
https://github.com/w3c/pointerevents && https://w3c.github.io/pointerevents/

Fig. 1 A pointer is a hardware agnostic representation of input devices that can target a specific coordinate (or set of coordinates) on a screen.
In the years since, I have continued to update, refine and test ofxPointer an implementation (as close as possible) to the specification. It is a drop-in replacement for the existing mouse/touch system. In its current form, it simply repackages the existing of mouse / touch events and makes it much easier to write applications that work across platforms. For an example of its use in a desktop multitouch context, see https://github.com/bakercp/ofxTouchPad. To try it out on a mobile platform see the ios example. To try it on desktop with a mouse see the desktop example.
Integrating this into the core would be fairly straight forward. The only real modification needed would be to decide if we want to enable it at first by default (which would just require us to add event listeners).
If people are into this (I know a few are) I am happy to put together a PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the linked ofxPointer implementation and its desktop and iOS examples to understand the proposed pointer-event behavior. Then inspect how the core currently handles mouse and touch events; done would mean a unified pointer-event system is integrated and its default behavior is decided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop-dev, mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100