X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fevents%2Fkey-event-processor.cpp;h=3d9ef4747fa4304a54c3b40271a5f111bac806a0;hb=182acae4df2a65a6876414c9540a3633a18911ff;hp=6e819e18c44d5f5ac81b15b7aaf9a86d784d1bc2;hpb=8ccd11691f8be0589d853c9d5572668f4f75470b;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/events/key-event-processor.cpp b/dali/internal/event/events/key-event-processor.cpp old mode 100644 new mode 100755 index 6e819e1..3d9ef47 --- a/dali/internal/event/events/key-event-processor.cpp +++ b/dali/internal/event/events/key-event-processor.cpp @@ -1,36 +1,39 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // CLASS HEADER #include // INTERNAL INCLUDES #include +#include #include -#include +#include #include + namespace Dali { namespace Internal { -KeyEventProcessor::KeyEventProcessor(Stage& stage) -: mStage(stage) +KeyEventProcessor::KeyEventProcessor( Scene& scene ) +: mScene( scene ) { } @@ -38,12 +41,22 @@ KeyEventProcessor::~KeyEventProcessor() { } -void KeyEventProcessor::ProcessKeyEvent(const Integration::KeyEvent& event) +void KeyEventProcessor::ProcessKeyEvent( const Integration::KeyEvent& event ) { - KeyEvent keyEvent(event.keyName, event.keyString, event.keyCode, event.keyModifier, event.time, static_cast(event.state)); + KeyEvent keyEvent(event.keyName, event.keyString, event.keyCode, event.keyModifier, event.time, static_cast(event.state)); + GetImplementation( &keyEvent )->SetLogicalKey( event.logicalKey ); + GetImplementation( &keyEvent )->SetCompose( event.compose ); + GetImplementation( &keyEvent )->SetDeviceName( event.deviceName ); + GetImplementation( &keyEvent )->SetDeviceClass( event.deviceClass ); + GetImplementation( &keyEvent )->SetDeviceSubclass( event.deviceSubclass ); + + // Emit the key event signal from the scene. + bool consumed = mScene.EmitKeyEventGeneratedSignal( keyEvent ); + if( !consumed ) + { + mScene.EmitKeyEventSignal(keyEvent); + } - // Emit the key event signal from stage. - mStage.EmitKeyEventSignal(keyEvent); } } // namespace Internal