author | kergoth <kergoth> | 2003-04-18 21:54:43 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-04-18 21:54:43 (UTC) |
commit | d0852e67c15c5a973b7bc7f7bee238a6fd00dee6 (patch) (unidiff) | |
tree | 68acc72ac204045b2492693ca668ece78e5f3a2c | |
parent | 1cdd9c974e621f6992ddc6dfccbc815baebd19ee (diff) | |
download | opie-d0852e67c15c5a973b7bc7f7bee238a6fd00dee6.zip opie-d0852e67c15c5a973b7bc7f7bee238a6fd00dee6.tar.gz opie-d0852e67c15c5a973b7bc7f7bee238a6fd00dee6.tar.bz2 |
Add rotation direction to ODevice, to ensure the default is appropriate for the hardware in question.
-rw-r--r-- | libopie/odevice.cpp | 10 | ||||
-rw-r--r-- | libopie/odevice.h | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 0e1c0dd..29c8ad2 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -69,2 +69,3 @@ public: | |||
69 | Transformation m_rotation; | 69 | Transformation m_rotation; |
70 | ODirection m_direction; | ||
70 | 71 | ||
@@ -256,2 +257,3 @@ ODevice::ODevice ( ) | |||
256 | d-> m_rotation = Rot0; | 257 | d-> m_rotation = Rot0; |
258 | d-> m_direction = CW; | ||
257 | 259 | ||
@@ -472,2 +474,10 @@ Transformation ODevice::rotation ( ) const | |||
472 | /** | 474 | /** |
475 | * @return the current rotation direction | ||
476 | */ | ||
477 | ODirection ODevice::direction ( ) const | ||
478 | { | ||
479 | return d-> m_direction; | ||
480 | } | ||
481 | |||
482 | /** | ||
473 | * This plays an alarmSound | 483 | * This plays an alarmSound |
diff --git a/libopie/odevice.h b/libopie/odevice.h index 45a790b..0c55ea0 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -105,2 +105,8 @@ enum OHardKey { | |||
105 | 105 | ||
106 | enum ODirection { | ||
107 | CW = 0, | ||
108 | CCW = 1, | ||
109 | Flip = 2, | ||
110 | }; | ||
111 | |||
106 | /** | 112 | /** |
@@ -152,2 +158,3 @@ public: | |||
152 | Transformation rotation ( ) const; | 158 | Transformation rotation ( ) const; |
159 | ODirection direction ( ) const; | ||
153 | 160 | ||