/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
// CLASS HEADER
#include <dali/integration-api/events/key-event-integ.h>
+// INTERNAL INCLUDES
+#include <dali/internal/event/events/key-event-impl.h>
+
namespace Dali
{
-
namespace Integration
{
-
KeyEvent::KeyEvent()
-: Event( Key ),
+: Event(Key),
keyName(),
+ logicalKey(),
keyString(),
- keyCode( -1 ),
- keyModifier( 0 ),
- time( 0 ),
- state( KeyEvent::Down ),
- deviceName( "" ),
- deviceClass( Device::Class::NONE ),
- deviceSubclass( Device::Subclass::NONE )
-{
-}
-
-KeyEvent::KeyEvent( const std::string& keyName, const std::string& keyString, int keyCode, int keyModifier,
- unsigned long timeStamp, const State& keyState, const std::string& deviceName,
- const Device::Class::Type deviceClass, const Device::Subclass::Type deviceSubclass )
-: Event( Key ),
- keyName( keyName ),
- keyString( keyString ),
- keyCode( keyCode ),
- keyModifier( keyModifier ),
- time( timeStamp ),
- state( keyState ),
- deviceName( deviceName ),
- deviceClass( deviceClass ),
- deviceSubclass( deviceSubclass )
+ keyCode(-1),
+ keyModifier(0),
+ time(0),
+ state(KeyEvent::DOWN),
+ compose(""),
+ deviceName(""),
+ deviceClass(Device::Class::NONE),
+ deviceSubclass(Device::Subclass::NONE)
{
}
-KeyEvent::KeyEvent( const Dali::KeyEvent& event )
-: Event( Key ),
- keyName( event.keyPressedName ),
- keyString( event.keyPressed ),
- keyCode( event.keyCode ),
- keyModifier( event.keyModifier ),
- time( event.time ),
- state( static_cast< Integration::KeyEvent::State >( event.state ) ),
- deviceName( "" ),
- deviceClass( Device::Class::NONE ),
- deviceSubclass( Device::Subclass::NONE )
+KeyEvent::KeyEvent(const std::string& keyName,
+ const std::string& logicalKey,
+ const std::string& keyString,
+ int keyCode,
+ int keyModifier,
+ unsigned long timeStamp,
+ const State& keyState,
+ const std::string& compose,
+ const std::string& deviceName,
+ const Device::Class::Type deviceClass,
+ const Device::Subclass::Type deviceSubclass)
+: Event(Key),
+ keyName(keyName),
+ logicalKey(logicalKey),
+ keyString(keyString),
+ keyCode(keyCode),
+ keyModifier(keyModifier),
+ time(timeStamp),
+ state(keyState),
+ compose(compose),
+ deviceName(deviceName),
+ deviceClass(deviceClass),
+ deviceSubclass(deviceSubclass)
{
}
-KeyEvent::~KeyEvent()
-{
-}
+KeyEvent::~KeyEvent() = default;
} // namespace Integration