Skip to content

Commit 68e2976

Browse files
authored
Add get native window interface (#209)
* Add get ecore window interface. * Change get window method name * Fix build error * Fix build error * Add comment for getting window interface * Remove not used code * Change interface name 1.Change interface name, make it more clearly. 2.Move HandleForRender and RendererFromHandle to unnamed namspace. * Get window from FlutterDesktopPluginRegistrarRef * Merge GetWindow and GetWindowHandle
1 parent 9a3333f commit 68e2976

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

shell/platform/tizen/flutter_tizen.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ void FlutterDesktopShutdownEngine(FlutterDesktopEngineRef engine_ref) {
7777
delete engine;
7878
}
7979

80+
void* FlutterDesktopGetWindow(FlutterDesktopPluginRegistrarRef registrar) {
81+
return registrar->engine->renderer()->GetWindowHandle();
82+
}
83+
8084
void FlutterDesktopPluginRegistrarEnableInputBlocking(
8185
FlutterDesktopPluginRegistrarRef registrar,
8286
const char* channel) {

shell/platform/tizen/public/flutter_tizen.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@ FlutterDesktopGetPluginRegistrar(FlutterDesktopEngineRef engine,
9191
FLUTTER_EXPORT FlutterDesktopMessengerRef
9292
FlutterDesktopEngineGetMessenger(FlutterDesktopEngineRef engine);
9393

94+
/**
95+
* Return backing window for manipulation in host application.
96+
*
97+
* If run engine on a wearable device, need cast void* to Evas_Objct*,
98+
* otherwise cast void* to Ecore_Wl2_Window*.
99+
*/
100+
FLUTTER_EXPORT void* FlutterDesktopGetWindow(
101+
FlutterDesktopPluginRegistrarRef registrar);
102+
94103
// Posts an app control to the engine instance.
95104
FLUTTER_EXPORT void FlutterDesktopNotifyAppControl(
96105
FlutterDesktopEngineRef engine,

shell/platform/tizen/tizen_renderer_evas_gl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ uintptr_t TizenRendererEvasGL::GetWindowId() {
576576
}
577577

578578
void* TizenRendererEvasGL::GetWindowHandle() {
579-
return nullptr;
579+
return evas_window_;
580580
}
581581

582582
Evas_Object* TizenRendererEvasGL::GetImageHandle() {

0 commit comments

Comments
 (0)