summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/odevice.cpp10
-rw-r--r--libopie/odevice.h7
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:
Transformation m_rotation;
+ ODirection m_direction;
@@ -256,2 +257,3 @@ ODevice::ODevice ( )
d-> m_rotation = Rot0;
+ d-> m_direction = CW;
@@ -472,2 +474,10 @@ Transformation ODevice::rotation ( ) const
/**
+ * @return the current rotation direction
+ */
+ODirection ODevice::direction ( ) const
+{
+ return d-> m_direction;
+}
+
+/**
* 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 {
+enum ODirection {
+ CW = 0,
+ CCW = 1,
+ Flip = 2,
+};
+
/**
@@ -152,2 +158,3 @@ public:
Transformation rotation ( ) const;
+ ODirection direction ( ) const;