#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.
#include <dali/public-api/common/view-mode.h>
#include <dali/public-api/math/rect.h>
#include <dali/public-api/signals/callback.h>
+#include <dali/public-api/math/uint-16-pair.h>
#include <dali/integration-api/render-controller.h>
// INTERNAL INCLUDES
typedef Dali::Adaptor::AdaptorSignalType AdaptorSignalType;
+ typedef Uint16Pair SurfaceSize; ///< Surface size type
+
/**
* Creates a New Adaptor
* @param[in] nativeWindow Native window handle
virtual void FeedKeyEvent( KeyEvent& keyEvent );
/**
- * @copydoc AdaptorInterface::MoveResize()
- */
- virtual bool MoveResize( const PositionSize& positionSize );
-
- /**
- * @copydoc AdaptorInterface::SurfaceResized()
- */
- virtual void SurfaceResized( const PositionSize& positionSize );
-
- /**
* @copydoc AdaptorInterface::ReplaceSurface()
*/
virtual void ReplaceSurface( Any nativeWindow, RenderSurface& surface );
/**
* @copydoc Dali::Adaptor::AddIdle()
*/
- virtual bool AddIdle( CallbackBase* callback );
+ virtual bool AddIdle( CallbackBase* callback, bool forceAdd );
+
+ /**
+ * @copydoc Dali::Adaptor::RemoveIdle()
+ */
+ virtual void RemoveIdle( CallbackBase* callback );
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:
/**
void RequestUpdateOnce();
/**
+ * Request adaptor to update indicator's height
+ */
+ void IndicatorSizeChanged(int height);
+
+ /**
* @copydoc Dali::Adaptor::NotifySceneCreated()
*/
void NotifySceneCreated();
*/
void NotifyLanguageChanged();
+ /**
+ * Gets AppId of current application
+ */
+ void GetAppId( std::string& appId );
+
+ /**
+ * Informs core the surface size and orientation has changed
+ */
+ void SurfaceResizePrepare( SurfaceSize surfaceSize, int orientation );
+
+ /**
+ * 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
/**
private: // From Dali::Integration::RenderController
/**
- * Called by the Dali core when it requires another update
+ * @copydoc Dali::Integration::RenderController::RequestUpdate()
*/
- virtual void RequestUpdate();
+ virtual void RequestUpdate( bool forceUpdate );
/**
- * Called by Dali core when it requires an notification event being sent on idle.
- * Multi-threading note: this method must be called from the main thread only.
+ * @copydoc Dali::Integration::RenderController::RequestProcessEventsOnIdle()
*/
- virtual void RequestProcessEventsOnIdle();
+ virtual void RequestProcessEventsOnIdle( bool forceProcess );
private: // From Dali::Internal::Adaptor::WindowVisibilityObserver
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();
*/
void GetDataStoragePath(std::string& path);
+ /**
+ * Sets up system information if needs
+ */
+ void SetupSystemInformation();
+
private:
/**
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
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;}
};