forked from enlightenment/efl
efl-wl: move keymap functions to eo
Summary: more 1:1 changes Depends on D11467 Reviewers: segfaultxavi, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11468
This commit is contained in:
parent
b51d45835c
commit
12854eac34
|
@ -26,8 +26,10 @@
|
|||
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>
|
||||
|
@ -210,7 +212,7 @@ EAPI Evas_Object *efl_wl_extracted_surface_object_find(void *surface_resource);
|
|||
* @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
|
||||
*
|
||||
|
@ -236,7 +238,7 @@ EAPI void efl_wl_seat_keymap_set(Evas_Object *obj, Eo *seat, void *state, char *
|
|||
* @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
|
||||
|
|
|
@ -210,7 +210,7 @@ typedef struct Comp_Seat
|
|||
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;
|
||||
|
@ -5782,14 +5782,11 @@ _efl_wl_surface_parent_surface_get(const Eo *surface, Comp_Surface *cs)
|
|||
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);
|
||||
|
@ -5799,8 +5796,8 @@ efl_wl_seat_keymap_set(Eo *obj, Eo *seat, void *state, char *str, void *key_arra
|
|||
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;
|
||||
|
@ -5812,14 +5809,11 @@ efl_wl_seat_keymap_set(Eo *obj, Eo *seat, void *state, char *str, void *key_arra
|
|||
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);
|
||||
|
|
|
@ -7,6 +7,8 @@ struct @beta @extern Efl.Wl_Wl_Global; [[ struct wl_global. @since 1.24 ]]
|
|||
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
|
||||
|
@ -82,6 +84,21 @@ class @beta Efl.Wl extends Efl.Canvas.Group
|
|||
}
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue