[SDL_Tizen] Add SDL_Tizen_GetNativeWindow() 70/195070/3 accepted/tizen/unified/20181211.064656 submit/tizen/20181211.010903
authorhuiyu.eun <huiyu.eun@samsung.com>
Mon, 10 Dec 2018 09:43:30 +0000 (18:43 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Tue, 11 Dec 2018 01:00:05 +0000 (10:00 +0900)
Change-Id: I9903ceef19d3c01022a4c4b3c845c8c3b01f0475
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/video/tizen/SDL_tizenwindow.c
src/video/tizen/SDL_tizenwindow.h

index c25f6a0..4572bcf 100755 (executable)
@@ -686,6 +686,24 @@ SDL_Tizen_GetSupportedAuxiliaryHint(SDL_Window *window, unsigned int index)
     return NULL;
 }
 
+Ecore_Wl2_Window*
+SDL_Tizen_GetNativeWindow(SDL_Window *window)
+{
+    SDL_WindowData *wind = NULL;
+    Ecore_Wl2_Window *ecore_window = NULL;
+
+    if (!window || !window->driverdata) {
+        return NULL;
+    }
+
+    wind = (SDL_WindowData *) window->driverdata;
+    if (wind->window) {
+        ecore_window = wind->window;
+    }
+
+    return ecore_window;
+}
+
 unsigned int
 SDL_Tizen_AddAuxiliaryHint(SDL_Window *window, const char *hint, const char *value)
 {
index b7cb4a7..e0ad2ed 100755 (executable)
@@ -119,6 +119,14 @@ extern void _tizen_quickpanel_on(SDL_WindowData *wind);
 extern void _tizen_quickpanel_off(SDL_WindowData *wind);
 
 /**
+ *  \brief Gets the ecore_wl2_window.
+ *
+ *  \param window SDL_Window
+ *  \return Ecore_Wl2_Window.
+ */
+extern TIZEN_INTERNAL_API Ecore_Wl2_Window* SDL_Tizen_GetNativeWindow(SDL_Window *window);
+
+/**
  *  \brief Gets the count of supported auxiliary hints of the window.
  *
  *  \param window SDL_Window