summaryrefslogtreecommitdiff
path: root/src/examples/evas
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-05-20 11:51:56 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-20 11:51:56 -0400
commitb24fde67871707bafea7d3e638bca70c6ef75de0 (patch)
tree76ac9e3133401b0321df5b960d4866ecf8a568ce /src/examples/evas
parenta5267d3d9c55ebcc2da3e7e05b23bc88d436f3fb (diff)
Merge Efl.Orient and Efl.Flip into the same enum
Summary: This is similar to how it is in Evas, and simplifies the Efl.Orientation interface, which only needs one property now. Relates to T7919 Test Plan: Everything builds and tests pass. There's only one example of efl_orientation_set() so there's not much to test yet. Reviewers: zmike, bu5hm4n, cedric, Hermet, Jaehyun_Cho Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7919 Differential Revision: https://phab.enlightenment.org/D8912
Diffstat (limited to 'src/examples/evas')
-rw-r--r--src/examples/evas/evas-images5.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/examples/evas/evas-images5.c b/src/examples/evas/evas-images5.c
index ed8a4e5541..fa2794e952 100644
--- a/src/examples/evas/evas-images5.c
+++ b/src/examples/evas/evas-images5.c
@@ -76,6 +76,7 @@ _on_keydown(void *data EINA_UNUSED,
76 void *einfo) 76 void *einfo)
77{ 77{
78 Evas_Event_Key_Down *ev = einfo; 78 Evas_Event_Key_Down *ev = einfo;
79 Efl_Orient orient = efl_orientation_get(d.img);
79 80
80 if (strcmp(ev->key, "h") == 0) /* print help */ 81 if (strcmp(ev->key, "h") == 0) /* print help */
81 { 82 {
@@ -109,25 +110,25 @@ _on_keydown(void *data EINA_UNUSED,
109 switch (key_val) 110 switch (key_val)
110 { 111 {
111 case 0: 112 case 0:
112 efl_orientation_set(d.img, EFL_ORIENT_0); 113 efl_orientation_set(d.img, EFL_ORIENT_UP | (orient & EFL_ORIENT_FLIP_BITMASK));
113 break; 114 break;
114 case 1: 115 case 1:
115 efl_orientation_set(d.img, EFL_ORIENT_90); 116 efl_orientation_set(d.img, EFL_ORIENT_RIGHT | (orient & EFL_ORIENT_FLIP_BITMASK));
116 break; 117 break;
117 case 2: 118 case 2:
118 efl_orientation_set(d.img, EFL_ORIENT_180); 119 efl_orientation_set(d.img, EFL_ORIENT_DOWN | (orient & EFL_ORIENT_FLIP_BITMASK));
119 break; 120 break;
120 case 3: 121 case 3:
121 efl_orientation_set(d.img, EFL_ORIENT_270); 122 efl_orientation_set(d.img, EFL_ORIENT_LEFT | (orient & EFL_ORIENT_FLIP_BITMASK));
122 break; 123 break;
123 case 4: 124 case 4:
124 efl_orientation_flip_set(d.img, EFL_FLIP_HORIZONTAL); 125 efl_orientation_set(d.img, (orient & EFL_ORIENT_ROTATION_BITMASK) | EFL_ORIENT_FLIP_HORIZONTAL);
125 break; 126 break;
126 case 5: 127 case 5:
127 efl_orientation_flip_set(d.img, EFL_FLIP_VERTICAL); 128 efl_orientation_set(d.img, (orient & EFL_ORIENT_ROTATION_BITMASK) | EFL_ORIENT_FLIP_VERTICAL);
128 break; 129 break;
129 case 6: 130 case 6:
130 efl_orientation_flip_set(d.img, EFL_FLIP_NONE); 131 efl_orientation_set(d.img, (orient & EFL_ORIENT_ROTATION_BITMASK));
131 break; 132 break;
132 } 133 }
133} 134}