X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fadaptor-impl.h;h=3d358d308f2e0df047d5210b7b44943e88a4bcbb;hb=e600d4ab449a1e23d2f6f5db893c4f1874ce98b9;hp=445326902b2f625f0c4fe8ecd3c483fa17356285;hpb=34aec01c5e704ac218b08d007426da6f941b801e;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/adaptor/common/adaptor-impl.h b/dali/internal/adaptor/common/adaptor-impl.h index 4453269..3d358d3 100755 --- a/dali/internal/adaptor/common/adaptor-impl.h +++ b/dali/internal/adaptor/common/adaptor-impl.h @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -98,9 +97,10 @@ class Adaptor : public Integration::RenderController, { public: - typedef Dali::Adaptor::AdaptorSignalType AdaptorSignalType; + using AdaptorSignalType = Dali::Adaptor::AdaptorSignalType; + using WindowCreatedSignalType = Dali::Adaptor::WindowCreatedSignalType; - typedef Uint16Pair SurfaceSize; ///< Surface size type + using SurfaceSize = Uint16Pair; ///< Surface size type /** * Creates a New Adaptor @@ -261,10 +261,10 @@ public: // AdaptorInternalServices implementation * @param[in] childWindowClassName The class name that the child window belongs to * @param[in] childWindowMode The mode of the child window */ - virtual bool AddWindow( Dali::Integration::SceneHolder* childWindow, + virtual bool AddWindow( Dali::Integration::SceneHolder childWindow, const std::string& childWindowName, const std::string& childWindowClassName, - const bool& childWindowMode ); + bool childWindowMode ); /** * Removes an existing Window instance from the Adaptor @@ -295,6 +295,19 @@ public: // AdaptorInternalServices implementation */ bool RemoveWindow( Dali::Internal::Adaptor::SceneHolder* childWindow ); + /** + * @brief Retrieve the window that the given actor is added to. + * + * @param[in] actor The actor + * @return The window the actor is added to or a null pointer if the actor is not added to any widnow. + */ + Dali::Internal::Adaptor::SceneHolder* GetWindow( Dali::Actor& actor ); + + /** + * @copydoc Dali::Adaptor::GetWindows() + */ + Dali::WindowContainer GetWindows() const; + public: /** @@ -319,26 +332,12 @@ public: Integration::PlatformAbstraction& GetPlatformAbstraction() const; /** - * Sets the Drag & Drop Listener. - * @param[in] detector The detector to send Drag & Drop events to. - */ - void SetDragAndDropDetector( DragAndDropDetectorPtr detector ); - - /** * Destroy the TtsPlayer of specific mode. * @param[in] mode The mode of TtsPlayer to destroy */ void DestroyTtsPlayer(Dali::TtsPlayer::Mode mode); /** - * @brief Sets minimum distance in pixels that the fingers must move towards/away from each other in order to - * trigger a pinch gesture - * - * @param[in] distance The minimum pinch distance in pixels - */ - void SetMinimumPinchDistance(float distance); - - /** * Gets native window handle * * @return native window handle @@ -400,12 +399,12 @@ public: void GetAppId( std::string& appId ); /** - * Informs core the surface size has changed + * @copydoc Dali::Adaptor::SurfaceResizePrepare */ void SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize ); /** - * Informs ThreadController the surface size has changed + * @copydoc Dali::Adaptor::SurfaceResizeComplete */ void SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize ); @@ -511,25 +510,26 @@ public: // Signals } /** - * Gets the gesture manager. - * @return The GestureManager + * @copydoc Dali::Adaptor::WindowCreatedSignal */ - GestureManager* GetGestureManager() const + WindowCreatedSignalType& WindowCreatedSignal() { - return mGestureManager; + return mWindowCreatedSignal; } -private: // From Dali::Internal::Adaptor::CoreEventInterface +public: // From Dali::Internal::Adaptor::CoreEventInterface /** - * @copydoc Dali::Internal::Adaptor::CoreEventInterface::QueueCoreEvent() + * @copydoc Dali::Internal::Adaptor:CoreEventInterface:::ProcessCoreEvents() */ - virtual void QueueCoreEvent(const Dali::Integration::Event& event); + virtual void ProcessCoreEvents(); + +private: // From Dali::Internal::Adaptor::CoreEventInterface /** - * @copydoc Dali::Internal::Adaptor:CoreEventInterface:::ProcessCoreEvents() + * @copydoc Dali::Internal::Adaptor::CoreEventInterface::QueueCoreEvent() */ - virtual void ProcessCoreEvents(); + virtual void QueueCoreEvent(const Dali::Integration::Event& event); private: // From Dali::Integration::RenderController @@ -543,7 +543,7 @@ private: // From Dali::Integration::RenderController */ virtual void RequestProcessEventsOnIdle( bool forceProcess ); -private: // From Dali::Internal::Adaptor::WindowVisibilityObserver +public: // From Dali::Internal::Adaptor::WindowVisibilityObserver /** * Called when the window becomes fully or partially visible. @@ -630,21 +630,24 @@ private: // Types enum State { - READY, ///< Initial state before Adaptor::Start is called. - RUNNING, ///< Adaptor is running. - PAUSED, ///< Adaptor has been paused. - PAUSED_WHILE_HIDDEN, ///< Adaptor is paused while window is hidden (& cannot be resumed until window is shown). - STOPPED, ///< Adaptor has been stopped. + READY, ///< Initial state before Adaptor::Start is called. + RUNNING, ///< Adaptor is running. + PAUSED, ///< Adaptor has been paused. + PAUSED_WHILE_HIDDEN, ///< Adaptor is paused while window is hidden (& cannot be resumed until window is shown). + PAUSED_WHILE_INITIALIZING, ///< Adaptor is paused while application is initializing. + STOPPED, ///< Adaptor has been stopped. }; - using SceneHolderPtr = IntrusivePtr< Dali::Internal::Adaptor::SceneHolder >; - using WindowContainer = std::vector; + // There is no weak handle for BaseHandle in DALi, but we can't ref count the window here, + // so we have to store the raw pointer. + using WindowContainer = std::vector; using ObserverContainer = std::vector; private: // Data AdaptorSignalType mResizedSignal; ///< Resized signal. AdaptorSignalType mLanguageChangedSignal; ///< Language changed signal. + WindowCreatedSignalType mWindowCreatedSignal; ///< Window created signal. Dali::Adaptor& mAdaptor; ///< Reference to public adaptor instance. State mState; ///< Current state of the adaptor @@ -661,12 +664,10 @@ private: // Data CallbackManager* mCallbackManager; ///< Used to install callbacks bool mNotificationOnIdleInstalled; ///< whether the idle handler is installed to send an notification event TriggerEventInterface* mNotificationTrigger; ///< Notification event trigger - GestureManager* mGestureManager; ///< Gesture manager FeedbackPluginProxy* mDaliFeedbackPlugin; ///< Used to access feedback support FeedbackController* mFeedbackController; ///< Plays feedback effects for Dali-Toolkit UI Controls. Dali::TtsPlayer mTtsPlayers[Dali::TtsPlayer::MODE_NUM]; ///< Provides TTS support ObserverContainer mObservers; ///< A list of adaptor observer pointers - DragAndDropDetectorPtr mDragAndDropDetector; ///< The Drag & Drop detector EnvironmentOptions* mEnvironmentOptions; ///< environment options PerformanceInterface* mPerformanceInterface; ///< Performance interface KernelTrace mKernelTracer; ///< Kernel tracer