diff options
author | Ken Moore <ken@ixsystems.com> | 2016-12-06 14:34:27 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2016-12-06 14:34:27 -0500 |
commit | c6e0fe646e78a6aff588277445fde9752f886a71 (patch) | |
tree | 58b24f5dd169e89a14a111e86254007c8d68c788 /src-qt5/core/libLumina/LInputDevice.h | |
parent | Commit a couple tweaks for lumina-fm - trying to get the drag and drop highli... (diff) | |
download | lumina-c6e0fe646e78a6aff588277445fde9752f886a71.tar.gz lumina-c6e0fe646e78a6aff588277445fde9752f886a71.tar.bz2 lumina-c6e0fe646e78a6aff588277445fde9752f886a71.zip |
Get the new input device routines almost ready. Still have the page disabled in lumina-config right now, but it is coming along nicely.
Diffstat (limited to 'src-qt5/core/libLumina/LInputDevice.h')
-rw-r--r-- | src-qt5/core/libLumina/LInputDevice.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src-qt5/core/libLumina/LInputDevice.h b/src-qt5/core/libLumina/LInputDevice.h index f7a4713c..82dee4fd 100644 --- a/src-qt5/core/libLumina/LInputDevice.h +++ b/src-qt5/core/libLumina/LInputDevice.h @@ -18,6 +18,14 @@ #include <xcb/xproto.h> +//Internal data structure for storing the property information +struct propData{ + int id; + QString name; + QVariant value; + xcb_atom_t atom; +}; + class LInputDevice{ public: LInputDevice(unsigned int id, unsigned int type); //don't use this directly - use the "listDevices()" function instead @@ -31,16 +39,22 @@ public: bool isExtension(); //Property Management - QStringList listProperties(); - QVariant propertyValue(QString prop); + QList<int> listProperties(); + QString propertyName(int prop); + QVariant getPropertyValue(int prop); + bool setPropertyValue(int prop, QVariant value); private: - unsigned int devID; //device ID number - assigned at class creation - unsigned int devType; //device "use" identifier - assigned at class creation - QHash<QString, xcb_atom_t> devProps; //Known device properties <name, atom> + unsigned int devID; //device ID number - assigned at class creation + unsigned int devType; //device "use" identifier - assigned at class creation + QHash<int, propData> devProps; //Known device properties <id#, properties struct> + + void getProperties(); + void readProperties(); + QVariant valueToVariant(QString value); //xinput output to QVariant + QString variantToString(QVariant value); //QVariant to xinput input string - void getProperties(); - //QString devName; //device name - use this for cross-session management (id #'s can get changed every session) + //QString devName; //device name - use this for cross-session management (id #'s can get changed every session) }; //Static functions for overall management |