EAPI extern int ECORE_EVENT_MOUSE_BUTTON_CANCEL; /**< @since 1.15 */
EAPI extern int ECORE_EVENT_DEVICE_ADD;
EAPI extern int ECORE_EVENT_DEVICE_DEL;
+ EAPI extern int ECORE_EVENT_DETENT_ROTATE; //TIZEN ONLY
#define ECORE_EVENT_MODIFIER_SHIFT 0x0001
#define ECORE_EVENT_MODIFIER_CTRL 0x0002
typedef struct _Ecore_Event_Axis_Update Ecore_Event_Axis_Update; /**< @since 1.13 */
typedef struct _Ecore_Axis Ecore_Axis; /**< @since 1.13 */
typedef struct _Ecore_Event_Device_Info Ecore_Event_Device_Info;
+ typedef struct _Ecore_Event_Detent_Rotate Ecore_Event_Detent_Rotate; //TIZEN ONLY
/**
* @typedef Ecore_Event_Modifier
const char *seatname;
unsigned int caps;
};
+ // TIZEN ONLY
+ typedef enum _Ecore_Detent_Direction
+ {
+ ECORE_DETENT_DIRECTION_CLOCKWISE,
+ ECORE_DETENT_DIRECTION_COUNTER_CLOCKWISE
+ } Ecore_Detent_Direction;
+ struct _Ecore_Event_Detent_Rotate
+ {
+ Ecore_Detent_Direction direction;
+ unsigned int timestamp;
+ };
+ // TIZEN ONLY - END
/**
* @struct _Ecore_Event_Mouse_IO
EAPI int ECORE_EVENT_MOUSE_BUTTON_CANCEL = 0;
EAPI int ECORE_EVENT_DEVICE_ADD = 0;
EAPI int ECORE_EVENT_DEVICE_DEL = 0;
+EAPI int ECORE_EVENT_DETENT_ROTATE = 0; //TIZEN ONLY
static int _ecore_event_init_count = 0;
ECORE_EVENT_MOUSE_BUTTON_CANCEL = ecore_event_type_new();
ECORE_EVENT_DEVICE_ADD = ecore_event_type_new();
ECORE_EVENT_DEVICE_DEL = ecore_event_type_new();
+ ECORE_EVENT_DETENT_ROTATE = ecore_event_type_new(); //TIZEN ONLY
return _ecore_event_init_count;
}
ECORE_EVENT_MOUSE_BUTTON_CANCEL = 0;
ECORE_EVENT_DEVICE_ADD = 0;
ECORE_EVENT_DEVICE_DEL = 0;
+ ECORE_EVENT_DETENT_ROTATE = 0; //TIZEN ONLY
eina_log_domain_unregister(_ecore_input_log_dom);
_ecore_input_log_dom = -1;
ecore_shutdown();
}
static void
+_ecore_wl_input_detent_rotate_free(void *data EINA_UNUSED, void *ev)
+{
+ Ecore_Event_Detent_Rotate *e = ev;
+ free(e);
+}
+
+static void
_ecore_wl_input_device_cb_axis(void *data EINA_UNUSED, struct tizen_input_device *tizen_input_device EINA_UNUSED, uint32_t axis_type, wl_fixed_t value)
{
Ecore_Wl_Input *input = _ecore_wl_disp->input;
double dvalue = wl_fixed_to_double(value);
+ Ecore_Event_Detent_Rotate *e;
switch (axis_type)
{
* value 1 is clockwise,
* value -1 is counterclockwise,
*/
+ if (!(e = calloc(1, sizeof(Ecore_Event_Detent_Rotate))))
+ {
+ ERR("detent: cannot allocate memory");
+ return;
+ }
+ if (dvalue == 1)
+ e->direction = ECORE_DETENT_DIRECTION_CLOCKWISE;
+ else
+ e->direction = ECORE_DETENT_DIRECTION_COUNTER_CLOCKWISE;
+ e->timestamp = (unsigned int)ecore_time_get();
+ DBG("detent: dir: %d, time: %d", e->direction, e->timestamp);
+ ecore_event_add(ECORE_EVENT_DETENT_ROTATE, e, _ecore_wl_input_detent_rotate_free, NULL);
break;
default:
WRN("Invalid type(%d) is ignored.\n", axis_type);