/*
- * 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/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 <dali/internal/window-system/ubuntu-x11/ecore-x-types.h>
// EXTERNAL_HEADERS
{
namespace
{
-const std::string DEFAULT_DEVICE_NAME = "";
+const char* DEFAULT_DEVICE_NAME = "";
const Device::Class::Type DEFAULT_DEVICE_CLASS = Device::Class::NONE;
const Device::Subclass::Type DEFAULT_DEVICE_SUBCLASS = Device::Subclass::NONE;
// Window Callbacks
/////////////////////////////////////////////////////////////////////////////////////////////////
+static Eina_Bool EcoreEventWindowConfigure(void* data, int type, void* event)
+{
+ WindowBaseEcoreX* windowBase = static_cast<WindowBaseEcoreX*>(data);
+ if(windowBase)
+ {
+ windowBase->OnWindowConfigure(event);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
static Eina_Bool EcoreEventWindowPropertyChanged(void* data, int type, void* event)
{
WindowBaseEcoreX* windowBase = static_cast<WindowBaseEcoreX*>(data);
if(mOwnSurface)
{
ecore_x_window_free(mEcoreWindow);
-
- WindowSystem::Shutdown();
}
}
// if the surface is empty, create a new one.
if(surfaceId == 0)
{
- WindowSystem::Initialize();
-
// we own the surface about to created
mOwnSurface = true;
CreateWindow(positionSize, isTransparent);
// Enable Drag & Drop
ecore_x_dnd_aware_set(mEcoreWindow, EINA_TRUE);
+ mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE, EcoreEventWindowConfigure, this));
mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, EcoreEventWindowPropertyChanged, this));
mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DELETE_REQUEST, EcoreEventWindowDeleteRequest, this));
mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, EcoreEventSelectionNotify, this));
}
+void WindowBaseEcoreX::OnWindowConfigure(void* event)
+{
+ auto configure = static_cast<Ecore_X_Event_Window_Configure*>(event);
+ if(configure->win == mEcoreWindow)
+ {
+ Dali::PositionSize positionSize;
+ positionSize.x = configure->x;
+ positionSize.y = configure->y;
+ positionSize.width = configure->w;
+ positionSize.height = configure->h;
+ mUpdatePositionSizeSignal.Emit(positionSize);
+ }
+}
+
Eina_Bool WindowBaseEcoreX::OnWindowPropertyChanged(void* data, int type, void* event)
{
Ecore_X_Event_Window_Property* propertyChangedEvent = static_cast<Ecore_X_Event_Window_Property*>(event);
ecore_x_window_move_resize(mEcoreWindow, positionSize.x, positionSize.y, positionSize.width, positionSize.height);
}
+void WindowBaseEcoreX::SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan)
+{
+}
+
void WindowBaseEcoreX::SetClass(const std::string& name, const std::string& className)
{
ecore_x_icccm_title_set(mEcoreWindow, name.c_str());
return false;
}
+void WindowBaseEcoreX::SetMaximumSize(Dali::Window::WindowSize size)
+{
+}
+
void WindowBaseEcoreX::Minimize(bool minimize)
{
}
return false;
}
+void WindowBaseEcoreX::SetMimimumSize(Dali::Window::WindowSize size)
+{
+}
+
void WindowBaseEcoreX::SetAvailableAnlges(const std::vector<int>& angles)
{
}
dpiVertical = ecore_x_dpi_get();
}
-int WindowBaseEcoreX::GetOrientation() const
+int WindowBaseEcoreX::GetWindowRotationAngle() const
{
return 0;
}
{
}
+bool WindowBaseEcoreX::PointerConstraintsLock()
+{
+ return false;
+}
+
+bool WindowBaseEcoreX::PointerConstraintsUnlock()
+{
+ return false;
+}
+
+void WindowBaseEcoreX::LockedPointerRegionSet(int32_t x, int32_t y, int32_t width, int32_t height)
+{
+}
+
+void WindowBaseEcoreX::LockedPointerCursorPositionHintSet(int32_t x, int32_t y)
+{
+}
+
+bool WindowBaseEcoreX::PointerWarp(int32_t x, int32_t y)
+{
+ return false;
+}
+
+void WindowBaseEcoreX::CursorVisibleSet(bool visible)
+{
+}
+
+bool WindowBaseEcoreX::KeyboardGrab(Device::Subclass::Type deviceSubclass)
+{
+ return false;
+}
+
+bool WindowBaseEcoreX::KeyboardUnGrab()
+{
+ return false;
+}
+
+void WindowBaseEcoreX::SetFullScreen(bool fullscreen)
+{
+ return;
+}
+
+bool WindowBaseEcoreX::GetFullScreen()
+{
+ return false;
+}
+
+void WindowBaseEcoreX::SetFrontBufferRendering(bool enable)
+{
+}
+
+bool WindowBaseEcoreX::GetFrontBufferRendering()
+{
+ return false;
+}
+
+void WindowBaseEcoreX::SetEglWindowFrontBufferMode(bool enable)
+{
+}
+
} // namespace Adaptor
} // namespace Internal