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([DALI], [dali-core dali-adaptor dali-toolkit dali-adaptor-integration])
PKG_CHECK_MODULES([EFL], [ecore ecore-input ecore-wayland])
BuildRequires: pkgconfig(dali-toolkit)
BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(pepper)
+BuildRequires: pkgconfig(pepper-xkb)
BuildRequires: pkgconfig(xdg-shell-server)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(tizen-extension-client)
BuildRequires: pkgconfig(wayland-tbm-server)
BuildRequires: pkgconfig(wayland-tbm-client)
Requires: libwayland-extension-server
+Requires: pepper-xkb
%description
DALi backend for pepper.
#include <dali/integration-api/debug.h>
#include <pepper-input-backend.h>
#include <Ecore_Input.h>
-#include <xkbcommon/xkbcommon.h>
namespace Dali
{
mPointer( NULL ),
mKeyboard( NULL ),
mTouch( NULL ),
- mContext( NULL ),
mEcoreEventHandler()
{
}
ecore_event_handler_del( *iter );
}
- xkb_context_unref( mContext );
+ pepper_xkb_destroy( mXkb );
+
pepper_seat_remove_input_device( mSeat, mDevice );
pepper_input_device_destroy( mDevice );
mTouch = pepper_seat_get_touch( mSeat );
mCompositor = compositor;
-
- SetKeymap();
-
- mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_KEY_DOWN, EcoreEventKeyDown, this ) );
- mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_KEY_UP, EcoreEventKeyUp, this ) );
-
- DALI_LOG_INFO( gPepperInputLogging, Debug::Verbose, "Input::Initialize: success\n" );
-}
-
-void Input::SetKeymap()
-{
- struct xkb_keymap* keymap;
- struct xkb_context* context;
- struct xkb_rule_names names;
-
- names.rules = "evdev";
- names.model = "pc105";
- names.layout = "us";
- names.options = NULL;
-
- context = xkb_context_new( XKB_CONTEXT_NO_FLAGS );
- if( !context )
+ mXkb = pepper_xkb_create( );
+ if( !mXkb )
{
- DALI_LOG_INFO( gPepperInputLogging, Debug::General, "failed to create xkb_context\n" );
+ DALI_LOG_INFO( gPepperInputLogging, Debug::General, "failed to create pepper xkb\n");
return;
}
- keymap = xkb_map_new_from_names( context, &names, XKB_KEYMAP_COMPILE_NO_FLAGS );
- if( !keymap )
- {
- DALI_LOG_INFO( gPepperInputLogging, Debug::General, "failed to get keymap\n" );
- xkb_context_unref( context );
- return;
- }
+ pepper_xkb_keyboard_set_keymap( mXkb, mKeyboard, NULL);
- pepper_keyboard_set_keymap( mKeyboard, keymap );
- xkb_map_unref( keymap );
+ mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_KEY_DOWN, EcoreEventKeyDown, this ) );
+ mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_KEY_UP, EcoreEventKeyUp, this ) );
- mContext = context;
+ DALI_LOG_INFO( gPepperInputLogging, Debug::Verbose, "Input::Initialize: success\n" );
}
Eina_Bool Input::EcoreEventKeyDown( void* data, int type, void* event )