Revert "WheelEvent class pimpling"
[platform/core/uifw/dali-core.git] / dali / public-api / events / wheel-event.h
index 4e6a985..7e310ee 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_WHEEL_EVENT_H
 
 /*
- * Copyright (c) 2020 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.
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/public-api/object/base-handle.h>
 
-namespace Dali
-{
 
-namespace Internal DALI_INTERNAL
+namespace Dali
 {
-class WheelEvent;
-}
-
 /**
  * @addtogroup dali_core_events
  * @{
  */
 
 /**
- * @brief The wheel event class is used to store a wheel rolling, it facilitates
+ * @brief The wheel event structure is used to store a wheel rolling, it facilitates
  * processing of the wheel rolling and passing to other libraries like Toolkit.
  *
  * There is a key modifier which relates to keys like alt, shift and control functions are
@@ -50,11 +44,8 @@ class WheelEvent;
  * The mouse wheel event can be sent to the specific actor but the custom wheel event will be sent to the stage.
  * @SINCE_1_0.0
  */
-class DALI_CORE_API WheelEvent : public BaseHandle
+struct DALI_CORE_API WheelEvent
 {
-
-public:
-
   // Enumerations
 
   /**
@@ -67,31 +58,24 @@ public:
     CUSTOM_WHEEL      ///< Custom wheel event @SINCE_1_0.0
   };
 
-  // Construction & Destruction
-
   /**
-   * @brief An uninitialized WheelEvent instance.
-   *
-   * Calling member functions with an uninitialized WheelEvent handle is not allowed.
+   * @brief Default constructor.
    * @SINCE_1_0.0
    */
   WheelEvent();
 
   /**
-   * @brief Copy constructor.
+   * @brief Constructor.
    *
-   * @SINCE_1_9.26
-   * @param[in] rhs The WheelEvent to copy from
-   */
-  WheelEvent( const WheelEvent& rhs );
-
-  /**
-   * @brief Move constructor.
-   *
-   * @SINCE_1_9.26
-   * @param[in] rhs A reference to the moved WheelEvent
+   * @SINCE_1_0.0
+   * @param[in] type      The type of the wheel event
+   * @param[in] direction The direction of wheel rolling (0 = default vertical wheel, 1 = horizontal wheel)
+   * @param[in] modifiers Modifier keys pressed during the event (such as shift, alt and control)
+   * @param[in] point     The co-ordinates of the cursor relative to the top-left of the screen
+   * @param[in] z         The offset of rolling (positive value means roll down or clockwise, and negative value means roll up or counter-clockwise)
+   * @param[in] timeStamp The time the wheel is being rolled
    */
-  WheelEvent( WheelEvent&& rhs );
+  WheelEvent( Type type, int32_t direction, uint32_t modifiers, Vector2 point, int32_t z, uint32_t timeStamp );
 
   /**
    * @brief Destructor.
@@ -100,24 +84,6 @@ public:
   ~WheelEvent();
 
   /**
-   * @brief Copy assignment operator.
-   *
-   * @SINCE_1_9.26
-   * @param[in] rhs The WheelEvent to copy from
-   * @return A reference to this
-   */
-  WheelEvent& operator=( const WheelEvent& rhs );
-
-  /**
-   * @brief Move assignment operator.
-   *
-   * @SINCE_1_9.26
-   * @param[in] rhs A reference to the moved WheelEvent
-   * @return A reference to this
-   */
-  WheelEvent& operator=( WheelEvent&& rhs );
-
-  /**
    * @brief Checks to see if Shift key modifier has been supplied.
    *
    * @SINCE_1_0.0
@@ -141,68 +107,44 @@ public:
    */
   bool IsAltModifier() const;
 
-  // Getters
+  // Data
 
   /**
-   * @brief Get the type of the wheel event.
+   * @brief Type of the event.
    *
-   * @SINCE_1_9.26
-   * @return The type of the wheel event
+   * @see Type
    */
-  Type GetType() const;
+  Type type;
 
   /**
-   * @brief Get the direction in which the wheel is being rolled.
+   * @brief The direction in which the wheel is being rolled.
    *
-   * @SINCE_1_9.26
-   * @return The direction of wheel rolling (0 = default vertical wheel, 1 = horizontal wheel)
+   * 0 means the default vertical wheel, and 1 means horizontal wheel.
    */
-  int32_t GetDirection() const;
+  int32_t direction;
 
   /**
-   * @brief Get the modifier keys pressed during the event (such as shift, alt and control).
-   *
-   * @SINCE_1_9.26
-   * @return The modifier keys pressed during the event
+   * @brief Modifier keys pressed during the event (such as shift, alt and control).
    */
-  uint32_t GetModifiers() const;
+  uint32_t modifiers;
 
   /**
-   * @brief Get the co-ordinates of the cursor relative to the top-left of the screen
+   * @brief The co-ordinates of the cursor relative to the top-left of the screen
    * when the wheel is being rolled.
-   *
-   * @SINCE_1_9.26
-   * @return The co-ordinates of the cursor relative to the top-left of the screen
    */
-  const Vector2& GetPoint() const;
+  Vector2 point;
 
   /**
-   * @brief Get the offset of the wheel rolling
-   *
-   * @SINCE_1_9.26
-   * @return The offset of rolling (positive value means roll down or clockwise, and negative value means roll up or counter-clockwise)
+   * @brief The offset of the wheel rolling, where positive value means rolling down or clockwise
+   * and negative value means rolling up or counter-clockwise.
    */
-  int32_t GetDelta() const;
+  int32_t z;
 
   /**
-   * @brief Get the time when the wheel is being rolled.
-   *
-   * @SINCE_1_9.26
-   * @return The time when the wheel is being rolled
+   * @brief The time when the wheel is being rolled.
    */
-  uint32_t GetTime() const;
-
-public: // Not intended for application developers
+  uint32_t timeStamp;
 
-  /// @cond internal
-  /**
-   * @brief This constructor is used internally to Create an initialized WheelEvent handle.
-   *
-   * @SINCE_1_9.26
-   * @param[in] wheelEvent A pointer to a newly allocated Dali resource
-   */
-  explicit DALI_INTERNAL WheelEvent( Internal::WheelEvent* hoverEvent );
-  /// @endcond
 };
 
 /**