X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fevents%2Fkey-event.h;h=6cd17ad62670c44bded1e706f734319b8224dbdf;hb=baad1726f5f7f05d98da7ca591f24dbe3c49dab2;hp=5d20f7cae886d362338f40589e113a0e87b9e5f8;hpb=eb6f5959d8f8e03bf8bfba6c3091bdb962ec0830;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/events/key-event.h b/dali/public-api/events/key-event.h old mode 100644 new mode 100755 index 5d20f7c..6cd17ad --- a/dali/public-api/events/key-event.h +++ b/dali/public-api/events/key-event.h @@ -1,8 +1,8 @@ -#ifndef __DALI_KEY_EVENT_H__ -#define __DALI_KEY_EVENT_H__ +#ifndef DALI_KEY_EVENT_H +#define DALI_KEY_EVENT_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -20,9 +20,11 @@ // EXTERNAL INCLUDES #include +#include // int32_t // INTERNAL INCLUDES #include +#include namespace Dali { @@ -46,7 +48,7 @@ namespace Dali * module. * @SINCE_1_0.0 */ -struct DALI_IMPORT_API KeyEvent +struct DALI_CORE_API KeyEvent { // Enumerations @@ -78,7 +80,22 @@ struct DALI_IMPORT_API KeyEvent * @param[in] timeStamp The time (in ms) that the key event occurred * @param[in] keyState The state of the key event */ - KeyEvent(const std::string& keyName, const std::string& keyString, int keyCode, int keyModifier, unsigned long timeStamp, const State& keyState); + KeyEvent(const std::string& keyName, const std::string& keyString, int32_t keyCode, int32_t keyModifier, unsigned long timeStamp, const State& keyState); + + /** + * @brief Copy constructor. + * @SINCE_1_2.36 + * @param[in] rhs A reference to the copied handle + */ + KeyEvent( const KeyEvent& rhs ); + + /** + * @brief Assignment operator. + * @SINCE_1_2.36 + * @param[in] rhs A reference to the copied handle + * @return A reference to this + */ + KeyEvent& operator=( const KeyEvent& rhs ); /** * @brief Destructor. @@ -110,6 +127,40 @@ struct DALI_IMPORT_API KeyEvent */ bool IsAltModifier() const; + /** + * @brief Get the key compose string. + * + * @SINCE_1_3.22 + * @return The compose string + */ + std::string GetCompose() const; + + /** + * @brief Get the device name the key event originated from. + * + * @SINCE_1_2.60 + * @return The device name + */ + std::string GetDeviceName() const; + + /** + * @brief Get the device class the key event originated from. + * + * The device class type is classification type of the input device of event received + * @SINCE_1_2.60 + * @return The type of the device class + */ + Device::Class::Type GetDeviceClass() const; + + /** + * @brief Get the device subclass the key event originated from. + * + * The device subclass type is subclassification type of the input device of event received. + * @SINCE_1_2.60 + * @return The type of the device subclass + */ + Device::Subclass::Type GetDeviceSubclass() const; + // Data /** @@ -130,12 +181,12 @@ struct DALI_IMPORT_API KeyEvent * platform-specific key code. You need to use IsKey() to know what a key event means * instead of direct comparison of key code value. */ - int keyCode; + int32_t keyCode; /** * @brief special keys like shift, alt and control which modify the next key pressed. */ - int keyModifier; + int32_t keyModifier; /** * @brief The time (in ms) that the key event occurred. @@ -156,4 +207,4 @@ struct DALI_IMPORT_API KeyEvent */ } // namespace Dali -#endif // __DALI_KEY_EVENT_H__ +#endif // DALI_KEY_EVENT_H