Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
 All Classes Functions Variables Typedefs Enumerator Pages
osxPointingDeviceManager.h
1 /* -*- mode: c++ -*-
2  *
3  * pointing/input/osx/osxPointingDeviceManager.h --
4  *
5  * Initial software
6  * Authors: Izzatbek Mukhanov
7  * Copyright © Inria
8  *
9  * http://libpointing.org/
10  *
11  * This software may be used and distributed according to the terms of
12  * the GNU General Public License version 2 or any later version.
13  *
14  */
15 #ifndef osxPointingDeviceManager_h
16 #define osxPointingDeviceManager_h
17 
18 #include <pointing/input/PointingDeviceManager.h>
19 #include <IOKit/hid/IOHIDManager.h>
20 #include <pointing/utils/HIDReportParser.h>
21 
22 namespace pointing
23 {
32  {
33  friend class PointingDeviceManager;
34  friend class osxPointingDevice;
35 
36  // Add osx-specific data
37  struct osxPointingDeviceData : PointingDeviceData
38  {
39  HIDReportParser parser;
40  uint8_t report[64];
41  IOHIDDeviceRef devRef = nullptr;
42  virtual ~osxPointingDeviceData();
43  };
44 
45  void processMatching(PointingDeviceData *pdd, SystemPointingDevice *device);
46 
47  IOHIDManagerRef manager = nullptr;
48  static void AddDevice(void *context, IOReturn /*result*/, void *sender, IOHIDDeviceRef devRef);
49  static void RemoveDevice(void *context, IOReturn /*result*/, void *sender, IOHIDDeviceRef devRef);
50 
53 
54  static void hidReportCallback(void *context, IOReturn result, void *sender,
55  IOHIDReportType type, uint32_t reportID,
56  uint8_t *report, CFIndex reportLength) ;
57  };
58 }
59 
60 #endif
The PointingDeviceManager class is a helper class which enumerates the list of existing pointing devi...
Definition: PointingDeviceManager.h:87
The SystemPointingDevice class is used to represent Pointing Devices connected to the computer...
Definition: SystemPointingDevice.h:28
Definition: PointingDeviceManager.h:112
Definition: osxPointingDevice.h:23
The osxPointingDeviceManager class is the platform-specific subclass of the PointingDeviceManager cla...
Definition: osxPointingDeviceManager.h:31