X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fcommon%2Fscene-impl.h;h=2c3f3d41425776fb76b0aee60dc0408f8af13792;hb=182acae4df2a65a6876414c9540a3633a18911ff;hp=1140b6a849a6eeef8f281de083c66450d8060fe2;hpb=403f5989d41f4e5c5a657e24020fe32c77fc1414;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/common/scene-impl.h b/dali/internal/event/common/scene-impl.h index 1140b6a..2c3f3d4 100644 --- a/dali/internal/event/common/scene-impl.h +++ b/dali/internal/event/common/scene-impl.h @@ -26,14 +26,23 @@ #include #include #include +#include #include namespace Dali { +namespace Integration +{ + +class Event; + +} + namespace Internal { +class EventProcessor; class Layer; class LayerList; class CameraActor; @@ -50,11 +59,10 @@ class Scene : public BaseObject, public RenderTaskDefaults { public: - /** * @copydoc Dali::Integration::Scene::New */ - static ScenePtr New( Size size ); + static ScenePtr New( const Size& size ); /** * virtual destructor @@ -118,7 +126,7 @@ public: Integration::RenderSurface* GetSurface() const; /** - * Retrieve the ordered list of on-stage layers. + * Retrieve the ordered list of on-scene layers. * @return The layer-list. */ LayerList& GetLayerList() const; @@ -129,6 +137,17 @@ public: void RequestRebuildDepthTree(); /** + * This function is called when an event is queued. + * @param[in] event A event to queue. + */ + void QueueEvent( const Integration::Event& event ); + + /** + * This function is called by Core when events are processed. + */ + void ProcessEvents(); + + /** * Rebuilds the depth tree at the end of the event frame if * it was requested this frame. */ @@ -146,6 +165,72 @@ public: */ Vector4 GetBackgroundColor() const; + /** + * Used by the EventProcessor to emit key event signals. + * @param[in] event The key event. + */ + void EmitKeyEventSignal(const KeyEvent& event); + + /** + * Used by the KeyEventProcessor to emit KeyEventGenerated signals. + * @param[in] event The key event. + * @return The return is true if KeyEvent is consumed, otherwise false. + */ + bool EmitKeyEventGeneratedSignal(const KeyEvent& event); + + /** + * Emits the event processing finished signal. + * + * @see Dali::Scene::SignalEventProcessingFinished() + */ + void EmitEventProcessingFinishedSignal(); + + /** + * Emits the touched signal. + * @param[in] touchEvent The touch event details (Old API). + * @param[in] touch The touch event details. + */ + void EmitTouchedSignal( const TouchEvent& touchEvent, const Dali::TouchData& touch ); + + /** + * Used by the EventProcessor to emit wheel event signals. + * @param[in] event The wheel event. + */ + void EmitWheelEventSignal( const WheelEvent& event ); + + /** + * @copydoc Integration::Scene::KeyEventSignal() + */ + Integration::Scene::KeyEventSignalType& KeyEventSignal(); + + /** + * @copydoc Integration::Scene::KeyEventGeneratedSignal() + */ + Integration::Scene::KeyEventGeneratedSignalType& KeyEventGeneratedSignal(); + + /** + * @copydoc Integration::Scene::SignalEventProcessingFinished() + */ + Integration::Scene::EventProcessingFinishedSignalType& EventProcessingFinishedSignal(); + + // The touched signal, to support Stage touched signal, will be removed when deprecated in public Stage API + using TouchedSignalType = Signal< void (const TouchEvent&) >; + + /** + * Touched signal to support deprecated stage touched signal. + */ + TouchedSignalType& TouchedSignal(); + + /** + * @copydoc Integration::Scene::TouchSignal() + */ + Integration::Scene::TouchSignalType& TouchSignal(); + + /** + * @copydoc Integration::Scene::sWheelEventSignal() + */ + Integration::Scene::WheelEventSignalType& WheelEventSignal(); + public: /** @@ -163,7 +248,7 @@ public: private: // Constructor - Scene( Size size ); + Scene( const Size& size ); /** * Second-phase constructor. @@ -177,7 +262,6 @@ private: Scene& operator=(const Scene& rhs) = delete; private: - Integration::RenderSurface* mSurface; // The scene-size may be different with the surface-size @@ -200,6 +284,24 @@ private: FrameBufferPtr mFrameBuffer; bool mDepthTreeDirty:1; ///< True if the depth tree needs recalculating + + EventProcessor mEventProcessor; + + // The key event signal + Integration::Scene::KeyEventSignalType mKeyEventSignal; + Integration::Scene::KeyEventGeneratedSignalType mKeyEventGeneratedSignal; + + // The event processing finished signal + Integration::Scene::EventProcessingFinishedSignalType mEventProcessingFinishedSignal; + + // The touch signal + Integration::Scene::TouchSignalType mTouchSignal; + + // The touched signal + TouchedSignalType mTouchedSignal; + + // The wheel event signal + Integration::Scene::WheelEventSignalType mWheelEventSignal; }; } // Internal