X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Ftizen-wayland%2Fecore-wl2%2Fwindow-base-ecore-wl2.h;h=77445458b6f2f4c09bd7909217884533a795977f;hb=9d1664abe78262c8a9bcf25d703581e347a8dc29;hp=a5bf2b200b901ed19fc25da05076d79004db30fb;hpb=198ffaa848ba593dbefe2f9a0e25b36fe32d7d99;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h index a5bf2b2..7744545 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h @@ -25,6 +25,11 @@ #include #include #include +#include + +#ifdef DALI_ELDBUS_AVAILABLE +#include +#endif namespace Dali { @@ -46,7 +51,7 @@ public: /** * @brief Constructor */ - WindowBaseEcoreWl2( Window* window, WindowRenderSurface* windowRenderSurface ); + WindowBaseEcoreWl2( PositionSize positionSize, Any surface, bool isTransparent ); /** * @brief Destructor @@ -81,6 +86,83 @@ public: Eina_Bool OnIgnoreOutputTransform( void* data, int type, void* event ); /** + * @brief Called when a rotation event is recevied. + */ + void OnRotation( void* data, int type, void* event ); + + /** + * @brief Called when a configure event is recevied. + */ + void OnConfiguration( void* data, int type, void* event ); + + /** + * @brief Called when a touch down is received. + */ + void OnMouseButtonDown( void* data, int type, void* event ); + + /** + * @brief Called when a touch up is received. + */ + void OnMouseButtonUp( void* data, int type, void* event ); + + /** + * @brief Called when a touch motion is received. + */ + void OnMouseButtonMove( void* data, int type, void* event ); + + /** + * @brief Called when a touch is canceled. + */ + void OnMouseButtonCancel( void* data, int type, void* event ); + + /** + * @brief Called when a mouse wheel is received. + */ + void OnMouseWheel( void* data, int type, void* event ); + + /** + * @brief Called when a detent rotation event is recevied. + */ + void OnDetentRotation( void* data, int type, void* event ); + + /** + * @brief Called when a key down is received. + */ + void OnKeyDown( void* data, int type, void* event ); + + /** + * @brief Called when a key up is received. + */ + void OnKeyUp( void* data, int type, void* event ); + + /** + * @brief Called when the source window notifies us the content in clipboard is selected. + */ + void OnDataSend( void* data, int type, void* event ); + + /** + * @brief Called when the source window sends us about the selected content. + */ + void OnDataReceive( void* data, int type, void* event ); + + /** + * @brief Called when a font name is changed. + */ + void OnFontNameChanged(); + + /** + * @brief Called when a font size is changed. + */ + void OnFontSizeChanged(); + +#ifdef DALI_ELDBUS_AVAILABLE + /** + * @brief Called when Ecore ElDBus accessibility event is received. + */ + void OnEcoreElDBusAccessibilityNotification( void* context, const Eldbus_Message* message ); +#endif + + /** * @brief RegistryGlobalCallback */ void RegistryGlobalCallback( void* data, struct wl_registry *registry, uint32_t name, const char* interface, uint32_t version ); @@ -108,29 +190,69 @@ public: public: /** - * @copydoc Dali::Internal::Adaptor::WindowBase::Initialize() + * @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeWindow() */ - virtual void Initialize() override; + virtual Any GetNativeWindow() override; /** - * @copydoc Dali::Internal::Adaptor::WindowBase::ShowIndicator() + * @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeWindowId() */ - virtual void ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode ) override; + virtual int GetNativeWindowId() override; /** - * @copydoc Dali::Internal::Adaptor::WindowBase::SetIndicatorProperties() + * @copydoc Dali::Internal::Adaptor::WindowBase::CreateEglWindow() */ - virtual void SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation ) override; + virtual EGLNativeWindowType CreateEglWindow( int width, int height ) override; /** - * @copydoc Dali::Internal::Adaptor::WindowBase::IndicatorTypeChanged() + * @copydoc Dali::Internal::Adaptor::WindowBase::DestroyEglWindow() */ - virtual void IndicatorTypeChanged( IndicatorInterface::Type type ) override; + virtual void DestroyEglWindow() override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetEglWindowRotation() + */ + virtual void SetEglWindowRotation( int angle ) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetEglWindowBufferTransform() + */ + virtual void SetEglWindowBufferTransform( int angle ) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetEglWindowTransform() + */ + virtual void SetEglWindowTransform( int angle ) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::ResizeEglWindow() + */ + virtual void ResizeEglWindow( PositionSize positionSize ) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::IsEglWindowRotationSupported() + */ + virtual bool IsEglWindowRotationSupported() override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::Move() + */ + virtual void Move( PositionSize positionSize ) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::Resize() + */ + virtual void Resize( PositionSize positionSize ) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::MoveResize() + */ + virtual void MoveResize( PositionSize positionSize ) override; /** * @copydoc Dali::Internal::Adaptor::WindowBase::SetClass() */ - virtual void SetClass( std::string name, std::string className ) override; + virtual void SetClass( const std::string& name, const std::string& className ) override; /** * @copydoc Dali::Internal::Adaptor::WindowBase::Raise() @@ -272,6 +394,59 @@ public: */ virtual bool UngrabKeyList( const Dali::Vector< Dali::KEY >& key, Dali::Vector< bool >& result ) override; + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetDpi() + */ + virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override; + + /** + * @brief Return the orientation of the surface. + * @return The orientation + */ + virtual int GetOrientation() const override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle() + */ + virtual int GetScreenRotationAngle() override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetWindowRotationAngle() + */ + virtual void SetWindowRotationAngle( int degree ) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle() + */ + virtual int GetWindowRotationAngle() override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted() + */ + virtual void WindowRotationCompleted( int degree, int width, int height ) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetTransparency() + */ + virtual void SetTransparency( bool transparent ) override; + +private: + + /** + * Second stage initialization + */ + void Initialize( PositionSize positionSize, Any surface, bool isTransparent ); + + /** + * Initialize Ecore ElDBus + */ + void InitializeEcoreElDBus(); + + /** + * @brief Create window + */ + void CreateWindow( PositionSize positionSize ); + protected: // Undefined @@ -286,9 +461,9 @@ private: Dali::Vector< Ecore_Event_Handler* > mEcoreEventHandler; - Window* mWindow; - WindowRenderSurfaceEcoreWl2* mWindowSurface; Ecore_Wl2_Window* mEcoreWindow; + wl_surface* mWlSurface; + wl_egl_window* mEglWindow; wl_display* mDisplay; wl_event_queue* mEventQueue; tizen_policy* mTizenPolicy; @@ -308,6 +483,18 @@ private: int mBrightness; uint32_t mBrightnessChangeState; bool mBrightnessChangeDone; + + bool mOwnSurface; + + volatile uint32_t mMoveResizeSerial; + uint32_t mLastSubmittedMoveResizeSerial; + + int mWindowRotationAngle; + int mScreenRotationAngle; + int mSupportedPreProtation; +#ifdef DALI_ELDBUS_AVAILABLE + Eldbus_Connection* mSystemConnection; +#endif // DALI_ELDBUS_AVAILABLE }; } // namespace Adaptor