and then use it.
Change-Id: Ia26b11331dd2da4529f85cf05c13372f8ebe255a
eina_log_domain_level_set((const char*)module_name, level);
if (!e_util_strcmp(module_name, "e_input"))
- {
- if (!e_input_device_libinput_log_level_set(NULL, level))
- ERR("an attempt to set libinput log level(%d) failed", level);
- else
- INF("Setting libinput log level(%d) succeeded", level);
- }
+ e_input_device_libinput_log_level_set(NULL, level);
parse_end:
start = strchr(tmp, ',');
return EINA_TRUE;
}
+
+EINTERN void
+e_input_backend_log_level_set(E_Input_Backend *input, unsigned int level)
+{
+ EINA_SAFETY_ON_NULL_RETURN(input);
+
+ if (input->log_disable)
+ {
+ ERR("Failed to set libinput log priority(%d) (input->log_disable:True)", level);
+ return;
+ }
+
+ if (!input->log_use_eina)
+ {
+ ERR("Failed to set libinput log priority(%d) (input->log_use_eina:False)", level);
+ return;
+ }
+
+ switch (level)
+ {
+ case 1:
+ libinput_log_set_priority(input->libinput, LIBINPUT_LOG_PRIORITY_ERROR);
+ break;
+ case 3:
+ libinput_log_set_priority(input->libinput, LIBINPUT_LOG_PRIORITY_INFO);
+ break;
+ case 5:
+ libinput_log_set_priority(input->libinput, LIBINPUT_LOG_PRIORITY_DEBUG);
+ break;
+ default:
+ break;
+ }
+}
EINTERN E_Input_Backend *e_input_backend_create_libinput_udev(void);
EINTERN E_Input_Backend *e_input_backend_create_libinput_path(int ndevices);
EINTERN Eina_Bool e_input_backend_libinput_context_create(E_Input_Backend *input);
+EINTERN void e_input_backend_log_level_set(E_Input_Backend *input, unsigned int level);
#endif
return ret;
}
-EINTERN Eina_Bool
+EINTERN void
e_input_device_libinput_log_level_set(E_Input_Device *dev, unsigned int level)
{
Eina_List *l;
E_Input_Backend* input;
- Eina_Bool ret = EINA_TRUE;
if (!dev)
dev = _e_input_device_default_get();
- EINA_SAFETY_ON_TRUE_RETURN_VAL(!dev, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN(dev);
+
EINA_LIST_FOREACH(dev->inputs, l, input)
{
- if (input->log_disable)
- {
- ERR("Failed to set libinput log priority(%d) (input->log_disable:True)", level);
- ret = EINA_FALSE;
- continue;
- }
- if (!input->log_use_eina)
- {
- ERR("Failed to set libinput log priority(%d) (input->log_use_eina:False)", level);
- ret = EINA_FALSE;
- continue;
- }
- switch (level)
- {
- case 1:
- libinput_log_set_priority(input->libinput, LIBINPUT_LOG_PRIORITY_ERROR);
- break;
- case 3:
- libinput_log_set_priority(input->libinput, LIBINPUT_LOG_PRIORITY_INFO);
- break;
- case 5:
- libinput_log_set_priority(input->libinput, LIBINPUT_LOG_PRIORITY_DEBUG);
- break;
- default:
- break;
- }
+ e_input_backend_log_level_set(input, level);
}
-
- return ret;
}
EINTERN Eina_Bool e_input_device_keyboard_remap_set(E_Input_Device *dev, int *from_keys, int *to_keys, int num);
EINTERN Eina_Bool e_input_device_input_backend_create(E_Input_Device *dev, E_Input_Libinput_Backend backend);
-EINTERN Eina_Bool e_input_device_libinput_log_level_set(E_Input_Device *dev, unsigned int level);
+EINTERN void e_input_device_libinput_log_level_set(E_Input_Device *dev, unsigned int level);
EINTERN void e_input_device_pointer_xy_get(E_Input_Device *dev, int *x, int *y);
EINTERN Eina_Bool e_input_device_pointer_left_handed_set(E_Input_Device *dev, Eina_Bool left_handed);