Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 0d21f26..000d29c 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp | |||
@@ -45,25 +45,25 @@ _;:, .> :=|. This program is free software; you can | |||
45 | #include <fcntl.h> | 45 | #include <fcntl.h> |
46 | #include <math.h> | 46 | #include <math.h> |
47 | #include <stdlib.h> | 47 | #include <stdlib.h> |
48 | #include <signal.h> | 48 | #include <signal.h> |
49 | #include <sys/ioctl.h> | 49 | #include <sys/ioctl.h> |
50 | #include <sys/time.h> | 50 | #include <sys/time.h> |
51 | #include <unistd.h> | 51 | #include <unistd.h> |
52 | #ifndef QT_NO_SOUND | 52 | #ifndef QT_NO_SOUND |
53 | #include <linux/soundcard.h> | 53 | #include <linux/soundcard.h> |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | using namespace Opie::Core; | 56 | using namespace Opie::Core; |
57 | using namespace Opie::Core::Private; | 57 | using namespace Opie::Core::Internal; |
58 | 58 | ||
59 | struct z_button z_buttons [] = { | 59 | struct z_button z_buttons [] = { |
60 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 60 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
61 | "devicebuttons/z_calendar", | 61 | "devicebuttons/z_calendar", |
62 | "datebook", "nextView()", | 62 | "datebook", "nextView()", |
63 | "today", "raise()" }, | 63 | "today", "raise()" }, |
64 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 64 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
65 | "devicebuttons/z_contact", | 65 | "devicebuttons/z_contact", |
66 | "addressbook", "raise()", | 66 | "addressbook", "raise()", |
67 | "addressbook", "beamBusinessCard()" }, | 67 | "addressbook", "beamBusinessCard()" }, |
68 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 68 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
69 | "devicebuttons/z_home", | 69 | "devicebuttons/z_home", |
@@ -378,33 +378,33 @@ void Zaurus::buzzer ( int sound ) | |||
378 | } | 378 | } |
379 | } | 379 | } |
380 | 380 | ||
381 | snd. play(); | 381 | snd. play(); |
382 | while ( !snd. isFinished()) | 382 | while ( !snd. isFinished()) |
383 | qApp->processEvents(); | 383 | qApp->processEvents(); |
384 | 384 | ||
385 | if ( fd >= 0 ) { | 385 | if ( fd >= 0 ) { |
386 | if ( vol_reset ) | 386 | if ( vol_reset ) |
387 | ::ioctl ( fd, MIXER_WRITE( 0 ), &vol ); | 387 | ::ioctl ( fd, MIXER_WRITE( 0 ), &vol ); |
388 | ::close ( fd ); | 388 | ::close ( fd ); |
389 | } | 389 | } |
390 | } else { | 390 | } else { |
391 | int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); | 391 | int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); |
392 | 392 | ||
393 | if ( fd >= 0 ) { | 393 | if ( fd >= 0 ) { |
394 | ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); | 394 | ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); |
395 | ::close ( fd ); | 395 | ::close ( fd ); |
396 | } | 396 | } |
397 | 397 | ||
398 | } | 398 | } |
399 | #endif | 399 | #endif |
400 | } | 400 | } |
401 | 401 | ||
402 | 402 | ||
403 | void Zaurus::playAlarmSound() | 403 | void Zaurus::playAlarmSound() |
404 | { | 404 | { |
405 | buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); | 405 | buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); |
406 | } | 406 | } |
407 | 407 | ||
408 | void Zaurus::playTouchSound() | 408 | void Zaurus::playTouchSound() |
409 | { | 409 | { |
410 | buzzer ( SHARP_BUZ_TOUCHSOUND ); | 410 | buzzer ( SHARP_BUZ_TOUCHSOUND ); |
@@ -597,27 +597,27 @@ Transformation Zaurus::rotation() const | |||
597 | int handle = 0; | 597 | int handle = 0; |
598 | int retval = 0; | 598 | int retval = 0; |
599 | 599 | ||
600 | switch ( d->m_model ) { | 600 | switch ( d->m_model ) { |
601 | case Model_Zaurus_SLC7x0: | 601 | case Model_Zaurus_SLC7x0: |
602 | handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK); | 602 | handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK); |
603 | if (handle == -1) { | 603 | if (handle == -1) { |
604 | return Rot270; | 604 | return Rot270; |
605 | } else { | 605 | } else { |
606 | retval = ::ioctl(handle, SHARP_IOCTL_GET_ROTATION); | 606 | retval = ::ioctl(handle, SHARP_IOCTL_GET_ROTATION); |
607 | ::close (handle); | 607 | ::close (handle); |
608 | 608 | ||
609 | if (retval == 2 ) | 609 | if (retval == 2 ) |
610 | rot = Rot0; | 610 | rot = Rot0; |
611 | else | 611 | else |
612 | rot = Rot270; | 612 | rot = Rot270; |
613 | } | 613 | } |
614 | break; | 614 | break; |
615 | case Model_Zaurus_SLA300: | 615 | case Model_Zaurus_SLA300: |
616 | case Model_Zaurus_SLB600: | 616 | case Model_Zaurus_SLB600: |
617 | case Model_Zaurus_SL5500: | 617 | case Model_Zaurus_SL5500: |
618 | case Model_Zaurus_SL5000: | 618 | case Model_Zaurus_SL5000: |
619 | default: | 619 | default: |
620 | rot = d->m_rotation; | 620 | rot = d->m_rotation; |
621 | break; | 621 | break; |
622 | } | 622 | } |
623 | 623 | ||