summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_zaurus.cpp
authorzecke <zecke>2004-10-13 13:00:45 (UTC)
committer zecke <zecke>2004-10-13 13:00:45 (UTC)
commit72065f1f1aa12882ae63f8b063312e96dd683156 (patch) (side-by-side diff)
tree0e4a68f4aac3cc8686987d03adc323a795db6b5c /libopie2/opiecore/device/odevice_zaurus.cpp
parentc931e96eb4bf7df64bca49c2343f2203bac637ba (diff)
downloadopie-72065f1f1aa12882ae63f8b063312e96dd683156.zip
opie-72065f1f1aa12882ae63f8b063312e96dd683156.tar.gz
opie-72065f1f1aa12882ae63f8b063312e96dd683156.tar.bz2
-Create the QPE/System channel in ODevice to listen for button remapping
-Remove various connect and QCopChannel creation from actual device implementations Let us see if that breaks anything, I hope SIMpad still will do fine. We might need to guard if a qApp exists?
Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index 733479e..ebe1949 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -193,100 +193,96 @@ void Zaurus::init(const QString& cpu_info)
d->m_direction = direction();
break;
case Model_Zaurus_SLB600:
case Model_Zaurus_SL5500:
case Model_Zaurus_SL5000:
default:
d->m_rotation = Rot270;
break;
}
m_leds [0] = Led_Off;
}
void Zaurus::initButtons()
{
if ( d->m_buttons )
return;
d->m_buttons = new QValueList <ODeviceButton>;
struct z_button * pz_buttons;
int buttoncount;
switch ( d->m_model ) {
case Model_Zaurus_SLC7x0:
pz_buttons = z_buttons_c700;
buttoncount = ARRAY_SIZE(z_buttons_c700);
break;
default:
pz_buttons = z_buttons;
buttoncount = ARRAY_SIZE(z_buttons);
break;
}
for ( int i = 0; i < buttoncount; i++ ) {
struct z_button *zb = pz_buttons + i;
ODeviceButton b;
b. setKeycode ( zb->code );
b. setUserText ( QObject::tr ( "Button", zb->utext ));
b. setPixmap ( Resource::loadPixmap ( zb->pix ));
b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb->fpressedservice ),
zb->fpressedaction ));
b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb->fheldservice ),
zb->fheldaction ));
d->m_buttons->append ( b );
}
reloadButtonMapping();
-
- QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
- connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)),
- this, SLOT( systemMessage(const QCString&,const QByteArray&)));
}
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
//#include <asm/sharp_char.h> // including kernel headers is evil ...
#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
#define SHARP_BUZ_KEYSOUND 2 /* key sound */
#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
/* --- for SHARP_BUZZER device --- */
//#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
//#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1)
#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2)
#define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3)
#define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4)
#define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5)
//#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
//#define SHARP_BUZ_KEYSOUND 2 /* key sound */
//#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */
//#define SHARP_PDA_WARNSOUND 4 /* warning occurred */
//#define SHARP_PDA_ERRORSOUND 5 /* error occurred */
//#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */
//#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */
//#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */
//#define SHARP_PDA_APPSTART 9 /* application start */
//#define SHARP_PDA_APPQUIT 10 /* application ends */
//#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
//#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */
//#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */
//#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */
//
#define SHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
#define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1)