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=0104a3689aad180c7bbaa78d772a143879a53a90;hpb=858e8fc245edd695501f3e9d460669e592bda9d3;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 0104a36..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) 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. @@ -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); @@ -686,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());