*/
EAPI int ecore_evas_aux_hint_id_get(const Ecore_Evas *ee, const char *hint);
+// TIZEN_ONLY(20160201) : support to handle input rectangle
+EAPI void ecore_evas_input_rect_set(Ecore_Evas *ee, Eina_Rectangle *input_rect);
+EAPI void ecore_evas_input_rect_add(Ecore_Evas *ee, Eina_Rectangle *input_rect);
+EAPI void ecore_evas_input_rect_subtract(Ecore_Evas *ee, Eina_Rectangle *input_rect);
+//
+
/**
* @brief Sends message to parent ecore.
*
return -1;
}
+// TIZEN_ONLY(20160201) : support to handle input rectangle
+EAPI void
+ecore_evas_input_rect_set(Ecore_Evas *ee, Eina_Rectangle *input_rect)
+{
+ ECORE_EVAS_CHECK(ee);
+
+ if (!strncmp(ee->driver, "wayland", 7))
+ {
+ Ecore_Evas_Interface_Wayland *iface;
+ iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
+ EINA_SAFETY_ON_NULL_RETURN(iface);
+
+ if (iface->input_rect_set)
+ iface->input_rect_set(ee, input_rect);
+
+ return;
+ }
+}
+
+EAPI void
+ecore_evas_input_rect_add(Ecore_Evas *ee, Eina_Rectangle *input_rect)
+{
+ ECORE_EVAS_CHECK(ee);
+
+ if (!strncmp(ee->driver, "wayland", 7))
+ {
+ Ecore_Evas_Interface_Wayland *iface;
+ iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
+ EINA_SAFETY_ON_NULL_RETURN(iface);
+
+ if (iface->input_rect_add)
+ iface->input_rect_add(ee, input_rect);
+
+ return;
+ }
+}
+
+EAPI void
+ecore_evas_input_rect_subtract(Ecore_Evas *ee, Eina_Rectangle *input_rect)
+{
+ ECORE_EVAS_CHECK(ee);
+
+ if (!strncmp(ee->driver, "wayland", 7))
+ {
+ Ecore_Evas_Interface_Wayland *iface;
+ iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
+ EINA_SAFETY_ON_NULL_RETURN(iface);
+
+ if (iface->input_rect_subtract)
+ iface->input_rect_subtract(ee, input_rect);
+
+ return;
+ }
+}
+//
+
EAPI void
ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
{
void (*aux_hint_add)(Ecore_Evas *ee, int id, const char *hint, const char *val);
void (*aux_hint_change)(Ecore_Evas *ee, int id, const char *val);
void (*aux_hint_del)(Ecore_Evas *ee, int id);
+ // TIZEN_ONLY(20160201) : support to handle input rectangle
+ void (*input_rect_set)(Ecore_Evas *ee, Eina_Rectangle *input_rect);
+ void (*input_rect_add)(Ecore_Evas *ee, Eina_Rectangle *input_rect);
+ void (*input_rect_subtract)(Ecore_Evas *ee, Eina_Rectangle *input_rect);
+ //
};
#endif
*/
EAPI void ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, int y, int w, int h);
+// TIZEN_ONLY(20160201) : support to handle input rectangle
+EAPI void ecore_wl2_window_input_rect_set(Ecore_Wl2_Window *win, Eina_Rectangle *input_rect);
+EAPI void ecore_wl2_window_input_rect_add(Ecore_Wl2_Window *win, Eina_Rectangle *input_rect);
+EAPI void ecore_wl2_window_input_rect_subtract(Ecore_Wl2_Window *win, Eina_Rectangle *input_rect);
+//
+
/**
* Set the input region of the Ecore_Wl2_Window.
*
Eina_Rectangle saved;
Eina_Rectangle opaque;
Eina_Rectangle input_rect;
+ // TIZEN_ONLY(20160201) : support to handle input rectangle
+ struct wl_region *input_region;
+ //
// TIZEN_ONLY(20160323)
struct
if (window->title) eina_stringshare_del(window->title);
if (window->class) eina_stringshare_del(window->class);
if (window->role) eina_stringshare_del(window->role);
+ // TIZEN_ONLY(20160201) : support to handle input rectangle
+ if (window->input_region) wl_region_destroy(window->input_region);
+ window->input_region = NULL;
+ //
display->windows =
eina_inlist_remove(display->windows, EINA_INLIST_GET(window));
window->pending.opaque = EINA_TRUE;
}
+// TIZEN_ONLY(20160201) : support to handle input rectangle
+EAPI void
+ecore_wl2_window_input_rect_set(Ecore_Wl2_Window *win, Eina_Rectangle *input_rect)
+{
+ if (!win) return;
+ if (!input_rect) return;
+ if (win->input_region)
+ {
+ wl_region_destroy(win->input_region);
+ win->input_region = NULL;
+ }
+
+ win->input_rect.x = input_rect->x;
+ win->input_rect.y = input_rect->y;
+ win->input_rect.w = input_rect->w;
+ win->input_rect.h = input_rect->h;
+
+ if (win->type != ECORE_WL2_WINDOW_TYPE_DND)
+ {
+ struct wl_region *region;
+ region = wl_compositor_create_region(win->display->wl.compositor);
+ if (!region) return;
+
+ wl_region_add(region, input_rect->x, input_rect->y, input_rect->w, input_rect->h);
+ wl_surface_set_input_region(win->surface, region);
+ wl_region_destroy(region);
+ }
+}
+
+EAPI void
+ecore_wl2_window_input_rect_add(Ecore_Wl2_Window *win, Eina_Rectangle *input_rect)
+{
+ if (!win) return;
+ if (!input_rect) return;
+ if (input_rect->x < 0 || input_rect->y < 0) return;
+
+ if (win->type != ECORE_WL2_WINDOW_TYPE_DND)
+ {
+ if (!win->input_region)
+ {
+ struct wl_region *region;
+ region = wl_compositor_create_region(win->display->wl.compositor);
+ if (!region) return;
+
+ win->input_region = region;
+ }
+
+ wl_region_add(win->input_region, input_rect->x, input_rect->y, input_rect->w, input_rect->h);
+ wl_surface_set_input_region(win->surface, win->input_region);
+ }
+}
+
+EAPI void
+ecore_wl2_window_input_rect_subtract(Ecore_Wl2_Window *win, Eina_Rectangle *input_rect)
+{
+ if (!win) return;
+ if (!input_rect) return;
+ if (input_rect->x < 0 || input_rect->y < 0) return;
+ if (!win->input_region) return;
+
+ if (win->type != ECORE_WL2_WINDOW_TYPE_DND)
+ {
+ wl_region_subtract(win->input_region, input_rect->x, input_rect->y, input_rect->w, input_rect->h);
+ wl_surface_set_input_region(win->surface, win->input_region);
+ }
+}
+//
+
EAPI void
ecore_wl2_window_input_region_set(Ecore_Wl2_Window *window, int x, int y, int w, int h)
{
ecore_wl2_window_aux_hint_del(wdata->win, id);
}
+// TIZEN_ONLY(20160201) : support to handle input rectangle
+static void
+_ecore_evas_wayland_input_rect_set(Ecore_Evas *ee, Eina_Rectangle *input_rect)
+{
+ Ecore_Evas_Engine_Wl_Data *wdata;
+
+ if (!ee) return;
+ wdata = ee->engine.data;
+ ecore_wl2_window_input_rect_set(wdata->win, input_rect);
+}
+
+static void
+_ecore_evas_wayland_input_rect_add(Ecore_Evas *ee, Eina_Rectangle *input_rect)
+{
+ Ecore_Evas_Engine_Wl_Data *wdata;
+
+ if (!ee) return;
+ wdata = ee->engine.data;
+ ecore_wl2_window_input_rect_add(wdata->win, input_rect);
+}
+
+static void
+_ecore_evas_wayland_input_rect_subtract(Ecore_Evas *ee, Eina_Rectangle *input_rect)
+{
+ Ecore_Evas_Engine_Wl_Data *wdata;
+
+ if (!ee) return;
+ wdata = ee->engine.data;
+ ecore_wl2_window_input_rect_subtract(wdata->win, input_rect);
+}
+//
+
static Ecore_Evas_Interface_Wayland *
_ecore_evas_wl_interface_new(void)
{
iface->aux_hint_add = _ecore_evas_wayland_aux_hint_add;
iface->aux_hint_change = _ecore_evas_wayland_aux_hint_change;
iface->aux_hint_del = _ecore_evas_wayland_aux_hint_del;
+ // TIZEN_ONLY(20160201) : support to handle input rectangle
+ iface->input_rect_set = _ecore_evas_wayland_input_rect_set;
+ iface->input_rect_add = _ecore_evas_wayland_input_rect_add;
+ iface->input_rect_subtract = _ecore_evas_wayland_input_rect_subtract;
+ //
return iface;
}