X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Ftizen-wayland%2Fecore-wl2%2Fwindow-base-ecore-wl2.cpp;h=cfa6b9d7067ed6a62cf6130ce5839cd6f254d978;hb=HEAD;hp=7ebaa1d4fee00223f9eac00684ed630be022d7fb;hpb=54de0f30630ee25cfb3a63f7927f0b6c2ae65058;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index 7ebaa1d..2c19579 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -462,6 +462,19 @@ static Eina_Bool EcoreEventMouseButtonMove(void* data, int type, void* event) /** * Called when a touch motion is received. */ +static Eina_Bool EcoreEventMouseFrame(void* data, int type, void* event) +{ + WindowBaseEcoreWl2* windowBase = static_cast(data); + if(windowBase) + { + windowBase->OnMouseFrame(data, type, event); + } + return ECORE_CALLBACK_PASS_ON; +} + +/** + * Called when a touch motion is received. + */ static Eina_Bool EcoreEventMouseButtonRelativeMove(void* data, int type, void* event) { WindowBaseEcoreWl2* windowBase = static_cast(data); @@ -1019,6 +1032,9 @@ void WindowBaseEcoreWl2::Initialize(PositionSize positionSize, Any surface, bool // Register pointer lock/unlock event mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL2_EVENT_POINTER_CONSTRAINTS, EcoreEventPointerConstraints, this)); + + // Register mouse frame events + mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_FRAME, EcoreEventMouseFrame, this)); #endif // Register Mouse wheel events @@ -1313,6 +1329,10 @@ void WindowBaseEcoreWl2::OnMouseButtonDown(void* data, int type, void* event) point.SetMouseButton(static_cast(touchEvent->buttons)); mTouchEventSignal.Emit(point, touchEvent->timestamp); + +#ifndef OVER_TIZEN_VERSION_8 + mMouseFrameEventSignal.Emit(); +#endif } } @@ -1342,6 +1362,10 @@ void WindowBaseEcoreWl2::OnMouseButtonUp(void* data, int type, void* event) point.SetMouseButton(static_cast(touchEvent->buttons)); mTouchEventSignal.Emit(point, touchEvent->timestamp); + +#ifndef OVER_TIZEN_VERSION_8 + mMouseFrameEventSignal.Emit(); +#endif } } @@ -1370,10 +1394,25 @@ void WindowBaseEcoreWl2::OnMouseButtonMove(void* data, int type, void* event) point.SetDeviceSubclass(deviceSubclass); mTouchEventSignal.Emit(point, touchEvent->timestamp); + +#ifndef OVER_TIZEN_VERSION_8 + mMouseFrameEventSignal.Emit(); +#endif } } #ifdef OVER_TIZEN_VERSION_8 +void WindowBaseEcoreWl2::OnMouseFrame(void* data, int type, void* event) +{ + Ecore_Event_Mouse_Frame* MouseFrameEvent = static_cast(event); + + if(MouseFrameEvent->window == static_cast(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable()) + { + DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_FRAME"); + mMouseFrameEventSignal.Emit(); + } +} + void WindowBaseEcoreWl2::OnMouseButtonRelativeMove(void* data, int type, void* event) { Ecore_Event_Mouse_Relative_Move* relativeMoveEvent = static_cast(event); @@ -1421,6 +1460,10 @@ void WindowBaseEcoreWl2::OnMouseButtonCancel(void* data, int type, void* event) mTouchEventSignal.Emit(point, touchEvent->timestamp); +#ifndef OVER_TIZEN_VERSION_8 + mMouseFrameEventSignal.Emit(); +#endif + DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseButtonCancel\n"); } } @@ -3626,6 +3669,36 @@ void WindowBaseEcoreWl2::SetEglWindowFrontBufferMode(bool enable) wl_egl_window_tizen_set_frontbuffer_mode(mEglWindow, enable); } +void WindowBaseEcoreWl2::SetModal(bool modal) +{ + DALI_LOG_RELEASE_INFO("ecore_wl2_window_modal_set, window: [%p], flag [%d]\n", mEcoreWindow, modal); + START_DURATION_CHECK(); + ecore_wl2_window_modal_set(mEcoreWindow, modal); + FINISH_DURATION_CHECK("ecore_wl2_window_modal_set"); +} + +bool WindowBaseEcoreWl2::IsModal() +{ + bool ret = ecore_wl2_window_modal_get(mEcoreWindow); + DALI_LOG_RELEASE_INFO("ecore_wl2_window_modal_get, window: [%p], flag [%d]\n", mEcoreWindow, ret); + return ret; +} + +void WindowBaseEcoreWl2::SetAlwaysOnTop(bool alwaysOnTop) +{ + DALI_LOG_RELEASE_INFO("ecore_wl2_window_pin_mode_set, window: [%p], flag [%d]\n", mEcoreWindow, alwaysOnTop); + START_DURATION_CHECK(); + ecore_wl2_window_pin_mode_set(mEcoreWindow, alwaysOnTop); + FINISH_DURATION_CHECK("ecore_wl2_window_pin_mode_set"); +} + +bool WindowBaseEcoreWl2::IsAlwaysOnTop() +{ + bool ret = ecore_wl2_window_pin_mode_get(mEcoreWindow); + DALI_LOG_RELEASE_INFO("ecore_wl2_window_pin_mode_get, window: [%p], flag [%d]\n", mEcoreWindow, ret); + return ret; +} + } // namespace Adaptor } // namespace Internal