2 * Copyright (c) 2024 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>
31 #include <Ecore_Input.h>
32 #include <dali/integration-api/debug.h>
33 #include <dali/public-api/object/any.h>
35 #if defined(VCONF_ENABLED)
36 #include <vconf-keys.h>
48 #if defined(DEBUG_ENABLED)
49 Debug::Filter* gWindowBaseLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_WINDOW_BASE");
52 const uint32_t MAX_TIZEN_CLIENT_VERSION = 7;
53 const unsigned int PRIMARY_TOUCH_BUTTON_ID = 1;
55 #if defined(VCONF_ENABLED)
56 const char* DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME = "db/setting/accessibility/font_name"; // It will be update at vconf-key.h and replaced.
60 const char* BUS = "org.enlightenment.wm-screen-reader";
61 const char* INTERFACE = "org.tizen.GestureNavigation";
62 const char* PATH = "/org/tizen/GestureNavigation";
65 * Get the device name from the provided ecore key event
67 void GetDeviceName(Ecore_Event_Key* keyEvent, std::string& result)
69 const char* ecoreDeviceName = ecore_device_name_get(keyEvent->dev);
73 result = ecoreDeviceName;
78 * Get the device class from the provided ecore event
80 void GetDeviceClass(Ecore_Device_Class ecoreDeviceClass, Device::Class::Type& deviceClass)
82 switch(ecoreDeviceClass)
84 case ECORE_DEVICE_CLASS_SEAT:
86 deviceClass = Device::Class::USER;
89 case ECORE_DEVICE_CLASS_KEYBOARD:
91 deviceClass = Device::Class::KEYBOARD;
94 case ECORE_DEVICE_CLASS_MOUSE:
96 deviceClass = Device::Class::MOUSE;
99 case ECORE_DEVICE_CLASS_TOUCH:
101 deviceClass = Device::Class::TOUCH;
104 case ECORE_DEVICE_CLASS_PEN:
106 deviceClass = Device::Class::PEN;
109 case ECORE_DEVICE_CLASS_POINTER:
111 deviceClass = Device::Class::POINTER;
114 case ECORE_DEVICE_CLASS_GAMEPAD:
116 deviceClass = Device::Class::GAMEPAD;
121 deviceClass = Device::Class::NONE;
127 void GetDeviceSubclass(Ecore_Device_Subclass ecoreDeviceSubclass, Device::Subclass::Type& deviceSubclass)
129 switch(ecoreDeviceSubclass)
131 case ECORE_DEVICE_SUBCLASS_FINGER:
133 deviceSubclass = Device::Subclass::FINGER;
136 case ECORE_DEVICE_SUBCLASS_FINGERNAIL:
138 deviceSubclass = Device::Subclass::FINGERNAIL;
141 case ECORE_DEVICE_SUBCLASS_KNUCKLE:
143 deviceSubclass = Device::Subclass::KNUCKLE;
146 case ECORE_DEVICE_SUBCLASS_PALM:
148 deviceSubclass = Device::Subclass::PALM;
151 case ECORE_DEVICE_SUBCLASS_HAND_SIZE:
153 deviceSubclass = Device::Subclass::HAND_SIDE;
156 case ECORE_DEVICE_SUBCLASS_HAND_FLAT:
158 deviceSubclass = Device::Subclass::HAND_FLAT;
161 case ECORE_DEVICE_SUBCLASS_PEN_TIP:
163 deviceSubclass = Device::Subclass::PEN_TIP;
166 case ECORE_DEVICE_SUBCLASS_TRACKPAD:
168 deviceSubclass = Device::Subclass::TRACKPAD;
171 case ECORE_DEVICE_SUBCLASS_TRACKPOINT:
173 deviceSubclass = Device::Subclass::TRACKPOINT;
176 case ECORE_DEVICE_SUBCLASS_TRACKBALL:
178 deviceSubclass = Device::Subclass::TRACKBALL;
181 case ECORE_DEVICE_SUBCLASS_REMOCON:
183 deviceSubclass = Device::Subclass::REMOCON;
186 case ECORE_DEVICE_SUBCLASS_VIRTUAL_KEYBOARD:
188 deviceSubclass = Device::Subclass::VIRTUAL_KEYBOARD;
193 deviceSubclass = Device::Subclass::NONE;
199 /////////////////////////////////////////////////////////////////////////////////////////////////
201 /////////////////////////////////////////////////////////////////////////////////////////////////
203 /// Called when the window iconify state is changed.
204 static Eina_Bool EcoreEventWindowIconifyStateChanged(void* data, int type, void* event)
206 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
209 return windowBase->OnIconifyStateChanged(data, type, event);
212 return ECORE_CALLBACK_PASS_ON;
215 /// Called when the window gains focus
216 static Eina_Bool EcoreEventWindowFocusIn(void* data, int type, void* event)
218 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
221 return windowBase->OnFocusIn(data, type, event);
224 return ECORE_CALLBACK_PASS_ON;
227 /// Called when the window loses focus
228 static Eina_Bool EcoreEventWindowFocusOut(void* data, int type, void* event)
230 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
233 return windowBase->OnFocusOut(data, type, event);
236 return ECORE_CALLBACK_PASS_ON;
239 /// Called when the output is transformed
240 static Eina_Bool EcoreEventOutputTransform(void* data, int type, void* event)
242 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
245 return windowBase->OnOutputTransform(data, type, event);
248 return ECORE_CALLBACK_PASS_ON;
251 /// Called when the output transform should be ignored
252 static Eina_Bool EcoreEventIgnoreOutputTransform(void* data, int type, void* event)
254 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
257 return windowBase->OnIgnoreOutputTransform(data, type, event);
260 return ECORE_CALLBACK_PASS_ON;
264 * Called when rotate event is recevied.
266 static Eina_Bool EcoreEventRotate(void* data, int type, void* event)
268 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
271 DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl::EcoreEventRotate\n");
272 windowBase->OnRotation(data, type, event);
274 return ECORE_CALLBACK_PASS_ON;
277 /////////////////////////////////////////////////////////////////////////////////////////////////
279 /////////////////////////////////////////////////////////////////////////////////////////////////
282 * Called when a touch down is received.
284 static Eina_Bool EcoreEventMouseButtonDown(void* data, int type, void* event)
286 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
289 windowBase->OnMouseButtonDown(data, type, event);
291 return ECORE_CALLBACK_PASS_ON;
295 * Called when a touch up is received.
297 static Eina_Bool EcoreEventMouseButtonUp(void* data, int type, void* event)
299 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
302 windowBase->OnMouseButtonUp(data, type, event);
304 return ECORE_CALLBACK_PASS_ON;
308 * Called when a touch motion is received.
310 static Eina_Bool EcoreEventMouseButtonMove(void* data, int type, void* event)
312 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
315 windowBase->OnMouseButtonMove(data, type, event);
317 return ECORE_CALLBACK_PASS_ON;
321 * Called when a touch is canceled.
323 static Eina_Bool EcoreEventMouseButtonCancel(void* data, int type, void* event)
325 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
328 windowBase->OnMouseButtonCancel(data, type, event);
330 return ECORE_CALLBACK_PASS_ON;
334 * Called when a mouse wheel is received.
336 static Eina_Bool EcoreEventMouseWheel(void* data, int type, void* event)
338 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
341 windowBase->OnMouseWheel(data, type, event);
343 return ECORE_CALLBACK_PASS_ON;
347 * Called when a detent rotation event is recevied.
349 static Eina_Bool EcoreEventDetentRotation(void* data, int type, void* event)
351 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
354 windowBase->OnDetentRotation(data, type, event);
356 return ECORE_CALLBACK_PASS_ON;
359 /////////////////////////////////////////////////////////////////////////////////////////////////
361 /////////////////////////////////////////////////////////////////////////////////////////////////
364 * Called when a key down is received.
366 static Eina_Bool EcoreEventKeyDown(void* data, int type, void* event)
368 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
371 windowBase->OnKeyDown(data, type, event);
373 return ECORE_CALLBACK_PASS_ON;
377 * Called when a key up is received.
379 static Eina_Bool EcoreEventKeyUp(void* data, int type, void* event)
381 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
384 windowBase->OnKeyUp(data, type, event);
386 return ECORE_CALLBACK_PASS_ON;
389 /////////////////////////////////////////////////////////////////////////////////////////////////
390 // Selection Callbacks
391 /////////////////////////////////////////////////////////////////////////////////////////////////
394 * Called when the source window notifies us the content in clipboard is selected.
396 static Eina_Bool EcoreEventDataSend(void* data, int type, void* event)
398 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
401 windowBase->OnDataSend(data, type, event);
403 return ECORE_CALLBACK_PASS_ON;
407 * Called when the source window sends us about the selected content.
408 * For example, when item is selected in the clipboard.
410 static Eina_Bool EcoreEventDataReceive(void* data, int type, void* event)
412 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
415 windowBase->OnDataReceive(data, type, event);
417 return ECORE_CALLBACK_PASS_ON;
420 /////////////////////////////////////////////////////////////////////////////////////////////////
422 /////////////////////////////////////////////////////////////////////////////////////////////////
424 #if defined(VCONF_ENABLED)
426 * Called when a font name is changed.
428 static void VconfNotifyFontNameChanged(keynode_t* node, void* data)
430 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
433 windowBase->OnFontNameChanged();
438 * Called when a font size is changed.
440 static void VconfNotifyFontSizeChanged(keynode_t* node, void* data)
442 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
445 windowBase->OnFontSizeChanged();
450 static void RegistryGlobalCallback(void* data, struct wl_registry* registry, uint32_t name, const char* interface, uint32_t version)
452 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
455 windowBase->RegistryGlobalCallback(data, registry, name, interface, version);
459 static void RegistryGlobalCallbackRemove(void* data, struct wl_registry* registry, uint32_t id)
461 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
464 windowBase->RegistryGlobalCallbackRemove(data, registry, id);
468 static void TizenPolicyConformant(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t isConformant)
472 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)
476 static void TizenPolicyNotificationChangeDone(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, int32_t level, uint32_t state)
478 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
481 windowBase->TizenPolicyNotificationChangeDone(data, tizenPolicy, surface, level, state);
485 static void TizenPolicyTransientForDone(void* data, struct tizen_policy* tizenPolicy, uint32_t childId)
489 static void TizenPolicyScreenModeChangeDone(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t mode, uint32_t state)
491 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
494 windowBase->TizenPolicyScreenModeChangeDone(data, tizenPolicy, surface, mode, state);
498 static void TizenPolicyIconifyStateChanged(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t iconified, uint32_t force)
502 static void TizenPolicySupportedAuxiliaryHints(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, struct wl_array* hints, uint32_t numNints)
506 static void TizenPolicyAllowedAuxiliaryHint(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, int id)
510 static void TizenPolicyAuxiliaryMessage(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, const char* key, const char* val, struct wl_array* options)
514 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)
518 static void DisplayPolicyBrightnessChangeDone(void* data, struct tizen_display_policy* displayPolicy, struct wl_surface* surface, int32_t brightness, uint32_t state)
520 WindowBaseEcoreWl* windowBase = static_cast<WindowBaseEcoreWl*>(data);
523 windowBase->DisplayPolicyBrightnessChangeDone(data, displayPolicy, surface, brightness, state);
527 const struct wl_registry_listener registryListener =
529 RegistryGlobalCallback,
530 RegistryGlobalCallbackRemove};
532 const struct tizen_policy_listener tizenPolicyListener =
534 TizenPolicyConformant,
535 TizenPolicyConformantArea,
536 TizenPolicyNotificationChangeDone,
537 TizenPolicyTransientForDone,
538 TizenPolicyScreenModeChangeDone,
539 TizenPolicyIconifyStateChanged,
540 TizenPolicySupportedAuxiliaryHints,
541 TizenPolicyAllowedAuxiliaryHint,
542 TizenPolicyAuxiliaryMessage,
543 TizenPolicyConformantRegion};
545 const struct tizen_display_policy_listener tizenDisplayPolicyListener =
547 DisplayPolicyBrightnessChangeDone};
549 } // unnamed namespace
551 WindowBaseEcoreWl::WindowBaseEcoreWl(Dali::PositionSize positionSize, Any surface, bool isTransparent)
552 : mEcoreEventHandler(),
553 mEcoreWindow(nullptr),
557 mEventQueue(nullptr),
558 mTizenPolicy(nullptr),
559 mTizenDisplayPolicy(nullptr),
560 mSupportedAuxiliaryHints(),
562 mNotificationLevel(-1),
563 mNotificationChangeState(0),
564 mNotificationLevelChangeDone(true),
566 mScreenOffModeChangeState(0),
567 mScreenOffModeChangeDone(true),
569 mBrightnessChangeState(0),
570 mBrightnessChangeDone(true),
572 mWindowRotationAngle(0),
573 mScreenRotationAngle(0),
574 mSupportedPreProtation(0)
576 Initialize(positionSize, surface, isTransparent);
579 WindowBaseEcoreWl::~WindowBaseEcoreWl()
581 #if defined(VCONF_ENABLED)
582 vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged);
583 vconf_ignore_key_changed(DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, VconfNotifyFontNameChanged);
586 for(Dali::Vector<Ecore_Event_Handler*>::Iterator iter = mEcoreEventHandler.Begin(), endIter = mEcoreEventHandler.End(); iter != endIter; ++iter)
588 ecore_event_handler_del(*iter);
590 mEcoreEventHandler.Clear();
594 wl_event_queue_destroy(mEventQueue);
597 mSupportedAuxiliaryHints.clear();
598 mAuxiliaryHints.clear();
600 if(mEglWindow != NULL)
602 wl_egl_window_destroy(mEglWindow);
610 ecore_wl_window_free(mEcoreWindow);
612 catch(std::bad_weak_ptr const& ex)
614 DALI_LOG_ERROR("WindowBaseEcoreWl::~WindowBaseEcoreWl() - window (%p) std::bad_weak_ptr caught: %s\n", mEcoreWindow, ex.what());
619 void WindowBaseEcoreWl::Initialize(PositionSize positionSize, Any surface, bool isTransparent)
621 if(surface.Empty() == false)
623 // check we have a valid type
624 DALI_ASSERT_ALWAYS((surface.GetType() == typeid(Ecore_Wl_Window*)) && "Surface type is invalid");
626 mEcoreWindow = AnyCast<Ecore_Wl_Window*>(surface);
630 // we own the surface about to created
632 CreateWindow(positionSize);
635 mWlSurface = ecore_wl_window_surface_create(mEcoreWindow);
637 SetTransparency(isTransparent);
639 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE, EcoreEventWindowIconifyStateChanged, this));
640 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_IN, EcoreEventWindowFocusIn, this));
641 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_OUT, EcoreEventWindowFocusOut, this));
642 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_OUTPUT_TRANSFORM, EcoreEventOutputTransform, this));
643 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_IGNORE_OUTPUT_TRANSFORM, EcoreEventIgnoreOutputTransform, this));
645 // Register Rotate event
646 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_ROTATE, EcoreEventRotate, this));
648 // Register Touch events
649 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, EcoreEventMouseButtonDown, this));
650 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, EcoreEventMouseButtonUp, this));
651 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, EcoreEventMouseButtonMove, this));
652 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_CANCEL, EcoreEventMouseButtonCancel, this));
654 // Register Mouse wheel events
655 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, EcoreEventMouseWheel, this));
657 // Register Detent event
658 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_DETENT_ROTATE, EcoreEventDetentRotation, this));
660 // Register Key events
661 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, EcoreEventKeyDown, this));
662 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_KEY_UP, EcoreEventKeyUp, this));
664 // Register Selection event - clipboard selection
665 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_DATA_SOURCE_SEND, EcoreEventDataSend, this));
666 mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL_EVENT_SELECTION_DATA_READY, EcoreEventDataReceive, this));
668 #if defined(VCONF_ENABLED)
669 // Register Vconf notify - font name and size
670 vconf_notify_key_changed_for_ui_thread(DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, VconfNotifyFontNameChanged, this);
671 vconf_notify_key_changed_for_ui_thread(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged, this);
674 mDisplay = ecore_wl_display_get();
678 wl_display* displayWrapper = static_cast<wl_display*>(wl_proxy_create_wrapper(mDisplay));
681 mEventQueue = wl_display_create_queue(mDisplay);
684 wl_proxy_set_queue(reinterpret_cast<wl_proxy*>(displayWrapper), mEventQueue);
686 wl_registry* registry = wl_display_get_registry(displayWrapper);
687 wl_registry_add_listener(registry, ®istryListener, this);
690 wl_proxy_wrapper_destroy(displayWrapper);
694 // get auxiliary hint
695 Eina_List* hints = ecore_wl_window_aux_hints_supported_get(mEcoreWindow);
701 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))))
703 mSupportedAuxiliaryHints.push_back(hint);
705 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::Initialize: %s\n", hint);
710 Eina_Bool WindowBaseEcoreWl::OnIconifyStateChanged(void* data, int type, void* event)
712 Ecore_Wl_Event_Window_Iconify_State_Change* iconifyChangedEvent(static_cast<Ecore_Wl_Event_Window_Iconify_State_Change*>(event));
713 Eina_Bool handled(ECORE_CALLBACK_PASS_ON);
715 if(iconifyChangedEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
717 if(iconifyChangedEvent->iconified == EINA_TRUE)
719 mIconifyChangedSignal.Emit(true);
723 mIconifyChangedSignal.Emit(false);
725 handled = ECORE_CALLBACK_DONE;
731 Eina_Bool WindowBaseEcoreWl::OnFocusIn(void* data, int type, void* event)
733 Ecore_Wl_Event_Focus_In* focusInEvent(static_cast<Ecore_Wl_Event_Focus_In*>(event));
735 if(focusInEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
737 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusIn\n");
739 mFocusChangedSignal.Emit(true);
742 return ECORE_CALLBACK_PASS_ON;
745 Eina_Bool WindowBaseEcoreWl::OnFocusOut(void* data, int type, void* event)
747 Ecore_Wl_Event_Focus_Out* focusOutEvent(static_cast<Ecore_Wl_Event_Focus_Out*>(event));
749 if(focusOutEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
751 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusOut\n");
753 mFocusChangedSignal.Emit(false);
756 return ECORE_CALLBACK_PASS_ON;
759 Eina_Bool WindowBaseEcoreWl::OnOutputTransform(void* data, int type, void* event)
761 Ecore_Wl_Event_Output_Transform* transformEvent(static_cast<Ecore_Wl_Event_Output_Transform*>(event));
763 if(transformEvent->output == ecore_wl_window_output_find(mEcoreWindow) && Dali::Adaptor::IsAvailable())
765 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window (%p) EcoreEventOutputTransform\n", mEcoreWindow);
767 mOutputTransformedSignal.Emit();
770 return ECORE_CALLBACK_PASS_ON;
773 Eina_Bool WindowBaseEcoreWl::OnIgnoreOutputTransform(void* data, int type, void* event)
775 Ecore_Wl_Event_Ignore_Output_Transform* ignoreTransformEvent(static_cast<Ecore_Wl_Event_Ignore_Output_Transform*>(event));
777 if(ignoreTransformEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
779 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window (%p) EcoreEventIgnoreOutputTransform\n", mEcoreWindow);
781 mOutputTransformedSignal.Emit();
784 return ECORE_CALLBACK_PASS_ON;
787 void WindowBaseEcoreWl::OnRotation(void* data, int type, void* event)
789 Ecore_Wl_Event_Window_Rotate* ev(static_cast<Ecore_Wl_Event_Window_Rotate*>(event));
791 if(ev->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
793 DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl::OnRotation, angle: %d, width: %d, height: %d\n", ev->angle, ev->w, ev->h);
795 RotationEvent rotationEvent;
796 rotationEvent.angle = ev->angle;
797 rotationEvent.winResize = 0;
799 if(ev->angle == 0 || ev->angle == 180)
801 rotationEvent.width = ev->w;
802 rotationEvent.height = ev->h;
806 rotationEvent.width = ev->h;
807 rotationEvent.height = ev->w;
810 mRotationSignal.Emit(rotationEvent);
814 void WindowBaseEcoreWl::OnMouseButtonDown(void* data, int type, void* event)
816 Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
818 if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
820 PointState::Type state(PointState::DOWN);
822 // Check if the buttons field is set and ensure it's the primary touch button.
823 // If this event was triggered by buttons other than the primary button (used for touch), then
824 // just send an interrupted event to Core.
825 if(touchEvent->buttons && (touchEvent->buttons != PRIMARY_TOUCH_BUTTON_ID))
827 state = PointState::INTERRUPTED;
830 Device::Class::Type deviceClass;
831 Device::Subclass::Type deviceSubclass;
833 GetDeviceClass(ecore_device_class_get(touchEvent->dev), deviceClass);
834 GetDeviceSubclass(ecore_device_subclass_get(touchEvent->dev), deviceSubclass);
836 Integration::Point point;
837 point.SetDeviceId(touchEvent->multi.device);
838 point.SetState(state);
839 point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
840 point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radius_x, touchEvent->multi.radius_y));
841 point.SetPressure(touchEvent->multi.pressure);
842 point.SetAngle(Degree(touchEvent->multi.angle));
843 point.SetDeviceClass(deviceClass);
844 point.SetDeviceSubclass(deviceSubclass);
846 mTouchEventSignal.Emit(point, touchEvent->timestamp);
850 void WindowBaseEcoreWl::OnMouseButtonUp(void* data, int type, void* event)
852 Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
854 if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
856 Device::Class::Type deviceClass;
857 Device::Subclass::Type deviceSubclass;
859 GetDeviceClass(ecore_device_class_get(touchEvent->dev), deviceClass);
860 GetDeviceSubclass(ecore_device_subclass_get(touchEvent->dev), deviceSubclass);
862 Integration::Point point;
863 point.SetDeviceId(touchEvent->multi.device);
864 point.SetState(PointState::UP);
865 point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
866 point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radius_x, touchEvent->multi.radius_y));
867 point.SetPressure(touchEvent->multi.pressure);
868 point.SetAngle(Degree(touchEvent->multi.angle));
869 point.SetDeviceClass(deviceClass);
870 point.SetDeviceSubclass(deviceSubclass);
872 mTouchEventSignal.Emit(point, touchEvent->timestamp);
876 void WindowBaseEcoreWl::OnMouseButtonMove(void* data, int type, void* event)
878 Ecore_Event_Mouse_Move* touchEvent = static_cast<Ecore_Event_Mouse_Move*>(event);
880 if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
882 Device::Class::Type deviceClass;
883 Device::Subclass::Type deviceSubclass;
885 GetDeviceClass(ecore_device_class_get(touchEvent->dev), deviceClass);
886 GetDeviceSubclass(ecore_device_subclass_get(touchEvent->dev), deviceSubclass);
888 Integration::Point point;
889 point.SetDeviceId(touchEvent->multi.device);
890 point.SetState(PointState::MOTION);
891 point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
892 point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radius_x, touchEvent->multi.radius_y));
893 point.SetPressure(touchEvent->multi.pressure);
894 point.SetAngle(Degree(touchEvent->multi.angle));
895 point.SetDeviceClass(deviceClass);
896 point.SetDeviceSubclass(deviceSubclass);
898 mTouchEventSignal.Emit(point, touchEvent->timestamp);
902 void WindowBaseEcoreWl::OnMouseButtonCancel(void* data, int type, void* event)
904 Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
906 if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
908 Device::Class::Type deviceClass;
909 Device::Subclass::Type deviceSubclass;
911 GetDeviceClass(ecore_device_class_get(touchEvent->dev), deviceClass);
912 GetDeviceSubclass(ecore_device_subclass_get(touchEvent->dev), deviceSubclass);
914 Integration::Point point;
915 point.SetDeviceId(touchEvent->multi.device);
916 point.SetState(PointState::INTERRUPTED);
917 point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
918 point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radius_x, touchEvent->multi.radius_y));
919 point.SetPressure(touchEvent->multi.pressure);
920 point.SetAngle(Degree(touchEvent->multi.angle));
921 point.SetDeviceClass(deviceClass);
922 point.SetDeviceSubclass(deviceSubclass);
924 mTouchEventSignal.Emit(point, touchEvent->timestamp);
926 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseButtonCancel\n");
930 void WindowBaseEcoreWl::OnMouseWheel(void* data, int type, void* event)
932 Ecore_Event_Mouse_Wheel* mouseWheelEvent = static_cast<Ecore_Event_Mouse_Wheel*>(event);
934 if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
936 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);
938 Integration::WheelEvent wheelEvent(Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2(mouseWheelEvent->x, mouseWheelEvent->y), mouseWheelEvent->z, mouseWheelEvent->timestamp);
940 mWheelEventSignal.Emit(wheelEvent);
944 void WindowBaseEcoreWl::OnDetentRotation(void* data, int type, void* event)
946 if(Dali::Adaptor::IsAvailable())
948 Ecore_Event_Detent_Rotate* detentEvent = static_cast<Ecore_Event_Detent_Rotate*>(event);
950 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnDetentRotation\n");
952 int direction = (detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE) ? 1 : -1;
953 int timeStamp = detentEvent->timestamp;
955 Integration::WheelEvent wheelEvent(Integration::WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2(0.0f, 0.0f), direction, timeStamp);
957 mWheelEventSignal.Emit(wheelEvent);
961 void WindowBaseEcoreWl::OnKeyDown(void* data, int type, void* event)
963 Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
965 if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
967 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyDown\n");
969 std::string keyName(keyEvent->keyname);
970 std::string logicalKey("");
971 std::string keyString("");
972 std::string compose("");
974 // Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
975 if(keyEvent->compose)
977 compose = keyEvent->compose;
980 // Ensure key symbol is not NULL as keys like SHIFT have a null string.
983 logicalKey = keyEvent->key;
986 int keyCode = KeyLookup::GetDaliKeyCode(keyEvent->keyname);
987 keyCode = (keyCode == -1) ? 0 : keyCode;
988 int modifier(keyEvent->modifiers);
989 unsigned long time = keyEvent->timestamp;
990 if(!strncmp(keyEvent->keyname, "Keycode-", 8))
992 keyCode = atoi(keyEvent->keyname + 8);
995 // Ensure key event string is not NULL as keys like SHIFT have a null string.
998 keyString = keyEvent->string;
1001 std::string deviceName;
1002 Device::Class::Type deviceClass;
1003 Device::Subclass::Type deviceSubclass;
1005 GetDeviceName(keyEvent, deviceName);
1006 GetDeviceClass(ecore_device_class_get(keyEvent->dev), deviceClass);
1007 GetDeviceSubclass(ecore_device_subclass_get(keyEvent->dev), deviceSubclass);
1009 Integration::KeyEvent keyEvent(keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, compose, deviceName, deviceClass, deviceSubclass);
1010 keyEvent.windowId = GetNativeWindowId();
1012 mKeyEventSignal.Emit(keyEvent);
1016 void WindowBaseEcoreWl::OnKeyUp(void* data, int type, void* event)
1018 Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
1020 if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
1022 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp\n");
1024 #if defined(ECORE_VERSION_MAJOR) && (ECORE_VERSION_MAJOR >= 1) && defined(ECORE_VERSION_MINOR) && (ECORE_VERSION_MINOR >= 23)
1025 // Cancel processing flag is sent because this key event will combine with the previous key. So, the event should not actually perform anything.
1026 if(keyEvent->event_flags & ECORE_EVENT_FLAG_CANCEL)
1028 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp: This event flag indicates the event is canceled. \n");
1031 #endif // Since ecore 1.23 version
1033 std::string keyName(keyEvent->keyname);
1034 std::string logicalKey("");
1035 std::string keyString("");
1036 std::string compose("");
1038 // Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
1039 if(keyEvent->compose)
1041 compose = keyEvent->compose;
1044 // Ensure key symbol is not NULL as keys like SHIFT have a null string.
1047 logicalKey = keyEvent->key;
1050 int keyCode = KeyLookup::GetDaliKeyCode(keyEvent->keyname);
1051 keyCode = (keyCode == -1) ? 0 : keyCode;
1052 int modifier(keyEvent->modifiers);
1053 unsigned long time = keyEvent->timestamp;
1054 if(!strncmp(keyEvent->keyname, "Keycode-", 8))
1056 keyCode = atoi(keyEvent->keyname + 8);
1059 // Ensure key event string is not NULL as keys like SHIFT have a null string.
1060 if(keyEvent->string)
1062 keyString = keyEvent->string;
1065 std::string deviceName;
1066 Device::Class::Type deviceClass;
1067 Device::Subclass::Type deviceSubclass;
1069 GetDeviceName(keyEvent, deviceName);
1070 GetDeviceClass(ecore_device_class_get(keyEvent->dev), deviceClass);
1071 GetDeviceSubclass(ecore_device_subclass_get(keyEvent->dev), deviceSubclass);
1073 Integration::KeyEvent keyEvent(keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::UP, compose, deviceName, deviceClass, deviceSubclass);
1074 keyEvent.windowId = GetNativeWindowId();
1076 mKeyEventSignal.Emit(keyEvent);
1080 void WindowBaseEcoreWl::OnDataSend(void* data, int type, void* event)
1082 if(Dali::Adaptor::IsAvailable())
1084 mSelectionDataSendSignal.Emit(event);
1088 void WindowBaseEcoreWl::OnDataReceive(void* data, int type, void* event)
1090 if(Dali::Adaptor::IsAvailable())
1092 mSelectionDataReceivedSignal.Emit(event);
1096 void WindowBaseEcoreWl::OnFontNameChanged()
1098 if(Dali::Adaptor::IsAvailable())
1100 mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_CHANGE);
1104 void WindowBaseEcoreWl::OnFontSizeChanged()
1106 if(Dali::Adaptor::IsAvailable())
1108 mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
1112 void WindowBaseEcoreWl::RegistryGlobalCallback(void* data, struct wl_registry* registry, uint32_t name, const char* interface, uint32_t version)
1114 if(strcmp(interface, tizen_policy_interface.name) == 0)
1116 uint32_t clientVersion = std::min(version, MAX_TIZEN_CLIENT_VERSION);
1118 mTizenPolicy = static_cast<tizen_policy*>(wl_registry_bind(registry, name, &tizen_policy_interface, clientVersion));
1121 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::RegistryGlobalCallback: wl_registry_bind(tizen_policy_interface) is failed.\n");
1125 tizen_policy_add_listener(mTizenPolicy, &tizenPolicyListener, data);
1127 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::RegistryGlobalCallback: tizen_policy_add_listener is called.\n");
1129 else if(strcmp(interface, tizen_display_policy_interface.name) == 0)
1131 mTizenDisplayPolicy = static_cast<tizen_display_policy*>(wl_registry_bind(registry, name, &tizen_display_policy_interface, version));
1132 if(!mTizenDisplayPolicy)
1134 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::RegistryGlobalCallback: wl_registry_bind(tizen_display_policy_interface) is failed.\n");
1138 tizen_display_policy_add_listener(mTizenDisplayPolicy, &tizenDisplayPolicyListener, data);
1140 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::RegistryGlobalCallback: tizen_display_policy_add_listener is called.\n");
1144 void WindowBaseEcoreWl::RegistryGlobalCallbackRemove(void* data, struct wl_registry* registry, uint32_t id)
1146 mTizenPolicy = NULL;
1147 mTizenDisplayPolicy = NULL;
1150 void WindowBaseEcoreWl::TizenPolicyNotificationChangeDone(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, int32_t level, uint32_t state)
1152 mNotificationLevel = level;
1153 mNotificationChangeState = state;
1154 mNotificationLevelChangeDone = true;
1156 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::TizenPolicyNotificationChangeDone: level = %d, state = %d\n", level, state);
1159 void WindowBaseEcoreWl::TizenPolicyScreenModeChangeDone(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t mode, uint32_t state)
1161 mScreenOffMode = mode;
1162 mScreenOffModeChangeState = state;
1163 mScreenOffModeChangeDone = true;
1165 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::TizenPolicyScreenModeChangeDone: mode = %d, state = %d\n", mode, state);
1168 void WindowBaseEcoreWl::DisplayPolicyBrightnessChangeDone(void* data, struct tizen_display_policy* displayPolicy, struct wl_surface* surface, int32_t brightness, uint32_t state)
1170 mBrightness = brightness;
1171 mBrightnessChangeState = state;
1172 mBrightnessChangeDone = true;
1174 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::DisplayPolicyBrightnessChangeDone: brightness = %d, state = %d\n", brightness, state);
1177 Any WindowBaseEcoreWl::GetNativeWindow()
1179 return mEcoreWindow;
1182 int WindowBaseEcoreWl::GetNativeWindowId()
1184 return ecore_wl_window_id_get(mEcoreWindow);
1187 std::string WindowBaseEcoreWl::GetNativeWindowResourceId()
1189 return std::string();
1192 EGLNativeWindowType WindowBaseEcoreWl::CreateEglWindow(int width, int height)
1194 mEglWindow = wl_egl_window_create(mWlSurface, width, height);
1196 return static_cast<EGLNativeWindowType>(mEglWindow);
1199 void WindowBaseEcoreWl::DestroyEglWindow()
1201 if(mEglWindow != NULL)
1203 wl_egl_window_destroy(mEglWindow);
1208 void WindowBaseEcoreWl::SetEglWindowRotation(int angle)
1210 wl_egl_window_rotation rotation;
1216 rotation = ROTATION_0;
1221 rotation = ROTATION_270;
1226 rotation = ROTATION_180;
1231 rotation = ROTATION_90;
1236 rotation = ROTATION_0;
1241 wl_egl_window_set_rotation(mEglWindow, rotation);
1244 void WindowBaseEcoreWl::SetEglWindowBufferTransform(int angle)
1246 wl_output_transform bufferTransform;
1252 bufferTransform = WL_OUTPUT_TRANSFORM_NORMAL;
1257 bufferTransform = WL_OUTPUT_TRANSFORM_90;
1262 bufferTransform = WL_OUTPUT_TRANSFORM_180;
1267 bufferTransform = WL_OUTPUT_TRANSFORM_270;
1272 bufferTransform = WL_OUTPUT_TRANSFORM_NORMAL;
1277 wl_egl_window_set_buffer_transform(mEglWindow, bufferTransform);
1280 void WindowBaseEcoreWl::SetEglWindowTransform(int angle)
1282 wl_output_transform windowTransform;
1288 windowTransform = WL_OUTPUT_TRANSFORM_NORMAL;
1293 windowTransform = WL_OUTPUT_TRANSFORM_90;
1298 windowTransform = WL_OUTPUT_TRANSFORM_180;
1303 windowTransform = WL_OUTPUT_TRANSFORM_270;
1308 windowTransform = WL_OUTPUT_TRANSFORM_NORMAL;
1313 wl_egl_window_set_window_transform(mEglWindow, windowTransform);
1316 void WindowBaseEcoreWl::ResizeEglWindow(PositionSize positionSize)
1318 wl_egl_window_resize(mEglWindow, positionSize.width, positionSize.height, positionSize.x, positionSize.y);
1321 bool WindowBaseEcoreWl::IsEglWindowRotationSupported()
1324 wl_egl_window_capability capability = static_cast<wl_egl_window_capability>(wl_egl_window_get_capabilities(mEglWindow));
1325 if(capability == WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED)
1327 mSupportedPreProtation = true;
1330 mSupportedPreProtation = false;
1334 void WindowBaseEcoreWl::Move(PositionSize positionSize)
1336 ecore_wl_window_position_set(mEcoreWindow, positionSize.x, positionSize.y);
1339 void WindowBaseEcoreWl::Resize(PositionSize positionSize)
1341 ecore_wl_window_update_size(mEcoreWindow, positionSize.width, positionSize.height);
1344 void WindowBaseEcoreWl::MoveResize(PositionSize positionSize)
1346 ecore_wl_window_position_set(mEcoreWindow, positionSize.x, positionSize.y);
1347 ecore_wl_window_update_size(mEcoreWindow, positionSize.width, positionSize.height);
1350 void WindowBaseEcoreWl::SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan)
1354 void WindowBaseEcoreWl::SetClass(const std::string& name, const std::string& className)
1356 ecore_wl_window_title_set(mEcoreWindow, name.c_str());
1357 ecore_wl_window_class_name_set(mEcoreWindow, className.c_str());
1360 void WindowBaseEcoreWl::Raise()
1362 // Use ecore_wl_window_activate to prevent the window shown without rendering
1363 ecore_wl_window_activate(mEcoreWindow);
1366 void WindowBaseEcoreWl::Lower()
1368 ecore_wl_window_lower(mEcoreWindow);
1371 void WindowBaseEcoreWl::Activate()
1373 ecore_wl_window_activate(mEcoreWindow);
1376 void WindowBaseEcoreWl::Maximize(bool maximize)
1380 bool WindowBaseEcoreWl::IsMaximized() const
1385 void WindowBaseEcoreWl::SetMaximumSize(Dali::Window::WindowSize size)
1389 void WindowBaseEcoreWl::Minimize(bool minimize)
1393 bool WindowBaseEcoreWl::IsMinimized() const
1398 void WindowBaseEcoreWl::SetMimimumSize(Dali::Window::WindowSize size)
1402 void WindowBaseEcoreWl::SetAvailableAnlges(const std::vector<int>& angles)
1404 int rotations[4] = {0};
1405 DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl::SetAvailableAnlges, angle's count: %d\n", angles.size());
1406 for(std::size_t i = 0; i < angles.size(); ++i)
1408 rotations[i] = static_cast<int>(angles[i]);
1409 DALI_LOG_RELEASE_INFO("%d ", rotations[i]);
1411 ecore_wl_window_rotation_available_rotations_set(mEcoreWindow, rotations, angles.size());
1414 void WindowBaseEcoreWl::SetPreferredAngle(int angle)
1416 ecore_wl_window_rotation_preferred_rotation_set(mEcoreWindow, angle);
1419 void WindowBaseEcoreWl::SetAcceptFocus(bool accept)
1421 ecore_wl_window_focus_skip_set(mEcoreWindow, !accept);
1424 void WindowBaseEcoreWl::Show()
1426 ecore_wl_window_show(mEcoreWindow);
1429 void WindowBaseEcoreWl::Hide()
1431 ecore_wl_window_hide(mEcoreWindow);
1434 unsigned int WindowBaseEcoreWl::GetSupportedAuxiliaryHintCount() const
1436 return mSupportedAuxiliaryHints.size();
1439 std::string WindowBaseEcoreWl::GetSupportedAuxiliaryHint(unsigned int index) const
1441 if(index >= GetSupportedAuxiliaryHintCount())
1443 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetSupportedAuxiliaryHint: Invalid index! [%d]\n", index);
1446 return mSupportedAuxiliaryHints[index];
1449 unsigned int WindowBaseEcoreWl::AddAuxiliaryHint(const std::string& hint, const std::string& value)
1451 bool supported = false;
1453 // Check if the hint is suppported
1454 for(std::vector<std::string>::iterator iter = mSupportedAuxiliaryHints.begin(); iter != mSupportedAuxiliaryHints.end(); ++iter)
1465 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::AddAuxiliaryHint: Not supported auxiliary hint [%s]\n", hint.c_str());
1469 // Check if the hint is already added
1470 for(unsigned int i = 0; i < mAuxiliaryHints.size(); i++)
1472 if(mAuxiliaryHints[i].first == hint)
1474 // Just change the value
1475 mAuxiliaryHints[i].second = value;
1477 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::AddAuxiliaryHint: Change! hint = %s, value = %s, id = %d\n", hint.c_str(), value.c_str(), i + 1);
1479 return i + 1; // id is index + 1
1484 mAuxiliaryHints.push_back(std::pair<std::string, std::string>(hint, value));
1486 unsigned int id = mAuxiliaryHints.size();
1488 ecore_wl_window_aux_hint_add(mEcoreWindow, static_cast<int>(id), hint.c_str(), value.c_str());
1490 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::AddAuxiliaryHint: hint = %s, value = %s, id = %d\n", hint.c_str(), value.c_str(), id);
1495 bool WindowBaseEcoreWl::RemoveAuxiliaryHint(unsigned int id)
1497 if(id == 0 || id > mAuxiliaryHints.size())
1499 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::RemoveAuxiliaryHint: Invalid id [%d]\n", id);
1503 mAuxiliaryHints[id - 1].second = std::string();
1505 ecore_wl_window_aux_hint_del(mEcoreWindow, static_cast<int>(id));
1507 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::RemoveAuxiliaryHint: id = %d, hint = %s\n", id, mAuxiliaryHints[id - 1].first.c_str());
1512 bool WindowBaseEcoreWl::SetAuxiliaryHintValue(unsigned int id, const std::string& value)
1514 if(id == 0 || id > mAuxiliaryHints.size())
1516 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::SetAuxiliaryHintValue: Invalid id [%d]\n", id);
1520 mAuxiliaryHints[id - 1].second = value;
1522 ecore_wl_window_aux_hint_change(mEcoreWindow, static_cast<int>(id), value.c_str());
1524 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());
1529 std::string WindowBaseEcoreWl::GetAuxiliaryHintValue(unsigned int id) const
1531 if(id == 0 || id > mAuxiliaryHints.size())
1533 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::GetAuxiliaryHintValue: Invalid id [%d]\n", id);
1534 return std::string();
1537 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());
1539 return mAuxiliaryHints[id - 1].second;
1542 unsigned int WindowBaseEcoreWl::GetAuxiliaryHintId(const std::string& hint) const
1544 for(unsigned int i = 0; i < mAuxiliaryHints.size(); i++)
1546 if(mAuxiliaryHints[i].first == hint)
1548 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetAuxiliaryHintId: hint = %s, id = %d\n", hint.c_str(), i + 1);
1553 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetAuxiliaryHintId: Invalid hint! [%s]\n", hint.c_str());
1558 void WindowBaseEcoreWl::SetInputRegion(const Rect<int>& inputRegion)
1560 ecore_wl_window_input_region_set(mEcoreWindow, inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height);
1563 void WindowBaseEcoreWl::SetType(Dali::WindowType type)
1565 Ecore_Wl_Window_Type windowType;
1569 case Dali::WindowType::NORMAL:
1571 windowType = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
1574 case Dali::WindowType::NOTIFICATION:
1576 windowType = ECORE_WL_WINDOW_TYPE_NOTIFICATION;
1579 case Dali::WindowType::UTILITY:
1581 windowType = ECORE_WL_WINDOW_TYPE_UTILITY;
1584 case Dali::WindowType::DIALOG:
1586 windowType = ECORE_WL_WINDOW_TYPE_DIALOG;
1591 windowType = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
1596 ecore_wl_window_type_set(mEcoreWindow, windowType);
1599 Dali::WindowType WindowBaseEcoreWl::GetType() const
1601 return Dali::WindowType::NORMAL;
1604 Dali::WindowOperationResult WindowBaseEcoreWl::SetNotificationLevel(Dali::WindowNotificationLevel level)
1606 while(!mTizenPolicy)
1608 wl_display_dispatch_queue(mDisplay, mEventQueue);
1611 int notificationLevel;
1615 case Dali::WindowNotificationLevel::NONE:
1617 notificationLevel = TIZEN_POLICY_LEVEL_NONE;
1620 case Dali::WindowNotificationLevel::BASE:
1622 notificationLevel = TIZEN_POLICY_LEVEL_DEFAULT;
1625 case Dali::WindowNotificationLevel::MEDIUM:
1627 notificationLevel = TIZEN_POLICY_LEVEL_MEDIUM;
1630 case Dali::WindowNotificationLevel::HIGH:
1632 notificationLevel = TIZEN_POLICY_LEVEL_HIGH;
1635 case Dali::WindowNotificationLevel::TOP:
1637 notificationLevel = TIZEN_POLICY_LEVEL_TOP;
1642 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: invalid level [%d]\n", level);
1643 notificationLevel = TIZEN_POLICY_LEVEL_DEFAULT;
1648 mNotificationLevelChangeDone = false;
1649 mNotificationChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
1651 tizen_policy_set_notification_level(mTizenPolicy, ecore_wl_window_surface_get(mEcoreWindow), notificationLevel);
1655 while(!mNotificationLevelChangeDone && count < 3)
1658 wl_display_dispatch_queue(mDisplay, mEventQueue);
1662 if(!mNotificationLevelChangeDone)
1664 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Level change is failed [%d, %d]\n", level, mNotificationChangeState);
1665 return Dali::WindowOperationResult::UNKNOWN_ERROR;
1667 else if(mNotificationChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
1669 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Permission denied! [%d]\n", level);
1670 return Dali::WindowOperationResult::PERMISSION_DENIED;
1673 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Level is changed [%d]\n", mNotificationLevel);
1675 return Dali::WindowOperationResult::SUCCEED;
1678 Dali::WindowNotificationLevel WindowBaseEcoreWl::GetNotificationLevel() const
1680 while(!mTizenPolicy)
1682 wl_display_dispatch_queue(mDisplay, mEventQueue);
1687 while(!mNotificationLevelChangeDone && count < 3)
1690 wl_display_dispatch_queue(mDisplay, mEventQueue);
1694 if(!mNotificationLevelChangeDone)
1696 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetNotificationLevel: Error! [%d]\n", mNotificationChangeState);
1697 return Dali::Window::NotificationLevel::NONE;
1700 Dali::WindowNotificationLevel level;
1702 switch(mNotificationLevel)
1704 case TIZEN_POLICY_LEVEL_NONE:
1706 level = Dali::WindowNotificationLevel::NONE;
1709 case TIZEN_POLICY_LEVEL_DEFAULT:
1711 level = Dali::WindowNotificationLevel::BASE;
1714 case TIZEN_POLICY_LEVEL_MEDIUM:
1716 level = Dali::WindowNotificationLevel::MEDIUM;
1719 case TIZEN_POLICY_LEVEL_HIGH:
1721 level = Dali::WindowNotificationLevel::HIGH;
1724 case TIZEN_POLICY_LEVEL_TOP:
1726 level = Dali::WindowNotificationLevel::TOP;
1731 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetNotificationLevel: invalid level [%d]\n", mNotificationLevel);
1732 level = Dali::WindowNotificationLevel::NONE;
1737 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetNotificationLevel: level [%d]\n", mNotificationLevel);
1742 void WindowBaseEcoreWl::SetOpaqueState(bool opaque)
1744 while(!mTizenPolicy)
1746 wl_display_dispatch_queue(mDisplay, mEventQueue);
1749 tizen_policy_set_opaque_state(mTizenPolicy, ecore_wl_window_surface_get(mEcoreWindow), (opaque ? 1 : 0));
1752 Dali::WindowOperationResult WindowBaseEcoreWl::SetScreenOffMode(WindowScreenOffMode screenOffMode)
1754 while(!mTizenPolicy)
1756 wl_display_dispatch_queue(mDisplay, mEventQueue);
1759 mScreenOffModeChangeDone = false;
1760 mScreenOffModeChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
1762 unsigned int mode = 0;
1764 switch(screenOffMode)
1766 case WindowScreenOffMode::TIMEOUT:
1771 case WindowScreenOffMode::NEVER:
1778 tizen_policy_set_window_screen_mode(mTizenPolicy, ecore_wl_window_surface_get(mEcoreWindow), mode);
1782 while(!mScreenOffModeChangeDone && count < 3)
1785 wl_display_dispatch_queue(mDisplay, mEventQueue);
1789 if(!mScreenOffModeChangeDone)
1791 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Screen mode change is failed [%d, %d]\n", screenOffMode, mScreenOffModeChangeState);
1792 return Dali::WindowOperationResult::UNKNOWN_ERROR;
1794 else if(mScreenOffModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
1796 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Permission denied! [%d]\n", screenOffMode);
1797 return Dali::WindowOperationResult::PERMISSION_DENIED;
1800 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Screen mode is changed [%d]\n", mScreenOffMode);
1802 return Dali::WindowOperationResult::SUCCEED;
1805 WindowScreenOffMode WindowBaseEcoreWl::GetScreenOffMode() const
1807 while(!mTizenPolicy)
1809 wl_display_dispatch_queue(mDisplay, mEventQueue);
1814 while(!mScreenOffModeChangeDone && count < 3)
1817 wl_display_dispatch_queue(mDisplay, mEventQueue);
1821 if(!mScreenOffModeChangeDone)
1823 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetScreenOffMode: Error! [%d]\n", mScreenOffModeChangeState);
1824 return WindowScreenOffMode::TIMEOUT;
1827 WindowScreenOffMode screenMode = WindowScreenOffMode::TIMEOUT;
1829 switch(mScreenOffMode)
1833 screenMode = WindowScreenOffMode::TIMEOUT;
1838 screenMode = WindowScreenOffMode::NEVER;
1843 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetScreenOffMode: screen mode [%d]\n", mScreenOffMode);
1848 Dali::WindowOperationResult WindowBaseEcoreWl::SetBrightness(int brightness)
1850 while(!mTizenDisplayPolicy)
1852 wl_display_dispatch_queue(mDisplay, mEventQueue);
1855 mBrightnessChangeDone = false;
1856 mBrightnessChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
1858 tizen_display_policy_set_window_brightness(mTizenDisplayPolicy, ecore_wl_window_surface_get(mEcoreWindow), brightness);
1862 while(!mBrightnessChangeDone && count < 3)
1865 wl_display_dispatch_queue(mDisplay, mEventQueue);
1869 if(!mBrightnessChangeDone)
1871 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Brightness change is failed [%d, %d]\n", brightness, mBrightnessChangeState);
1872 return Dali::WindowOperationResult::UNKNOWN_ERROR;
1874 else if(mBrightnessChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
1876 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Permission denied! [%d]\n", brightness);
1877 return Dali::WindowOperationResult::PERMISSION_DENIED;
1880 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Brightness is changed [%d]\n", mBrightness);
1882 return Dali::WindowOperationResult::SUCCEED;
1885 int WindowBaseEcoreWl::GetBrightness() const
1887 while(!mTizenDisplayPolicy)
1889 wl_display_dispatch_queue(mDisplay, mEventQueue);
1894 while(!mBrightnessChangeDone && count < 3)
1897 wl_display_dispatch_queue(mDisplay, mEventQueue);
1901 if(!mBrightnessChangeDone)
1903 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetBrightness: Error! [%d]\n", mBrightnessChangeState);
1907 DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetBrightness: Brightness [%d]\n", mBrightness);
1912 bool WindowBaseEcoreWl::GrabKey(Dali::KEY key, KeyGrab::KeyGrabMode grabMode)
1914 Ecore_Wl_Window_Keygrab_Mode mode;
1918 case KeyGrab::TOPMOST:
1920 mode = ECORE_WL_WINDOW_KEYGRAB_TOPMOST;
1923 case KeyGrab::SHARED:
1925 mode = ECORE_WL_WINDOW_KEYGRAB_SHARED;
1928 case KeyGrab::OVERRIDE_EXCLUSIVE:
1930 mode = ECORE_WL_WINDOW_KEYGRAB_OVERRIDE_EXCLUSIVE;
1933 case KeyGrab::EXCLUSIVE:
1935 mode = ECORE_WL_WINDOW_KEYGRAB_EXCLUSIVE;
1944 return ecore_wl_window_keygrab_set(mEcoreWindow, KeyLookup::GetKeyName(key), 0, 0, 0, mode);
1947 bool WindowBaseEcoreWl::UngrabKey(Dali::KEY key)
1949 return ecore_wl_window_keygrab_unset(mEcoreWindow, KeyLookup::GetKeyName(key), 0, 0);
1952 bool WindowBaseEcoreWl::GrabKeyList(const Dali::Vector<Dali::KEY>& key, const Dali::Vector<KeyGrab::KeyGrabMode>& grabMode, Dali::Vector<bool>& result)
1954 int keyCount = key.Count();
1955 int keyGrabModeCount = grabMode.Count();
1957 if(keyCount != keyGrabModeCount || keyCount == 0)
1964 Eina_List* keyList = NULL;
1965 Ecore_Wl_Window_Keygrab_Info* info = new Ecore_Wl_Window_Keygrab_Info[keyCount];
1967 for(int index = 0; index < keyCount; ++index)
1969 info[index].key = const_cast<char*>(KeyLookup::GetKeyName(key[index]));
1971 switch(grabMode[index])
1973 case KeyGrab::TOPMOST:
1975 info[index].mode = ECORE_WL_WINDOW_KEYGRAB_TOPMOST;
1978 case KeyGrab::SHARED:
1980 info[index].mode = ECORE_WL_WINDOW_KEYGRAB_SHARED;
1983 case KeyGrab::OVERRIDE_EXCLUSIVE:
1985 info[index].mode = ECORE_WL_WINDOW_KEYGRAB_OVERRIDE_EXCLUSIVE;
1988 case KeyGrab::EXCLUSIVE:
1990 info[index].mode = ECORE_WL_WINDOW_KEYGRAB_EXCLUSIVE;
1995 info[index].mode = ECORE_WL_WINDOW_KEYGRAB_UNKNOWN;
2000 keyList = eina_list_append(keyList, &info);
2003 Eina_List* grabList = ecore_wl_window_keygrab_list_set(mEcoreWindow, keyList);
2005 result.Resize(keyCount, true);
2007 Eina_List* l = NULL;
2008 Eina_List* m = NULL;
2009 void* listData = NULL;
2011 if(grabList != NULL)
2013 EINA_LIST_FOREACH(grabList, m, data)
2016 EINA_LIST_FOREACH(keyList, l, listData)
2018 if(static_cast<Ecore_Wl_Window_Keygrab_Info*>(listData)->key == NULL)
2020 DALI_LOG_ERROR("input key list has null data!");
2024 if(strcmp(static_cast<char*>(data), static_cast<Ecore_Wl_Window_Keygrab_Info*>(listData)->key) == 0)
2026 result[index] = false;
2035 eina_list_free(keyList);
2036 eina_list_free(grabList);
2042 bool WindowBaseEcoreWl::UngrabKeyList(const Dali::Vector<Dali::KEY>& key, Dali::Vector<bool>& result)
2044 int keyCount = key.Count();
2052 Eina_List* keyList = NULL;
2053 Ecore_Wl_Window_Keygrab_Info* info = new Ecore_Wl_Window_Keygrab_Info[keyCount];
2055 for(int index = 0; index < keyCount; ++index)
2057 info[index].key = const_cast<char*>(KeyLookup::GetKeyName(key[index]));
2058 keyList = eina_list_append(keyList, &info);
2061 Eina_List* ungrabList = ecore_wl_window_keygrab_list_unset(mEcoreWindow, keyList);
2063 result.Resize(keyCount, true);
2065 Eina_List* l = NULL;
2066 Eina_List* m = NULL;
2067 void* listData = NULL;
2070 if(ungrabList != NULL)
2072 EINA_LIST_FOREACH(ungrabList, m, data)
2075 EINA_LIST_FOREACH(keyList, l, listData)
2077 if(strcmp(static_cast<char*>(data), static_cast<Ecore_Wl_Window_Keygrab_Info*>(listData)->key) == 0)
2079 result[index] = false;
2088 eina_list_free(keyList);
2089 eina_list_free(ungrabList);
2095 void WindowBaseEcoreWl::GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical)
2100 // 1 inch = 25.4 millimeters
2101 xres = ecore_wl_dpi_get();
2102 yres = ecore_wl_dpi_get();
2104 dpiHorizontal = int(xres + 0.5f); // rounding
2105 dpiVertical = int(yres + 0.5f);
2108 int WindowBaseEcoreWl::GetWindowRotationAngle() const
2110 int orientation = mWindowRotationAngle;
2111 if(mSupportedPreProtation)
2118 int WindowBaseEcoreWl::GetScreenRotationAngle()
2122 if(ecore_wl_window_ignore_output_transform_get(mEcoreWindow))
2128 transform = ecore_wl_output_transform_get(ecore_wl_window_output_find(mEcoreWindow));
2131 mScreenRotationAngle = transform * 90;
2132 return mScreenRotationAngle;
2135 void WindowBaseEcoreWl::SetWindowRotationAngle(int degree)
2137 mWindowRotationAngle = degree;
2138 ecore_wl_window_rotation_set(mEcoreWindow, degree);
2141 void WindowBaseEcoreWl::WindowRotationCompleted(int degree, int width, int height)
2143 ecore_wl_window_rotation_change_done_send(mEcoreWindow);
2146 void WindowBaseEcoreWl::SetTransparency(bool transparent)
2148 ecore_wl_window_alpha_set(mEcoreWindow, transparent);
2151 void WindowBaseEcoreWl::CreateWindow(PositionSize positionSize)
2153 mEcoreWindow = ecore_wl_window_new(0, positionSize.x, positionSize.y, positionSize.width, positionSize.height, ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW);
2155 if(mEcoreWindow == 0)
2157 DALI_ASSERT_ALWAYS(0 && "Failed to create Wayland window");
2161 void WindowBaseEcoreWl::SetParent(WindowBase* parentWinBase, bool belowParent)
2163 Ecore_Wl_Window* ecoreParent = NULL;
2166 WindowBaseEcoreWl* winBaseEcore = static_cast<WindowBaseEcoreWl*>(parentWinBase);
2167 ecoreParent = winBaseEcore->mEcoreWindow;
2169 ecore_wl_window_parent_set(mEcoreWindow, ecoreParent);
2172 int WindowBaseEcoreWl::CreateFrameRenderedSyncFence()
2177 int WindowBaseEcoreWl::CreateFramePresentedSyncFence()
2182 void WindowBaseEcoreWl::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
2186 void WindowBaseEcoreWl::InitializeIme()
2190 void WindowBaseEcoreWl::ImeWindowReadyToRender()
2194 void WindowBaseEcoreWl::RequestMoveToServer()
2198 void WindowBaseEcoreWl::RequestResizeToServer(WindowResizeDirection direction)
2202 void WindowBaseEcoreWl::EnableFloatingMode(bool enable)
2206 bool WindowBaseEcoreWl::IsFloatingModeEnabled() const
2211 void WindowBaseEcoreWl::IncludeInputRegion(const Rect<int>& inputRegion)
2215 void WindowBaseEcoreWl::ExcludeInputRegion(const Rect<int>& inputRegion)
2219 void WindowBaseEcoreWl::SetFrontBufferRendering(bool enable)
2223 bool WindowBaseEcoreWl::GetFrontBufferRendering()
2228 void WindowBaseEcoreWl::SetEglWindowFrontBufferMode(bool enable)
2232 } // namespace Adaptor
2234 } // namespace Internal
2238 #pragma GCC diagnostic pop