author | harlekin <harlekin> | 2002-08-16 15:16:13 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-16 15:16:13 (UTC) |
commit | aa9eba407a8236c72822d24643b58d4d48ae80c0 (patch) (unidiff) | |
tree | 178c91d1a1d33a3ae6ae7bf91746fc1a4fd499e2 /noncore/multimedia/opieplayer2 | |
parent | c150d03ae4d626c57531f89413710033d1ef5151 (diff) | |
download | opie-aa9eba407a8236c72822d24643b58d4d48ae80c0.zip opie-aa9eba407a8236c72822d24643b58d4d48ae80c0.tar.gz opie-aa9eba407a8236c72822d24643b58d4d48ae80c0.tar.bz2 |
blank now works, mail key on ipaq
Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 11 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 6 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 2 |
4 files changed, 13 insertions, 9 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 56203e0..604ed3a 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -529,17 +529,18 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) | |||
529 | hide(); | 529 | hide(); |
530 | // qDebug("Audio F9"); | 530 | // qDebug("Audio F9"); |
531 | break; | 531 | break; |
532 | case Key_F10: //contacts | 532 | case Key_F10: //contacts |
533 | break; | 533 | break; |
534 | case Key_F11: //menu | 534 | case Key_F11: //menu |
535 | mediaPlayerState->toggleBlank(); | ||
535 | break; | 536 | break; |
536 | case Key_F12: //home | 537 | case Key_F12: //home |
537 | break; | 538 | break; |
538 | case Key_F13: //mail | 539 | case Key_F13: //mail |
539 | mediaPlayerState->toggleBlank(); | 540 | mediaPlayerState->toggleBlank(); |
540 | break; | 541 | break; |
541 | case Key_Space: { | 542 | case Key_Space: { |
542 | if(mediaPlayerState->playing()) { | 543 | if(mediaPlayerState->playing()) { |
543 | // toggleButton(1); | 544 | // toggleButton(1); |
544 | mediaPlayerState->setPlaying(FALSE); | 545 | mediaPlayerState->setPlaying(FALSE); |
545 | // toggleButton(1); | 546 | // toggleButton(1); |
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 858b51f..87f4f0c 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -26,12 +26,14 @@ | |||
26 | extern AudioWidget *audioUI; | 26 | extern AudioWidget *audioUI; |
27 | extern VideoWidget *videoUI; | 27 | extern VideoWidget *videoUI; |
28 | extern PlayListWidget *playList; | 28 | extern PlayListWidget *playList; |
29 | extern MediaPlayerState *mediaPlayerState; | 29 | extern MediaPlayerState *mediaPlayerState; |
30 | 30 | ||
31 | 31 | ||
32 | #define FBIOBLANK 0x4611 | ||
33 | |||
32 | MediaPlayer::MediaPlayer( QObject *parent, const char *name ) | 34 | MediaPlayer::MediaPlayer( QObject *parent, const char *name ) |
33 | : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { | 35 | : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { |
34 | 36 | ||
35 | 37 | ||
36 | // xineControl = new XineControl(); | 38 | // xineControl = new XineControl(); |
37 | // QPEApplication::grabKeyboard(); // EVIL | 39 | // QPEApplication::grabKeyboard(); // EVIL |
@@ -249,23 +251,24 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { | |||
249 | } | 251 | } |
250 | 252 | ||
251 | 253 | ||
252 | void MediaPlayer::blank( bool b ) { | 254 | void MediaPlayer::blank( bool b ) { |
253 | fd=open("/dev/fb0",O_RDWR); | 255 | fd=open("/dev/fb0",O_RDWR); |
254 | if (fd != -1) { | 256 | if (fd != -1) { |
255 | 257 | if ( b ) { | |
256 | if ( !b ) { | ||
257 | qDebug("do blanking"); | 258 | qDebug("do blanking"); |
258 | ioctl( fd, FBIOBLANK, 3 ); | 259 | ioctl( fd, FBIOBLANK, 3 ); |
259 | isBlanked = TRUE; | 260 | isBlanked = TRUE; |
260 | } else { | 261 | } else { |
261 | qDebug("do unblanking"); | 262 | qDebug("do unblanking"); |
262 | ioctl( fd, FBIOBLANK, 0); | 263 | ioctl( fd, FBIOBLANK, 0); |
263 | isBlanked = FALSE; | 264 | isBlanked = FALSE; |
264 | } | 265 | } |
265 | close( fd ); | 266 | close( fd ); |
267 | } else { | ||
268 | qDebug("<< /dev/fb0 could not be opend >>"); | ||
266 | } | 269 | } |
267 | } | 270 | } |
268 | 271 | ||
269 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | 272 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { |
270 | switch ( e->key() ) { | 273 | switch ( e->key() ) { |
271 | ////////////////////////////// Zaurus keys | 274 | ////////////////////////////// Zaurus keys |
@@ -280,14 +283,14 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | |||
280 | case Key_F12: //home | 283 | case Key_F12: //home |
281 | qDebug("Blank here"); | 284 | qDebug("Blank here"); |
282 | // mediaPlayerState->toggleBlank(); | 285 | // mediaPlayerState->toggleBlank(); |
283 | break; | 286 | break; |
284 | case Key_F13: //mail | 287 | case Key_F13: //mail |
285 | qDebug("Blank here"); | 288 | qDebug("Blank here"); |
286 | // mediaPlayerState->toggleBlank(); | 289 | // mediaPlayerState->toggleBlank(); |
287 | break; | 290 | break; |
288 | } | 291 | } |
289 | } | 292 | } |
290 | 293 | ||
291 | void MediaPlayer::cleanUp() { | 294 | void MediaPlayer::cleanUp() { |
292 | // QPEApplication::grabKeyboard(); | 295 | // QPEApplication::grabKeyboard(); |
293 | // QPEApplication::ungrabKeyboard(); | 296 | // QPEApplication::ungrabKeyboard(); |
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 6aafb88..6833e07 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp | |||
@@ -112,22 +112,22 @@ void MediaPlayerState::setIsStreaming( bool b ) { | |||
112 | return; | 112 | return; |
113 | } | 113 | } |
114 | isStreaming = b; | 114 | isStreaming = b; |
115 | } | 115 | } |
116 | 116 | ||
117 | 117 | ||
118 | void MediaPlayerState::setBlank( bool b ) { | 118 | void MediaPlayerState::setFullscreen( bool b ) { |
119 | if ( isFullscreen == b ) { | 119 | if ( isFullscreen == b ) { |
120 | return; | 120 | return; |
121 | } | 121 | } |
122 | isFullscreen = b; | 122 | isFullscreen = b; |
123 | emit fullscreenToggled(b); | 123 | emit fullscreenToggled(b); |
124 | } | 124 | } |
125 | 125 | ||
126 | 126 | ||
127 | void MediaPlayerState::setFullscreen( bool b ) { | 127 | void MediaPlayerState::setBlanked( bool b ) { |
128 | if ( isBlanked == b ) { | 128 | if ( isBlanked == b ) { |
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | isBlanked = b; | 131 | isBlanked = b; |
132 | emit blankToggled(b); | 132 | emit blankToggled(b); |
133 | } | 133 | } |
@@ -271,11 +271,11 @@ void MediaPlayerState::togglePaused() { | |||
271 | 271 | ||
272 | void MediaPlayerState::togglePlaying() { | 272 | void MediaPlayerState::togglePlaying() { |
273 | setPlaying( !isPlaying); | 273 | setPlaying( !isPlaying); |
274 | } | 274 | } |
275 | 275 | ||
276 | void MediaPlayerState::toggleBlank() { | 276 | void MediaPlayerState::toggleBlank() { |
277 | setBlank( !isBlanked); | 277 | setBlanked( !isBlanked); |
278 | } | 278 | } |
279 | 279 | ||
280 | 280 | ||
281 | 281 | ||
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 3baffd3..b3431d7 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h | |||
@@ -75,13 +75,13 @@ public slots: | |||
75 | void setPlaying( bool b ); | 75 | void setPlaying( bool b ); |
76 | void setStop( bool b ); | 76 | void setStop( bool b ); |
77 | void setPosition( long p ); | 77 | void setPosition( long p ); |
78 | void updatePosition( long p ); | 78 | void updatePosition( long p ); |
79 | void setLength( long l ); | 79 | void setLength( long l ); |
80 | void setView( char v ); | 80 | void setView( char v ); |
81 | void setBlank( bool b ); | 81 | void setBlanked( bool b ); |
82 | 82 | ||
83 | void setPrev(); | 83 | void setPrev(); |
84 | void setNext(); | 84 | void setNext(); |
85 | void setList(); | 85 | void setList(); |
86 | void setVideo(); | 86 | void setVideo(); |
87 | void setAudio(); | 87 | void setAudio(); |