[Tizen] Adding deviceClass to KeyEvent Integ
[platform/core/uifw/dali-core.git] / dali / integration-api / events / key-event-integ.h
index 26762ed..d98970d 100644 (file)
@@ -23,6 +23,8 @@
 
 // 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
 {
@@ -58,15 +60,25 @@ struct KeyEvent : public Event
    * @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]  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
    */
   KeyEvent(const std::string& keyName,
            const std::string& keyString,
            int keyCode,
            int keyModifier,
            unsigned long timeStamp,
-           const State& keyState);
+           const State& keyState,
+           const std::string deviceName,
+           const DevelKeyEvent::DeviceClass::Type deviceClass );
+
+  /*
+   * Constructor, creates a Integration::KeyEvent from a Dali::KeyEvent
+   * @param[in] event Dali::KeyEvent to convert from
+   */
+  explicit KeyEvent( const Dali::KeyEvent& event );
 
   /**
    * Virtual destructor
@@ -106,6 +118,15 @@ struct KeyEvent : public Event
    */
   State state;
 
+  /**
+   * Name of device KeyEvent originated from
+   */
+  std::string deviceName;
+
+  /**
+   * Class of device KeyEvent originated from
+   */
+  DevelKeyEvent::DeviceClass::Type deviceClass;
 };
 
 } // namespace Integration