2 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/internal/window-system/x11/window-base-x.h>
22 #include <dali/internal/window-system/common/window-impl.h>
23 #include <dali/internal/window-system/common/window-render-surface.h>
24 #include <dali/internal/window-system/common/window-system.h>
25 #include <dali/internal/window-system/x11/window-system-x.h>
28 #include <dali/integration-api/debug.h>
29 #include <dali/public-api/events/mouse-button.h>
30 #include <dali/public-api/object/any.h>
32 using Dali::Internal::Adaptor::WindowSystem::WindowSystemX;
42 const char* DEFAULT_DEVICE_NAME = "";
43 const Device::Class::Type DEFAULT_DEVICE_CLASS = Device::Class::NONE;
44 const Device::Subclass::Type DEFAULT_DEVICE_SUBCLASS = Device::Subclass::NONE;
46 const unsigned int PRIMARY_TOUCH_BUTTON_ID(1);
48 #if defined(DEBUG_ENABLED)
49 Debug::Filter* gWindowBaseLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_WINDOW_BASE");
52 /////////////////////////////////////////////////////////////////////////////////////////////////
54 /////////////////////////////////////////////////////////////////////////////////////////////////
56 static bool EventWindowConfigureNotify(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
58 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
61 windowBase->OnConfigure(event);
67 static bool EventWindowPropertyChanged(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
69 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
72 return windowBase->OnWindowPropertyChanged(data, type, event);
79 * Called when the window receives a delete request
81 static bool EventWindowDeleteRequest(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
83 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
86 windowBase->OnDeleteRequest();
92 * Called when the window gains focus.
94 static bool EventWindowFocusIn(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
96 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
99 windowBase->OnFocusIn(data, type, event);
105 * Called when the window loses focus.
107 static bool EventWindowFocusOut(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
109 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
112 windowBase->OnFocusOut(data, type, event);
118 * Called when the window is damaged.
120 static bool EventWindowDamaged(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
122 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
125 windowBase->OnWindowDamaged(data, type, event);
131 /////////////////////////////////////////////////////////////////////////////////////////////////
132 // Selection Callbacks
133 /////////////////////////////////////////////////////////////////////////////////////////////////
136 * Called when the source window notifies us the content in clipboard is selected.
138 static bool EventSelectionClear(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
140 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
143 windowBase->OnSelectionClear(data, type, event);
149 * Called when the source window sends us about the selected content.
150 * For example, when dragged items are dragged INTO our window or when items are selected in the clipboard.
152 static bool EventSelectionNotify(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
154 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
157 windowBase->OnSelectionNotify(data, type, event);
162 /////////////////////////////////////////////////////////////////////////////////////////////////
164 /////////////////////////////////////////////////////////////////////////////////////////////////
167 * Called when a touch down is received.
169 static bool EventMouseButtonDown(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
171 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
174 windowBase->OnMouseButtonDown(data, type, event);
180 * Called when a touch up is received.
182 static bool EventMouseButtonUp(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
184 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
187 windowBase->OnMouseButtonUp(data, type, event);
193 * Called when a touch motion is received.
195 static bool EventMouseButtonMove(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
197 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
200 windowBase->OnMouseButtonMove(data, type, event);
205 /////////////////////////////////////////////////////////////////////////////////////////////////
207 /////////////////////////////////////////////////////////////////////////////////////////////////
210 * Called when a mouse wheel is received.
212 static bool EventMouseWheel(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
214 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
217 windowBase->OnMouseWheel(data, type, event);
222 /////////////////////////////////////////////////////////////////////////////////////////////////
224 /////////////////////////////////////////////////////////////////////////////////////////////////
227 * Called when a key down is received.
229 static bool EventKeyDown(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
231 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
234 windowBase->OnKeyDown(data, type, event);
240 * Called when a key up is received.
242 static bool EventKeyUp(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
244 WindowBaseX* windowBase = static_cast<WindowBaseX*>(data);
247 windowBase->OnKeyUp(data, type, event);
252 } // unnamed namespace
254 WindowBaseX::WindowBaseX(Dali::PositionSize positionSize, Any surface, bool isTransparent)
258 mIsTransparent(false), // Should only be set to true once we actually create a transparent window regardless of what isTransparent is.
259 mRotationAppSet(false),
260 mWindowRotationAngle(0)
262 Initialize(positionSize, surface, isTransparent);
265 WindowBaseX::~WindowBaseX()
268 mEventHandlers.Clear();
272 XDestroyWindow(WindowSystem::GetImplementation().GetXDisplay(), mWindow);
276 void WindowBaseX::Initialize(PositionSize positionSize, Any surface, bool isTransparent)
278 // see if there is a surface in Any surface
279 unsigned int surfaceId = GetSurfaceId(surface);
281 // if the surface is empty, create a new one.
284 // we own the surface about to created
286 CreateWindow(positionSize, isTransparent);
290 // XLib should already be initialized so no point in calling XInitThreads
291 mWindow = static_cast<::Window>(surfaceId);
294 auto& windowSystem = WindowSystem::GetImplementation();
297 if((id = getenv("DESKTOP_STARTUP_ID")))
299 windowSystem.SetStringProperty(mWindow, WindowSystemX::ATOM_NET_STARTUP_ID, std::string(id));
302 windowSystem.SetWindowHints(mWindow, true);
305 EnableMultipleSelection();
312 void WindowBaseX::SetWindowHints()
316 void WindowBaseX::EnableMultipleSelection()
318 WindowSystem::GetImplementation().InputMultiSelect(mWindow);
321 void WindowBaseX::EnableWindowClose()
323 WindowSystem::GetImplementation().SetProtocol(mWindow, WindowSystemX::ATOM_WM_DELETE_WINDOW, true);
326 void WindowBaseX::EnableDragAndDrop()
328 WindowSystem::GetImplementation().EnableDragAndDrop(mWindow, true);
331 void WindowBaseX::SetupEvents()
333 auto& windowSystem = WindowSystem::GetImplementation();
334 windowSystem.AddEventHandler(WindowSystemBase::Event::CONFIGURE_NOTIFY, EventWindowConfigureNotify, this);
335 windowSystem.AddEventHandler(WindowSystemBase::Event::PROPERTY_NOTIFY, EventWindowPropertyChanged, this);
336 windowSystem.AddEventHandler(WindowSystemBase::Event::DELETE_REQUEST, EventWindowDeleteRequest, this);
337 windowSystem.AddEventHandler(WindowSystemBase::Event::FOCUS_IN, EventWindowFocusIn, this);
338 windowSystem.AddEventHandler(WindowSystemBase::Event::FOCUS_OUT, EventWindowFocusOut, this);
339 windowSystem.AddEventHandler(WindowSystemBase::Event::DAMAGE, EventWindowDamaged, this);
340 windowSystem.AddEventHandler(WindowSystemBase::Event::MOUSE_BUTTON_DOWN, EventMouseButtonDown, this);
341 windowSystem.AddEventHandler(WindowSystemBase::Event::MOUSE_BUTTON_UP, EventMouseButtonUp, this);
342 windowSystem.AddEventHandler(WindowSystemBase::Event::MOUSE_OUT, EventMouseButtonUp, this);
343 windowSystem.AddEventHandler(WindowSystemBase::Event::MOUSE_MOVE, EventMouseButtonMove, this);
344 windowSystem.AddEventHandler(WindowSystemBase::Event::MOUSE_WHEEL, EventMouseWheel, this);
345 windowSystem.AddEventHandler(WindowSystemBase::Event::KEY_DOWN, EventKeyDown, this);
346 windowSystem.AddEventHandler(WindowSystemBase::Event::KEY_UP, EventKeyUp, this);
347 windowSystem.AddEventHandler(WindowSystemBase::Event::SELECTION_CLEAR, EventSelectionClear, this);
348 windowSystem.AddEventHandler(WindowSystemBase::Event::SELECTION_NOTIFY, EventSelectionNotify, this);
351 void WindowBaseX::DeleteEvents()
355 bool WindowBaseX::OnWindowPropertyChanged(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
359 auto propertyNotifyEvent = static_cast<WindowSystem::WindowSystemX::X11PropertyNotifyEvent*>(event);
360 if(propertyNotifyEvent->window == mWindow)
362 WindowSystemX::WindowState state = WindowSystem::GetImplementation().GetWindowState(mWindow);
366 case WindowSystemX::WindowState::WITHDRAWN:
368 // Window was hidden.
369 mIconifyChangedSignal.Emit(true);
373 case WindowSystemX::WindowState::ICONIC:
375 // Window was iconified (minimised).
376 mIconifyChangedSignal.Emit(true);
380 case WindowSystemX::WindowState::NORMAL:
383 mIconifyChangedSignal.Emit(false);
398 void WindowBaseX::OnConfigure(WindowSystemBase::EventBase* event)
400 auto configureEvent = static_cast<WindowSystemX::X11ConfigureNotifyEvent*>(event);
401 if(configureEvent->window == mWindow)
403 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::OnConfigureNotify\n");
404 Dali::PositionSize positionSize;
405 positionSize.x = configureEvent->x;
406 positionSize.y = configureEvent->y;
407 positionSize.width = configureEvent->width;
408 positionSize.height = configureEvent->height;
409 /// @note Can also get the window below this one if raise/lower was called.
410 mUpdatePositionSizeSignal.Emit(positionSize);
414 void WindowBaseX::OnDeleteRequest()
416 mDeleteRequestSignal.Emit();
419 void WindowBaseX::OnFocusIn(void* data, WindowSystemBase::Event, WindowSystemBase::EventBase* event)
421 auto x11Event = static_cast<WindowSystemX::X11Event*>(event);
423 if(x11Event->window == mWindow)
425 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::OnFocusIn\n");
427 mFocusChangedSignal.Emit(true);
431 void WindowBaseX::OnFocusOut(void* data, WindowSystemBase::Event, WindowSystemBase::EventBase* event)
433 auto x11Event = static_cast<WindowSystemX::X11Event*>(event);
434 // If the window loses focus then hide the keyboard.
435 if(x11Event->window == mWindow)
437 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::FocusOut\n");
439 mFocusChangedSignal.Emit(false);
443 void WindowBaseX::OnWindowDamaged(void* data, WindowSystemBase::Event, WindowSystemBase::EventBase* event)
445 auto windowExposeEvent = static_cast<WindowSystemX::X11ExposeEvent*>(event);
446 if(windowExposeEvent->window == mWindow)
449 area.x = windowExposeEvent->x;
450 area.y = windowExposeEvent->y;
451 area.width = windowExposeEvent->width;
452 area.height = windowExposeEvent->height;
454 mWindowDamagedSignal.Emit(area);
458 void WindowBaseX::OnMouseButtonDown(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
460 auto touchEvent = static_cast<WindowSystemX::X11MouseEvent*>(event);
462 if(touchEvent->window == mWindow)
464 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::ButtonDown\n");
465 PointState::Type state(PointState::DOWN);
467 Integration::Point point;
468 point.SetDeviceId(touchEvent->device);
469 point.SetState(state);
470 point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
471 point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radiusX, touchEvent->multi.radiusY));
472 point.SetPressure(touchEvent->multi.pressure);
473 point.SetAngle(Degree(touchEvent->multi.angle));
474 if(touchEvent->buttons)
476 point.SetMouseButton(static_cast<MouseButton::Type>(touchEvent->buttons));
479 mTouchEventSignal.Emit(point, touchEvent->timestamp);
483 void WindowBaseX::OnMouseButtonUp(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
485 auto touchEvent = static_cast<WindowSystemX::X11MouseEvent*>(event);
487 if(touchEvent->window == mWindow)
489 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::ButtonUp\n");
490 Integration::Point point;
491 point.SetDeviceId(touchEvent->device);
492 point.SetState(PointState::UP);
493 point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
494 point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radiusX, touchEvent->multi.radiusY));
495 point.SetPressure(touchEvent->multi.pressure);
496 point.SetAngle(Degree(static_cast<float>(touchEvent->multi.angle)));
497 if(touchEvent->buttons)
499 point.SetMouseButton(static_cast<MouseButton::Type>(touchEvent->buttons));
502 mTouchEventSignal.Emit(point, touchEvent->timestamp);
506 void WindowBaseX::OnMouseButtonMove(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
508 auto touchEvent = static_cast<WindowSystemX::X11MouseEvent*>(event);
510 if(touchEvent->window == mWindow)
512 Integration::Point point;
513 point.SetDeviceId(touchEvent->device);
514 point.SetState(PointState::MOTION);
515 point.SetScreenPosition(Vector2(static_cast<float>(touchEvent->x), static_cast<float>(touchEvent->y)));
516 point.SetRadius(static_cast<float>(touchEvent->multi.radius), Vector2(static_cast<float>(touchEvent->multi.radiusX), static_cast<float>(touchEvent->multi.radiusY)));
517 point.SetPressure(static_cast<float>(touchEvent->multi.pressure));
518 point.SetAngle(Degree(static_cast<float>(touchEvent->multi.angle)));
520 mTouchEventSignal.Emit(point, touchEvent->timestamp);
524 void WindowBaseX::OnMouseWheel(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
526 auto mouseWheelEvent = static_cast<WindowSystemX::X11MouseWheelEvent*>(event);
528 if(mouseWheelEvent->window == mWindow)
530 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseX::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
532 Integration::WheelEvent wheelEvent(Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2(static_cast<float>(mouseWheelEvent->x), static_cast<float>(mouseWheelEvent->y)), mouseWheelEvent->z, mouseWheelEvent->timestamp);
534 mWheelEventSignal.Emit(wheelEvent);
538 Integration::KeyEvent WindowBaseX::CreateKeyEvent(WindowSystemX::X11KeyEvent* keyEvent, Integration::KeyEvent::State state)
540 std::string keyName(keyEvent->keyname);
541 std::string logicalKey("");
542 std::string keyString("");
543 std::string compose("");
545 // Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
546 if(!keyEvent->compose.empty())
548 compose = keyEvent->compose;
549 keyString = keyEvent->compose;
551 // Ensure key symbol is not NULL as keys like SHIFT have a null string.
552 if(!keyEvent->key.empty())
554 logicalKey = keyEvent->key;
557 int keyCode = keyEvent->keyCode;
558 int modifier(keyEvent->modifiers);
559 unsigned long time(keyEvent->timestamp);
561 Integration::KeyEvent daliKeyEvent{keyName, logicalKey, keyString, keyCode, modifier, time, state, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS};
565 void WindowBaseX::OnKeyDown(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
567 auto keyEvent = static_cast<WindowSystemX::X11KeyEvent*>(event);
569 if(keyEvent->window == mWindow)
571 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseX::OnKeyDown\n");
573 auto daliKeyEvent = CreateKeyEvent(keyEvent, Integration::KeyEvent::DOWN);
575 mKeyEventSignal.Emit(daliKeyEvent);
579 void WindowBaseX::OnKeyUp(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
581 auto keyEvent = static_cast<WindowSystemX::X11KeyEvent*>(event);
583 if(keyEvent->window == mWindow)
585 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, " WindowBaseX::OnKeyUp\n");
587 auto daliKeyEvent = CreateKeyEvent(keyEvent, Integration::KeyEvent::UP);
589 mKeyEventSignal.Emit(daliKeyEvent);
593 void WindowBaseX::OnSelectionClear(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
597 void WindowBaseX::OnSelectionNotify(void* data, WindowSystemBase::Event type, WindowSystemBase::EventBase* event)
601 Any WindowBaseX::GetNativeWindow()
606 int WindowBaseX::GetNativeWindowId()
611 std::string WindowBaseX::GetNativeWindowResourceId()
613 return std::string();
616 EGLNativeWindowType WindowBaseX::CreateEglWindow(int width, int height)
618 return reinterpret_cast<EGLNativeWindowType>(mWindow);
621 void WindowBaseX::DestroyEglWindow()
625 void WindowBaseX::SetEglWindowRotation(int angle)
629 void WindowBaseX::SetEglWindowBufferTransform(int angle)
633 void WindowBaseX::SetEglWindowTransform(int angle)
637 void WindowBaseX::ResizeEglWindow(PositionSize positionSize)
641 bool WindowBaseX::IsEglWindowRotationSupported()
646 void WindowBaseX::Move(PositionSize positionSize)
648 WindowSystem::GetImplementation().Move(mWindow, positionSize.x, positionSize.y);
651 void WindowBaseX::Resize(PositionSize positionSize)
653 WindowSystem::GetImplementation().Resize(mWindow, positionSize.width, positionSize.height);
656 void WindowBaseX::MoveResize(PositionSize positionSize)
658 WindowSystem::GetImplementation().MoveResize(mWindow, positionSize.x, positionSize.y, positionSize.width, positionSize.height);
661 void WindowBaseX::SetClass(const std::string& name, const std::string& className)
663 WindowSystem::GetImplementation().SetClass(mWindow, name, className);
666 void WindowBaseX::Raise()
668 WindowSystem::GetImplementation().Raise(mWindow);
671 void WindowBaseX::Lower()
673 WindowSystem::GetImplementation().Lower(mWindow);
676 void WindowBaseX::Activate()
678 WindowSystem::GetImplementation().Activate(mWindow);
681 void WindowBaseX::Maximize(bool maximize)
685 bool WindowBaseX::IsMaximized() const
690 void WindowBaseX::Minimize(bool minimize)
694 bool WindowBaseX::IsMinimized() const
699 void WindowBaseX::SetMimimumSize(Dali::Window::WindowSize size)
703 void WindowBaseX::SetMaximumSize(Dali::Window::WindowSize size)
707 void WindowBaseX::SetAvailableAnlges(const std::vector<int>& angles)
711 void WindowBaseX::SetPreferredAngle(int angle)
715 void WindowBaseX::SetAcceptFocus(bool accept)
719 void WindowBaseX::Show()
721 WindowSystem::GetImplementation().Show(mWindow);
724 void WindowBaseX::Hide()
726 WindowSystem::GetImplementation().Hide(mWindow);
729 unsigned int WindowBaseX::GetSupportedAuxiliaryHintCount() const
734 std::string WindowBaseX::GetSupportedAuxiliaryHint(unsigned int index) const
736 return std::string();
739 unsigned int WindowBaseX::AddAuxiliaryHint(const std::string& hint, const std::string& value)
744 bool WindowBaseX::RemoveAuxiliaryHint(unsigned int id)
749 bool WindowBaseX::SetAuxiliaryHintValue(unsigned int id, const std::string& value)
754 std::string WindowBaseX::GetAuxiliaryHintValue(unsigned int id) const
756 return std::string();
759 unsigned int WindowBaseX::GetAuxiliaryHintId(const std::string& hint) const
764 void WindowBaseX::SetInputRegion(const Rect<int>& inputRegion)
768 void WindowBaseX::SetType(Dali::WindowType type)
772 Dali::WindowType WindowBaseX::GetType() const
774 return Dali::WindowType::NORMAL;
777 Dali::WindowOperationResult WindowBaseX::SetNotificationLevel(Dali::WindowNotificationLevel level)
779 return Dali::WindowOperationResult::NOT_SUPPORTED;
782 Dali::WindowNotificationLevel WindowBaseX::GetNotificationLevel() const
784 return Dali::WindowNotificationLevel::NONE;
787 void WindowBaseX::SetOpaqueState(bool opaque)
791 Dali::WindowOperationResult WindowBaseX::SetScreenOffMode(WindowScreenOffMode screenOffMode)
793 return Dali::WindowOperationResult::NOT_SUPPORTED;
796 WindowScreenOffMode WindowBaseX::GetScreenOffMode() const
798 return WindowScreenOffMode::TIMEOUT;
801 Dali::WindowOperationResult WindowBaseX::SetBrightness(int brightness)
803 return Dali::WindowOperationResult::NOT_SUPPORTED;
806 int WindowBaseX::GetBrightness() const
811 bool WindowBaseX::GrabKey(Dali::KEY key, KeyGrab::KeyGrabMode grabMode)
816 bool WindowBaseX::UngrabKey(Dali::KEY key)
821 bool WindowBaseX::GrabKeyList(const Dali::Vector<Dali::KEY>& key, const Dali::Vector<KeyGrab::KeyGrabMode>& grabMode, Dali::Vector<bool>& result)
826 bool WindowBaseX::UngrabKeyList(const Dali::Vector<Dali::KEY>& key, Dali::Vector<bool>& result)
831 void WindowBaseX::GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical)
833 // 1 inch = 25.4 millimeters
834 WindowSystem::GetImplementation().GetDPI(dpiHorizontal, dpiVertical);
837 int WindowBaseX::GetWindowRotationAngle() const
842 int WindowBaseX::GetScreenRotationAngle()
847 void WindowBaseX::SetWindowRotationAngle(int degree)
849 mWindowRotationAngle = degree;
852 void WindowBaseX::WindowRotationCompleted(int degree, int width, int height)
856 void WindowBaseX::SetTransparency(bool transparent)
860 unsigned int WindowBaseX::GetSurfaceId(Any surface) const
862 unsigned int surfaceId = 0;
864 if(surface.Empty() == false)
866 // check we have a valid type
867 DALI_ASSERT_ALWAYS(((surface.GetType() == typeid(::Window))) && "Surface type is invalid");
869 surfaceId = static_cast<unsigned int>(AnyCast<::Window>(surface));
874 void WindowBaseX::CreateWindow(PositionSize positionSize, bool isTransparent)
880 // create 32 bit window
883 mIsTransparent = true;
885 mWindow = WindowSystem::GetImplementation().CreateWindow(depth, positionSize.x, positionSize.y, positionSize.width, positionSize.height);
889 DALI_ASSERT_ALWAYS(0 && "Failed to create X window");
893 void WindowBaseX::SetParent(WindowBase* parentWinBase, bool belowParent)
897 WindowBaseX* windowBaseX = static_cast<WindowBaseX*>(parentWinBase);
898 ::Window parentWindow = windowBaseX->mWindow;
899 WindowSystem::GetImplementation().SetTransientForHint(mWindow, parentWindow);
903 WindowSystem::GetImplementation().UnsetTransientFor(mWindow);
907 int WindowBaseX::CreateFrameRenderedSyncFence()
912 int WindowBaseX::CreateFramePresentedSyncFence()
917 void WindowBaseX::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
921 void WindowBaseX::InitializeIme()
925 void WindowBaseX::ImeWindowReadyToRender()
929 void WindowBaseX::RequestMoveToServer()
933 void WindowBaseX::RequestResizeToServer(WindowResizeDirection direction)
937 void WindowBaseX::EnableFloatingMode(bool enable)
941 bool WindowBaseX::IsFloatingModeEnabled() const
946 void WindowBaseX::IncludeInputRegion(const Rect<int>& inputRegion)
950 void WindowBaseX::ExcludeInputRegion(const Rect<int>& inputRegion)
954 } // namespace Adaptor
956 } // namespace Internal