mirror of
https://github.com/AxioDL/boo.git
synced 2025-05-16 20:31:29 +00:00
Alphabetizes includes and resolves quite a few instances of indirect inclusions, making the requirements of several interfaces explicit. This also trims out includes that aren't actually necessary (likely due to changes in the API over time).
31 lines
769 B
C++
31 lines
769 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
|
|
#include "boo/inputdev/DeviceBase.hpp"
|
|
#include "boo/inputdev/HIDParser.hpp"
|
|
|
|
namespace boo {
|
|
|
|
struct IGenericPadCallback {
|
|
virtual void controllerConnected() {}
|
|
virtual void controllerDisconnected() {}
|
|
virtual void valueUpdate(const HIDMainItem& item, int32_t value) {}
|
|
};
|
|
|
|
class GenericPad final : public TDeviceBase<IGenericPadCallback> {
|
|
HIDParser m_parser;
|
|
|
|
public:
|
|
GenericPad(DeviceToken* token);
|
|
~GenericPad() override;
|
|
|
|
void deviceDisconnected() override;
|
|
void initialCycle() override;
|
|
void receivedHIDReport(const uint8_t* data, size_t length, HIDReportType tp, uint32_t message) override;
|
|
|
|
void enumerateValues(const std::function<bool(const HIDMainItem& item)>& valueCB) const;
|
|
};
|
|
|
|
} // namespace boo
|