typedef struct Efl_Wl_Wl_Surface Efl_Wl_Wl_Surface;
typedef struct Efl_Wl_Wl_Global Efl_Wl_Wl_Global;
typedef struct Efl_Wl_Wl_Interface Efl_Wl_Wl_Interface;
+typedef struct Efl_Wl_Wl_Array Efl_Wl_Wl_Array;
typedef void * Efl_Wl_Wl_Interface_Data;
typedef void * Efl_Wl_Wl_Interface_Bind_Cb;
+typedef struct Efl_Wl_Xkb_State Efl_Wl_Xkb_State;
#include <efl_wl.eo.h>
#include <efl_wl_surface.eo.h>
* @since 1.21
*/
EAPI Evas_Object *efl_wl_extracted_surface_extracted_parent_get(Evas_Object *surface);
-#endif
+
/**
* Set external xkbcommon resources to be used read-only by the compositor object
*
* @since 1.21
*/
EAPI void efl_wl_seat_key_repeat_set(Evas_Object *obj, Eo *seat, int repeat_rate, int repeat_delay);
-
+#endif
#undef EAPI
#define EAPI
#undef EAPI_WEAK
struct xkb_context *context;
struct xkb_keymap *keymap;
struct xkb_state *state;
- char *keymap_str;
+ const char *keymap_str;
int keymap_str_size;
int repeat_rate;
int repeat_delay;
return NULL;
}
-void
-efl_wl_seat_keymap_set(Eo *obj, Eo *seat, void *state, char *str, void *key_array)
+static EOLIAN void
+_efl_wl_seat_keymap_set(Eo *obj, Comp *c, Eo *seat, Efl_Wl_Xkb_State *state, const char *str, Efl_Wl_Wl_Array *key_array)
{
- Comp *c;
Comp_Seat *s;
- if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
- c = efl_data_scope_get(obj, MY_CLASS);
EINA_INLIST_FOREACH(c->seats, s)
{
if (!seat) efl_wl_seat_keymap_set(obj, s->dev, state, str, key_array);
EINA_SAFETY_ON_NULL_RETURN(s);
seat_kbd_destroy(s);
s->kbd.external = 1;
- s->kbd.keys_external = key_array;
- s->kbd.state = state;
+ s->kbd.keys_external = (void*)key_array;
+ s->kbd.state = (void*)state;
s->kbd.keymap_str = str;
if (str)
s->kbd.keymap_str_size = strlen(str) + 1;
seat_kbd_external_init(s);
}
-void
-efl_wl_seat_key_repeat_set(Eo *obj, Eo *seat, int repeat_rate, int repeat_delay)
+static EOLIAN void
+_efl_wl_seat_key_repeat_set(Eo *obj, Comp *c, Eo *seat, int repeat_rate, int repeat_delay)
{
- Comp *c;
Comp_Seat *s;
- if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
- c = efl_data_scope_get(obj, MY_CLASS);
EINA_INLIST_FOREACH(c->seats, s)
{
if (!seat) efl_wl_seat_key_repeat_set(obj, s->dev, repeat_rate, repeat_delay);
struct @beta @extern Efl.Wl_Wl_Interface; [[ A libwayland callback interface struct. @since 1.24 ]]
struct @beta @extern Efl.Wl_Wl_Interface_Data; [[ A data pointer to send with the bind callback. @since 1.24 ]]
struct @beta @extern Efl.Wl_Wl_Interface_Bind_Cb; [[ A callback with the type (*void)(struct wl_client *client, void *data, uint32_t version, uint32_t id). @since 1.24 ]]
+struct @beta @extern Efl.Wl_Xkb_State; [[ struct xkb_state. @since 1.24 ]]
+struct @beta @extern Efl.Wl_Wl_Array; [[ struct wl_array. @since 1.24 ]]
enum @beta Efl.Wl.Rotation
}
return: Efl.Wl_Wl_Global @by_ref;
}
+ seat_keymap_set {
+ params {
+ seat: Efl.Input.Device;
+ state: Efl.Wl_Xkb_State @by_ref;
+ keymap_str: string;
+ key_array: Efl.Wl_Wl_Array @by_ref;
+ }
+ }
+ seat_key_repeat_set {
+ params {
+ seat: Efl.Input.Device;
+ repeat_rate: int;
+ repeat_delay: int;
+ }
+ }
}
implements {
Efl.Object.constructor;