// TIZEN_ONLY(20230802): ecore_input: add Ecore_Event_Mouse_Relative_Move struct
EAPI extern int ECORE_EVENT_MOUSE_RELATIVE_MOVE;
//
+ // TIZEN_ONLY(20240604): ecore_input: support frame event
+ EAPI extern int ECORE_EVENT_MOUSE_FRAME;
+ //
#define ECORE_EVENT_MODIFIER_SHIFT 0x0001
#define ECORE_EVENT_MODIFIER_CTRL 0x0002
// TIZEN_ONLY(20230802): ecore_input: add Ecore_Event_Mouse_Relative_Move struct
typedef struct _Ecore_Event_Mouse_Relative_Move Ecore_Event_Mouse_Relative_Move;
//
+ // TIZEN_ONLY(20240604): ecore_input: support frame event
+ typedef struct _Ecore_Event_Mouse_Frame Ecore_Event_Mouse_Frame;
+ //
/**
* @typedef Ecore_Event_Modifier
Eo *dev; /**< The Efl_Input_Device that originated the event @since 1.19 */
};
+
+ // TIZEN_ONLY(20240604): ecore_input: support frame event
+ struct _Ecore_Event_Mouse_Frame
+ {
+ Ecore_Window window;
+ int dev_clas; // device class such as mouse, touch, etc
+ };
+ //
+
//
/**
* Initializes the Ecore Event system.
// TIZEN_ONLY(20230802): ecore_input: add Ecore_Event_Mouse_Relative_Move struct
EAPI int ECORE_EVENT_MOUSE_RELATIVE_MOVE = 0;
//
-
+// TIZEN_ONLY(20240604): ecore_input: support frame event
+EAPI int ECORE_EVENT_MOUSE_FRAME = 0;
+//
static int _ecore_event_init_count = 0;
ECORE_EVENT_MOUSE_RELATIVE_MOVE = ecore_event_type_new();
//
+ // TIZEN_ONLY(20240604): ecore_input: support frame event
+ ECORE_EVENT_MOUSE_FRAME = ecore_event_type_new();
+ //
+
//TIZEN_ONLY(20170307) Remove warning message
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
if (getenv("ECORE_INPUT_ENABLE_JOYSTICK_INIT"))
ECORE_EVENT_DEVICE_SUBCLASS_UPDATE,
//
// TIZEN_ONLY(20230802): ecore_input: add Ecore_Event_Mouse_Relative_Move struct
- ECORE_EVENT_MOUSE_RELATIVE_MOVE
+ ECORE_EVENT_MOUSE_RELATIVE_MOVE,
+ //
+ // TIZEN_ONLY(20240604): ecore_input: support frame event
+ ECORE_EVENT_MOUSE_FRAME
//
);
//TIZEN_ONLY(20170307) Remove warning message
_keyboard_cb_repeat_setup
};
+// TIZEN_ONLY(20240604): ecore_input: support frame event
+static void
+_mouse_frame_target_window_set(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window)
+{
+ input->focus.frame = window;
+}
+
+static Ecore_Wl2_Window *
+_mouse_frame_target_window_get(Ecore_Wl2_Input *input)
+{
+ return input->focus.frame;
+}
+//
+
static void
_touch_cb_down(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int serial, unsigned int timestamp, struct wl_surface *surface, int id, wl_fixed_t x, wl_fixed_t y)
{
#endif
//
+ // TIZEN_ONLY(20240604): ecore_input: support frame event
+ _mouse_frame_target_window_set(input, input->focus.touch);
+ //
+
// TIZEN_ONLY(20171107): always send move event when touch down event is occurred
_ecore_wl2_input_mouse_move_send(input, input->focus.touch, id);
//
input->timestamp = timestamp;
input->display->serial = serial;
+ // TIZEN_ONLY(20240604): ecore_input: support frame event
+ _mouse_frame_target_window_set(input, input->focus.touch);
+ //
+
_ecore_wl2_input_mouse_up_send(input, input->focus.touch, id,
BTN_LEFT, timestamp);
_ecore_wl2_input_touch_axis_process(input, id);
//
+ // TIZEN_ONLY(20240604): ecore_input: support frame event
+ _mouse_frame_target_window_set(input, input->focus.touch);
+ //
+
_ecore_wl2_input_mouse_move_send(input, input->focus.touch, id);
}
+// TIZEN_ONLY(20240604): ecore_input: support frame event
static void
-_touch_cb_frame(void *data EINA_UNUSED, struct wl_touch *touch EINA_UNUSED)
+_mouse_frame_cb_free(void *data EINA_UNUSED, void *event)
{
+ Ecore_Event_Mouse_Frame *ev = event;
+ free(ev);
+}
+//
+static void
+_touch_cb_frame(void *data, struct wl_touch *touch EINA_UNUSED)
+{
+// TIZEN_ONLY(20240604): ecore_input: support frame event
+ Ecore_Wl2_Input *input;
+ Ecore_Wl2_Window *window;
+ Ecore_Event_Mouse_Frame *ev;
+
+ input = data;
+ if (!input)
+ {
+ ERR("input is NULL");
+ return;
+ }
+
+ window = _mouse_frame_target_window_get(input);
+ if (!window) return;
+
+ ev = calloc(1, sizeof(Ecore_Event_Mouse_Frame));
+ if (!ev) return;
+
+ ev->window = window->id;
+ ev->dev_clas = ECORE_DEVICE_CLASS_TOUCH;
+
+ ERR("[ECORE_WL2_INPUT] GET wl_touch.frame event. Generate ECORE_EVENT_TOUCH_FRAME");
+ ecore_event_add(ECORE_EVENT_MOUSE_FRAME, ev, _mouse_frame_cb_free, NULL);
+
+ _mouse_frame_target_window_set(input, NULL);
+//
}
static void