/*
- * 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.
if(mOwnSurface)
{
ecore_wl2_window_free(mEcoreWindow);
-
- WindowSystem::Shutdown();
}
}
else
{
// we own the surface about to created
- WindowSystem::Initialize();
-
mOwnSurface = true;
CreateWindow(positionSize);
}
std::string keyString("");
std::string compose("");
-#ifdef TRACE_ENABLED
- std::ostringstream stream;
- if(gTraceFilter->IsTraceEnabled())
- {
- stream << "DALI_ON_KEY_DOWN [" << keyName << "]";
- DALI_TRACE_BEGIN(gTraceFilter, stream.str().c_str());
- }
-#endif
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_KEY_DOWN");
// Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
if(keyEvent->compose)
Integration::KeyEvent keyEvent(keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, compose, deviceName, deviceClass, deviceSubclass);
mKeyEventSignal.Emit(keyEvent);
-
-#ifdef TRACE_ENABLED
- if(gTraceFilter->IsTraceEnabled())
- {
- DALI_TRACE_END(gTraceFilter, stream.str().c_str());
- }
-#endif
}
}
std::string keyString("");
std::string compose("");
-#ifdef TRACE_ENABLED
- std::ostringstream stream;
- if(gTraceFilter->IsTraceEnabled())
- {
- stream << "DALI_ON_KEY_UP [" << keyName << "]";
- DALI_TRACE_BEGIN(gTraceFilter, stream.str().c_str());
- }
-#endif
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_KEY_UP");
// Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
if(keyEvent->compose)
Integration::KeyEvent keyEvent(keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::UP, compose, deviceName, deviceClass, deviceSubclass);
mKeyEventSignal.Emit(keyEvent);
-
-#ifdef TRACE_ENABLED
- if(gTraceFilter->IsTraceEnabled())
- {
- DALI_TRACE_END(gTraceFilter, stream.str().c_str());
- }
-#endif
}
}
ecore_wl2_window_sync_geometry_set(mEcoreWindow, ++mMoveResizeSerial, newPositionSize.x, newPositionSize.y, newPositionSize.width, newPositionSize.height);
}
+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);
+ ecore_wl2_window_layout_set(mEcoreWindow, numCols, numRows, column, row, colSpan, rowSpan);
+}
+
void WindowBaseEcoreWl2::SetClass(const std::string& name, const std::string& className)
{
ecore_wl2_window_title_set(mEcoreWindow, name.c_str());
{
DALI_LOG_RELEASE_INFO("ecore_wl2_window_maximum_size_set, width: %d, height: %d\n", size.GetWidth(), size.GetHeight());
ecore_wl2_window_maximum_size_set(mEcoreWindow, size.GetWidth(), size.GetHeight());
+ ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
}
void WindowBaseEcoreWl2::Minimize(bool minimize)
{
DALI_LOG_RELEASE_INFO("ecore_wl2_window_minimum_size_set, width: %d, height: %d\n", size.GetWidth(), size.GetHeight());
ecore_wl2_window_minimum_size_set(mEcoreWindow, size.GetWidth(), size.GetHeight());
+ ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
}
void WindowBaseEcoreWl2::SetAvailableAnlges(const std::vector<int>& angles)
void WindowBaseEcoreWl2::SetInputRegion(const Rect<int>& inputRegion)
{
- ecore_wl2_window_input_region_set(mEcoreWindow, inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height);
+ DALI_LOG_RELEASE_INFO("%p, Set input rect (%d, %d, %d x %d)\n", mEcoreWindow, inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height);
+ Eina_Rectangle rect;
+ rect.x = inputRegion.x;
+ rect.y = inputRegion.y;
+ rect.w = inputRegion.width;
+ rect.h = inputRegion.height;
+
+ ecore_wl2_window_input_rect_set(mEcoreWindow, &rect);
+ ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
}
void WindowBaseEcoreWl2::SetType(Dali::WindowType type)
rect.w = inputRegion.width;
rect.h = inputRegion.height;
+ DALI_LOG_RELEASE_INFO("%p, Add input_rect(%d, %d, %d x %d)\n", mEcoreWindow, rect.x, rect.y, rect.w, rect.h);
ecore_wl2_window_input_rect_add(mEcoreWindow, &rect);
ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
}
rect.w = inputRegion.width;
rect.h = inputRegion.height;
+ DALI_LOG_RELEASE_INFO("%p, Subtract input_rect(%d, %d, %d x %d)\n", mEcoreWindow, rect.x, rect.y, rect.w, rect.h);
ecore_wl2_window_input_rect_subtract(mEcoreWindow, &rect);
ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
}