Pointers
Input for universal apps is consolidated into a concept called a pointer. No, this isn’t a C++-style pointer, it’s an abstraction for three separate kinds of input: touch, mouse, and pen. This enables an app to use a single set of APIs for the things that touch, mouse, and pen have in common, which is quite a bit.
The pointer abstraction involves four main classes: PointerDevice, Pointer, PointerPoint, and PointerPointProperties. Figure 5.1 demonstrates their meaning and relationship. A single PC can (and often does) have multiple PointerDevices, each PointerDevice can support multiple Pointers (such as five fingers for touch), and each Pointer can generate a series of PointerPoints.
FIGURE 5.1 The four main pointer classes that consolidate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access