-#ifndef __DALI_INTEGRATION_KEY_EVENT_H__
-#define __DALI_INTEGRATION_KEY_EVENT_H__
+#ifndef DALI_INTEGRATION_KEY_EVENT_H
+#define DALI_INTEGRATION_KEY_EVENT_H
/*
- * Copyright (c) 2014 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.
// INTERNAL INCLUDES
#include <dali/integration-api/events/event.h>
#include <dali/public-api/events/key-event.h>
-#include <dali/devel-api/events/key-event-devel.h>
-namespace Dali DALI_IMPORT_API
+namespace Dali
{
namespace Integration
* the Dali core.
*
*/
-struct KeyEvent : public Event
+struct DALI_CORE_API KeyEvent : public Event
{
// Enumerations
// Specifies the state of the key event.
enum State
{
- Down, /**< Key down */
- Up, /**< Key up */
-
- Last
+ DOWN, /**< Key down */
+ UP, /**< Key up */
};
/**
/**
* Constructor
- * @param[in] keyName The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.
- * @param[in] keyString A string of input characters or key pressed
- * @param[in] keyCode The unique key code for the key pressed.
- * @param[in] keyModifier The key modifier for special keys like shift and alt
- * @param[in] timeStamp The time (in ms) that the key event occurred.
- * @param[in] keyState The state of the key event.
- * @param[in] deviceName Name of device KeyEvent originated from
- * @param[in] deviceClass Class of device KeyEvent originated from
+ * @param[in] keyName The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.
+ * @param[in] logicalKey The logical key symbol (eg. shift + 1 == "exclamation")
+ * @param[in] keyString The string of input characters or key pressed
+ * @param[in] keyCode The unique key code for the key pressed.
+ * @param[in] keyModifier The key modifier for special keys like shift and alt
+ * @param[in] timeStamp The time (in ms) that the key event occurred.
+ * @param[in] keyState The state of the key event.
+ * @param[in] compose The key compose
+ * @param[in] deviceName The name of device KeyEvent originated from
+ * @param[in] deviceClass The class of device KeyEvent originated from
+ * @param[in] deviceSubclass The subclass of device KeyEvent originated from
*/
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 deviceName,
- const DevelDevice::Class::Type deviceClass,
- const DevelDevice::Subclass::Type deviceSubclass );
-
- /*
- * Constructor, creates a Integration::KeyEvent from a Dali::KeyEvent
- * @param[in] event Dali::KeyEvent to convert from
- */
- explicit KeyEvent( const Dali::KeyEvent& event );
+ const std::string& compose,
+ const std::string& deviceName,
+ const Device::Class::Type deviceClass,
+ const Device::Subclass::Type deviceSubclass );
/**
* Virtual destructor
*/
- virtual ~KeyEvent();
+ ~KeyEvent() override;
// Data
/**
- *@copydoc Dali::KeyEvent::keyPressedName
+ * The name of the key pressed or command from the IMF
*/
std::string keyName;
/**
- *@copydoc Dali::KeyEvent::keyPressed
+ * The logical key symbol
+ */
+ std::string logicalKey;
+
+ /**
+ * The string of input characters or key pressed
*/
std::string keyString;
/**
- * @copydoc Dali::KeyEvent::keyCode
+ * The unique key code for the key pressed.
*/
int keyCode;
/**
- *@copydoc Dali::KeyEvent::keyModifier
+ * The key modifier for special keys like shift and alt
*/
int keyModifier;
/**
- *@copydoc Dali::KeyEvent::time
+ * The time (in ms) that the key event occurred.
*/
unsigned long time;
State state;
/**
- * Name of device KeyEvent originated from
+ * If this keystroke has modified a string in the middle of being composed - this string replaces the previous one.
+ */
+ std::string compose;
+
+ /**
+ * The name of device KeyEvent originated from
*/
std::string deviceName;
/**
- * Class of device KeyEvent originated from
+ * The class of device KeyEvent originated from
*/
- DevelDevice::Class::Type deviceClass;
+ Device::Class::Type deviceClass;
/**
- * Subclass of device KeyEvent originated from
+ * The subclass of device KeyEvent originated from
*/
- DevelDevice::Subclass::Type deviceSubclass;
+ Device::Subclass::Type deviceSubclass;
};
} // namespace Integration
} // namespace Dali
-#endif // __DALI_INTEGRATION_KEY_EVENT_H__
+#endif // DALI_INTEGRATION_KEY_EVENT_H