diff options
Diffstat (limited to 'lib/ct-front/ct-front-view.c')
-rwxr-xr-x | lib/ct-front/ct-front-view.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/lib/ct-front/ct-front-view.c b/lib/ct-front/ct-front-view.c index 1201d30..1b4cb14 100755 --- a/lib/ct-front/ct-front-view.c +++ b/lib/ct-front/ct-front-view.c @@ -371,36 +371,29 @@ static void cfront_view_win_activate(void *data, Evas *e, void *even_info) evas_event_callback_del(e, EVAS_CALLBACK_RENDER_FLUSH_POST, cfront_view_win_activate); } -API int ctui_front_view_rotate(ct_front_data *cfront_d, app_device_orientation_e orientation) +API int ctui_front_view_rotate(ct_front_data *cfront_d, int rotate) { - int rotate; int ret = 0; - switch (orientation) { - case APP_DEVICE_ORIENTATION_0: - rotate = 0; + switch (rotate) { + case 0: ug_send_event(UG_EVENT_ROTATE_PORTRAIT); break; - case APP_DEVICE_ORIENTATION_180: - rotate = 180; + case 180: ug_send_event(UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN); break; - case APP_DEVICE_ORIENTATION_270: - rotate = 270; + case 270: ug_send_event(UG_EVENT_ROTATE_LANDSCAPE); break; - case APP_DEVICE_ORIENTATION_90: - rotate = 90; + case 90: ug_send_event(UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN); break; default: - rotate = -1; break; } evas_object_data_set(cfront_d->navi, "phone_rotate", (void *)rotate); - if (0 <= rotate) - elm_win_rotation_with_resize_set(cfront_d->win, rotate); + return ret; } |