-rw-r--r-- | libopie2/opiecore/device/odevice_htc.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice_htc.cpp b/libopie2/opiecore/device/odevice_htc.cpp index 7f82369..4bc8c49 100644 --- a/libopie2/opiecore/device/odevice_htc.cpp +++ b/libopie2/opiecore/device/odevice_htc.cpp @@ -41,192 +41,193 @@ #include <qfile.h> #include <qtextstream.h> #include <qwindowsystem_qws.h> #include <qcopchannel_qws.h> /* STD */ #include <string.h> #include <errno.h> #include <fcntl.h> #include <math.h> #include <stdlib.h> #include <signal.h> #include <sys/ioctl.h> #include <sys/time.h> #include <unistd.h> #ifndef QT_NO_SOUND #include <linux/soundcard.h> #endif using namespace Opie::Core; using namespace Opie::Core::Internal; struct htc_button htc_buttons [] = { { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), "devicebuttons/z_calendar", "datebook", "nextView()", "today", "raise()" }, { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), "devicebuttons/z_contact", "addressbook", "raise()", "addressbook", "beamBusinessCard()" }, { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), "devicebuttons/z_home", "QPE/Launcher", "home()", "buttonsettings", "raise()" }, { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), "devicebuttons/z_menu", "QPE/TaskBar", "toggleMenu()", "QPE/TaskBar", "toggleStartMenu()" }, { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), "devicebuttons/z_mail", "opiemail", "raise()", "opiemail", "newMail()" }, }; struct htc_button htc_buttons_universal [] = { { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), "devicebuttons/z_calendar", "datebook", "nextView()", "today", "raise()" }, { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), "devicebuttons/z_contact", "addressbook", "raise()", "addressbook", "beamBusinessCard()" }, { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), "devicebuttons/z_home", "QPE/Launcher", "home()", "buttonsettings", "raise()" }, { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), "devicebuttons/z_menu", "QPE/TaskBar", "toggleMenu()", "QPE/TaskBar", "toggleStartMenu()" }, { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), "devicebuttons/z_mail", "opiemail", "raise()", "opiemail", "newMail()" }, { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"), "devicebuttons/z_hinge1", "QPE/Rotation", "rotateDefault()",0,0}, { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"), "devicebuttons/z_hinge2", "QPE/Rotation", "rotateDefault()",0,0}, { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"), "devicebuttons/z_hinge3", "QPE/Rotation", "rotateDefault()",0,0}, }; // // HTC-Universal (PXA-model w/ 480x640 3.6" lcd) // HTC-Alpine (PXA-model w/ 240x320 3.5" lcd) // HTC-Apache (PXA-model w/ 240x320 2.8" lcd) // HTC-Beetles (PXA-model w/ 240x240 3.0" lcd) // HTC-Blueangel (PXA-model w/ 240x320 3.5" lcd) // HTC-Himalaya (PXA-model w/ 240x320 3.5" lcd) // HTC-Magician (PXA-model w/ 240x320 2.8" lcd) void HTC::init(const QString& cpu_info) { qDebug( "HTC::init()" ); // Set the time to wait until the system is really suspended // the delta between apm --suspend and sleeping setAPMTimeOut( 15000 ); d->m_vendorstr = "Xanadux Team"; + d->m_vendor = Vendor_HTC; d->m_systemstr = "Familiar"; d->m_system = System_Familiar; // check the HTC model QString model; int loc = cpu_info.find( ":" ); if ( loc != -1 ) model = cpu_info.mid( loc+2 ).simplifyWhiteSpace(); else model = cpu_info; d->m_model = Model_HTC_Universal; d->m_modelstr = "Unknown HTC"; if ( model == "HTC Universal" ) { d->m_model = Model_HTC_Universal; d->m_modelstr = "HTC Universal"; } if ( model == "HTC Alpine" ) { d->m_model = Model_HTC_Alpine; d->m_modelstr = "HTC Alpine"; } if ( model == "HTC Apache" ) { d->m_model = Model_HTC_Apache; d->m_modelstr = "HTC Apache"; } if ( model == "HTC Beetles" ) { d->m_model = Model_HTC_Beetles; d->m_modelstr = "HTC Beetles"; } if ( model == "HTC Blueangel" ) { d->m_model = Model_HTC_Blueangel; d->m_modelstr = "HTC Blueangel"; } if ( model == "HTC Himalaya" ) { d->m_model = Model_HTC_Himalaya; d->m_modelstr = "HTC Himalaya"; } if ( model == "HTC Magician" ) { d->m_model = Model_HTC_Magician; d->m_modelstr = "HTC Magician"; } // set path to backlight device switch ( d->m_model ) { case Model_HTC_Universal: case Model_HTC_Magician: case Model_HTC_Alpine: case Model_HTC_Beetles: case Model_HTC_Apache: m_backlightdev = "/sys/class/backlight/corgi-bl/"; break; case Model_HTC_Blueangel: case Model_HTC_Himalaya: m_backlightdev = "/sys/class/backlight/w100fb/"; break; default: m_backlightdev = "/sys/class/backlight/corgi-bl/"; } // set initial rotation switch( d->m_model ) { case Model_HTC_Universal: initHingeSensor(); d->m_rotation = rotation(); d->m_direction = direction(); break; default: d->m_rotation = Rot270; } // set default qte driver switch( d->m_model ) { default: d->m_qteDriver = "Transformed"; } m_leds[0] = Led_Off; qDebug( "HTC::init() - Using the 2.6 Xanadux on a %s", (const char*) d->m_modelstr ); } void HTC::initButtons() { qDebug( "HTC::initButtons()" ); if ( d->m_buttons ) return; d->m_buttons = new QValueList <ODeviceButton>; struct htc_button * phtc_buttons; int buttoncount; |