summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oinputsystem.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/oinputsystem.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oinputsystem.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/libopie2/opiecore/oinputsystem.h b/libopie2/opiecore/oinputsystem.h
index 7919610..6f822a1 100644
--- a/libopie2/opiecore/oinputsystem.h
+++ b/libopie2/opiecore/oinputsystem.h
@@ -68,43 +68,43 @@ class OInputSystem : public QObject
/**
* @returns a pointer to the @ref OAudioInterface object for the specified @a interface or 0, if not found
* @see OAudioInterface
*/
OInputDevice* device( const QString& interface ) const;
/**
* @internal Rebuild the internal interface database
* @note Sometimes it might be useful to call this from client code,
*/
void synchronize();
/**
* @internal destructor
- */
+ */
~OInputSystem();
-
+
protected:
OInputSystem();
-
+
static OInputSystem* _instance;
DeviceMap _devices;
};
class OInputDevice : public QObject
-{
+{
public:
OInputDevice( QObject* parent, const char* name = 0 );
~OInputDevice();
- #include "oinputsystemenums.h"
-
+ #include "oinputsystemenums.h"
+
public:
/**
* @returns the identity string of this input device
*/
QString identity() const;
/**
* @returns the path of this input device
*/
QString path() const;
/**
* @returns a unique identifier for this input device
* @note Only a few devices support this
@@ -114,24 +114,29 @@ class OInputDevice : public QObject
* @returns whether a certain @a Feature is being supported by this device
*/
bool hasFeature( Feature ) const;
/**
* @returns whether a given @a Key or Button is being held at the moment
*/
bool isHeld( Key ) const;
/**
* @internal
* @returns a string containing a printable form of the global keymask
*/
QString globalKeyMask() const;
-
+ /**
+ * @internal
+ * @returns whether a certain @a path corresponds to an input device
+ */
+ static bool isValid( const QString& path );
+
private:
int _fd;
input_id _id;
};
}
}
#endif // OINPUTSYSTEM_H