Panda3D
ioKitInputDeviceManager.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file ioKitInputDeviceManager.h
10  * @author rdb
11  * @date 2018-02-04
12  */
13 
14 #ifndef IOKITINPUTDEVICEMANAGER_H
15 #define IOKITINPUTDEVICEMANAGER_H
16 
17 #include "inputDeviceManager.h"
18 
19 #if defined(__APPLE__) && !defined(CPPPARSER)
20 #include <IOKit/hid/IOHIDManager.h>
21 
22 /**
23  * The macOS implementation of InputDeviceManager.
24  */
25 class EXPCL_PANDA_DEVICE IOKitInputDeviceManager final : public InputDeviceManager {
26 protected:
27  IOKitInputDeviceManager();
28  ~IOKitInputDeviceManager();
29 
30 protected:
31  IOHIDManagerRef _hid_manager;
32 
33  static void on_match_device(void *ctx, IOReturn result, void *sender, IOHIDDeviceRef device);
34 
35  friend class InputDeviceManager;
36 };
37 
38 #endif
39 
40 #endif
This class keeps track of all the devices on a system, and sends out events when a device has been ho...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.