Summary:
The repeated counter in Efl.Input.Clickable_Clicked can be used to
identify double click or triple click.
Previously, the repeated counter in Efl.Input.Clickable_Clicked was
calculated within the time interval 0.1 second.
Now, the time interval for the repeated counter is increased to 0.25
second. It seems that 0.25 second is more appropriate to identify if the
two consecutive clicks should be considered together.
(e.g. considered as double click or triple click)
Moreover, in ecore_event and edje, 0.25 second is already used as a time
interval for double click.
Test Plan:
1. Run Efl.Ui.Button in elementary_test
2. Do double click or triple click the buttons
Reviewers: segfaultxavi, bu5hm4n, YOhoho
Reviewed By: segfaultxavi, YOhoho
Subscribers: YOhoho, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9485
#include <Elementary.h>
static void
-_clicked(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
+_clicked(void *data EINA_UNUSED, const Efl_Event *ev)
{
- printf("Button is clicked!!!\n");
+ Efl_Input_Clickable_Clicked *clicked = ev->info;
+ printf("Button is clicked!!! repeated(%d) button(%d)\n", clicked->repeated, clicked->button);
}
static void
#define MY_CLASS EFL_INPUT_CLICKABLE_MIXIN
-#define DOUBLE_CLICK_TIME ((double)0.1) //in seconds
+#define DOUBLE_CLICK_TIME ((double)0.25) //in seconds
#define LONGPRESS_TIMEOUT ((double)1.0) //in seconds
static void