/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
const char* DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME = "db/setting/accessibility/font_name"; // It will be update at vconf-key.h and replaced.
+#ifdef DALI_ELDBUS_AVAILABLE
// DBUS accessibility
const char* BUS = "org.enlightenment.wm-screen-reader";
const char* INTERFACE = "org.tizen.GestureNavigation";
const char* PATH = "/org/tizen/GestureNavigation";
+#endif // DALI_ELDBUS_AVAILABLE
struct KeyCodeMap
{
}
/////////////////////////////////////////////////////////////////////////////////////////////////
+// Window Auxiliary Message Callbacks
+/////////////////////////////////////////////////////////////////////////////////////////////////
+static Eina_Bool EcoreEventWindowAuxiliaryMessage(void *data, int type, void *event)
+{
+ WindowBaseEcoreWl2* windowBase = static_cast<WindowBaseEcoreWl2*>(data);
+ if(windowBase)
+ {
+ windowBase->OnEcoreEventWindowAuxiliaryMessage(event);
+ }
+ return ECORE_CALLBACK_RENEW;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
// ElDBus Accessibility Callbacks
/////////////////////////////////////////////////////////////////////////////////////////////////
// Register Window redraw request event
mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_REDRAW_REQUEST, EcoreEventWindowRedrawRequest, this));
+ // Register Window auxiliary event
+ mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL2_EVENT_AUX_MESSAGE, EcoreEventWindowAuxiliaryMessage, this));
+
// Register Vconf notify - font name and size
vconf_notify_key_changed(DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, VconfNotifyFontNameChanged, this);
vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged, this);
mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
}
+#ifdef DALI_ELDBUS_AVAILABLE
void WindowBaseEcoreWl2::OnEcoreElDBusAccessibilityNotification(void* context, const Eldbus_Message* message)
{
-#ifdef DALI_ELDBUS_AVAILABLE
AccessibilityInfo info;
// The string defines the arg-list's respective types.
}
mAccessibilitySignal.Emit(info);
-#endif
}
+#endif // DALI_ELDBUS_AVAILABLE
void WindowBaseEcoreWl2::OnTransitionEffectEvent(WindowEffectState state, WindowEffectType type)
{
mWindowRedrawRequestSignal.Emit();
}
+void WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage(void* event)
+{
+ Ecore_Wl2_Event_Aux_Message *message = static_cast<Ecore_Wl2_Event_Aux_Message*>(event);
+ if(message)
+ {
+ DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, key:%s, value:%s \n",message->key, message->val);
+ std::string key(message->key);
+ std::string value(message->val);
+ Dali::Property::Array options;
+
+ if(message->options)
+ {
+ Eina_List *l;
+ void* data;
+ EINA_LIST_FOREACH(message->options, l, data)
+ {
+ DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, option: %s\n",(char*)data);
+ std::string option(static_cast<char*>(data));
+ options.Add(option);
+ }
+ }
+
+ mAuxiliaryMessageSignal.Emit(key, value, options);
+ }
+}
+
+
void WindowBaseEcoreWl2::KeymapChanged(void* data, int type, void* event)
{
Ecore_Wl2_Event_Seat_Keymap_Changed* changed = static_cast<Ecore_Wl2_Event_Seat_Keymap_Changed*>(event);
ecore_wl2_window_type_set(mEcoreWindow, ECORE_WL2_WINDOW_TYPE_TOPLEVEL);
}
-void WindowBaseEcoreWl2::SetParent(WindowBase* parentWinBase)
+void WindowBaseEcoreWl2::SetParent(WindowBase* parentWinBase, bool belowParent)
{
Ecore_Wl2_Window* ecoreParent = NULL;
if(parentWinBase)
WindowBaseEcoreWl2* winBaseEcore2 = static_cast<WindowBaseEcoreWl2*>(parentWinBase);
ecoreParent = winBaseEcore2->mEcoreWindow;
}
- ecore_wl2_window_parent_set(mEcoreWindow, ecoreParent);
+ ecore_wl2_window_transient_parent_set(mEcoreWindow, ecoreParent, belowParent);
}
int WindowBaseEcoreWl2::CreateFrameRenderedSyncFence()
EINA_ITERATOR_FOREACH(globals, global)
{
- if(strcmp(global->interface, "wl_input_panel") == 0)
+ if(strcmp(global->interface, "zwp_input_panel_v1") == 0)
{
- mWlInputPanel = (wl_input_panel*)wl_registry_bind(registry, global->id, &wl_input_panel_interface, 1);
+ mWlInputPanel = (zwp_input_panel_v1*)wl_registry_bind(registry, global->id, &zwp_input_panel_v1_interface, 1);
}
else if(strcmp(global->interface, "wl_output") == 0)
{
return;
}
- mWlInputPanelSurface = wl_input_panel_get_input_panel_surface(mWlInputPanel, mWlSurface);
+ mWlInputPanelSurface = zwp_input_panel_v1_get_input_panel_surface(mWlInputPanel, mWlSurface);
if(!mWlInputPanelSurface)
{
DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get wayland input panel surface\n");
return;
}
- wl_input_panel_surface_set_toplevel(mWlInputPanelSurface, mWlOutput, WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM);
+ zwp_input_panel_surface_v1_set_toplevel(mWlInputPanelSurface, mWlOutput, ZWP_INPUT_PANEL_SURFACE_V1_POSITION_CENTER_BOTTOM);
}
void WindowBaseEcoreWl2::ImeWindowReadyToRender()
return;
}
- wl_input_panel_surface_set_ready(mWlInputPanelSurface, 1);
+ zwp_input_panel_surface_v1_set_ready(mWlInputPanelSurface, 1);
}
void WindowBaseEcoreWl2::RequestMoveToServer()