/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
// INTERNAL HEADERS
#include <dali/internal/input/common/key-impl.h>
+#include <dali/internal/system/common/time-service.h>
#include <dali/internal/window-system/common/window-impl.h>
#include <dali/internal/window-system/common/window-render-surface.h>
#include <dali/internal/window-system/common/window-system.h>
#include <vconf.h>
#endif
+#define START_DURATION_CHECK() \
+ uint32_t durationMilliSeconds = static_cast<uint32_t>(-1); \
+ uint32_t startTime, endTime; \
+ startTime = TimeService::GetMilliSeconds();
+
+#define FINISH_DURATION_CHECK(functionName) \
+ endTime = TimeService::GetMilliSeconds(); \
+ durationMilliSeconds = endTime - startTime; \
+ if(durationMilliSeconds > 0) \
+ { \
+ DALI_LOG_DEBUG_INFO("%s : duration [%u ms]\n", functionName, durationMilliSeconds); \
+ }
+
#include <wayland-egl-tizen.h>
namespace Dali
}
/**
+ * Called when a mouse in is received.
+ */
+static Eina_Bool EcoreEventMouseIn(void* data, int type, void* event)
+{
+ WindowBaseEcoreWl2* windowBase = static_cast<WindowBaseEcoreWl2*>(data);
+ if(windowBase)
+ {
+ windowBase->OnMouseInOut(data, type, event, Dali::DevelWindow::MouseInOutEvent::Type::IN);
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+/**
+ * Called when a mouse out is received.
+ */
+static Eina_Bool EcoreEventMouseOut(void* data, int type, void* event)
+{
+ WindowBaseEcoreWl2* windowBase = static_cast<WindowBaseEcoreWl2*>(data);
+ if(windowBase)
+ {
+ // When the mouse is out, the previous mouse must be canceled.
+ windowBase->OnMouseButtonCancel(data, type, event);
+ windowBase->OnMouseInOut(data, type, event, Dali::DevelWindow::MouseInOutEvent::Type::OUT);
+ }
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+/**
* Called when a detent rotation event is recevied.
*/
static Eina_Bool EcoreEventDetentRotation(void* data, int type, void* event)
if(mOwnSurface)
{
ecore_wl2_window_free(mEcoreWindow);
-
- WindowSystem::Shutdown();
}
}
else
{
// we own the surface about to created
- WindowSystem::Initialize();
-
mOwnSurface = true;
CreateWindow(positionSize);
}
// Register Mouse wheel events
mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, EcoreEventMouseWheel, this));
+ // Register Mouse IO events
+ mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_IN, EcoreEventMouseIn, this));
+ mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_OUT, EcoreEventMouseOut, this));
+
// Register Detent event
mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_DETENT_ROTATE, EcoreEventDetentRotation, this));
if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_DOWN");
+
Device::Class::Type deviceClass;
Device::Subclass::Type deviceSubclass;
if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_UP");
+
Device::Class::Type deviceClass;
Device::Subclass::Type deviceSubclass;
if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_MOVE");
+
Device::Class::Type deviceClass;
Device::Subclass::Type deviceSubclass;
if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_CANCEL");
+
Integration::Point point;
point.SetDeviceId(touchEvent->multi.device);
point.SetState(PointState::INTERRUPTED);
if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_WHEEL");
+
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
Integration::WheelEvent wheelEvent(Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2(mouseWheelEvent->x, mouseWheelEvent->y), mouseWheelEvent->z, mouseWheelEvent->timestamp);
}
}
+void WindowBaseEcoreWl2::OnMouseInOut(void* data, int type, void* event, Dali::DevelWindow::MouseInOutEvent::Type action)
+{
+ Ecore_Event_Mouse_IO* mouseInOutEvent = static_cast<Ecore_Event_Mouse_IO*>(event);
+
+ if(mouseInOutEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ {
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_IN_OUT");
+
+ DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseInOut: timestamp: %d, modifiers: %d, x: %d, y: %d\n", mouseInOutEvent->timestamp, mouseInOutEvent->modifiers, mouseInOutEvent->x, mouseInOutEvent->y);
+
+ Device::Class::Type deviceClass;
+ Device::Subclass::Type deviceSubclass;
+
+ GetDeviceClass(ecore_device_class_get(mouseInOutEvent->dev), deviceClass);
+ GetDeviceSubclass(ecore_device_subclass_get(mouseInOutEvent->dev), deviceSubclass);
+
+ Dali::DevelWindow::MouseInOutEvent inOutEvent(action, mouseInOutEvent->modifiers, Vector2(mouseInOutEvent->x, mouseInOutEvent->y), mouseInOutEvent->timestamp, deviceClass, deviceSubclass);
+
+ mMouseInOutEventSignal.Emit(inOutEvent);
+ }
+}
+
void WindowBaseEcoreWl2::OnDetentRotation(void* data, int type, void* event)
{
Ecore_Event_Detent_Rotate* detentEvent = static_cast<Ecore_Event_Detent_Rotate*>(event);
EGLNativeWindowType WindowBaseEcoreWl2::CreateEglWindow(int width, int height)
{
int totalAngle = (mWindowRotationAngle + mScreenRotationAngle) % 360;
+
+ START_DURATION_CHECK();
if(totalAngle == 90 || totalAngle == 270)
{
mEglWindow = wl_egl_window_create(mWlSurface, height, width);
{
mEglWindow = wl_egl_window_create(mWlSurface, width, height);
}
+ FINISH_DURATION_CHECK("wl_egl_window_create");
return static_cast<EGLNativeWindowType>(mEglWindow);
}
{
if(mEglWindow != NULL)
{
+ START_DURATION_CHECK();
wl_egl_window_destroy(mEglWindow);
+ FINISH_DURATION_CHECK("wl_egl_window_destroy");
+
mEglWindow = NULL;
}
}
}
}
+ START_DURATION_CHECK();
wl_egl_window_tizen_set_rotation(mEglWindow, rotation);
+ FINISH_DURATION_CHECK("wl_egl_window_tizen_set_rotation");
}
void WindowBaseEcoreWl2::SetEglWindowBufferTransform(int angle)
}
DALI_LOG_RELEASE_INFO("wl_egl_window_tizen_set_buffer_transform() with buffer Transform [%d]\n", bufferTransform);
+ START_DURATION_CHECK();
wl_egl_window_tizen_set_buffer_transform(mEglWindow, bufferTransform);
+ FINISH_DURATION_CHECK("wl_egl_window_tizen_set_buffer_transform");
}
void WindowBaseEcoreWl2::SetEglWindowTransform(int angle)
}
DALI_LOG_RELEASE_INFO("wl_egl_window_tizen_set_window_transform() with window Transform [%d]\n", windowTransform);
+ START_DURATION_CHECK();
wl_egl_window_tizen_set_window_transform(mEglWindow, windowTransform);
+ FINISH_DURATION_CHECK("wl_egl_window_tizen_set_window_transform");
}
void WindowBaseEcoreWl2::ResizeEglWindow(PositionSize positionSize)
{
DALI_LOG_RELEASE_INFO("wl_egl_window_resize(), (%d, %d) [%d x %d]\n", positionSize.x, positionSize.y, positionSize.width, positionSize.height);
+ START_DURATION_CHECK();
wl_egl_window_resize(mEglWindow, positionSize.width, positionSize.height, positionSize.x, positionSize.y);
// Note: Both "Resize" and "MoveResize" cases can reach here, but only "MoveResize" needs to submit serial number
wl_egl_window_tizen_set_window_serial(mEglWindow, mMoveResizeSerial);
mLastSubmittedMoveResizeSerial = mMoveResizeSerial;
}
+ FINISH_DURATION_CHECK("wl_egl_window functions");
}
bool WindowBaseEcoreWl2::IsEglWindowRotationSupported()
{
+ START_DURATION_CHECK();
// Check capability
wl_egl_window_tizen_capability capability = static_cast<wl_egl_window_tizen_capability>(wl_egl_window_tizen_get_capabilities(mEglWindow));
+ FINISH_DURATION_CHECK("wl_egl_window_tizen_get_capabilities");
+
if(capability == WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_SUPPORTED)
{
mSupportedPreProtation = true;
mWindowPositionSize = newPositionSize;
DALI_LOG_RELEASE_INFO("ecore_wl2_window_position_set x[%d], y[%d]\n", newPositionSize.x, newPositionSize.y);
+ START_DURATION_CHECK();
ecore_wl2_window_position_set(mEcoreWindow, newPositionSize.x, newPositionSize.y);
+ FINISH_DURATION_CHECK("ecore_wl2_window_position_set");
}
void WindowBaseEcoreWl2::Resize(PositionSize positionSize)
mWindowPositionSize = newPositionSize;
DALI_LOG_RELEASE_INFO("ecore_wl2_window_sync_geometry_set, x[%d], y[%d], w{%d], h[%d]\n", newPositionSize.x, newPositionSize.y, newPositionSize.width, newPositionSize.height);
+ START_DURATION_CHECK();
ecore_wl2_window_sync_geometry_set(mEcoreWindow, ++mMoveResizeSerial, newPositionSize.x, newPositionSize.y, newPositionSize.width, newPositionSize.height);
+ FINISH_DURATION_CHECK("ecore_wl2_window_sync_geometry_set");
}
void WindowBaseEcoreWl2::MoveResize(PositionSize positionSize)
mWindowPositionSize = newPositionSize;
DALI_LOG_RELEASE_INFO("ecore_wl2_window_sync_geometry_set, x[%d], y[%d], w{%d], h[%d]\n", newPositionSize.x, newPositionSize.y, newPositionSize.width, newPositionSize.height);
+ START_DURATION_CHECK();
ecore_wl2_window_sync_geometry_set(mEcoreWindow, ++mMoveResizeSerial, newPositionSize.x, newPositionSize.y, newPositionSize.width, newPositionSize.height);
+ FINISH_DURATION_CHECK("ecore_wl2_window_sync_geometry_set");
+}
+
+void WindowBaseEcoreWl2::SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan)
+{
+ DALI_LOG_RELEASE_INFO("ecore_wl2_window_layout_set, numCols[%d], numRows[%d], column[%d], row[%d], colSpan[%d], rowSpan[%d]\n", numCols, numRows, column, row, colSpan, rowSpan);
+ START_DURATION_CHECK();
+ ecore_wl2_window_layout_set(mEcoreWindow, numCols, numRows, column, row, colSpan, rowSpan);
+ FINISH_DURATION_CHECK("ecore_wl2_window_layout_set");
}
void WindowBaseEcoreWl2::SetClass(const std::string& name, const std::string& className)
void WindowBaseEcoreWl2::Raise()
{
+ START_DURATION_CHECK();
// Use ecore_wl2_window_activate to prevent the window shown without rendering
ecore_wl2_window_activate(mEcoreWindow);
+ FINISH_DURATION_CHECK("ecore_wl2_window_activate");
}
void WindowBaseEcoreWl2::Lower()
{
+ START_DURATION_CHECK();
ecore_wl2_window_lower(mEcoreWindow);
+ FINISH_DURATION_CHECK("ecore_wl2_window_lower");
}
void WindowBaseEcoreWl2::Activate()
{
+ START_DURATION_CHECK();
ecore_wl2_window_activate(mEcoreWindow);
+ FINISH_DURATION_CHECK("ecore_wl2_window_activate");
}
void WindowBaseEcoreWl2::Maximize(bool maximize)
{
+ START_DURATION_CHECK();
ecore_wl2_window_maximized_set(mEcoreWindow, maximize);
+ FINISH_DURATION_CHECK("ecore_wl2_window_maximized_set");
}
bool WindowBaseEcoreWl2::IsMaximized() const
void WindowBaseEcoreWl2::SetMaximumSize(Dali::Window::WindowSize size)
{
DALI_LOG_RELEASE_INFO("ecore_wl2_window_maximum_size_set, width: %d, height: %d\n", size.GetWidth(), size.GetHeight());
+ START_DURATION_CHECK();
ecore_wl2_window_maximum_size_set(mEcoreWindow, size.GetWidth(), size.GetHeight());
+ FINISH_DURATION_CHECK("ecore_wl2_window_maximum_size_set");
+ ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
}
void WindowBaseEcoreWl2::Minimize(bool minimize)
{
+ START_DURATION_CHECK();
ecore_wl2_window_iconified_set(mEcoreWindow, minimize);
+ FINISH_DURATION_CHECK("ecore_wl2_window_iconified_set");
}
bool WindowBaseEcoreWl2::IsMinimized() const
void WindowBaseEcoreWl2::SetMimimumSize(Dali::Window::WindowSize size)
{
DALI_LOG_RELEASE_INFO("ecore_wl2_window_minimum_size_set, width: %d, height: %d\n", size.GetWidth(), size.GetHeight());
+ START_DURATION_CHECK();
ecore_wl2_window_minimum_size_set(mEcoreWindow, size.GetWidth(), size.GetHeight());
+ FINISH_DURATION_CHECK("ecore_wl2_window_minimum_size_set");
+ ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
}
void WindowBaseEcoreWl2::SetAvailableAnlges(const std::vector<int>& angles)
rotations[i] = static_cast<int>(angles[i]);
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "%d ", rotations[i]);
}
+
+ START_DURATION_CHECK();
ecore_wl2_window_available_rotations_set(mEcoreWindow, rotations, angles.size());
+ FINISH_DURATION_CHECK("ecore_wl2_window_available_rotations_set");
}
void WindowBaseEcoreWl2::SetPreferredAngle(int angle)
{
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetPreferredAngle, angle: %d\n", angle);
+ START_DURATION_CHECK();
ecore_wl2_window_preferred_rotation_set(mEcoreWindow, angle);
+ FINISH_DURATION_CHECK("ecore_wl2_window_preferred_rotation_set");
}
void WindowBaseEcoreWl2::SetAcceptFocus(bool accept)
{
+ START_DURATION_CHECK();
ecore_wl2_window_focus_skip_set(mEcoreWindow, !accept);
+ FINISH_DURATION_CHECK("ecore_wl2_window_focus_skip_set");
}
void WindowBaseEcoreWl2::Show()
{
if(!mVisible)
{
+ START_DURATION_CHECK();
ecore_wl2_window_geometry_set(mEcoreWindow, mWindowPositionSize.x, mWindowPositionSize.y, mWindowPositionSize.width, mWindowPositionSize.height);
+ FINISH_DURATION_CHECK("ecore_wl2_window_geometry_set");
}
mVisible = true;
unsigned int id = mAuxiliaryHints.size();
+ START_DURATION_CHECK();
ecore_wl2_window_aux_hint_add(mEcoreWindow, static_cast<int>(id), hint.c_str(), value.c_str());
+ FINISH_DURATION_CHECK("ecore_wl2_window_aux_hint_add");
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::AddAuxiliaryHint: hint = %s, value = %s, id = %d\n", hint.c_str(), value.c_str(), id);
mAuxiliaryHints[id - 1].second = std::string();
+ START_DURATION_CHECK();
ecore_wl2_window_aux_hint_del(mEcoreWindow, static_cast<int>(id));
+ FINISH_DURATION_CHECK("ecore_wl2_window_aux_hint_del");
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::RemoveAuxiliaryHint: id = %d, hint = %s\n", id, mAuxiliaryHints[id - 1].first.c_str());
mAuxiliaryHints[id - 1].second = value;
+ START_DURATION_CHECK();
ecore_wl2_window_aux_hint_change(mEcoreWindow, static_cast<int>(id), value.c_str());
+ FINISH_DURATION_CHECK("ecore_wl2_window_aux_hint_change");
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetAuxiliaryHintValue: id = %d, hint = %s, value = %s\n", id, mAuxiliaryHints[id - 1].first.c_str(), mAuxiliaryHints[id - 1].second.c_str());
return 0;
}
+Rect<int> WindowBaseEcoreWl2::RecalculateInputRect(const Rect<int>& rect)
+{
+ Rect<int> newRect;
+
+ if(mWindowRotationAngle == 90)
+ {
+ newRect.x = rect.y;
+ newRect.y = mWindowPositionSize.height - (rect.x + rect.width);
+ newRect.width = rect.height;
+ newRect.height = rect.width;
+ }
+ else if(mWindowRotationAngle == 180)
+ {
+ newRect.x = mWindowPositionSize.width - (rect.x + rect.width);
+ newRect.y = mWindowPositionSize.height - (rect.y + rect.height);
+ newRect.width = rect.width;
+ newRect.height = rect.height;
+ }
+ else if(mWindowRotationAngle == 270)
+ {
+ newRect.x = mWindowPositionSize.width - (rect.y + rect.height);
+ newRect.y = rect.x;
+ newRect.width = rect.height;
+ newRect.height = rect.width;
+ }
+ else
+ {
+ newRect.x = rect.x;
+ newRect.y = rect.y;
+ newRect.width = rect.width;
+ newRect.height = rect.height;
+ }
+ return newRect;
+}
+
void WindowBaseEcoreWl2::SetInputRegion(const Rect<int>& inputRegion)
{
- ecore_wl2_window_input_region_set(mEcoreWindow, inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height);
+ Rect<int> convertRegion = RecalculateInputRect(inputRegion);
+
+ Eina_Rectangle rect;
+ rect.x = convertRegion.x;
+ rect.y = convertRegion.y;
+ rect.w = convertRegion.width;
+ rect.h = convertRegion.height;
+
+ DALI_LOG_RELEASE_INFO("%p, Set input rect (%d, %d, %d x %d)\n", mEcoreWindow, rect.x, rect.y, rect.w, rect.h);
+ START_DURATION_CHECK();
+ ecore_wl2_window_input_rect_set(mEcoreWindow, &rect);
+ FINISH_DURATION_CHECK("ecore_wl2_window_input_rect_set");
+ ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
}
void WindowBaseEcoreWl2::SetType(Dali::WindowType type)
break;
}
}
+
+ START_DURATION_CHECK();
ecore_wl2_window_type_set(mEcoreWindow, windowType);
+ FINISH_DURATION_CHECK("ecore_wl2_window_type_set");
}
}
Dali::WindowOperationResult WindowBaseEcoreWl2::SetNotificationLevel(Dali::WindowNotificationLevel level)
{
+ START_DURATION_CHECK();
while(!mTizenPolicy)
{
wl_display_dispatch_queue(mDisplay, mEventQueue);
wl_display_dispatch_queue(mDisplay, mEventQueue);
count++;
}
+ FINISH_DURATION_CHECK("ecore_wl2 & wl_display");
if(!mNotificationLevelChangeDone)
{
Dali::WindowOperationResult WindowBaseEcoreWl2::SetBrightness(int brightness)
{
+ START_DURATION_CHECK();
while(!mTizenDisplayPolicy)
{
wl_display_dispatch_queue(mDisplay, mEventQueue);
wl_display_dispatch_queue(mDisplay, mEventQueue);
count++;
}
+ FINISH_DURATION_CHECK("ecore_wl2_display_flush");
if(!mBrightnessChangeDone)
{
int WindowBaseEcoreWl2::GetBrightness() const
{
+ START_DURATION_CHECK();
while(!mTizenDisplayPolicy)
{
wl_display_dispatch_queue(mDisplay, mEventQueue);
wl_display_dispatch_queue(mDisplay, mEventQueue);
count++;
}
+ FINISH_DURATION_CHECK("ecore_wl2_display_flush");
if(!mBrightnessChangeDone)
{
keyList = eina_list_append(keyList, &info);
}
+ START_DURATION_CHECK();
Eina_List* grabList = ecore_wl2_window_keygrab_list_set(mEcoreWindow, keyList);
+ FINISH_DURATION_CHECK("ecore_wl2_window_keygrab_list_set");
result.Resize(keyCount, true);
keyList = eina_list_append(keyList, &info);
}
+ START_DURATION_CHECK();
Eina_List* ungrabList = ecore_wl2_window_keygrab_list_unset(mEcoreWindow, keyList);
+ FINISH_DURATION_CHECK("ecore_wl2_window_keygrab_list_unset");
result.Resize(keyCount, true);
void WindowBaseEcoreWl2::WindowRotationCompleted(int degree, int width, int height)
{
+ START_DURATION_CHECK();
ecore_wl2_window_rotation_change_done_send(mEcoreWindow, degree, width, height);
+ FINISH_DURATION_CHECK("ecore_wl2_window_rotation_change_done_send");
}
void WindowBaseEcoreWl2::SetTransparency(bool transparent)
{
+ START_DURATION_CHECK();
ecore_wl2_window_alpha_set(mEcoreWindow, transparent);
+ FINISH_DURATION_CHECK("ecore_wl2_window_alpha_set");
}
void WindowBaseEcoreWl2::CreateWindow(PositionSize positionSize)
DALI_ASSERT_ALWAYS(0 && "Failed to get display");
}
+ START_DURATION_CHECK();
ecore_wl2_display_sync(display);
mEcoreWindow = ecore_wl2_window_new(display, NULL, positionSize.x, positionSize.y, positionSize.width, positionSize.height);
// Set default type
ecore_wl2_window_type_set(mEcoreWindow, ECORE_WL2_WINDOW_TYPE_TOPLEVEL);
+ FINISH_DURATION_CHECK("ecore_wl2 functions");
}
void WindowBaseEcoreWl2::SetParent(WindowBase* parentWinBase, bool belowParent)
WindowBaseEcoreWl2* winBaseEcore2 = static_cast<WindowBaseEcoreWl2*>(parentWinBase);
ecoreParent = winBaseEcore2->mEcoreWindow;
}
+
+ START_DURATION_CHECK();
ecore_wl2_window_transient_parent_set(mEcoreWindow, ecoreParent, belowParent);
+ FINISH_DURATION_CHECK("ecore_wl2_window_transient_parent_set");
}
int WindowBaseEcoreWl2::CreateFrameRenderedSyncFence()
void WindowBaseEcoreWl2::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
{
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetPositionSizeWithAngle, angle: %d, x: %d, y: %d, w: %d, h: %d\n", angle, positionSize.x, positionSize.y, positionSize.width, positionSize.height);
+ START_DURATION_CHECK();
ecore_wl2_window_rotation_geometry_set(mEcoreWindow, angle, positionSize.x, positionSize.y, positionSize.width, positionSize.height);
+ FINISH_DURATION_CHECK("ecore_wl2_window_rotation_geometry_set");
}
void WindowBaseEcoreWl2::InitializeIme()
return;
}
+ START_DURATION_CHECK();
EINA_ITERATOR_FOREACH(globals, global)
{
#ifdef OVER_TIZEN_VERSION_7
#else
wl_input_panel_surface_set_toplevel(mWlInputPanelSurface, mWlOutput, WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM);
#endif
+ FINISH_DURATION_CHECK("zwp_input_panel_surface_v1_set_toplevel");
}
void WindowBaseEcoreWl2::ImeWindowReadyToRender()
DALI_LOG_ERROR("WindowBaseEcoreWl2::ImeWindowReadyToRender(), wayland input panel surface is null\n");
return;
}
+
+ START_DURATION_CHECK();
#ifdef OVER_TIZEN_VERSION_7
zwp_input_panel_surface_v1_set_ready(mWlInputPanelSurface, 1);
#else
wl_input_panel_surface_set_ready(mWlInputPanelSurface, 1);
#endif
+ FINISH_DURATION_CHECK("zwp_input_panel_surface_v1_set_ready");
}
void WindowBaseEcoreWl2::RequestMoveToServer()
return;
}
+ START_DURATION_CHECK();
ecore_wl2_window_move(mEcoreWindow, input);
+ FINISH_DURATION_CHECK("ecore_wl2_window_move");
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::RequestMoveToServer, starts the window[%p] is moved by server\n", mEcoreWindow);
}
ResizeLocation location = RecalculateLocationToCurrentOrientation(direction, mWindowRotationAngle);
+ START_DURATION_CHECK();
ecore_wl2_window_resize(mEcoreWindow, input, static_cast<int>(location));
+ FINISH_DURATION_CHECK("ecore_wl2_window_resize");
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::RequestResizeToServer, starts the window[%p] is resized by server, direction:%d oriention:%d mode:%d\n", mEcoreWindow, direction, mWindowRotationAngle, location);
}
void WindowBaseEcoreWl2::EnableFloatingMode(bool enable)
{
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::EnableFloatingMode, floating mode flag: [%p], enable [%d]\n", mEcoreWindow, enable);
+ START_DURATION_CHECK();
if(enable == true)
{
ecore_wl2_window_floating_mode_set(mEcoreWindow, EINA_TRUE);
{
ecore_wl2_window_floating_mode_set(mEcoreWindow, EINA_FALSE);
}
+ FINISH_DURATION_CHECK("ecore_wl2_window_floating_mode_set");
}
bool WindowBaseEcoreWl2::IsFloatingModeEnabled() const
void WindowBaseEcoreWl2::IncludeInputRegion(const Rect<int>& inputRegion)
{
+ Rect<int> convertRegion = RecalculateInputRect(inputRegion);
Eina_Rectangle rect;
- rect.x = inputRegion.x;
- rect.y = inputRegion.y;
- rect.w = inputRegion.width;
- rect.h = inputRegion.height;
+ rect.x = convertRegion.x;
+ rect.y = convertRegion.y;
+ rect.w = convertRegion.width;
+ rect.h = convertRegion.height;
+
+ DALI_LOG_RELEASE_INFO("%p, Add input_rect(%d, %d, %d x %d)\n", mEcoreWindow, rect.x, rect.y, rect.w, rect.h);
+ START_DURATION_CHECK();
ecore_wl2_window_input_rect_add(mEcoreWindow, &rect);
+ FINISH_DURATION_CHECK("ecore_wl2_window_input_rect_add");
ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
}
void WindowBaseEcoreWl2::ExcludeInputRegion(const Rect<int>& inputRegion)
{
+ Rect<int> convertRegion = RecalculateInputRect(inputRegion);
Eina_Rectangle rect;
- rect.x = inputRegion.x;
- rect.y = inputRegion.y;
- rect.w = inputRegion.width;
- rect.h = inputRegion.height;
+ rect.x = convertRegion.x;
+ rect.y = convertRegion.y;
+ rect.w = convertRegion.width;
+ rect.h = convertRegion.height;
+
+ DALI_LOG_RELEASE_INFO("%p, Subtract input_rect(%d, %d, %d x %d)\n", mEcoreWindow, rect.x, rect.y, rect.w, rect.h);
+ START_DURATION_CHECK();
ecore_wl2_window_input_rect_subtract(mEcoreWindow, &rect);
+ FINISH_DURATION_CHECK("ecore_wl2_window_input_rect_subtract");
ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
}