princeamd pushed a commit to branch enlightenment-0.17.
commit ab05ef5335e4a322ae24cfeec47717d0adb6dd85
Author: Christopher Michael <[email protected]>
Date: Tue Feb 19 10:58:19 2013 +0000
Backport: 3585513 :: Add inline function to return the degree of rotation
based on orientation.
Signed-off-by: Christopher Michael <[email protected]>
SVN revision: 84182
Signed-off-by: Deon Thomas <[email protected]>
---
src/modules/conf_randr/e_smart_monitor.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/modules/conf_randr/e_smart_monitor.c
b/src/modules/conf_randr/e_smart_monitor.c
index 0d39bbd..d4c2789 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -129,6 +129,7 @@ static void _e_smart_monitor_resize_event(E_Smart_Data *sd,
Evas_Object *mon, vo
static void _e_smart_monitor_rotate_event(E_Smart_Data *sd, Evas_Object *mon,
void *event);
static int _e_smart_monitor_rotation_amount_get(E_Smart_Data *sd,
Evas_Event_Mouse_Move *ev);
+static inline int _e_smart_monitor_rotation_get(Ecore_X_Randr_Orientation
orient);
/* external functions exposed by this widget */
Evas_Object *
@@ -1241,3 +1242,21 @@ _e_smart_monitor_rotation_amount_get(E_Smart_Data *sd,
Evas_Event_Mouse_Move *ev
return r;
}
+
+static inline int
+_e_smart_monitor_rotation_get(Ecore_X_Randr_Orientation orient)
+{
+ /* return numerical rotation degree based on orientation */
+ switch (orient)
+ {
+ case ECORE_X_RANDR_ORIENTATION_ROT_90:
+ return 90;
+ case ECORE_X_RANDR_ORIENTATION_ROT_180:
+ return 180;
+ case ECORE_X_RANDR_ORIENTATION_ROT_270:
+ return 270;
+ case ECORE_X_RANDR_ORIENTATION_ROT_0:
+ default:
+ return 0;
+ }
+}
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev