2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
18 // INTERNAL INCLUDES
\r
19 #include <dali/devel-api/events/key-event-devel.h>
\r
20 #include <dali/internal/event/events/key-event-impl.h>
\r
25 namespace DevelKeyEvent
\r
28 KeyEvent New( const std::string& keyName,
\r
29 const std::string& logicalKey,
\r
30 const std::string& keyString,
\r
33 unsigned long timeStamp,
\r
34 const Dali::KeyEvent::State& keyState,
\r
35 const std::string& compose,
\r
36 const std::string& deviceName,
\r
37 const Device::Class::Type deviceClass,
\r
38 const Device::Subclass::Type deviceSubclass )
\r
40 Internal::KeyEventPtr internal = Internal::KeyEvent::New( keyName, logicalKey, keyString, keyCode, keyModifier, timeStamp, keyState, compose, deviceName, deviceClass, deviceSubclass );
\r
42 return KeyEvent( internal.Get() );
\r
45 void SetKeyName( KeyEvent keyEvent, const std::string& keyName )
\r
47 GetImplementation( keyEvent ).SetKeyName( keyName );
\r
50 void SetKeyString( KeyEvent keyEvent, const std::string& keyString )
\r
52 GetImplementation( keyEvent ).SetKeyString( keyString );
\r
55 void SetKeyCode( KeyEvent keyEvent, int32_t keyCode )
\r
57 GetImplementation( keyEvent ).SetKeyCode( keyCode );
\r
60 void SetKeyModifier( KeyEvent keyEvent, int32_t keyModifier )
\r
62 GetImplementation( keyEvent ).SetKeyModifier( keyModifier );
\r
65 void SetTime( KeyEvent keyEvent, unsigned long time )
\r
67 GetImplementation( keyEvent ).SetTime( time );
\r
70 void SetState( KeyEvent keyEvent, const KeyEvent::State& state )
\r
72 GetImplementation( keyEvent ).SetState( state );
\r
75 } // namespace DevelKeyEvent
\r