X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fubuntu-x11%2Fwindow-base-ecore-x.cpp;h=39bcf9a0efcd22ebd769acbed8d25a3bf4c4fe1c;hb=f79805402bf8bd9b7ceb4561d4c089411fb5927f;hp=f7058dcbee065ca0547379d814ede10b1ebab1ac;hpb=e7069e6600d290fb68810872d2077e0a90cf8657;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp index f7058dc..39bcf9a 100644 --- a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 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. @@ -21,7 +21,6 @@ // INTERNAL HEADERS #include #include -#include #include // EXTERNAL_HEADERS @@ -38,7 +37,7 @@ namespace Adaptor { 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; @@ -52,6 +51,17 @@ Debug::Filter* gWindowBaseLogFilter = Debug::Filter::New(Debug::NoLogging, false // Window Callbacks ///////////////////////////////////////////////////////////////////////////////////////////////// +static Eina_Bool EcoreEventWindowConfigure(void* data, int type, void* event) +{ + WindowBaseEcoreX* windowBase = static_cast(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(data); @@ -261,8 +271,6 @@ WindowBaseEcoreX::~WindowBaseEcoreX() if(mOwnSurface) { ecore_x_window_free(mEcoreWindow); - - WindowSystem::Shutdown(); } } @@ -274,8 +282,6 @@ void WindowBaseEcoreX::Initialize(PositionSize positionSize, Any surface, bool i // 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); @@ -313,6 +319,7 @@ void WindowBaseEcoreX::Initialize(PositionSize positionSize, Any surface, bool i // 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)); @@ -341,6 +348,20 @@ void WindowBaseEcoreX::Initialize(PositionSize positionSize, Any surface, bool i mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, EcoreEventSelectionNotify, this)); } +void WindowBaseEcoreX::OnWindowConfigure(void* event) +{ + auto configure = static_cast(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(event); @@ -634,6 +655,11 @@ int WindowBaseEcoreX::GetNativeWindowId() return mEcoreWindow; } +std::string WindowBaseEcoreX::GetNativeWindowResourceId() +{ + return std::string(); +} + EGLNativeWindowType WindowBaseEcoreX::CreateEglWindow(int width, int height) { // need to create X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit @@ -681,6 +707,10 @@ void WindowBaseEcoreX::MoveResize(PositionSize positionSize) 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()); @@ -703,6 +733,32 @@ void WindowBaseEcoreX::Activate() ecore_x_netwm_client_active_request(ecore_x_window_root_get(mEcoreWindow), mEcoreWindow, 1 /* request type, 1:application, 2:pager */, 0); } +void WindowBaseEcoreX::Maximize(bool maximize) +{ +} + +bool WindowBaseEcoreX::IsMaximized() const +{ + return false; +} + +void WindowBaseEcoreX::SetMaximumSize(Dali::Window::WindowSize size) +{ +} + +void WindowBaseEcoreX::Minimize(bool minimize) +{ +} + +bool WindowBaseEcoreX::IsMinimized() const +{ + return false; +} + +void WindowBaseEcoreX::SetMimimumSize(Dali::Window::WindowSize size) +{ +} + void WindowBaseEcoreX::SetAvailableAnlges(const std::vector& angles) { } @@ -836,7 +892,7 @@ void WindowBaseEcoreX::GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVert dpiVertical = ecore_x_dpi_get(); } -int WindowBaseEcoreX::GetOrientation() const +int WindowBaseEcoreX::GetWindowRotationAngle() const { return 0; }