Move TouchPoint to Devel API
[platform/core/uifw/dali-core.git] / dali / integration-api / events / point.h
old mode 100644 (file)
new mode 100755 (executable)
index 6570c65..f1e9112
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTEGRATION_POINT_H__
-#define __DALI_INTEGRATION_POINT_H__
+#ifndef DALI_INTEGRATION_POINT_H
+#define DALI_INTEGRATION_POINT_H
 
 /*
- * Copyright (c) 2016 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.
@@ -22,8 +22,9 @@
 #include <dali/public-api/events/point-state.h>
 #include <dali/public-api/math/degree.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/public-api/events/touch-point.h>
-#include <dali/devel-api/events/device.h>
+#include <dali/devel-api/events/touch-point.h>
+#include <dali/public-api/events/device.h>
+#include <dali/public-api/events/mouse-button.h>
 
 namespace Dali
 {
@@ -34,7 +35,7 @@ namespace Integration
 /**
  * @brief A Point represents a point on the screen that is currently being touched or where touch has stopped.
  */
-struct DALI_IMPORT_API Point
+struct DALI_CORE_API Point
 {
   /**
    * @brief Default Constructor
@@ -59,7 +60,7 @@ struct DALI_IMPORT_API Point
    *
    * @param[in]  deviceId  The Unique Device ID.
    */
-  void SetDeviceId( int deviceId );
+  void SetDeviceId( int32_t deviceId );
 
   /**
    * @brief Set the state of the point.
@@ -110,13 +111,13 @@ struct DALI_IMPORT_API Point
    * @brief Sets the class of the device for the event
    * @param[in] deviceClass The class of the device.
    */
-  void SetDeviceClass( DevelDevice::Class::Type deviceClass );
+  void SetDeviceClass( Device::Class::Type deviceClass );
 
   /**
    * @brief Sets the subclass of the device for the event
    * @param[in] deviceSubclass The subclass of the device.
    */
-  void SetDeviceSubclass( DevelDevice::Subclass::Type deviceSubclass );
+  void SetDeviceSubclass( Device::Subclass::Type deviceSubclass );
 
   /**
    * @brief Retrieve the Unique Device ID of the point.
@@ -170,14 +171,24 @@ struct DALI_IMPORT_API Point
    * @brief Retrieve the class of the device for the event.
    * @return The class of the device
    */
-  DevelDevice::Class::Type GetDeviceClass() const;
+  Device::Class::Type GetDeviceClass() const;
 
   /**
    * @brief Retrieve the subclass of the device for the event.
    * @return The subclass of the device
    */
-  DevelDevice::Subclass::Type GetDeviceSubclass() const;
+  Device::Subclass::Type GetDeviceSubclass() const;
 
+  /**
+   * @brief Get Mouse Button value. (ex: right/left button)
+   * @return The mouse button value.
+   */
+  MouseButton::Type GetMouseButton() const;
+
+  /**
+   * @brief Set Mouse Button value. (ex: right/left button)
+   */
+  void SetMouseButton(MouseButton::Type button);
 
 
 public: // Not intended for Integration API developers
@@ -219,14 +230,15 @@ private:
   TouchPoint mTouchPoint; ///< Stores screen position, device Id, local & screen positions and the hit-actor. @see TouchPoint
   Vector2 mEllipseRadius; ///< Radius of both the horizontal and vertical radius (useful if an ellipse).
   Degree mAngle; ///< The angle of the press point, relative to the Y-Axis.
-  DevelDevice::Class::Type mDeviceClass;
-  DevelDevice::Subclass::Type mDeviceSubclass;
+  Device::Class::Type mDeviceClass;
+  Device::Subclass::Type mDeviceSubclass;
   float mPressure; ///< The touch pressure.
   float mRadius; ///< Radius of the press point, an average of the ellipse radius.
+  MouseButton::Type mMouseButton; /// < mouse button value.
 };
 
 } // namespace Integration
 
 } // namespace Dali
 
-#endif // __DALI_TOUCH_POINT_H__
+#endif // DALI_INTEGRATION_POINT_H