From: duna.oh Date: Thu, 15 Jun 2023 04:06:59 +0000 (+0900) Subject: e_devicemgr: add E_API enabling to reset input block X-Git-Tag: accepted/tizen/7.0/unified/20230628.014031~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0558b789367d81eab69fb7c7a69cad03692a729e;p=platform%2Fupstream%2Fenlightenment.git e_devicemgr: add E_API enabling to reset input block Change-Id: I34eb9ed5ade990af920649dd58f8a0dddbe1cd92 --- diff --git a/src/bin/e_devicemgr.c b/src/bin/e_devicemgr.c index ed663c25f1..c20d06f331 100644 --- a/src/bin/e_devicemgr.c +++ b/src/bin/e_devicemgr.c @@ -214,3 +214,16 @@ e_devicemgr_block_internal_remove(E_Devicemgr_Block_Expire_Cb cb_func, void *cb_ return e_devicemgr_block_remove_internal(cb_func, cb_data); } +E_API Eina_Bool +e_devicemgr_block_reset(void) +{ + int ret; + + if (!e_devicemgr->block.client) return EINA_FALSE; + ret = e_devicemgr_block_remove(e_devicemgr->block.client); + if (ret == TIZEN_INPUT_DEVICE_MANAGER_ERROR_NONE) + return EINA_TRUE; + + return EINA_FALSE; +} + diff --git a/src/bin/e_devicemgr.h b/src/bin/e_devicemgr.h index 8935c6b08b..74ae63f904 100644 --- a/src/bin/e_devicemgr.h +++ b/src/bin/e_devicemgr.h @@ -111,6 +111,8 @@ Eina_Bool e_devicemgr_detent_is_detent(const char *name); EINTERN Eina_Bool e_devicemgr_block_internal_add(Ecore_Device_Class clas, Eina_Bool all_clas, uint32_t duration, E_Devicemgr_Block_Expire_Cb cb_func, void *cb_data); EINTERN Eina_Bool e_devicemgr_block_internal_remove(E_Devicemgr_Block_Expire_Cb cb_func, void *cb_data); +E_API Eina_Bool e_devicemgr_block_reset(void); + #endif #endif