20 #include <pointing/utils/URI.h>
21 #include <pointing/input/SystemPointingDevice.h>
24 #include <IOKit/hid/IOHIDManager.h>
25 #define identifier IOHIDDeviceRef
29 #define identifier std::string
34 #define identifier HANDLE
37 #ifndef POINTINGDEVICEMANAGER_H
38 #define POINTINGDEVICEMANAGER_H
49 std::string vendor =
"???";
50 std::string product =
"???";
57 typedef std::set<PointingDeviceDescriptor> PointingDescriptorSet;
63 typedef PointingDescriptorSet::iterator PointingDescriptorIterator;
64 typedef PointingDescriptorSet::const_iterator PointingDescriptorConstIterator;
69 DeviceUpdateCallback callbackFunc;
71 CallbackInfo(DeviceUpdateCallback callbackFunc,
void *context)
72 :callbackFunc(callbackFunc),context(context) { }
92 typedef std::list<SystemPointingDevice *> PointingList;
99 PointingList pointingList;
102 std::map<identifier, PointingDeviceData *> devMap;
104 DeviceUpdateCallback callback = NULL;
109 PointingDescriptorSet descriptors;
111 std::set<CallbackInfo> callbackInfos;
118 PointingList candidates;
121 void convertAnyCandidates();
123 void matchCandidates();
139 void printDeviceInfo(PointingDeviceData *pdd,
bool add);
193 size_t size()
const {
return descriptors.size(); }
199 PointingDescriptorIterator begin() {
return descriptors.begin(); }
200 PointingDescriptorIterator end() {
return descriptors.end(); }
205 #endif // POINTINGDEVICEMANAGER_H
Definition: PointingDeviceManager.h:67
void registerDevice(identifier key, PointingDeviceData *pdd)
Called from subclasses.
Definition: PointingDeviceManager.cpp:225
The PointingDeviceManager class is a helper class which enumerates the list of existing pointing devi...
Definition: PointingDeviceManager.h:86
URI anyToSpecific(const URI &anyURI) const
anyToSpecific Converts a given URI into platform-specific unique URI
Definition: PointingDeviceManager.cpp:108
virtual void removePointingDevice(SystemPointingDevice *device)
Whenever there is a PointingDevice is created or deleted those methods are called internally from a S...
Definition: PointingDeviceManager.cpp:269
URI generalizeAny(const URI &anyURI) const
generalizeAny Remove all arguments from the given any: URI except for vendor vendor and product argum...
Definition: PointingDeviceManager.cpp:132
virtual void addPointingDevice(SystemPointingDevice *device)
Whenever there is a PointingDevice is created or deleted those methods are called internally from a S...
Definition: PointingDeviceManager.cpp:255
Definition: PointingDeviceManager.h:96
Definition: DummyPointingDevice.cpp:23
size_t size() const
size
Definition: PointingDeviceManager.h:193
The SystemPointingDevice class is used to represent Pointing Devices connected to the computer...
Definition: SystemPointingDevice.h:28
Definition: PointingDeviceManager.h:42
void removeDeviceUpdateCallback(DeviceUpdateCallback callback, void *context)
Removes the callback function which is called when a device was added or removed. ...
Definition: PointingDeviceManager.cpp:159
bool unregisterDevice(identifier)
Called from subclasses.
Definition: PointingDeviceManager.cpp:234
void addDeviceUpdateCallback(DeviceUpdateCallback callback, void *context)
Adds the callback function which is called when a device was added or removed.
Definition: PointingDeviceManager.cpp:153