X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fevents%2Ftouch-event-processor.h;h=70a0fb98e8055ddd01e5c6d33af0509b26b2fe16;hb=3d321b256f0799b1683d9d23fabb8bfd612d3bd9;hp=e0c38b7feedb0ee82429e4c5e068527e33bc461e;hpb=b3355d3e24c02b29c0ffd6d98c996cf45946d276;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/events/touch-event-processor.h b/dali/internal/event/events/touch-event-processor.h index e0c38b7..70a0fb9 100644 --- a/dali/internal/event/events/touch-event-processor.h +++ b/dali/internal/event/events/touch-event-processor.h @@ -1,8 +1,8 @@ -#ifndef __DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H__ -#define __DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H__ +#ifndef DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H +#define DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -19,12 +19,12 @@ */ // INTERNAL INCLUDES -#include #include +#include +#include namespace Dali { - class Actor; struct Vector2; struct Vector4; @@ -36,9 +36,8 @@ struct TouchEvent; namespace Internal { - class Actor; -class Stage; +class Scene; struct ActorObserver; /** @@ -52,12 +51,11 @@ struct ActorObserver; class TouchEventProcessor { public: - /** * Create an event processor. - * @param[in] stage The stage. + * @param[in] scene The scene the event processor belongs to. */ - TouchEventProcessor( Stage& stage ); + TouchEventProcessor(Scene& scene); /** * Non-virtual destructor; TouchEventProcessor is not a base class @@ -67,35 +65,37 @@ public: /** * This function is called by the event processor whenever a touch event occurs. * @param[in] event The touch event that has occurred. + * @return true if consumed */ - void ProcessTouchEvent( const Integration::TouchEvent& event ); + bool ProcessTouchEvent(const Integration::TouchEvent& event); private: - // Undefined TouchEventProcessor(const TouchEventProcessor&); // Undefined TouchEventProcessor& operator=(const TouchEventProcessor& rhs); +private: + Scene& mScene; ///< Used to deliver touch events + /** * Called by some actor-observers when the observed actor is disconnected. * * @param[in] actor The actor that has been disconnected. */ - void OnObservedActorDisconnected( Actor* actor ); - -private: - - Stage& mStage; ///< Used to deliver touch events - ActorObserver mLastPrimaryHitActor; ///< Stores the last primary point hit actor - ActorObserver mLastConsumedActor; ///< Stores the last consumed actor - ActorObserver mTouchDownConsumedActor; ///< Stores the touch-down consumed actor - Dali::RenderTask mLastRenderTask; ///< The RenderTask used for the last hit actor + void OnObservedActorDisconnected(Actor* actor); + + ActorObserver mLastPrimaryHitActor; ///< Stores the last primary point hit actor + ActorObserver mLastConsumedActor; ///< Stores the last consumed actor + ActorObserver mCapturingTouchActor; ///< Stored the actor that captures touch + ActorObserver mTouchDownConsumedActor; ///< Stores the touch-down consumed actor + RenderTaskPtr mLastRenderTask; ///< The RenderTask used for the last hit actor + PointState::Type mLastPrimaryPointState; ///< Stores the last primary point state }; } // namespace Internal } // namespace Dali -#endif // __DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H__ +#endif // DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H