diff options
author | Ken Moore <ken@ixsystems.com> | 2016-11-17 10:38:53 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2016-11-17 10:38:53 -0500 |
commit | c8478cd010f7c6056a48e0cca9d4c0359329297a (patch) | |
tree | 8d65e16936375f8594112e8ea0719bd783a15861 /src-qt5/core/libLumina/LInputDevice.h | |
parent | Bump the copyright year on the LuminaX11 files. (diff) | |
download | lumina-c8478cd010f7c6056a48e0cca9d4c0359329297a.tar.gz lumina-c8478cd010f7c6056a48e0cca9d4c0359329297a.tar.bz2 lumina-c8478cd010f7c6056a48e0cca9d4c0359329297a.zip |
Add in the beginnings of a new backend class for managing input devices (LInputDevice):
This uses the xcb-xinput library for interacting with devices on X (could be moved to wayland in the future).
Diffstat (limited to 'src-qt5/core/libLumina/LInputDevice.h')
-rw-r--r-- | src-qt5/core/libLumina/LInputDevice.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src-qt5/core/libLumina/LInputDevice.h b/src-qt5/core/libLumina/LInputDevice.h new file mode 100644 index 00000000..efbc41e7 --- /dev/null +++ b/src-qt5/core/libLumina/LInputDevice.h @@ -0,0 +1,43 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2016, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +// This class governs all the XCB input device interactions +// and provides simpler Qt-based functions for use elsewhere +//=========================================== +#ifndef _LUMINA_XCB_INPUT_DEVICES_H +#define _LUMINA_XCB_INPUT_DEVICES_H + +#include <QList> +#include <QString> +#include <QStringList> + +class LInputDevice{ +public: + LInputDevice(unsigned int id, unsigned int type); //don't use this directly - use the "listDevices()" function instead + ~LInputDevice(); + + //QString name(); //Return the name of this device + unsigned int devNumber(); + bool isPointer(); + bool isKeyboard(); + bool isExtension(); + + //List Properties of device + QStringList listProperties(); + +private: + unsigned int devID; //device ID number - assigned at class creation + unsigned int devType; //device "use" identifier - assigned at class creation + //QString devName; //device name - use this for cross-session management (id #'s can get changed every session) +}; + +//Static functions for overall management +class LInput{ + QList<LInputDevice*> listDevices(); //NOTE: Make sure you "free()" all the LInputDevice objects when finished + +}; + +#endif |