X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fcommon%2Fadaptor-impl.h;h=f42b85f3944ccb378dbd63db6c84c74d190e77f1;hb=dc7687ed7492068f18778cc318076e072c9ed985;hp=9bebb38be54cee3fc7a0bf3cca9df5b258a65d9f;hpb=30730ba6895c1ec19fd139317dad05d3a5eab5ee;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/common/adaptor-impl.h b/adaptors/common/adaptor-impl.h index 9bebb38..f42b85f 100644 --- a/adaptors/common/adaptor-impl.h +++ b/adaptors/common/adaptor-impl.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_ADAPTOR_IMPL_H__ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -23,6 +23,7 @@ #include #include #include +#include #include // INTERNAL INCLUDES @@ -66,7 +67,7 @@ class EglFactory; class GestureManager; class GlImplementation; class GlSyncImplementation; -class UpdateRenderController; +class ThreadController; class TriggerEvent; class CallbackManager; class FeedbackPluginProxy; @@ -90,6 +91,8 @@ public: typedef Dali::Adaptor::AdaptorSignalType AdaptorSignalType; + typedef Uint16Pair SurfaceSize; ///< Surface size type + /** * Creates a New Adaptor * @param[in] nativeWindow Native window handle @@ -132,6 +135,11 @@ public: */ static bool IsAvailable(); + /** + * @copydoc Dali::Core::SceneCreated(); + */ + void SceneCreated(); + public: // AdaptorInternalServices implementation /** * @copydoc Dali::Adaptor::Start() @@ -154,29 +162,29 @@ public: // AdaptorInternalServices implementation virtual void Stop(); /** - * @copydoc Dali::EventFeeder::FeedTouchPoint() + * @copydoc Dali::Adaptor::ContextLost() */ - virtual void FeedTouchPoint( TouchPoint& point, int timeStamp ); + virtual void ContextLost(); /** - * @copydoc Dali::EventFeeder::FeedWheelEvent() + * @copydoc Dali::Adaptor::ContextRegained() */ - virtual void FeedWheelEvent( WheelEvent& wheelEvent ); + virtual void ContextRegained(); /** - * @copydoc Dali::EventFeeder::FeedKeyEvent() + * @copydoc Dali::EventFeeder::FeedTouchPoint() */ - virtual void FeedKeyEvent( KeyEvent& keyEvent ); + virtual void FeedTouchPoint( TouchPoint& point, int timeStamp ); /** - * @copydoc AdaptorInterface::MoveResize() + * @copydoc Dali::EventFeeder::FeedWheelEvent() */ - virtual bool MoveResize( const PositionSize& positionSize ); + virtual void FeedWheelEvent( WheelEvent& wheelEvent ); /** - * @copydoc AdaptorInterface::SurfaceResized() + * @copydoc Dali::EventFeeder::FeedKeyEvent() */ - virtual void SurfaceResized( const PositionSize& positionSize ); + virtual void FeedKeyEvent( KeyEvent& keyEvent ); /** * @copydoc AdaptorInterface::ReplaceSurface() @@ -205,6 +213,11 @@ public: // AdaptorInternalServices implementation */ virtual bool AddIdle( CallbackBase* callback ); + /** + * @copydoc Dali::Adaptor::RemoveIdle() + */ + virtual void RemoveIdle( CallbackBase* callback ); + public: /** @@ -273,6 +286,12 @@ public: */ Any GetNativeWindowHandle(); + /** + * Sets use remote surface for eglSurface output + * @param[in] useRemoteSurface True if the remote surface is used + */ + void SetUseRemoteSurface(bool useRemoteSurface); + public: /** @@ -300,6 +319,11 @@ public: void RequestUpdateOnce(); /** + * Request adaptor to update indicator's height + */ + void IndicatorSizeChanged(int height); + + /** * @copydoc Dali::Adaptor::NotifySceneCreated() */ void NotifySceneCreated(); @@ -309,6 +333,32 @@ public: */ void NotifyLanguageChanged(); + /** + * Gets AppId of current application + */ + void GetAppId( std::string& appId ); + + /** + * Informs core the surface size has changed + */ + void SurfaceResizePrepare( SurfaceSize surfaceSize ); + + /** + * Informs ThreadController the surface size has changed + */ + void SurfaceResizeComplete( SurfaceSize surfaceSize ); + + /** + * Sets layout direction of root by system language + * @param[in] locale System locale + */ + void SetRootLayoutDirection( std::string locale ); + + /** + * @copydoc Dali::Adaptor::RenderOnce + */ + void RenderOnce(); + public: //AdaptorInternalServices /** @@ -459,17 +509,17 @@ private: private: /** - * Informs core the surface size has changed - */ - void SurfaceSizeChanged(const PositionSize& positionSize); - - /** * Assigns the render surface to the adaptor * */ void SetSurface(RenderSurface *surface); /** + * called after surface is created + */ + void SurfaceInitialized(); + + /** * Sends an notification message from main loop idle handler */ void ProcessCoreEventsFromIdle(); @@ -480,6 +530,11 @@ private: */ void GetDataStoragePath(std::string& path); + /** + * Sets up system information if needs + */ + void SetupSystemInformation(); + private: /** @@ -514,7 +569,7 @@ private: // Data Dali::Adaptor& mAdaptor; ///< Reference to public adaptor instance. State mState; ///< Current state of the adaptor Dali::Integration::Core* mCore; ///< Dali Core - UpdateRenderController* mUpdateRenderController; ///< Controls update/render threads + ThreadController* mThreadController; ///< Controls the threads VSyncMonitor* mVSyncMonitor; ///< Monitors VSync events GlImplementation* mGLES; ///< GL implementation GlSyncImplementation* mGlSync; ///< GL Sync implementation @@ -522,7 +577,7 @@ private: // Data Any mNativeWindow; ///< window identifier RenderSurface* mSurface; ///< Current surface - TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction; ///< Platform abstraction + TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction; ///< Platform abstraction EventHandler* mEventHandler; ///< event handler CallbackManager* mCallbackManager; ///< Used to install callbacks @@ -543,6 +598,7 @@ private: // Data ObjectProfiler* mObjectProfiler; ///< Tracks object lifetime for profiling SocketFactory mSocketFactory; ///< Socket factory const bool mEnvironmentOptionsOwned:1; ///< Whether we own the EnvironmentOptions (and thus, need to delete it) + bool mUseRemoteSurface; ///< whether the remoteSurface is used or not public: inline static Adaptor& GetImplementation(Dali::Adaptor& adaptor) {return *adaptor.mImpl;} };