// TIZEN_ONLY(20150722): Add ecore_wl_window_keygrab_* APIs
static void _ecore_wl_cb_keygrab_notify(void *data, struct tizen_keyrouter *tizen_keyrouter, struct wl_surface *surface, uint32_t key, uint32_t mode, uint32_t error);
static void _ecore_wl_cb_keygrab_notify_list(void *data, struct tizen_keyrouter *tizen_keyrouter, struct wl_surface *surface, struct wl_array *grab_result);
+static void _ecore_wl_cb_getgrab_notify_list(void *data EINA_UNUSED, struct tizen_keyrouter *tizen_keyrouter EINA_UNUSED, struct wl_surface *surface EINA_UNUSED, struct wl_array *grab_result EINA_UNUSED);
+static void _ecore_wl_cb_set_register_none_key(void *data EINA_UNUSED, struct tizen_keyrouter *tizen_keyrouter EINA_UNUSED, struct wl_surface *surface EINA_UNUSED, uint32_t mode EINA_UNUSED);
+static void _ecore_wl_cb_keyregister_notify(void *data EINA_UNUSED, struct tizen_keyrouter *tizen_keyrouter EINA_UNUSED, uint32_t status EINA_UNUSED);
+static void _ecore_wl_cb_set_input_config(void *data EINA_UNUSED, struct tizen_keyrouter *tizen_keyrouter EINA_UNUSED, uint32_t status EINA_UNUSED);
+static void _ecore_wl_cb_key_cancel(void *data EINA_UNUSED, struct tizen_keyrouter *tizen_keyrouter EINA_UNUSED, uint32_t key);
//
static void _ecore_wl_cb_conformant(void *data EINA_UNUSED, struct tizen_policy *tizen_policy EINA_UNUSED, struct wl_surface *surface_resource, uint32_t is_conformant);
static void _ecore_wl_cb_conformant_area(void *data EINA_UNUSED, struct tizen_policy *tizen_policy EINA_UNUSED, struct wl_surface *surface_resource, uint32_t conformant_part, uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h);
static const struct tizen_keyrouter_listener _ecore_tizen_keyrouter_listener =
{
_ecore_wl_cb_keygrab_notify,
- _ecore_wl_cb_keygrab_notify_list
+ _ecore_wl_cb_keygrab_notify_list,
+ _ecore_wl_cb_getgrab_notify_list,
+ _ecore_wl_cb_set_register_none_key,
+ _ecore_wl_cb_keyregister_notify,
+ _ecore_wl_cb_set_input_config,
+ _ecore_wl_cb_key_cancel
};
//
ewd->wl.keyrouter =
wl_registry_bind(registry, id, &tizen_keyrouter_interface, 1);
if (ewd->wl.keyrouter)
- tizen_keyrouter_add_listener(_ecore_wl_disp->wl.keyrouter, &_ecore_tizen_keyrouter_listener, ewd->wl.display);
+ tizen_keyrouter_add_listener(_ecore_wl_disp->wl.keyrouter, &_ecore_tizen_keyrouter_listener, ewd->input);
}
//
else if (!strcmp(interface, "tizen_input_device_manager"))
wl_array_copy(&_ecore_wl_keygrab_result_list, grab_result);
}
+static void
+_ecore_wl_cb_getgrab_notify_list(void *data EINA_UNUSED, struct tizen_keyrouter *tizen_keyrouter EINA_UNUSED, struct wl_surface *surface EINA_UNUSED, struct wl_array *grab_result EINA_UNUSED)
+{
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+}
+
+static void
+_ecore_wl_cb_set_register_none_key(void *data EINA_UNUSED, struct tizen_keyrouter *tizen_keyrouter EINA_UNUSED, struct wl_surface *surface EINA_UNUSED, uint32_t mode EINA_UNUSED)
+{
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+}
+
+static void
+_ecore_wl_cb_keyregister_notify(void *data EINA_UNUSED, struct tizen_keyrouter *tizen_keyrouter EINA_UNUSED, uint32_t status EINA_UNUSED)
+{
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+}
+
+static void
+_ecore_wl_cb_set_input_config(void *data EINA_UNUSED, struct tizen_keyrouter *tizen_keyrouter EINA_UNUSED, uint32_t status EINA_UNUSED)
+{
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+}
+
+static void
+_ecore_wl_cb_key_cancel(void *data, struct tizen_keyrouter *tizen_keyrouter EINA_UNUSED, uint32_t key)
+{
+ Ecore_Wl_Input *input = (Ecore_Wl_Input *)data;
+
+ if (!input)
+ {
+ WRN("Failed to get Ecore_Wl_Input\n");
+ return;
+ }
+
+ if (input->repeat.key == key)
+ {
+ input->repeat.sym = 0;
+ input->repeat.key = 0;
+ input->repeat.time = 0;
+
+ if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr);
+ input->repeat.tmr = NULL;
+ }
+}
+
+
struct _Keycode_Map
{
xkb_keysym_t keysym;