X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fevents%2Fwheel-event.h;h=7e310ee89b0eb3f9b85a0a817138c6c6b6ef5862;hb=c16f2ac157730dfa3d28c448bf92a994e2afe975;hp=4e6a9859ce3aaa72ddf63e9d75d38d843fb1d32f;hpb=91738b83b399fcf04a37665bb247aa3a0dcb8c2d;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/events/wheel-event.h b/dali/public-api/events/wheel-event.h index 4e6a985..7e310ee 100644 --- a/dali/public-api/events/wheel-event.h +++ b/dali/public-api/events/wheel-event.h @@ -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. @@ -24,23 +24,17 @@ // INTERNAL INCLUDES #include #include -#include -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 }; /**