Diffstat (limited to 'core/multimedia/opieplayer/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index faa6e3f..70b7cef 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -21,2 +21,3 @@ #define QTOPIA_INTERNAL_FSLP +#include <qpe/qcopenvelope_qws.h> @@ -64,2 +65,13 @@ +#include <unistd.h> +#include <sys/file.h> +#include <sys/ioctl.h> +#include <sys/soundcard.h> + +// for setBacklight() +#include <linux/fb.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <stdlib.h> + #define BUTTONS_ON_TOOLBAR @@ -1055,9 +1067,16 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e) case Key_F9: //activity - if(audioUI->isHidden()) - audioUI->showMaximized(); +// if(audioUI->isHidden()) +// audioUI->showMaximized(); break; case Key_F10: //contacts - if( videoUI->isHidden()) - videoUI->showMaximized(); - +// if( videoUI->isHidden()) +// videoUI->showMaximized(); + break; + case Key_F11: //menu + break; + case Key_F12: //home +// doBlank(); + break; + case Key_F13: //mail +// doUnblank(); break; @@ -1066 +1085,23 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e) } + +void PlayListWidget::doBlank() { + qDebug("do blanking"); + fd=open("/dev/fb0",O_RDWR); + if (fd != -1) { + ioctl(fd,FBIOBLANK,1); +// close(fd); + } +} + +void PlayListWidget::doUnblank() { + // this crashes opieplayer with a segfault +// int fd; +// fd=open("/dev/fb0",O_RDWR); + qDebug("do unblanking"); + if (fd != -1) { + ioctl(fd,FBIOBLANK,0); + close(fd); + } + QCopEnvelope h("QPE/System", "setBacklight(int)"); + h <<-3;// v[1]; // -3 Force on +} |