AC_PROG_LIBTOOL
# Checks for libraries.
-PKG_CHECK_MODULES([PEPPER], [pepper xkbcommon])
+PKG_CHECK_MODULES([PEPPER], [pepper pepper-xkb])
PKG_CHECK_MODULES([WAYLAND], [wayland-server xdg-shell-server tizen-extension-client])
PKG_CHECK_MODULES([EFL], [eina ecore ecore-input evas ecore-wayland])
PKG_CHECK_MODULES([WAYLAND_TBM], [wayland-tbm-server])
BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(pepper)
+BuildRequires: pkgconfig(pepper-xkb)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(xdg-shell-server)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(wayland-tbm-server)
BuildRequires: pkgconfig(wayland-tbm-client)
Requires: libwayland-extension-server
+Requires: pepper-xkb
%description
EFL backend for pepper.
#include <Ecore_Input.h>
-#include <xkbcommon/xkbcommon.h>
+#include <pepper-xkb.h>
#include <pepper-input-backend.h>
static Eina_List *handlers = NULL;
-static void
-_pepper_efl_input_keymap_set(pepper_efl_input_t *input)
-{
- struct xkb_keymap *keymap;
- struct xkb_context *context;
- struct xkb_rule_names names = { /* FIXME: hard coded */
- .rules = "evdev",
- .model = "pc105",
- .layout = "us",
- .options = NULL
- };
-
- DBG("Set Keymap");
-
- context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
- if (!context)
- {
- ERR("failed to create xkb_context");
- return;
- }
-
- keymap = xkb_map_new_from_names(context, &names, XKB_KEYMAP_COMPILE_NO_FLAGS);
- if (!keymap)
- {
- ERR("failed to get keymap");
- xkb_context_unref(context);
- return;
- }
-
- pepper_keyboard_set_keymap(input->keyboard, keymap);
- xkb_map_unref(keymap);
-
- input->xkb.context = context;
-}
-
static Eina_Bool
_pepper_efl_input_cb_key_down(void *data, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
{
input->touch = pepper_seat_get_touch(input->seat);
input->comp = comp;
- _pepper_efl_input_keymap_set(input);
+ input->xkb = pepper_xkb_create();
+ if (input->xkb)
+ pepper_xkb_keyboard_set_keymap(input->xkb, input->keyboard, NULL);
PE_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_DOWN, _pepper_efl_input_cb_key_down, input);
PE_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_UP, _pepper_efl_input_cb_key_up, input);
handlers = eina_list_remove(handlers, hdl);
}
- xkb_context_unref(input->xkb.context);
+ pepper_xkb_destroy(input->xkb);
pepper_seat_remove_input_device(input->seat, input->device);
pepper_input_device_destroy(input->device);