author | mickeyl <mickeyl> | 2003-12-29 16:51:07 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-12-29 16:51:07 (UTC) |
commit | 8224dfc07a698d4c40cb240d315dc81b67512015 (patch) (side-by-side diff) | |
tree | 0cdbb05aab54948421c873ccd25881caf1e474c5 /libopie/odevice.h | |
parent | dae677b6e29e2a0efb7128bcc4b0d87bf2b535dd (diff) | |
download | opie-8224dfc07a698d4c40cb240d315dc81b67512015.zip opie-8224dfc07a698d4c40cb240d315dc81b67512015.tar.gz opie-8224dfc07a698d4c40cb240d315dc81b67512015.tar.bz2 |
- add fine granular backlight support for devices with the corgi backlight interface
- add hinge sensor framework for devices with hinge sensors
-rw-r--r-- | libopie/odevice.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index 8273761..ee0b0ec 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h @@ -122,48 +122,55 @@ enum OLed { Led_Power, Led_BlueTooth }; enum OHardKey { HardKey_Datebook = Qt::Key_F9, HardKey_Contacts = Qt::Key_F10, HardKey_Menu = Qt::Key_F11, HardKey_Home = Qt::Key_F12, HardKey_Mail = Qt::Key_F13, HardKey_Record = Qt::Key_F24, HardKey_Suspend = Qt::Key_F34, HardKey_Backlight = Qt::Key_F35, HardKey_Action = Qt::Key_F10, HardKey_OK = Qt::Key_F11, HardKey_End = Qt::Key_F12, }; enum ODirection { CW = 0, CCW = 1, Flip = 2, }; +enum OHingeStatus { + CASE_CLOSED = 3, + CASE_PORTRAIT = 2, + CASE_LANDSCAPE = 0, + CASE_UNKNOWN = 1, +}; + /** * A singleton which gives informations about device specefic option * like the Hardware used, LEDs, the Base Distribution and * hardware key mappings. * * @short A small class for device specefic options * @see QObject * @author Robert Griebl * @version 1.0 */ class ODevice : public QObject { Q_OBJECT private: /* disable copy */ ODevice ( const ODevice & ); protected: ODevice ( ); virtual void init ( ); virtual void initButtons ( ); ODeviceData *d; @@ -201,48 +208,51 @@ public: virtual bool setDisplayContrast ( int contrast ); virtual int displayContrastResolution ( ) const; // don't add new virtual methods, use this: // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; // and in your subclass do do overwrite // protected virtual int virtual_hook(int, void *) // which is defined below // input / output //FIXME playAlarmSound and al might be better -zecke virtual void alarmSound ( ); virtual void keySound ( ); virtual void touchSound ( ); virtual QValueList <OLed> ledList ( ) const; virtual QValueList <OLedState> ledStateList ( OLed led ) const; virtual OLedState ledState ( OLed led ) const; virtual bool setLedState ( OLed led, OLedState st ); virtual bool hasLightSensor ( ) const; virtual int readLightSensor ( ); virtual int lightSensorResolution ( ) const; + virtual bool hasHingeSensor ( ) const; + virtual OHingeStatus readHingeSensor ( ); + const QStrList &allowedCpuFrequencies() const; bool setCurrentCpuFrequency(uint index); /** * Returns the available buttons on this device. The number and location * of buttons will vary depending on the device. Button numbers will be assigned * by the device manufacturer and will be from most preferred button to least preffered * button. Note that this list only contains "user mappable" buttons. */ const QValueList<ODeviceButton> &buttons ( ) /* ### make const */; /** * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it * returns 0L */ const ODeviceButton *buttonForKeycode ( ushort keyCode ); /** * Reassigns the pressed action for \a button. To return to the factory * default pass an empty string as \a qcopMessage. */ void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); /** |