You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.3 KiB
51 lines
1.3 KiB
#ifndef DEVICECONFIG_HPP
|
|
#define DEVICECONFIG_HPP
|
|
|
|
#include "appProfile.hpp"
|
|
#include "utils.hpp"
|
|
|
|
struct ApiDeviceConfig ;
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
// This represent the configuration associated with an input device (i.e. a mouse).
|
|
// AppProfile's are associated with specific DeviceConfig's, so that different devices can be used
|
|
// to control different applications.
|
|
|
|
class DeviceConfig
|
|
{
|
|
|
|
// constructors/destructor:
|
|
public:
|
|
DeviceConfig(
|
|
const ApiDeviceConfig* pDeviceConfig ,
|
|
const ApiAppProfile* pAppProfiles , int nAppProfiles ,
|
|
const ApiEvent* pEvents , int nEvents ,
|
|
const ApiAction* pActions , int nActions
|
|
) ;
|
|
DISABLE_COPY_ASSIGNMENT( DeviceConfig ) ;
|
|
|
|
// access methods:
|
|
public:
|
|
int deviceId() const ;
|
|
const int strokeHistoryResetInterval() const ;
|
|
const AppProfilePtrVector& appProfiles() const ;
|
|
|
|
// miscellaneous methods:
|
|
public:
|
|
void dumpDeviceConfig( std::ostream& os , const char* pPrefix="" ) const ;
|
|
|
|
// data members:
|
|
private:
|
|
int mDeviceId ;
|
|
int mStrokeHistoryResetInterval ;
|
|
AppProfilePtrVector mAppProfiles ;
|
|
|
|
} ;
|
|
|
|
// inserter
|
|
std::ostream& operator<<( std::ostream& , const DeviceConfig& ) ;
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
#endif // DEVICECONFIG_HPP
|
|
|