[SDL_Tizen] Add pre-rotation enum type 81/105881/1
authorhuiyu.eun <huiyu.eun@samsung.com>
Tue, 20 Dec 2016 02:10:51 +0000 (11:10 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Tue, 20 Dec 2016 02:13:28 +0000 (11:13 +0900)
Change-Id: Ic054cd48e7cf571761533e28cebb26b30465ad64
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/video/tizen/SDL_tizenwindow.c
src/video/tizen/SDL_tizenwindow.h

index 45f4efa..8d46b54 100755 (executable)
@@ -133,19 +133,19 @@ _tizen_pre_rotation_set(SDL_WindowData *_this)
     SDL_Log("%s with angle %d",__FUNCTION__, _this->rotation);
     switch (_this->rotation) {
          case 90:
-            rot = ROTATION_270;
+            rot = TIZEN_ROTATION_270;
             break;
          case 180:
-            rot = ROTATION_180;
+            rot = TIZEN_ROTATION_180;
             break;
          case 270:
-            rot = ROTATION_90;
+            rot = TIZEN_ROTATION_90;
             break;
          case 0:
-            rot = ROTATION_0;
+            rot = TIZEN_ROTATION_0;
             break;
          default:
-            rot = ROTATION_0;
+            rot = TIZEN_ROTATION_0;
             break;
       }
 
@@ -288,7 +288,7 @@ Tizen_CreateWindow(_THIS, SDL_Window *window)
         //Support PreRotation
         wind->support_pre_rotation = 0;
         if (_tizen_PreRotatotion_LoadLibrary(wind, "libwayland-egl.so")) {
-            if (wind->tizen_pre_rotation_data->wl_egl_window_get_capabilities(wind->egl_window) == WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED ) {
+            if (wind->tizen_pre_rotation_data->wl_egl_window_get_capabilities(wind->egl_window) == TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED ) {
                 wind->support_pre_rotation = 1;
                 SDL_Log("Can support PreRotation");
             }
index 565fe68..7947092 100755 (executable)
@@ -59,6 +59,20 @@ typedef struct {
 
 } SDL_WindowData;
 
+enum tizen_wl_egl_window_capability {
+    TIZEN_WL_EGL_WINDOW_CAPABILITY_NONE = 0,
+    TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED = (1 << 0),
+    TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_UNSUPPORTED = (1 << 1),
+    TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_UNKNOWN = (1 << 2),
+};
+
+typedef enum {
+    TIZEN_ROTATION_0 = 0,
+    TIZEN_ROTATION_90 = 90,
+    TIZEN_ROTATION_180 = 180,
+    TIZEN_ROTATION_270 = 270
+} tizen_wl_egl_window_rotation;
+
 extern SDL_Window* Tizen_FindWindow(_THIS, Ecore_Wl_Window *ewin);
 extern void Tizen_ShowWindow(_THIS, SDL_Window *window);
 extern void Tizen_SetWindowFullscreen(_THIS, SDL_Window *window,