X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fubuntu-x11%2Fwindow-base-ecore-x.cpp;h=c70bc4b0a7c33cbdafb14a18c21f59a71e3efc0f;hb=d5365301af718ee285f84452464ca030758eeb66;hp=b12f37ee7a590237b660a4e6737dcb5050164293;hpb=880c3fef683f952d6fe64a7eeb1a83b34959c4ec;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 b12f37e..c70bc4b 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 @@ -703,6 +729,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) { } @@ -768,9 +820,14 @@ void WindowBaseEcoreX::SetType(Dali::WindowType type) { } -bool WindowBaseEcoreX::SetNotificationLevel(Dali::WindowNotificationLevel level) +Dali::WindowType WindowBaseEcoreX::GetType() const { - return false; + return Dali::WindowType::NORMAL; +} + +Dali::WindowOperationResult WindowBaseEcoreX::SetNotificationLevel(Dali::WindowNotificationLevel level) +{ + return Dali::WindowOperationResult::NOT_SUPPORTED; } Dali::WindowNotificationLevel WindowBaseEcoreX::GetNotificationLevel() const @@ -782,9 +839,9 @@ void WindowBaseEcoreX::SetOpaqueState(bool opaque) { } -bool WindowBaseEcoreX::SetScreenOffMode(WindowScreenOffMode screenOffMode) +Dali::WindowOperationResult WindowBaseEcoreX::SetScreenOffMode(WindowScreenOffMode screenOffMode) { - return false; + return Dali::WindowOperationResult::NOT_SUPPORTED; } WindowScreenOffMode WindowBaseEcoreX::GetScreenOffMode() const @@ -792,9 +849,9 @@ WindowScreenOffMode WindowBaseEcoreX::GetScreenOffMode() const return WindowScreenOffMode::TIMEOUT; } -bool WindowBaseEcoreX::SetBrightness(int brightness) +Dali::WindowOperationResult WindowBaseEcoreX::SetBrightness(int brightness) { - return false; + return Dali::WindowOperationResult::NOT_SUPPORTED; } int WindowBaseEcoreX::GetBrightness() const @@ -831,7 +888,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; } @@ -895,7 +952,7 @@ void WindowBaseEcoreX::CreateWindow(PositionSize positionSize, bool isTransparen } } -void WindowBaseEcoreX::SetParent(WindowBase* parentWinBase) +void WindowBaseEcoreX::SetParent(WindowBase* parentWinBase, bool belowParent) { Ecore_X_Window ecoreParent = 0; if(parentWinBase) @@ -921,6 +978,43 @@ int WindowBaseEcoreX::CreateFramePresentedSyncFence() return -1; } +void WindowBaseEcoreX::SetPositionSizeWithAngle(PositionSize positionSize, int angle) +{ +} + +void WindowBaseEcoreX::InitializeIme() +{ +} + +void WindowBaseEcoreX::ImeWindowReadyToRender() +{ +} + +void WindowBaseEcoreX::RequestMoveToServer() +{ +} + +void WindowBaseEcoreX::RequestResizeToServer(WindowResizeDirection direction) +{ +} + +void WindowBaseEcoreX::EnableFloatingMode(bool enable) +{ +} + +bool WindowBaseEcoreX::IsFloatingModeEnabled() const +{ + return false; +} + +void WindowBaseEcoreX::IncludeInputRegion(const Rect& inputRegion) +{ +} + +void WindowBaseEcoreX::ExcludeInputRegion(const Rect& inputRegion) +{ +} + } // namespace Adaptor } // namespace Internal