Remove wl_keyboard_release and wl_touch_release functions.

NB: Once again, they are redefined in the protocol (for now), so don't
need them here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-09-11 08:28:22 +01:00
parent 01717bde88
commit 131eb77926
1 changed files with 33 additions and 17 deletions

View File

@ -91,6 +91,12 @@ static void _e_comp_wl_pointer_unmap(E_Wayland_Surface *ews);
static void _e_comp_wl_pointer_cb_cursor_set(struct wl_client *client, struct wl_resource *resource, unsigned int serial, struct wl_resource *surface_resource, int x, int y);
static void _e_comp_wl_pointer_cb_release(struct wl_client *client, struct wl_resource *resource);
/* keyboard interface prototypes */
static void _e_comp_wl_keyboard_cb_release(struct wl_client *client, struct wl_resource *resource);
/* touch interface prototypes */
static void _e_comp_wl_touch_cb_release(struct wl_client *client, struct wl_resource *resource);
/* region interface prototypes */
static void _e_comp_wl_region_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource);
static void _e_comp_wl_region_cb_add(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int x, int y, int w, int h);
@ -135,6 +141,16 @@ static const struct wl_pointer_interface _e_pointer_interface =
_e_comp_wl_pointer_cb_release
};
static const struct wl_keyboard_interface _e_keyboard_interface =
{
_e_comp_wl_keyboard_cb_release
};
static const struct wl_touch_interface _e_touch_interface =
{
_e_comp_wl_touch_cb_release
};
static const struct wl_region_interface _e_region_interface =
{
_e_comp_wl_region_cb_destroy,
@ -647,14 +663,6 @@ wl_keyboard_init(struct wl_keyboard *keyboard)
wl_signal_init(&keyboard->focus_signal);
}
EAPI void
wl_keyboard_release(struct wl_keyboard *keyboard)
{
if (keyboard->focus_resource)
wl_list_remove(&keyboard->focus_listener.link);
wl_array_release(&keyboard->keys);
}
EAPI void
wl_keyboard_set_focus(struct wl_keyboard *keyboard, struct wl_resource *surface)
{
@ -722,13 +730,6 @@ wl_touch_init(struct wl_touch *touch)
wl_signal_init(&touch->focus_signal);
}
EAPI void
wl_touch_release(struct wl_touch *touch)
{
if (touch->focus_resource)
wl_list_remove(&touch->focus_listener.link);
}
EAPI void
wl_touch_start_grab(struct wl_touch *device, struct wl_touch_grab *grab)
{
@ -2145,7 +2146,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
wl_resource_get_version(resource), id);
wl_list_insert(&input->wl.seat.keyboard->resource_list,
wl_resource_get_link(kbd));
wl_resource_set_implementation(kbd, NULL, input,
wl_resource_set_implementation(kbd, &_e_keyboard_interface, input,
_e_comp_wl_input_cb_unbind);
/* send the current keymap to the keyboard object */
@ -2184,7 +2185,8 @@ _e_comp_wl_input_cb_touch_get(struct wl_client *client, struct wl_resource *reso
tch = wl_resource_create(client, &wl_touch_interface,
wl_resource_get_version(resource), id);
wl_list_insert(&input->wl.seat.touch->resource_list, &tch->link);
wl_resource_set_implementation(tch, NULL, input, _e_comp_wl_input_cb_unbind);
wl_resource_set_implementation(tch, &_e_touch_interface, input,
_e_comp_wl_input_cb_unbind);
}
/* pointer functions */
@ -2394,6 +2396,20 @@ _e_comp_wl_pointer_cb_release(struct wl_client *client EINA_UNUSED, struct wl_re
wl_resource_destroy(resource);
}
/* keyboard interface functions */
static void
_e_comp_wl_keyboard_cb_release(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
wl_resource_destroy(resource);
}
/* touch interface functions */
static void
_e_comp_wl_touch_cb_release(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
wl_resource_destroy(resource);
}
/* region interface functions */
static void
_e_comp_wl_region_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)