summaryrefslogtreecommitdiff
path: root/examples
authormickeyl <mickeyl>2005-08-31 10:21:12 (UTC)
committer mickeyl <mickeyl>2005-08-31 10:21:12 (UTC)
commitcde931654d1966be6989e6c8f3cfacb23e6822a2 (patch) (side-by-side diff)
tree9a8244f4da0180a685554ebca0d7b628630fb42e /examples
parent142e7e82efa6dd45884805c34fadec2160225e4b (diff)
downloadopie-cde931654d1966be6989e6c8f3cfacb23e6822a2.zip
opie-cde931654d1966be6989e6c8f3cfacb23e6822a2.tar.gz
opie-cde931654d1966be6989e6c8f3cfacb23e6822a2.tar.bz2
- add support for the new Switches type in the Linux Input System (coming with 2.6.14)
- use the new Switches support to rewrite the hinge sensor handling on Zaurus models w/ 2.6 - add Switches support to SysInfo, OInputSystem, oinputsystemdemo
Diffstat (limited to 'examples') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/opiecore/oinputsystemdemo/oinputsystemdemo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/opiecore/oinputsystemdemo/oinputsystemdemo.cpp b/examples/opiecore/oinputsystemdemo/oinputsystemdemo.cpp
index 6c95048..b49df99 100644
--- a/examples/opiecore/oinputsystemdemo/oinputsystemdemo.cpp
+++ b/examples/opiecore/oinputsystemdemo/oinputsystemdemo.cpp
@@ -60,12 +60,14 @@ int main( int argc, char** argv )
features += QString( "\nRelative Axes: " );
if ( dev->hasFeature( OInputDevice::Relative ) ) features += "[ x ]"; else features += "[ ]";
features += QString( "\nAbsolute Axes: " );
if ( dev->hasFeature( OInputDevice::Absolute ) ) features += "[ x ]"; else features += "[ ]";
features += QString( "\nMiscellaneous: " );
if ( dev->hasFeature( OInputDevice::Miscellaneous ) ) features += "[ x ]"; else features += "[ ]";
+ features += QString( "\nSwitches: " );
+ if ( dev->hasFeature( OInputDevice::Switches ) ) features += "[ x ]"; else features += "[ ]";
features += QString( "\nLeds: " );
if ( dev->hasFeature( OInputDevice::Leds ) ) features += "[ x ]"; else features += "[ ]";
features += QString( "\nSound: " );
if ( dev->hasFeature( OInputDevice::Sound ) ) features += "[ x ]"; else features += "[ ]";
features += QString( "\nAutoRepeat " );
if ( dev->hasFeature( OInputDevice::AutoRepeat ) ) features += "[ x ]"; else features += "[ ]";
@@ -90,13 +92,15 @@ int main( int argc, char** argv )
if ( dev->isHeld( OInputDevice::Button_LEFT ) )
odebug << "Left Mouse Button is being held." << oendl;
else odebug << "Left Mouse Button is _not_ being held." << oendl;
odebug << "Global key mask: " << dev->globalKeyMask() << oendl;
-
+ odebug << "Global switch mask: " << dev->globalSwitchMask() << oendl;
+
+
++it;
}
}
#else
@@ -328,7 +332,7 @@ int main( int argc, char **argv )
exit( EXIT_SUCCESS );
hell:
exit( EXIT_FAILURE );
}
-#endif \ No newline at end of file
+#endif