version up of tizen_input_device_manager_interface 35/257835/2
authordyamy-lee <dyamy.lee@samsung.com>
Tue, 4 May 2021 04:41:44 +0000 (13:41 +0900)
committerdyamy-lee <dyamy.lee@samsung.com>
Tue, 4 May 2021 09:06:30 +0000 (18:06 +0900)
for using ecore wl2 api, it needs tizen_input_device_manager_interface version 4.
So it changed version 2->4.

Change-Id: Idb2f15bf0b4facdb88ffe56fa6fee88df0467db5

src/lib/devicemgr/pepper-devicemgr.c

index 70cc59c..6f3d708 100644 (file)
@@ -546,6 +546,17 @@ _pepper_devicemgr_cb_destroy(struct wl_client *client, struct wl_resource *resou
 {
        wl_resource_destroy(resource);
 }
+static void
+_pepper_devicemgr_cb_generate_axis(struct wl_client *client, struct wl_resource *resource, uint32_t type, wl_fixed_t value)
+{
+       tizen_input_device_manager_send_error(resource, TIZEN_INPUT_DEVICE_MANAGER_ERROR_NO_SYSTEM_RESOURCES);
+}
+
+static void
+_pepper_devicemgr_cb_set_touch_count(struct wl_client *client, struct wl_resource *resource, int32_t max_count)
+{
+       tizen_input_device_manager_send_error(resource, TIZEN_INPUT_DEVICE_MANAGER_ERROR_NO_SYSTEM_RESOURCES);
+}
 
 
 static const struct tizen_input_device_manager_interface _pepper_devmgr_implementation = {
@@ -559,6 +570,8 @@ static const struct tizen_input_device_manager_interface _pepper_devmgr_implemen
    _pepper_devicemgr_cb_pointer_warp,
    _pepper_devicemgr_cb_init_generator_with_name,
    _pepper_devicemgr_cb_destroy,
+   _pepper_devicemgr_cb_generate_axis, //v4
+   _pepper_devicemgr_cb_set_touch_count,
 };
 
 /* tizen_devicemgr global object bind function */
@@ -600,7 +613,7 @@ _pepper_devicemgr_cb_bind(struct wl_client *client, void *data, uint32_t version
        PEPPER_CHECK(client, return, "Invalid client\n");
        PEPPER_CHECK(pepper_devicemgr, return, "Invalid pepper_devicemgr_t\n");
 
-       resource = wl_resource_create(client, &tizen_input_device_manager_interface, 2, id);
+       resource = wl_resource_create(client, &tizen_input_device_manager_interface, MIN(version,4), id);
        if (!resource) {
                PEPPER_ERROR("Failed to create resource ! (version :%d, id:%d)", version, id);
                wl_client_post_no_memory(client);
@@ -664,7 +677,7 @@ pepper_devicemgr_create(pepper_compositor_t *compositor, pepper_seat_t *seat)
        pepper_list_init(&pepper_devicemgr->resources);
        pepper_list_init(&pepper_devicemgr->blocked_keys);
 
-       global = wl_global_create(display, &tizen_input_device_manager_interface, 2, pepper_devicemgr, _pepper_devicemgr_cb_bind);
+       global = wl_global_create(display, &tizen_input_device_manager_interface, 4, pepper_devicemgr, _pepper_devicemgr_cb_bind);
        PEPPER_CHECK(global, goto failed, "Failed to create wl_global for tizen_devicemgr\n");
 
        pepper_devicemgr->devicemgr = devicemgr_create(compositor, seat);