Ecore_Wl2_Display *display;
} Ecore_Wl2_Event_Data_Source_Send;
+typedef struct Ecore_Wl2_Event_Seat_Selection
+{
+ unsigned int seat;
+ Ecore_Wl2_Display *display;
+} Ecore_Wl2_Event_Seat_Selection;
+
typedef struct _Ecore_Wl2_Event_Seat_Name
{
Eina_Stringshare *name;
unsigned int win;
} Ecore_Wl2_Event_Window_Configure_Complete;
+typedef struct _Ecore_Wl2_Event_Input_Keymap_Changed
+{
+ unsigned int id;
+ Ecore_Wl2_Display *display;
+} Ecore_Wl2_Event_Seat_Keymap_Changed;
+
+typedef struct Ecore_Wl2_Event_Seat_Keyboard_Repeat_Changed
+{
+ unsigned int id;
+ Ecore_Wl2_Display *display;
+} Ecore_Wl2_Event_Seat_Keyboard_Repeat_Changed;
+
typedef struct _Ecore_Wl2_Event_Sync_Done
{
Ecore_Wl2_Display *display;
EAPI extern int ECORE_WL2_EVENT_DEVICE_ADDED; /** @since 1.19 */
EAPI extern int ECORE_WL2_EVENT_DEVICE_REMOVED; /** @since 1.19 */
EAPI extern int ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE; /** @since 1.19 */
+EAPI extern int ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED; /** @since 1.20 */
+EAPI extern int ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED; /** @since 1.20 */
+EAPI extern int ECORE_WL2_EVENT_SEAT_SELECTION; /** @since 1.20 */
/**
* @file
EAPI int ECORE_WL2_EVENT_DEVICE_ADDED = 0;
EAPI int ECORE_WL2_EVENT_DEVICE_REMOVED = 0;
EAPI int ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE = 0;
+EAPI int ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED = 0;
+EAPI int ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED = 0;
+EAPI int ECORE_WL2_EVENT_SEAT_SELECTION = 0;
EAPI int _ecore_wl2_event_window_www = -1;
EAPI int _ecore_wl2_event_window_www_drag = -1;
_ecore_wl2_event_window_www = ecore_event_type_new();
_ecore_wl2_event_window_www_drag = ecore_event_type_new();
ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE = ecore_event_type_new();
+ ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED = ecore_event_type_new();
+ ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED = ecore_event_type_new();
+ ECORE_WL2_EVENT_SEAT_SELECTION = ecore_event_type_new();
}
if (!no_session_recovery)
no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY");
ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED,
ECORE_WL2_EVENT_DEVICE_ADDED,
ECORE_WL2_EVENT_DEVICE_REMOVED,
- ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE);
+ ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
+ ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED,
+ ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED,
+ ECORE_WL2_EVENT_SEAT_SELECTION);
/* shutdown Ecore_Event */
ecore_event_shutdown();
void
_ecore_wl2_dnd_selection(Ecore_Wl2_Input *input, struct wl_data_offer *offer)
{
+ Ecore_Wl2_Event_Seat_Selection *ev;
+
if (input->selection) _ecore_wl2_offer_unref(input->selection);
input->selection = NULL;
if (offer)
input->selection = wl_data_offer_get_user_data(offer);
+ ev = malloc(sizeof(Ecore_Wl2_Event_Seat_Selection));
+ EINA_SAFETY_ON_NULL_RETURN(ev);
+ ev->seat = input->id;
+ ev->display = input->display;
+ ev->display->refs++;
+ ecore_event_add(ECORE_WL2_EVENT_SEAT_SELECTION, ev, _display_event_free, ev->display);
}
void
input->xkb.keymap = NULL;
return;
}
+ {
+ Ecore_Wl2_Event_Seat_Keymap_Changed *ev = malloc(sizeof(Ecore_Wl2_Event_Seat_Keymap_Changed));
+ if (ev)
+ {
+ ev->id = input->id;
+ ev->display = input->display;
+ input->display->refs++;
+ ecore_event_add(ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED, ev, _display_event_free, ev->display);
+ }
+ }
input->xkb.control_mask =
1 << xkb_map_mod_get_index(input->xkb.keymap, XKB_MOD_NAME_CTRL);
_keyboard_cb_repeat_setup(void *data, struct wl_keyboard *keyboard EINA_UNUSED, int32_t rate, int32_t delay)
{
Ecore_Wl2_Input *input;
+ Ecore_Wl2_Event_Seat_Keyboard_Repeat_Changed *ev;
input = data;
if (!input) return;
input->repeat.enabled = EINA_TRUE;
input->repeat.rate = (1.0 / rate);
input->repeat.delay = (delay / 1000.0);
+ ev = malloc(sizeof(Ecore_Wl2_Event_Seat_Keymap_Changed));
+ if (ev)
+ {
+ ev->id = input->id;
+ ev->display = input->display;
+ ev->display->refs++;
+ ecore_event_add(ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED, ev, _display_event_free, ev->display);
+ }
}
static const struct wl_keyboard_listener _keyboard_listener =