Ecore_Wl2_Splitscreen_Region *_ecore_wl2_splitscreen_region_get(Ecore_Wl2_Splitscreen *ewsp, const char *name);
void _ecore_wl2_splitscreen_region_assign_appid(Ecore_Wl2_Splitscreen_Region *ewsr, const char *appid);
Eina_Bool _ecore_wl2_splitscreen_region_get_geometry(Ecore_Wl2_Splitscreen_Region *ewsr, int *x, int *y, int *w, int *h);
+Eina_Bool _ecore_wl2_screen_aux_hint_splitscreen_helper(Ecore_Wl2_Window *win, const char *hint, const char *val);
//
#endif
}
free(ewsr);
}
+
+Eina_Bool
+_ecore_wl2_screen_aux_hint_splitscreen_helper(Ecore_Wl2_Window *win, const char *hint, const char *val)
+{
+ Ecore_Wl2_Screen *ews = NULL;
+ Ecore_Wl2_Splitscreen *ewsp = NULL;
+ Ecore_Wl2_Splitscreen_Region *ewsr = NULL;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, EINA_FALSE);
+
+ if (!strcmp(hint, "wm.splitscreen.win.split_screen_manager.assign_region.sub1"))
+ {
+ ews = _ecore_wl2_display_screen_get(win->display);
+ if (!ews) return EINA_FALSE;
+
+ ewsp = _ecore_wl2_screen_splitscreen_get(ews);
+ if (!ewsp) return EINA_FALSE;
+
+ ewsr = _ecore_wl2_splitscreen_region_get(ewsp, "sub1");
+ if (!ewsr) return EINA_FALSE;
+
+ _ecore_wl2_splitscreen_region_assign_appid(ewsr, val);
+ return EINA_TRUE;
+ }
+ else if (!strcmp(hint, "wm.splitscreen.win.split_screen_manager.assign_region.sub2"))
+ {
+ ews = _ecore_wl2_display_screen_get(win->display);
+ if (!ews) return EINA_FALSE;
+
+ ewsp = _ecore_wl2_screen_splitscreen_get(ews);
+ if (!ewsp) return EINA_FALSE;
+
+ ewsr = _ecore_wl2_splitscreen_region_get(ewsp, "sub2");
+ if (!ewsr) return EINA_FALSE;
+
+ _ecore_wl2_splitscreen_region_assign_appid(ewsr, val);
+ return EINA_TRUE;
+ }
+ else if (!strcmp(hint, "wm.splitscreen.win.split_screen_manager.activate"))
+ {
+ ews = _ecore_wl2_display_screen_get(win->display);
+ if (!ews) return EINA_FALSE;
+
+ ewsp = _ecore_wl2_screen_splitscreen_get(ews);
+ if (!ewsp) return EINA_FALSE;
+
+ _ecore_wl2_splitscreen_activate(ewsp);
+ return EINA_TRUE;
+ }
+ else if (!strcmp(hint, "wm.splitscreen.win.split_screen_manager.deactivate"))
+ {
+ ews = _ecore_wl2_display_screen_get(win->display);
+ if (!ews) return EINA_FALSE;
+
+ ewsp = _ecore_wl2_screen_splitscreen_get(ews);
+ if (!ewsp) return EINA_FALSE;
+
+ _ecore_wl2_splitscreen_deactivate(ewsp);
+ return EINA_TRUE;
+ }
+
+ return EINA_FALSE;
+}
if (!_ecore_wl2_window_aux_hint_list_add(win, id, hint, val))
return -1;
+// TIZEN_ONLY(20230312): support wtz_split_screen
+// WORKAROUND: for temporary solution using wayland protocol instead of aux_hint
+ if (_ecore_wl2_screen_aux_hint_splitscreen_helper(win, hint, val))
+ return id;
+//
// add aux hint
if ((win->surface) && (win->display->wl.tz_policy))
{
if (!win) return;
+// TIZEN_ONLY(20230312): support wtz_split_screen
+// WORKAROUND: for temporary solution using wayland protocol instead of aux_hint
+ if (_ecore_wl2_screen_aux_hint_splitscreen_helper(win, hint, val))
+ return;
+//
+
// TIZEN_ONLY : To use tizen protocols
if ((win->surface) && (win->display->wl.tz_policy))
tizen_policy_add_aux_hint(win->display->wl.tz_policy, win->surface, id, hint, val);
EAPI void
ecore_wl2_window_aux_hint_change(Ecore_Wl2_Window *win, int id, const char *val)
{
+ Ecore_Wl2_Window_Aux_Hint *ewah = NULL;
if (!win) return;
+// TIZEN_ONLY(20230312): support wtz_split_screen
+// WORKAROUND: for temporary solution using wayland protocol instead of aux_hint
+ ewah = _ecore_wl2_window_aux_hint_get_by_id(win, id);
+ if (ewah && _ecore_wl2_screen_aux_hint_splitscreen_helper(win, ewah->hint, val))
+ return;
+//
+
// TIZEN_ONLY : To use tizen protocols
if ((win->surface) && (win->display->wl.tz_policy))
tizen_policy_change_aux_hint(win->display->wl.tz_policy, win->surface, id, val);
//
// TIZEN_ONLY(20210330): for maintain internal aux hint list
- Ecore_Wl2_Window_Aux_Hint *ewah = NULL;
- ewah = _ecore_wl2_window_aux_hint_get_by_id(win, id);
if (ewah)
_ecore_wl2_window_aux_hint_list_change(win, ewah, val);
//