diff --git a/shell/platform/tizen/flutter_tizen.cc b/shell/platform/tizen/flutter_tizen.cc index c55dde5204c71..3218f43431694 100644 --- a/shell/platform/tizen/flutter_tizen.cc +++ b/shell/platform/tizen/flutter_tizen.cc @@ -77,6 +77,10 @@ void FlutterDesktopShutdownEngine(FlutterDesktopEngineRef engine_ref) { delete engine; } +void* FlutterDesktopGetWindow(FlutterDesktopPluginRegistrarRef registrar) { + return registrar->engine->renderer()->GetWindowHandle(); +} + void FlutterDesktopPluginRegistrarEnableInputBlocking( FlutterDesktopPluginRegistrarRef registrar, const char* channel) { diff --git a/shell/platform/tizen/public/flutter_tizen.h b/shell/platform/tizen/public/flutter_tizen.h index 0f14c8914b91b..1e423ac3ec1dd 100644 --- a/shell/platform/tizen/public/flutter_tizen.h +++ b/shell/platform/tizen/public/flutter_tizen.h @@ -91,6 +91,15 @@ FlutterDesktopGetPluginRegistrar(FlutterDesktopEngineRef engine, FLUTTER_EXPORT FlutterDesktopMessengerRef FlutterDesktopEngineGetMessenger(FlutterDesktopEngineRef engine); +/** + * Return backing window for manipulation in host application. + * + * If run engine on a wearable device, need cast void* to Evas_Objct*, + * otherwise cast void* to Ecore_Wl2_Window*. + */ +FLUTTER_EXPORT void* FlutterDesktopGetWindow( + FlutterDesktopPluginRegistrarRef registrar); + // Posts an app control to the engine instance. FLUTTER_EXPORT void FlutterDesktopNotifyAppControl( FlutterDesktopEngineRef engine, diff --git a/shell/platform/tizen/tizen_renderer_evas_gl.cc b/shell/platform/tizen/tizen_renderer_evas_gl.cc index 445c8d6bcd2ec..8eb235932c2e1 100644 --- a/shell/platform/tizen/tizen_renderer_evas_gl.cc +++ b/shell/platform/tizen/tizen_renderer_evas_gl.cc @@ -576,7 +576,7 @@ uintptr_t TizenRendererEvasGL::GetWindowId() { } void* TizenRendererEvasGL::GetWindowHandle() { - return nullptr; + return evas_window_; } Evas_Object* TizenRendererEvasGL::GetImageHandle() {