2 * Copyright (c) 2021 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.
18 // Ecore is littered with C style cast
19 #pragma GCC diagnostic push
20 #pragma GCC diagnostic ignored "-Wold-style-cast"
23 #include <dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h>
26 #include <dali/internal/input/common/key-impl.h>
27 #include <dali/internal/window-system/common/window-impl.h>
28 #include <dali/internal/window-system/common/window-render-surface.h>
29 #include <dali/internal/window-system/common/window-system.h>
32 #include <Ecore_Input.h>
33 #include <dali/integration-api/debug.h>
34 #include <dali/public-api/object/any.h>
35 #include <vconf-keys.h>
46 #if defined(DEBUG_ENABLED)
47 Debug::Filter* gWindowBaseLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_WINDOW_BASE");
50 const uint32_t MAX_TIZEN_CLIENT_VERSION = 7;
51 const unsigned int PRIMARY_TOUCH_BUTTON_ID = 1;
53 const char* DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME = "db/setting/accessibility/font_name"; // It will be update at vconf-key.h and replaced.
56 const char* BUS = "org.enlightenment.wm-screen-reader";
57 const char* INTERFACE = "org.tizen.GestureNavigation";
58 const char* PATH = "/org/tizen/GestureNavigation";
61 * Get the device name from the provided ecore key event
63 void GetDeviceName(Ecore_Event_Key* keyEvent, std::string& result)
65 const char* ecoreDeviceName = ecore_device_name_get(keyEvent->dev);
69 result = ecoreDeviceName;
74 * Get the device class from the provided ecore event
76 void GetDeviceClass(Ecore_Device_Class ecoreDeviceClass, Device::Class::Type& deviceClass)
78 switch(ecoreDeviceClass)
80 case ECORE_DEVICE_CLASS_SEAT:
82 deviceClass = Device::Class::USER;
85 case ECORE_DEVICE_CLASS_KEYBOARD:
87 deviceClass = Device::Class::KEYBOARD;
90 case ECORE_DEVICE_CLASS_MOUSE:
92 deviceClass = Device::Class::MOUSE;
95 case ECORE_DEVICE_CLASS_TOUCH:
97 deviceClass = Device::Class::TOUCH;
100 case ECORE_DEVICE_CLASS_PEN:
102 deviceClass = Device::Class::PEN;
105 case ECORE_DEVICE_CLASS_POINTER:
107 deviceClass = Device::Class::POINTER;
110 case ECORE_DEVICE_CLASS_GAMEPAD:
112 deviceClass = Device::Class::GAMEPAD;
117 deviceClass = Device::Class::NONE;
123 void GetDeviceSubclass(Ecore_Device_Subclass ecoreDeviceSubclass, Device::Subclass::Type& deviceSubclass)
125 switch(ecoreDeviceSubclass)
127 case ECORE_DEVICE_SUBCLASS_FINGER:
129 deviceSubclass = Device::Subclass::FINGER;
132 case ECORE_DEVICE_SUBCLASS_FINGERNAIL:
134 deviceSubclass = Device::Subclass::FINGERNAIL;
137 case ECORE_DEVICE_SUBCLASS_KNUCKLE:
139 deviceSubclass = Device::Subclass::KNUCKLE;
142 case ECORE_DEVICE_SUBCLASS_PALM:
144 deviceSubclass = Device::Subclass::PALM;
147 case ECORE_DEVICE_SUBCLASS_HAND_SIZE:
149 deviceSubclass = Device::Subclass::HAND_SIDE;
152 case ECORE_DEVICE_SUBCLASS_HAND_FLAT:
154 deviceSubclass = Device::Subclass::HAND_FLAT;
157 case ECORE_DEVICE_SUBCLASS_PEN_TIP:
159 deviceSubclass = Device::Subclass::PEN_TIP;
162 case ECORE_DEVICE_SUBCLASS_TRACKPAD:
164 deviceSubclass = Device::Subclass::TRACKPAD;
167 case ECORE_DEVICE_SUBCLASS_TRACKPOINT:
169 deviceSubclass = Device::Subclass::TRACKPOINT;
172 case ECORE_DEVICE_SUBCLASS_TRACKBALL:
174 deviceSubclass = Device::Subclass::TRACKBALL;
177 case ECORE_DEVICE_SUBCLASS_REMOCON:
179 deviceSubclass = Device::Subclass::REMOCON;
182 case ECORE_DEVICE_SUBCLASS_VIRTUAL_KEYBOARD:
184 deviceSubclass = Device::Subclass::VIRTUAL_KEYBOARD;
189 deviceSubclass = Device::Subclass::NONE;
195 /////////////////////////////////////////////////////////////////////////////////////////////////
197 /////////////////////////////////////////////////////////////////////////////////////////////////
199 /// Called when the window iconify state is changed.
200 static Eina_Bool EcoreEventWindowIconifyStateChanged(void* data, int type, void* event)
202 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
205 return windowBase->OnIconifyStateChanged(data, type, event);
208 return ECORE_CALLBACK_PASS_ON;
211 /// Called when the window gains focus
212 static Eina_Bool EcoreEventWindowFocusIn(void* data, int type, void* event)
214 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
217 return windowBase->OnFocusIn(data, type, event);
220 return ECORE_CALLBACK_PASS_ON;
223 /// Called when the window loses focus
224 static Eina_Bool EcoreEventWindowFocusOut(void* data, int type, void* event)
226 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
229 return windowBase->OnFocusOut(data, type, event);
232 return ECORE_CALLBACK_PASS_ON;
235 /// Called when the output is transformed
236 static Eina_Bool EcoreEventOutputTransform(void* data, int type, void* event)
238 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
241 return windowBase->OnOutputTransform(data, type, event);
244 return ECORE_CALLBACK_PASS_ON;
247 /// Called when the output transform should be ignored
248 static Eina_Bool EcoreEventIgnoreOutputTransform(void* data, int type, void* event)
250 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
253 return windowBase->OnIgnoreOutputTransform(data, type, event);
256 return ECORE_CALLBACK_PASS_ON;
260 * Called when rotate event is recevied.
262 static Eina_Bool EcoreEventRotate(void* data, int type, void* event)
264 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
267 DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl::EcoreEventRotate\n");
268 windowBase->OnRotation(data, type, event);
270 return ECORE_CALLBACK_PASS_ON;
273 /////////////////////////////////////////////////////////////////////////////////////////////////
275 /////////////////////////////////////////////////////////////////////////////////////////////////
278 * Called when a touch down is received.
280 static Eina_Bool EcoreEventMouseButtonDown(void* data, int type, void* event)
282 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
285 windowBase->OnMouseButtonDown(data, type, event);
287 return ECORE_CALLBACK_PASS_ON;
291 * Called when a touch up is received.
293 static Eina_Bool EcoreEventMouseButtonUp(void* data, int type, void* event)
295 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
298 windowBase->OnMouseButtonUp(data, type, event);
300 return ECORE_CALLBACK_PASS_ON;
304 * Called when a touch motion is received.
306 static Eina_Bool EcoreEventMouseButtonMove(void* data, int type, void* event)
308 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
311 windowBase->OnMouseButtonMove(data, type, event);
313 return ECORE_CALLBACK_PASS_ON;
317 * Called when a touch is canceled.
319 static Eina_Bool EcoreEventMouseButtonCancel(void* data, int type, void* event)
321 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
324 windowBase->OnMouseButtonCancel(data, type, event);
326 return ECORE_CALLBACK_PASS_ON;
330 * Called when a mouse wheel is received.
332 static Eina_Bool EcoreEventMouseWheel(void* data, int type, void* event)
334 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
337 windowBase->OnMouseWheel(data, type, event);
339 return ECORE_CALLBACK_PASS_ON;
343 * Called when a detent rotation event is recevied.
345 static Eina_Bool EcoreEventDetentRotation(void* data, int type, void* event)
347 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
350 windowBase->OnDetentRotation(data, type, event);
352 return ECORE_CALLBACK_PASS_ON;
355 /////////////////////////////////////////////////////////////////////////////////////////////////
357 /////////////////////////////////////////////////////////////////////////////////////////////////
360 * Called when a key down is received.
362 static Eina_Bool EcoreEventKeyDown(void* data, int type, void* event)
364 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
367 windowBase->OnKeyDown(data, type, event);
369 return ECORE_CALLBACK_PASS_ON;
373 * Called when a key up is received.
375 static Eina_Bool EcoreEventKeyUp(void* data, int type, void* event)
377 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
380 windowBase->OnKeyUp(data, type, event);
382 return ECORE_CALLBACK_PASS_ON;
385 /////////////////////////////////////////////////////////////////////////////////////////////////
386 // Selection Callbacks
387 /////////////////////////////////////////////////////////////////////////////////////////////////
390 * Called when the source window notifies us the content in clipboard is selected.
392 static Eina_Bool EcoreEventDataSend(void* data, int type, void* event)
394 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
397 windowBase->OnDataSend(data, type, event);
399 return ECORE_CALLBACK_PASS_ON;
403 * Called when the source window sends us about the selected content.
404 * For example, when item is selected in the clipboard.
406 static Eina_Bool EcoreEventDataReceive(void* data, int type, void* event)
408 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
411 windowBase->OnDataReceive(data, type, event);
413 return ECORE_CALLBACK_PASS_ON;
416 /////////////////////////////////////////////////////////////////////////////////////////////////
418 /////////////////////////////////////////////////////////////////////////////////////////////////
421 * Called when a font name is changed.
423 static void VconfNotifyFontNameChanged(keynode_t* node, void* data)
425 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
428 windowBase->OnFontNameChanged();
433 * Called when a font size is changed.
435 static void VconfNotifyFontSizeChanged(keynode_t* node, void* data)
437 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
440 windowBase->OnFontSizeChanged();
444 /////////////////////////////////////////////////////////////////////////////////////////////////
445 // ElDBus Accessibility Callbacks
446 /////////////////////////////////////////////////////////////////////////////////////////////////
448 #ifdef DALI_ELDBUS_AVAILABLE
449 // Callback for Ecore ElDBus accessibility events.
450 static void EcoreElDBusAccessibilityNotification(void* context, const Eldbus_Message* message)
452 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(context);
455 windowBase->OnEcoreElDBusAccessibilityNotification(context, message);
458 #endif // DALI_ELDBUS_AVAILABLE
460 static void RegistryGlobalCallback(void* data, struct wl_registry* registry, uint32_t name, const char* interface, uint32_t version)
462 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
465 windowBase->RegistryGlobalCallback(data, registry, name, interface, version);
469 static void RegistryGlobalCallbackRemove(void* data, struct wl_registry* registry, uint32_t id)
471 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
474 windowBase->RegistryGlobalCallbackRemove(data, registry, id);
478 static void TizenPolicyConformant(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t isConformant)
482 static void TizenPolicyConformantArea(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t conformantPart, uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h)
486 static void TizenPolicyNotificationChangeDone(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, int32_t level, uint32_t state)
488 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
491 windowBase->TizenPolicyNotificationChangeDone(data, tizenPolicy, surface, level, state);
495 static void TizenPolicyTransientForDone(void* data, struct tizen_policy* tizenPolicy, uint32_t childId)
499 static void TizenPolicyScreenModeChangeDone(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t mode, uint32_t state)
501 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
504 windowBase->TizenPolicyScreenModeChangeDone(data, tizenPolicy, surface, mode, state);
508 static void TizenPolicyIconifyStateChanged(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t iconified, uint32_t force)
512 static void TizenPolicySupportedAuxiliaryHints(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, struct wl_array* hints, uint32_t numNints)
516 static void TizenPolicyAllowedAuxiliaryHint(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, int id)
520 static void TizenPolicyAuxiliaryMessage(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, const char* key, const char* val, struct wl_array* options)
524 static void TizenPolicyConformantRegion(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t conformantPart, uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t serial)
528 static void DisplayPolicyBrightnessChangeDone(void* data, struct tizen_display_policy* displayPolicy, struct wl_surface* surface, int32_t brightness, uint32_t state)
530 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
533 windowBase->DisplayPolicyBrightnessChangeDone(data, displayPolicy, surface, brightness, state);
537 const struct wl_registry_listener registryListener =
539 RegistryGlobalCallback,
540 RegistryGlobalCallbackRemove};
542 const struct tizen_policy_listener tizenPolicyListener =
544 TizenPolicyConformant,
545 TizenPolicyConformantArea,
546 TizenPolicyNotificationChangeDone,
547 TizenPolicyTransientForDone,
548 TizenPolicyScreenModeChangeDone,
549 TizenPolicyIconifyStateChanged,
550 TizenPolicySupportedAuxiliaryHints,
551 TizenPolicyAllowedAuxiliaryHint,
552 TizenPolicyAuxiliaryMessage,
553 TizenPolicyConformantRegion};
555 const struct tizen_display_policy_listener tizenDisplayPolicyListener =
557 DisplayPolicyBrightnessChangeDone};
559 } // unnamed namespace
561 WindowBaseEcoreWl::WindowBaseEcoreWl(Dali::PositionSize positionSize, Any surface, bool isTransparent)
562 : mEcoreEventHandler(),
563 mEcoreWindow(nullptr),
567 mEventQueue(nullptr),
568 mTizenPolicy(nullptr),
569 mTizenDisplayPolicy(nullptr),
570 mSupportedAuxiliaryHints(),
572 mNotificationLevel(-1),
573 mNotificationChangeState(0),
574 mNotificationLevelChangeDone(true),
576 mScreenOffModeChangeState(0),
577 mScreenOffModeChangeDone(true),
579 mBrightnessChangeState(0),
580 mBrightnessChangeDone(true),
582 mWindowRotationAngle(0),
583 mScreenRotationAngle(0),
584 mSupportedPreProtation(0)
585 #ifdef DALI_ELDBUS_AVAILABLE
587 mSystemConnection(NULL)
590 Initialize(positionSize, surface, isTransparent);
593 WindowBaseEcoreWl::~WindowBaseEcoreWl()
595 #ifdef DALI_ELDBUS_AVAILABLE
596 // Close down ElDBus connections.
597 if(mSystemConnection)
599 eldbus_connection_unref(mSystemConnection);
601 #endif // DALI_ELDBUS_AVAILABLE
603 vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged);
604 vconf_ignore_key_changed(DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, VconfNotifyFontNameChanged);
606 for(Dali::Vector<Ecore_Event_Handler*>::Iterator iter = mEcoreEventHandler.Begin(), endIter = mEcoreEventHandler.End(); iter != endIter; ++iter)
608 ecore_event_handler_del(*iter);
610 mEcoreEventHandler.Clear();
614 wl_event_queue_destroy(mEventQueue);
617 mSupportedAuxiliaryHints.clear();
618 mAuxiliaryHints.clear();
620 if(mEglWindow != NULL)
622 wl_egl_window_destroy(mEglWindow);
628 ecore_wl_window_free(mEcoreWindow);
630 WindowSystem::Shutdown();
634 void WindowBaseEcoreWl::Initialize(PositionSize positionSize, Any surface, bool isTransparent)
636 if(surface.Empty() == false)
638 // check we have a valid type
639 DALI_ASSERT_ALWAYS((surface.GetType() == typeid(Ecore_Wl_Window*)) && "Surface type is invalid");
641 mEcoreWindow = AnyCast<Ecore_Wl_Window*>(surface);
645 // we own the surface about to created
646 WindowSystem::Initialize();
649 CreateWindow(positionSize);
652 mWlSurface = ecore_wl_window_surface_create(mEcoreWindow);
654 SetTransparency(isTransparent);
656 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE, EcoreEventWindowIconifyStateChanged, this));
657 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_IN, EcoreEventWindowFocusIn, this));
658 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_OUT, EcoreEventWindowFocusOut, this));
659 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_OUTPUT_TRANSFORM, EcoreEventOutputTransform, this));
660 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_IGNORE_OUTPUT_TRANSFORM, EcoreEventIgnoreOutputTransform, this));
662 // Register Rotate event
663 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_ROTATE, EcoreEventRotate, this));
665 // Register Touch events
666 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, EcoreEventMouseButtonDown, this));
667 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, EcoreEventMouseButtonUp, this));
668 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, EcoreEventMouseButtonMove, this));
669 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_CANCEL, EcoreEventMouseButtonCancel, this));
671 // Register Mouse wheel events
672 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, EcoreEventMouseWheel, this));
674 // Register Detent event
675 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_DETENT_ROTATE, EcoreEventDetentRotation, this));
677 // Register Key events
678 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, EcoreEventKeyDown, this));
679 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_KEY_UP, EcoreEventKeyUp, this));
681 // Register Selection event - clipboard selection
682 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_DATA_SOURCE_SEND, EcoreEventDataSend, this));
683 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_SELECTION_DATA_READY, EcoreEventDataReceive, this));
685 // Register Vconf notify - font name and size
686 vconf_notify_key_changed(DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, VconfNotifyFontNameChanged, this);
687 vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged, this);
689 InitializeEcoreElDBus();
691 mDisplay = ecore_wl_display_get();
695 wl_display* displayWrapper = static_cast<wl_display*>(wl_proxy_create_wrapper(mDisplay));
698 mEventQueue = wl_display_create_queue(mDisplay);
701 wl_proxy_set_queue(reinterpret_cast<wl_proxy*>(displayWrapper), mEventQueue);
703 wl_registry* registry = wl_display_get_registry(displayWrapper);
704 wl_registry_add_listener(registry, ®istryListener, this);
707 wl_proxy_wrapper_destroy(displayWrapper);
711 // get auxiliary hint
712 Eina_List* hints = ecore_wl_window_aux_hints_supported_get(mEcoreWindow);
718 for(l = hints, (hint = static_cast<char*>(eina_list_data_get(l))); l; l = eina_list_next(l), (hint = static_cast<char*>(eina_list_data_get(l))))
720 mSupportedAuxiliaryHints.push_back(hint);
722 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::Initialize: %s\n", hint);
727 Eina_Bool WindowBaseEcoreWl::OnIconifyStateChanged(void* data, int type, void* event)
729 Ecore_Wl_Event_Window_Iconify_State_Change* iconifyChangedEvent(static_cast<Ecore_Wl_Event_Window_Iconify_State_Change*>(event));
730 Eina_Bool handled(ECORE_CALLBACK_PASS_ON);
732 if(iconifyChangedEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
734 if(iconifyChangedEvent->iconified == EINA_TRUE)
736 mIconifyChangedSignal.Emit(true);
740 mIconifyChangedSignal.Emit(false);
742 handled = ECORE_CALLBACK_DONE;
748 Eina_Bool WindowBaseEcoreWl::OnFocusIn(void* data, int type, void* event)
750 Ecore_Wl_Event_Focus_In* focusInEvent(static_cast<Ecore_Wl_Event_Focus_In*>(event));
752 if(focusInEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
754 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusIn\n");
756 mFocusChangedSignal.Emit(true);
759 return ECORE_CALLBACK_PASS_ON;
762 Eina_Bool WindowBaseEcoreWl::OnFocusOut(void* data, int type, void* event)
764 Ecore_Wl_Event_Focus_Out* focusOutEvent(static_cast<Ecore_Wl_Event_Focus_Out*>(event));
766 if(focusOutEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
768 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusOut\n");
770 mFocusChangedSignal.Emit(false);
773 return ECORE_CALLBACK_PASS_ON;
776 Eina_Bool WindowBaseEcoreWl::OnOutputTransform(void* data, int type, void* event)
778 Ecore_Wl_Event_Output_Transform* transformEvent(static_cast<Ecore_Wl_Event_Output_Transform*>(event));
780 if(transformEvent->output == ecore_wl_window_output_find(mEcoreWindow))
782 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window (%p) EcoreEventOutputTransform\n", mEcoreWindow);
784 mOutputTransformedSignal.Emit();
787 return ECORE_CALLBACK_PASS_ON;
790 Eina_Bool WindowBaseEcoreWl::OnIgnoreOutputTransform(void* data, int type, void* event)
792 Ecore_Wl_Event_Ignore_Output_Transform* ignoreTransformEvent(static_cast<Ecore_Wl_Event_Ignore_Output_Transform*>(event));
794 if(ignoreTransformEvent->win == mEcoreWindow)
796 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window (%p) EcoreEventIgnoreOutputTransform\n", mEcoreWindow);
798 mOutputTransformedSignal.Emit();
801 return ECORE_CALLBACK_PASS_ON;
804 void WindowBaseEcoreWl::OnRotation(void* data, int type, void* event)
806 Ecore_Wl_Event_Window_Rotate* ev(static_cast<Ecore_Wl_Event_Window_Rotate*>(event));
808 if(ev->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
810 DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl::OnRotation, angle: %d, width: %d, height: %d\n", ev->angle, ev->w, ev->h);
812 RotationEvent rotationEvent;
813 rotationEvent.angle = ev->angle;
814 rotationEvent.winResize = 0;
816 if(ev->angle == 0 || ev->angle == 180)
818 rotationEvent.width = ev->w;
819 rotationEvent.height = ev->h;
823 rotationEvent.width = ev->h;
824 rotationEvent.height = ev->w;
827 mRotationSignal.Emit(rotationEvent);
831 void WindowBaseEcoreWl::OnMouseButtonDown(void* data, int type, void* event)
833 Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
835 if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
837 PointState::Type state(PointState::DOWN);
839 // Check if the buttons field is set and ensure it's the primary touch button.
840 // If this event was triggered by buttons other than the primary button (used for touch), then
841 // just send an interrupted event to Core.
842 if(touchEvent->buttons && (touchEvent->buttons != PRIMARY_TOUCH_BUTTON_ID))
844 state = PointState::INTERRUPTED;
847 Device::Class::Type deviceClass;
848 Device::Subclass::Type deviceSubclass;
850 GetDeviceClass(ecore_device_class_get(touchEvent->dev), deviceClass);
851 GetDeviceSubclass(ecore_device_subclass_get(touchEvent->dev), deviceSubclass);
853 Integration::Point point;
854 point.SetDeviceId(touchEvent->multi.device);
855 point.SetState(state);
856 point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
857 point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radius_x, touchEvent->multi.radius_y));
858 point.SetPressure(touchEvent->multi.pressure);
859 point.SetAngle(Degree(touchEvent->multi.angle));
860 point.SetDeviceClass(deviceClass);
861 point.SetDeviceSubclass(deviceSubclass);
863 mTouchEventSignal.Emit(point, touchEvent->timestamp);
867 void WindowBaseEcoreWl::OnMouseButtonUp(void* data, int type, void* event)
869 Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
871 if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
873 Device::Class::Type deviceClass;
874 Device::Subclass::Type deviceSubclass;
876 GetDeviceClass(ecore_device_class_get(touchEvent->dev), deviceClass);
877 GetDeviceSubclass(ecore_device_subclass_get(touchEvent->dev), deviceSubclass);
879 Integration::Point point;
880 point.SetDeviceId(touchEvent->multi.device);
881 point.SetState(PointState::UP);
882 point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
883 point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radius_x, touchEvent->multi.radius_y));
884 point.SetPressure(touchEvent->multi.pressure);
885 point.SetAngle(Degree(touchEvent->multi.angle));
886 point.SetDeviceClass(deviceClass);
887 point.SetDeviceSubclass(deviceSubclass);
889 mTouchEventSignal.Emit(point, touchEvent->timestamp);
893 void WindowBaseEcoreWl::OnMouseButtonMove(void* data, int type, void* event)
895 Ecore_Event_Mouse_Move* touchEvent = static_cast<Ecore_Event_Mouse_Move*>(event);
897 if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
899 Device::Class::Type deviceClass;
900 Device::Subclass::Type deviceSubclass;
902 GetDeviceClass(ecore_device_class_get(touchEvent->dev), deviceClass);
903 GetDeviceSubclass(ecore_device_subclass_get(touchEvent->dev), deviceSubclass);
905 Integration::Point point;
906 point.SetDeviceId(touchEvent->multi.device);
907 point.SetState(PointState::MOTION);
908 point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
909 point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radius_x, touchEvent->multi.radius_y));
910 point.SetPressure(touchEvent->multi.pressure);
911 point.SetAngle(Degree(touchEvent->multi.angle));
912 point.SetDeviceClass(deviceClass);
913 point.SetDeviceSubclass(deviceSubclass);
915 mTouchEventSignal.Emit(point, touchEvent->timestamp);
919 void WindowBaseEcoreWl::OnMouseButtonCancel(void* data, int type, void* event)
921 Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
923 if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
925 Integration::Point point;
926 point.SetDeviceId(touchEvent->multi.device);
927 point.SetState(PointState::INTERRUPTED);
928 point.SetScreenPosition(Vector2(0.0f, 0.0f));
930 mTouchEventSignal.Emit(point, touchEvent->timestamp);
932 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseButtonCancel\n");
936 void WindowBaseEcoreWl::OnMouseWheel(void* data, int type, void* event)
938 Ecore_Event_Mouse_Wheel* mouseWheelEvent = static_cast<Ecore_Event_Mouse_Wheel*>(event);
940 if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
942 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
944 Integration::WheelEvent wheelEvent(Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2(mouseWheelEvent->x, mouseWheelEvent->y), mouseWheelEvent->z, mouseWheelEvent->timestamp);
946 mWheelEventSignal.Emit(wheelEvent);
950 void WindowBaseEcoreWl::OnDetentRotation(void* data, int type, void* event)
952 Ecore_Event_Detent_Rotate* detentEvent = static_cast<Ecore_Event_Detent_Rotate*>(event);
954 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnDetentRotation\n");
956 int direction = (detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE) ? 1 : -1;
957 int timeStamp = detentEvent->timestamp;
959 Integration::WheelEvent wheelEvent(Integration::WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2(0.0f, 0.0f), direction, timeStamp);
961 mWheelEventSignal.Emit(wheelEvent);
964 void WindowBaseEcoreWl::OnKeyDown(void* data, int type, void* event)
966 Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
968 if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
970 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyDown\n");
972 std::string keyName(keyEvent->keyname);
973 std::string logicalKey("");
974 std::string keyString("");
975 std::string compose("");
977 // Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
978 if(keyEvent->compose)
980 compose = keyEvent->compose;
983 // Ensure key symbol is not NULL as keys like SHIFT have a null string.
986 logicalKey = keyEvent->key;
989 int keyCode = KeyLookup::GetDaliKeyCode(keyEvent->keyname);
990 keyCode = (keyCode == -1) ? 0 : keyCode;
991 int modifier(keyEvent->modifiers);
992 unsigned long time = keyEvent->timestamp;
993 if(!strncmp(keyEvent->keyname, "Keycode-", 8))
995 keyCode = atoi(keyEvent->keyname + 8);
998 // Ensure key event string is not NULL as keys like SHIFT have a null string.
1001 keyString = keyEvent->string;
1004 std::string deviceName;
1005 Device::Class::Type deviceClass;
1006 Device::Subclass::Type deviceSubclass;
1008 GetDeviceName(keyEvent, deviceName);
1009 GetDeviceClass(ecore_device_class_get(keyEvent->dev), deviceClass);
1010 GetDeviceSubclass(ecore_device_subclass_get(keyEvent->dev), deviceSubclass);
1012 Integration::KeyEvent keyEvent(keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, compose, deviceName, deviceClass, deviceSubclass);
1014 mKeyEventSignal.Emit(keyEvent);
1018 void WindowBaseEcoreWl::OnKeyUp(void* data, int type, void* event)
1020 Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
1022 if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
1024 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp\n");
1026 #if defined(ECORE_VERSION_MAJOR) && (ECORE_VERSION_MAJOR >= 1) && defined(ECORE_VERSION_MINOR) && (ECORE_VERSION_MINOR >= 23)
1027 // Cancel processing flag is sent because this key event will combine with the previous key. So, the event should not actually perform anything.
1028 if(keyEvent->event_flags & ECORE_EVENT_FLAG_CANCEL)
1030 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp: This event flag indicates the event is canceled. \n");
1033 #endif // Since ecore 1.23 version
1035 std::string keyName(keyEvent->keyname);
1036 std::string logicalKey("");
1037 std::string keyString("");
1038 std::string compose("");
1040 // Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
1041 if(keyEvent->compose)
1043 compose = keyEvent->compose;
1046 // Ensure key symbol is not NULL as keys like SHIFT have a null string.
1049 logicalKey = keyEvent->key;
1052 int keyCode = KeyLookup::GetDaliKeyCode(keyEvent->keyname);
1053 keyCode = (keyCode == -1) ? 0 : keyCode;
1054 int modifier(keyEvent->modifiers);
1055 unsigned long time = keyEvent->timestamp;
1056 if(!strncmp(keyEvent->keyname, "Keycode-", 8))
1058 keyCode = atoi(keyEvent->keyname + 8);
1061 // Ensure key event string is not NULL as keys like SHIFT have a null string.
1062 if(keyEvent->string)
1064 keyString = keyEvent->string;
1067 std::string deviceName;
1068 Device::Class::Type deviceClass;
1069 Device::Subclass::Type deviceSubclass;
1071 GetDeviceName(keyEvent, deviceName);
1072 GetDeviceClass(ecore_device_class_get(keyEvent->dev), deviceClass);
1073 GetDeviceSubclass(ecore_device_subclass_get(keyEvent->dev), deviceSubclass);
1075 Integration::KeyEvent keyEvent(keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::UP, compose, deviceName, deviceClass, deviceSubclass);
1077 mKeyEventSignal.Emit(keyEvent);
1081 void WindowBaseEcoreWl::OnDataSend(void* data, int type, void* event)
1083 mSelectionDataSendSignal.Emit(event);
1086 void WindowBaseEcoreWl::OnDataReceive(void* data, int type, void* event)
1088 mSelectionDataReceivedSignal.Emit(event);
1091 void WindowBaseEcoreWl::OnFontNameChanged()
1093 mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_CHANGE);
1096 void WindowBaseEcoreWl::OnFontSizeChanged()
1098 mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
1101 void WindowBaseEcoreWl::OnEcoreElDBusAccessibilityNotification(void* context, const Eldbus_Message* message)
1103 #ifdef DALI_ELDBUS_AVAILABLE
1104 AccessibilityInfo info;
1106 // The string defines the arg-list's respective types.
1107 if(!eldbus_message_arguments_get(message, "iiiiiiu", &info.gestureValue, &info.startX, &info.startY, &info.endX, &info.endY, &info.state, &info.eventTime))
1109 DALI_LOG_ERROR("OnEcoreElDBusAccessibilityNotification: Error getting arguments\n");
1112 mAccessibilitySignal.Emit(info);
1116 void WindowBaseEcoreWl::RegistryGlobalCallback(void* data, struct wl_registry* registry, uint32_t name, const char* interface, uint32_t version)
1118 if(strcmp(interface, tizen_policy_interface.name) == 0)
1120 uint32_t clientVersion = std::min(version, MAX_TIZEN_CLIENT_VERSION);
1122 mTizenPolicy = static_cast<tizen_policy*>(wl_registry_bind(registry, name, &tizen_policy_interface, clientVersion));
1125 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::RegistryGlobalCallback: wl_registry_bind(tizen_policy_interface) is failed.\n");
1129 tizen_policy_add_listener(mTizenPolicy, &tizenPolicyListener, data);
1131 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::RegistryGlobalCallback: tizen_policy_add_listener is called.\n");
1133 else if(strcmp(interface, tizen_display_policy_interface.name) == 0)
1135 mTizenDisplayPolicy = static_cast<tizen_display_policy*>(wl_registry_bind(registry, name, &tizen_display_policy_interface, version));
1136 if(!mTizenDisplayPolicy)
1138 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::RegistryGlobalCallback: wl_registry_bind(tizen_display_policy_interface) is failed.\n");
1142 tizen_display_policy_add_listener(mTizenDisplayPolicy, &tizenDisplayPolicyListener, data);
1144 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::RegistryGlobalCallback: tizen_display_policy_add_listener is called.\n");
1148 void WindowBaseEcoreWl::RegistryGlobalCallbackRemove(void* data, struct wl_registry* registry, uint32_t id)
1150 mTizenPolicy = NULL;
1151 mTizenDisplayPolicy = NULL;
1154 void WindowBaseEcoreWl::TizenPolicyNotificationChangeDone(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, int32_t level, uint32_t state)
1156 mNotificationLevel = level;
1157 mNotificationChangeState = state;
1158 mNotificationLevelChangeDone = true;
1160 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::TizenPolicyNotificationChangeDone: level = %d, state = %d\n", level, state);
1163 void WindowBaseEcoreWl::TizenPolicyScreenModeChangeDone(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t mode, uint32_t state)
1165 mScreenOffMode = mode;
1166 mScreenOffModeChangeState = state;
1167 mScreenOffModeChangeDone = true;
1169 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::TizenPolicyScreenModeChangeDone: mode = %d, state = %d\n", mode, state);
1172 void WindowBaseEcoreWl::DisplayPolicyBrightnessChangeDone(void* data, struct tizen_display_policy* displayPolicy, struct wl_surface* surface, int32_t brightness, uint32_t state)
1174 mBrightness = brightness;
1175 mBrightnessChangeState = state;
1176 mBrightnessChangeDone = true;
1178 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::DisplayPolicyBrightnessChangeDone: brightness = %d, state = %d\n", brightness, state);
1181 Any WindowBaseEcoreWl::GetNativeWindow()
1183 return mEcoreWindow;
1186 int WindowBaseEcoreWl::GetNativeWindowId()
1188 return ecore_wl_window_id_get(mEcoreWindow);
1191 EGLNativeWindowType WindowBaseEcoreWl::CreateEglWindow(int width, int height)
1193 mEglWindow = wl_egl_window_create(mWlSurface, width, height);
1195 return static_cast<EGLNativeWindowType>(mEglWindow);
1198 void WindowBaseEcoreWl::DestroyEglWindow()
1200 if(mEglWindow != NULL)
1202 wl_egl_window_destroy(mEglWindow);
1207 void WindowBaseEcoreWl::SetEglWindowRotation(int angle)
1209 wl_egl_window_rotation rotation;
1215 rotation = ROTATION_0;
1220 rotation = ROTATION_270;
1225 rotation = ROTATION_180;
1230 rotation = ROTATION_90;
1235 rotation = ROTATION_0;
1240 wl_egl_window_set_rotation(mEglWindow, rotation);
1243 void WindowBaseEcoreWl::SetEglWindowBufferTransform(int angle)
1245 wl_output_transform bufferTransform;
1251 bufferTransform = WL_OUTPUT_TRANSFORM_NORMAL;
1256 bufferTransform = WL_OUTPUT_TRANSFORM_90;
1261 bufferTransform = WL_OUTPUT_TRANSFORM_180;
1266 bufferTransform = WL_OUTPUT_TRANSFORM_270;
1271 bufferTransform = WL_OUTPUT_TRANSFORM_NORMAL;
1276 wl_egl_window_set_buffer_transform(mEglWindow, bufferTransform);
1279 void WindowBaseEcoreWl::SetEglWindowTransform(int angle)
1281 wl_output_transform windowTransform;
1287 windowTransform = WL_OUTPUT_TRANSFORM_NORMAL;
1292 windowTransform = WL_OUTPUT_TRANSFORM_90;
1297 windowTransform = WL_OUTPUT_TRANSFORM_180;
1302 windowTransform = WL_OUTPUT_TRANSFORM_270;
1307 windowTransform = WL_OUTPUT_TRANSFORM_NORMAL;
1312 wl_egl_window_set_window_transform(mEglWindow, windowTransform);
1315 void WindowBaseEcoreWl::ResizeEglWindow(PositionSize positionSize)
1317 wl_egl_window_resize(mEglWindow, positionSize.width, positionSize.height, positionSize.x, positionSize.y);
1320 bool WindowBaseEcoreWl::IsEglWindowRotationSupported()
1323 wl_egl_window_capability capability = static_cast<wl_egl_window_capability>(wl_egl_window_get_capabilities(mEglWindow));
1324 if(capability == WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED)
1326 mSupportedPreProtation = true;
1329 mSupportedPreProtation = false;
1333 void WindowBaseEcoreWl::Move(PositionSize positionSize)
1335 ecore_wl_window_position_set(mEcoreWindow, positionSize.x, positionSize.y);
1338 void WindowBaseEcoreWl::Resize(PositionSize positionSize)
1340 ecore_wl_window_update_size(mEcoreWindow, positionSize.width, positionSize.height);
1343 void WindowBaseEcoreWl::MoveResize(PositionSize positionSize)
1345 ecore_wl_window_position_set(mEcoreWindow, positionSize.x, positionSize.y);
1346 ecore_wl_window_update_size(mEcoreWindow, positionSize.width, positionSize.height);
1349 void WindowBaseEcoreWl::SetClass(const std::string& name, const std::string& className)
1351 ecore_wl_window_title_set(mEcoreWindow, name.c_str());
1352 ecore_wl_window_class_name_set(mEcoreWindow, className.c_str());
1355 void WindowBaseEcoreWl::Raise()
1357 // Use ecore_wl_window_activate to prevent the window shown without rendering
1358 ecore_wl_window_activate(mEcoreWindow);
1361 void WindowBaseEcoreWl::Lower()
1363 ecore_wl_window_lower(mEcoreWindow);
1366 void WindowBaseEcoreWl::Activate()
1368 ecore_wl_window_activate(mEcoreWindow);
1371 void WindowBaseEcoreWl::SetAvailableAnlges(const std::vector<int>& angles)
1373 int rotations[4] = {0};
1374 DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl::SetAvailableAnlges, angle's count: %d\n", angles.size());
1375 for(std::size_t i = 0; i < angles.size(); ++i)
1377 rotations[i] = static_cast<int>(angles[i]);
1378 DALI_LOG_RELEASE_INFO("%d ", rotations[i]);
1380 ecore_wl_window_rotation_available_rotations_set(mEcoreWindow, rotations, angles.size());
1383 void WindowBaseEcoreWl::SetPreferredAngle(int angle)
1385 ecore_wl_window_rotation_preferred_rotation_set(mEcoreWindow, angle);
1388 void WindowBaseEcoreWl::SetAcceptFocus(bool accept)
1390 ecore_wl_window_focus_skip_set(mEcoreWindow, !accept);
1393 void WindowBaseEcoreWl::Show()
1395 ecore_wl_window_show(mEcoreWindow);
1398 void WindowBaseEcoreWl::Hide()
1400 ecore_wl_window_hide(mEcoreWindow);
1403 unsigned int WindowBaseEcoreWl::GetSupportedAuxiliaryHintCount() const
1405 return mSupportedAuxiliaryHints.size();
1408 std::string WindowBaseEcoreWl::GetSupportedAuxiliaryHint(unsigned int index) const
1410 if(index >= GetSupportedAuxiliaryHintCount())
1412 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetSupportedAuxiliaryHint: Invalid index! [%d]\n", index);
1415 return mSupportedAuxiliaryHints[index];
1418 unsigned int WindowBaseEcoreWl::AddAuxiliaryHint(const std::string& hint, const std::string& value)
1420 bool supported = false;
1422 // Check if the hint is suppported
1423 for(std::vector<std::string>::iterator iter = mSupportedAuxiliaryHints.begin(); iter != mSupportedAuxiliaryHints.end(); ++iter)
1434 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::AddAuxiliaryHint: Not supported auxiliary hint [%s]\n", hint.c_str());
1438 // Check if the hint is already added
1439 for(unsigned int i = 0; i < mAuxiliaryHints.size(); i++)
1441 if(mAuxiliaryHints[i].first == hint)
1443 // Just change the value
1444 mAuxiliaryHints[i].second = value;
1446 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::AddAuxiliaryHint: Change! hint = %s, value = %s, id = %d\n", hint.c_str(), value.c_str(), i + 1);
1448 return i + 1; // id is index + 1
1453 mAuxiliaryHints.push_back(std::pair<std::string, std::string>(hint, value));
1455 unsigned int id = mAuxiliaryHints.size();
1457 ecore_wl_window_aux_hint_add(mEcoreWindow, static_cast<int>(id), hint.c_str(), value.c_str());
1459 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::AddAuxiliaryHint: hint = %s, value = %s, id = %d\n", hint.c_str(), value.c_str(), id);
1464 bool WindowBaseEcoreWl::RemoveAuxiliaryHint(unsigned int id)
1466 if(id == 0 || id > mAuxiliaryHints.size())
1468 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::RemoveAuxiliaryHint: Invalid id [%d]\n", id);
1472 mAuxiliaryHints[id - 1].second = std::string();
1474 ecore_wl_window_aux_hint_del(mEcoreWindow, static_cast<int>(id));
1476 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::RemoveAuxiliaryHint: id = %d, hint = %s\n", id, mAuxiliaryHints[id - 1].first.c_str());
1481 bool WindowBaseEcoreWl::SetAuxiliaryHintValue(unsigned int id, const std::string& value)
1483 if(id == 0 || id > mAuxiliaryHints.size())
1485 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::SetAuxiliaryHintValue: Invalid id [%d]\n", id);
1489 mAuxiliaryHints[id - 1].second = value;
1491 ecore_wl_window_aux_hint_change(mEcoreWindow, static_cast<int>(id), value.c_str());
1493 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetAuxiliaryHintValue: id = %d, hint = %s, value = %s\n", id, mAuxiliaryHints[id - 1].first.c_str(), mAuxiliaryHints[id - 1].second.c_str());
1498 std::string WindowBaseEcoreWl::GetAuxiliaryHintValue(unsigned int id) const
1500 if(id == 0 || id > mAuxiliaryHints.size())
1502 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::GetAuxiliaryHintValue: Invalid id [%d]\n", id);
1503 return std::string();
1506 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetAuxiliaryHintValue: id = %d, hint = %s, value = %s\n", id, mAuxiliaryHints[id - 1].first.c_str(), mAuxiliaryHints[id - 1].second.c_str());
1508 return mAuxiliaryHints[id - 1].second;
1511 unsigned int WindowBaseEcoreWl::GetAuxiliaryHintId(const std::string& hint) const
1513 for(unsigned int i = 0; i < mAuxiliaryHints.size(); i++)
1515 if(mAuxiliaryHints[i].first == hint)
1517 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetAuxiliaryHintId: hint = %s, id = %d\n", hint.c_str(), i + 1);
1522 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetAuxiliaryHintId: Invalid hint! [%s]\n", hint.c_str());
1527 void WindowBaseEcoreWl::SetInputRegion(const Rect<int>& inputRegion)
1529 ecore_wl_window_input_region_set(mEcoreWindow, inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height);
1532 void WindowBaseEcoreWl::SetType(Dali::WindowType type)
1534 Ecore_Wl_Window_Type windowType;
1538 case Dali::WindowType::NORMAL:
1540 windowType = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
1543 case Dali::WindowType::NOTIFICATION:
1545 windowType = ECORE_WL_WINDOW_TYPE_NOTIFICATION;
1548 case Dali::WindowType::UTILITY:
1550 windowType = ECORE_WL_WINDOW_TYPE_UTILITY;
1553 case Dali::WindowType::DIALOG:
1555 windowType = ECORE_WL_WINDOW_TYPE_DIALOG;
1560 windowType = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
1565 ecore_wl_window_type_set(mEcoreWindow, windowType);
1568 Dali::WindowType WindowBaseEcoreWl::GetType() const
1570 return Dali::WindowType::NORMAL;
1573 Dali::WindowOperationResult WindowBaseEcoreWl::SetNotificationLevel(Dali::WindowNotificationLevel level)
1575 while(!mTizenPolicy)
1577 wl_display_dispatch_queue(mDisplay, mEventQueue);
1580 int notificationLevel;
1584 case Dali::WindowNotificationLevel::NONE:
1586 notificationLevel = TIZEN_POLICY_LEVEL_NONE;
1589 case Dali::WindowNotificationLevel::BASE:
1591 notificationLevel = TIZEN_POLICY_LEVEL_DEFAULT;
1594 case Dali::WindowNotificationLevel::MEDIUM:
1596 notificationLevel = TIZEN_POLICY_LEVEL_MEDIUM;
1599 case Dali::WindowNotificationLevel::HIGH:
1601 notificationLevel = TIZEN_POLICY_LEVEL_HIGH;
1604 case Dali::WindowNotificationLevel::TOP:
1606 notificationLevel = TIZEN_POLICY_LEVEL_TOP;
1611 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: invalid level [%d]\n", level);
1612 notificationLevel = TIZEN_POLICY_LEVEL_DEFAULT;
1617 mNotificationLevelChangeDone = false;
1618 mNotificationChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
1620 tizen_policy_set_notification_level(mTizenPolicy, ecore_wl_window_surface_get(mEcoreWindow), notificationLevel);
1624 while(!mNotificationLevelChangeDone && count < 3)
1627 wl_display_dispatch_queue(mDisplay, mEventQueue);
1631 if(!mNotificationLevelChangeDone)
1633 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Level change is failed [%d, %d]\n", level, mNotificationChangeState);
1634 return Dali::WindowOperationResult::UNKNOWN_ERROR;
1636 else if(mNotificationChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
1638 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Permission denied! [%d]\n", level);
1639 return Dali::WindowOperationResult::PERMISSION_DENIED;
1642 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Level is changed [%d]\n", mNotificationLevel);
1644 return Dali::WindowOperationResult::SUCCEED;
1647 Dali::WindowNotificationLevel WindowBaseEcoreWl::GetNotificationLevel() const
1649 while(!mTizenPolicy)
1651 wl_display_dispatch_queue(mDisplay, mEventQueue);
1656 while(!mNotificationLevelChangeDone && count < 3)
1659 wl_display_dispatch_queue(mDisplay, mEventQueue);
1663 if(!mNotificationLevelChangeDone)
1665 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetNotificationLevel: Error! [%d]\n", mNotificationChangeState);
1666 return Dali::Window::NotificationLevel::NONE;
1669 Dali::WindowNotificationLevel level;
1671 switch(mNotificationLevel)
1673 case TIZEN_POLICY_LEVEL_NONE:
1675 level = Dali::WindowNotificationLevel::NONE;
1678 case TIZEN_POLICY_LEVEL_DEFAULT:
1680 level = Dali::WindowNotificationLevel::BASE;
1683 case TIZEN_POLICY_LEVEL_MEDIUM:
1685 level = Dali::WindowNotificationLevel::MEDIUM;
1688 case TIZEN_POLICY_LEVEL_HIGH:
1690 level = Dali::WindowNotificationLevel::HIGH;
1693 case TIZEN_POLICY_LEVEL_TOP:
1695 level = Dali::WindowNotificationLevel::TOP;
1700 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetNotificationLevel: invalid level [%d]\n", mNotificationLevel);
1701 level = Dali::WindowNotificationLevel::NONE;
1706 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetNotificationLevel: level [%d]\n", mNotificationLevel);
1711 void WindowBaseEcoreWl::SetOpaqueState(bool opaque)
1713 while(!mTizenPolicy)
1715 wl_display_dispatch_queue(mDisplay, mEventQueue);
1718 tizen_policy_set_opaque_state(mTizenPolicy, ecore_wl_window_surface_get(mEcoreWindow), (opaque ? 1 : 0));
1721 Dali::WindowOperationResult WindowBaseEcoreWl::SetScreenOffMode(WindowScreenOffMode screenOffMode)
1723 while(!mTizenPolicy)
1725 wl_display_dispatch_queue(mDisplay, mEventQueue);
1728 mScreenOffModeChangeDone = false;
1729 mScreenOffModeChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
1731 unsigned int mode = 0;
1733 switch(screenOffMode)
1735 case WindowScreenOffMode::TIMEOUT:
1740 case WindowScreenOffMode::NEVER:
1747 tizen_policy_set_window_screen_mode(mTizenPolicy, ecore_wl_window_surface_get(mEcoreWindow), mode);
1751 while(!mScreenOffModeChangeDone && count < 3)
1754 wl_display_dispatch_queue(mDisplay, mEventQueue);
1758 if(!mScreenOffModeChangeDone)
1760 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Screen mode change is failed [%d, %d]\n", screenOffMode, mScreenOffModeChangeState);
1761 return Dali::WindowOperationResult::UNKNOWN_ERROR;
1763 else if(mScreenOffModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
1765 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Permission denied! [%d]\n", screenOffMode);
1766 return Dali::WindowOperationResult::PERMISSION_DENIED;
1769 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Screen mode is changed [%d]\n", mScreenOffMode);
1771 return Dali::WindowOperationResult::SUCCEED;
1774 WindowScreenOffMode WindowBaseEcoreWl::GetScreenOffMode() const
1776 while(!mTizenPolicy)
1778 wl_display_dispatch_queue(mDisplay, mEventQueue);
1783 while(!mScreenOffModeChangeDone && count < 3)
1786 wl_display_dispatch_queue(mDisplay, mEventQueue);
1790 if(!mScreenOffModeChangeDone)
1792 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetScreenOffMode: Error! [%d]\n", mScreenOffModeChangeState);
1793 return WindowScreenOffMode::TIMEOUT;
1796 WindowScreenOffMode screenMode = WindowScreenOffMode::TIMEOUT;
1798 switch(mScreenOffMode)
1802 screenMode = WindowScreenOffMode::TIMEOUT;
1807 screenMode = WindowScreenOffMode::NEVER;
1812 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetScreenOffMode: screen mode [%d]\n", mScreenOffMode);
1817 Dali::WindowOperationResult WindowBaseEcoreWl::SetBrightness(int brightness)
1819 while(!mTizenDisplayPolicy)
1821 wl_display_dispatch_queue(mDisplay, mEventQueue);
1824 mBrightnessChangeDone = false;
1825 mBrightnessChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
1827 tizen_display_policy_set_window_brightness(mTizenDisplayPolicy, ecore_wl_window_surface_get(mEcoreWindow), brightness);
1831 while(!mBrightnessChangeDone && count < 3)
1834 wl_display_dispatch_queue(mDisplay, mEventQueue);
1838 if(!mBrightnessChangeDone)
1840 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Brightness change is failed [%d, %d]\n", brightness, mBrightnessChangeState);
1841 return Dali::WindowOperationResult::UNKNOWN_ERROR;
1843 else if(mBrightnessChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
1845 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Permission denied! [%d]\n", brightness);
1846 return Dali::WindowOperationResult::PERMISSION_DENIED;
1849 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Brightness is changed [%d]\n", mBrightness);
1851 return Dali::WindowOperationResult::SUCCEED;
1854 int WindowBaseEcoreWl::GetBrightness() const
1856 while(!mTizenDisplayPolicy)
1858 wl_display_dispatch_queue(mDisplay, mEventQueue);
1863 while(!mBrightnessChangeDone && count < 3)
1866 wl_display_dispatch_queue(mDisplay, mEventQueue);
1870 if(!mBrightnessChangeDone)
1872 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetBrightness: Error! [%d]\n", mBrightnessChangeState);
1876 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetBrightness: Brightness [%d]\n", mBrightness);
1881 bool WindowBaseEcoreWl::GrabKey(Dali::KEY key, KeyGrab::KeyGrabMode grabMode)
1883 Ecore_Wl_Window_Keygrab_Mode mode;
1887 case KeyGrab::TOPMOST:
1889 mode = ECORE_WL_WINDOW_KEYGRAB_TOPMOST;
1892 case KeyGrab::SHARED:
1894 mode = ECORE_WL_WINDOW_KEYGRAB_SHARED;
1897 case KeyGrab::OVERRIDE_EXCLUSIVE:
1899 mode = ECORE_WL_WINDOW_KEYGRAB_OVERRIDE_EXCLUSIVE;
1902 case KeyGrab::EXCLUSIVE:
1904 mode = ECORE_WL_WINDOW_KEYGRAB_EXCLUSIVE;
1913 return ecore_wl_window_keygrab_set(mEcoreWindow, KeyLookup::GetKeyName(key), 0, 0, 0, mode);
1916 bool WindowBaseEcoreWl::UngrabKey(Dali::KEY key)
1918 return ecore_wl_window_keygrab_unset(mEcoreWindow, KeyLookup::GetKeyName(key), 0, 0);
1921 bool WindowBaseEcoreWl::GrabKeyList(const Dali::Vector<Dali::KEY>& key, const Dali::Vector<KeyGrab::KeyGrabMode>& grabMode, Dali::Vector<bool>& result)
1923 int keyCount = key.Count();
1924 int keyGrabModeCount = grabMode.Count();
1926 if(keyCount != keyGrabModeCount || keyCount == 0)
1933 Eina_List* keyList = NULL;
1934 Ecore_Wl_Window_Keygrab_Info* info = new Ecore_Wl_Window_Keygrab_Info[keyCount];
1936 for(int index = 0; index < keyCount; ++index)
1938 info[index].key = const_cast<char*>(KeyLookup::GetKeyName(key[index]));
1940 switch(grabMode[index])
1942 case KeyGrab::TOPMOST:
1944 info[index].mode = ECORE_WL_WINDOW_KEYGRAB_TOPMOST;
1947 case KeyGrab::SHARED:
1949 info[index].mode = ECORE_WL_WINDOW_KEYGRAB_SHARED;
1952 case KeyGrab::OVERRIDE_EXCLUSIVE:
1954 info[index].mode = ECORE_WL_WINDOW_KEYGRAB_OVERRIDE_EXCLUSIVE;
1957 case KeyGrab::EXCLUSIVE:
1959 info[index].mode = ECORE_WL_WINDOW_KEYGRAB_EXCLUSIVE;
1964 info[index].mode = ECORE_WL_WINDOW_KEYGRAB_UNKNOWN;
1969 keyList = eina_list_append(keyList, &info);
1972 Eina_List* grabList = ecore_wl_window_keygrab_list_set(mEcoreWindow, keyList);
1974 result.Resize(keyCount, true);
1976 Eina_List* l = NULL;
1977 Eina_List* m = NULL;
1978 void* listData = NULL;
1980 if(grabList != NULL)
1982 EINA_LIST_FOREACH(grabList, m, data)
1985 EINA_LIST_FOREACH(keyList, l, listData)
1987 if(static_cast<Ecore_Wl_Window_Keygrab_Info*>(listData)->key == NULL)
1989 DALI_LOG_ERROR("input key list has null data!");
1993 if(strcmp(static_cast<char*>(data), static_cast<Ecore_Wl_Window_Keygrab_Info*>(listData)->key) == 0)
1995 result[index] = false;
2004 eina_list_free(keyList);
2005 eina_list_free(grabList);
2011 bool WindowBaseEcoreWl::UngrabKeyList(const Dali::Vector<Dali::KEY>& key, Dali::Vector<bool>& result)
2013 int keyCount = key.Count();
2021 Eina_List* keyList = NULL;
2022 Ecore_Wl_Window_Keygrab_Info* info = new Ecore_Wl_Window_Keygrab_Info[keyCount];
2024 for(int index = 0; index < keyCount; ++index)
2026 info[index].key = const_cast<char*>(KeyLookup::GetKeyName(key[index]));
2027 keyList = eina_list_append(keyList, &info);
2030 Eina_List* ungrabList = ecore_wl_window_keygrab_list_unset(mEcoreWindow, keyList);
2032 result.Resize(keyCount, true);
2034 Eina_List* l = NULL;
2035 Eina_List* m = NULL;
2036 void* listData = NULL;
2039 if(ungrabList != NULL)
2041 EINA_LIST_FOREACH(ungrabList, m, data)
2044 EINA_LIST_FOREACH(keyList, l, listData)
2046 if(strcmp(static_cast<char*>(data), static_cast<Ecore_Wl_Window_Keygrab_Info*>(listData)->key) == 0)
2048 result[index] = false;
2057 eina_list_free(keyList);
2058 eina_list_free(ungrabList);
2064 void WindowBaseEcoreWl::GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical)
2069 // 1 inch = 25.4 millimeters
2070 xres = ecore_wl_dpi_get();
2071 yres = ecore_wl_dpi_get();
2073 dpiHorizontal = int(xres + 0.5f); // rounding
2074 dpiVertical = int(yres + 0.5f);
2077 int WindowBaseEcoreWl::GetOrientation() const
2079 int orientation = (mScreenRotationAngle + mWindowRotationAngle) % 360;
2080 if(mSupportedPreProtation)
2087 int WindowBaseEcoreWl::GetScreenRotationAngle()
2091 if(ecore_wl_window_ignore_output_transform_get(mEcoreWindow))
2097 transform = ecore_wl_output_transform_get(ecore_wl_window_output_find(mEcoreWindow));
2100 mScreenRotationAngle = transform * 90;
2101 return mScreenRotationAngle;
2104 void WindowBaseEcoreWl::SetWindowRotationAngle(int degree)
2106 mWindowRotationAngle = degree;
2107 ecore_wl_window_rotation_set(mEcoreWindow, degree);
2110 void WindowBaseEcoreWl::WindowRotationCompleted(int degree, int width, int height)
2112 ecore_wl_window_rotation_change_done_send(mEcoreWindow);
2115 void WindowBaseEcoreWl::SetTransparency(bool transparent)
2117 ecore_wl_window_alpha_set(mEcoreWindow, transparent);
2120 void WindowBaseEcoreWl::InitializeEcoreElDBus()
2122 #ifdef DALI_ELDBUS_AVAILABLE
2123 Eldbus_Object* object;
2124 Eldbus_Proxy* manager;
2126 if(!(mSystemConnection = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SYSTEM)))
2128 DALI_LOG_ERROR("Unable to get system bus\n");
2131 object = eldbus_object_get(mSystemConnection, BUS, PATH);
2134 DALI_LOG_ERROR("Getting object failed\n");
2138 manager = eldbus_proxy_get(object, INTERFACE);
2141 DALI_LOG_ERROR("Getting proxy failed\n");
2145 if(!eldbus_proxy_signal_handler_add(manager, "GestureDetected", EcoreElDBusAccessibilityNotification, this))
2147 DALI_LOG_ERROR("No signal handler returned\n");
2152 void WindowBaseEcoreWl::CreateWindow(PositionSize positionSize)
2154 mEcoreWindow = ecore_wl_window_new(0, positionSize.x, positionSize.y, positionSize.width, positionSize.height, ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW);
2156 if(mEcoreWindow == 0)
2158 DALI_ASSERT_ALWAYS(0 && "Failed to create Wayland window");
2162 void WindowBaseEcoreWl::SetParent(WindowBase* parentWinBase)
2164 Ecore_Wl_Window* ecoreParent = NULL;
2167 WindowBaseEcoreWl* winBaseEcore = static_cast<WindowBaseEcoreWl*>(parentWinBase);
2168 ecoreParent = winBaseEcore->mEcoreWindow;
2170 ecore_wl_window_parent_set(mEcoreWindow, ecoreParent);
2173 int WindowBaseEcoreWl::CreateFrameRenderedSyncFence()
2178 int WindowBaseEcoreWl::CreateFramePresentedSyncFence()
2183 void WindowBaseEcoreWl::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
2187 void WindowBaseEcoreWl::InitializeIme()
2191 void WindowBaseEcoreWl::ImeWindowReadyToRender()
2195 void WindowBaseEcoreWl::RequestMoveToServer()
2199 void WindowBaseEcoreWl::RequestResizeToServer(WindowResizeDirection direction)
2203 void WindowBaseEcoreWl::EnableFloatingMode(bool enable)
2207 bool WindowBaseEcoreWl::IsFloatingModeEnabled() const
2212 void WindowBaseEcoreWl::IncludeInputRegion(const Rect<int>& inputRegion)
2216 void WindowBaseEcoreWl::ExcludeInputRegion(const Rect<int>& inputRegion)
2220 } // namespace Adaptor
2222 } // namespace Internal
2226 #pragma GCC diagnostic pop