From c32e9793a59ba6ea5b58b207391836d28e3cfb77 Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Tue, 23 Aug 2016 10:50:49 +0900 Subject: [PATCH] Revert "e_comp_wl: Add a subclass argument in device header and print it using e_info" This reverts commit 4f15b929d41430c39ccf3e5cd8c8161a06626125. Change-Id: I0d52bbe07e60e00eb498cef1fa0ebde604a8e71b Signed-off-by: Gwanglim Lee --- src/bin/e_comp_wl.h | 1 - src/bin/e_info_client.c | 56 ++++++----------------------------------- src/bin/e_info_server.c | 4 +-- 3 files changed, 9 insertions(+), 52 deletions(-) diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index a56e3b0c88..2e6cd69135 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -154,7 +154,6 @@ struct _E_Comp_Wl_Input_Device const char *name; const char *identifier; Ecore_Device_Class clas; - Ecore_Device_Subclass subclas; }; struct _E_Comp_Wl_Data diff --git a/src/bin/e_info_client.c b/src/bin/e_info_client.c index ebce388945..8faedcb413 100644 --- a/src/bin/e_info_client.c +++ b/src/bin/e_info_client.c @@ -43,7 +43,7 @@ typedef struct _E_Win_Info #define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbiibbbiis" #define VALUE_TYPE_REQUEST_RESLIST "ui" #define VALUE_TYPE_REPLY_RESLIST "ssi" -#define VALUE_TYPE_FOR_INPUTDEV "ssii" +#define VALUE_TYPE_FOR_INPUTDEV "ssi" static E_Info_Client e_info_client; @@ -178,13 +178,11 @@ _cb_input_device_info_get(const Eldbus_Message *msg) char *dev_name; char *identifier; int clas; - int subclas; res = eldbus_message_iter_arguments_get(eldbus_msg, VALUE_TYPE_FOR_INPUTDEV, &dev_name, &identifier, - &clas, - &subclas); + &clas); if (!res) { printf("Failed to get device info\n"); @@ -195,7 +193,6 @@ _cb_input_device_info_get(const Eldbus_Message *msg) dev->name = strdup(dev_name); dev->identifier = strdup(identifier); dev->clas = clas; - dev->subclas = subclas; e_info_client.input_dev = eina_list_append(e_info_client.input_dev, dev); } @@ -464,44 +461,6 @@ _e_info_client_proc_topvwins_info(int argc, char **argv) E_FREE_LIST(e_info_client.win_list, _e_win_info_free); } -static const char * -_e_info_client_device_subclass_get(Ecore_Device_Subclass subclas) -{ - switch (subclas) - { - case ECORE_DEVICE_SUBCLASS_NONE: - return "None"; - case ECORE_DEVICE_SUBCLASS_FINGER: - return "Finger"; - case ECORE_DEVICE_SUBCLASS_FINGERNAIL: - return "Fingernail"; - case ECORE_DEVICE_SUBCLASS_KNUCKLE: - return "Knuckle"; - case ECORE_DEVICE_SUBCLASS_PALM: - return "Palm"; - case ECORE_DEVICE_SUBCLASS_HAND_SIZE: - return "Hand Size"; - case ECORE_DEVICE_SUBCLASS_HAND_FLAT: - return "Hand Flat"; - case ECORE_DEVICE_SUBCLASS_PEN_TIP: - return "Pen Tip"; - case ECORE_DEVICE_SUBCLASS_TRACKPAD: - return "Trackpad"; - case ECORE_DEVICE_SUBCLASS_TRACKPOINT: - return "Trackpoint"; - case ECORE_DEVICE_SUBCLASS_TRACKBALL: - return "Trackball"; - case ECORE_DEVICE_SUBCLASS_BUILTIN: - return "Builtin Device"; - case ECORE_DEVICE_SUBCLASS_SW_KEYBOARD: - return "Software Keyboard"; - case ECORE_DEVICE_SUBCLASS_HW_KEYBOARD: - return "Hardware Keyboard"; - default: - return "Unknown Subclass"; - } -} - static void _e_info_client_proc_input_device_info(int argc, char **argv) { @@ -513,7 +472,7 @@ _e_info_client_proc_input_device_info(int argc, char **argv) return; printf("--------------------------------------[ input devices ]----------------------------------------------------------\n"); - printf(" No Name identifier Class Subclass\n"); + printf(" No Name identifier Cap\n"); printf("-----------------------------------------------------------------------------------------------------------------\n"); if (!e_info_client.input_dev) @@ -525,12 +484,11 @@ _e_info_client_proc_input_device_info(int argc, char **argv) EINA_LIST_FOREACH(e_info_client.input_dev, l, dev) { i++; - printf("%3d %30s %20s ", i, dev->name, dev->identifier); - if (dev->clas == ECORE_DEVICE_CLASS_MOUSE) printf("Mouse | "); + printf("%3d %50s %20s ", i, dev->name, dev->identifier); + if (dev->clas == ECORE_DEVICE_CLASS_MOUSE) printf("Mouse | "); else if (dev->clas == ECORE_DEVICE_CLASS_KEYBOARD) printf("Keyboard | "); - else if (dev->clas == ECORE_DEVICE_CLASS_TOUCH) printf("Touch | "); - printf("(0x%x) %s", dev->clas, _e_info_client_device_subclass_get(dev->subclas)); - printf("\n"); + else if (dev->clas == ECORE_DEVICE_CLASS_TOUCH) printf("Touch | "); + printf("(0x%x)\n", dev->clas); } E_FREE_LIST(e_info_client.input_dev, free); diff --git a/src/bin/e_info_server.c b/src/bin/e_info_server.c index fa8841267a..d353c964e9 100644 --- a/src/bin/e_info_server.c +++ b/src/bin/e_info_server.c @@ -70,7 +70,7 @@ static Eina_List *module_hook = NULL; #define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbiibbbiis" #define VALUE_TYPE_REQUEST_RESLIST "ui" #define VALUE_TYPE_REPLY_RESLIST "ssi" -#define VALUE_TYPE_FOR_INPUTDEV "ssii" +#define VALUE_TYPE_FOR_INPUTDEV "ssi" static E_Info_Transform *_e_info_transform_new(E_Client *ec, int id, int enable, int x, int y, int sx, int sy, int degree, int keep_ratio); static E_Info_Transform *_e_info_transform_find(E_Client *ec, int id); @@ -192,7 +192,7 @@ _input_msg_clients_append(Eldbus_Message_Iter *iter) eldbus_message_iter_arguments_append (struct_of_input, VALUE_TYPE_FOR_INPUTDEV, - dev->name, dev->identifier, dev->clas, dev->subclas); + dev->name, dev->identifier, dev->clas); eldbus_message_iter_container_close(array_of_input, struct_of_input); } -- 2.34.1