{
class AdaptorAccessible : public ActorAccessible
{
+private:
+ std::unique_ptr<TriggerEventInterface> mRenderNotification = nullptr;
+
protected:
bool mRoot = false;
{
return {};
}
+
+ void SetListenPostRender(bool enabled) override
+ {
+ if (!mRoot)
+ {
+ return;
+ }
+
+ auto window = Dali::DevelWindow::Get(Self());
+ Dali::Internal::Adaptor::Window& windowImpl = Dali::GetImplementation(window);
+
+ if(!mRenderNotification)
+ {
+ mRenderNotification = std::unique_ptr<TriggerEventInterface>(
+ TriggerEventFactory::CreateTriggerEvent(MakeCallback(this, &AdaptorAccessible::OnPostRender),
+ TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER));
+ }
+
+ if (enabled)
+ {
+ windowImpl.SetRenderNotification(mRenderNotification.get());
+ }
+ else
+ {
+ windowImpl.SetRenderNotification(nullptr);
+ }
+ }
+
+ void OnPostRender()
+ {
+ Accessibility::Bridge::GetCurrentBridge()->Emit(Accessibility::Accessible::Get(Self()), Accessibility::WindowEvent::POST_RENDER);
+ }
+
}; // AdaptorAccessible
using AdaptorAccessiblesType = std::unordered_map<const Dali::RefObject*, std::unique_ptr<AdaptorAccessible> >;
#ifndef DALI_ATSPI_ACCESSIBILITY_H\r
#define DALI_ATSPI_ACCESSIBILITY_H\r
/*\r
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.\r
*\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
SHADE,\r
UU_SHADE,\r
RESTYLE,\r
+ POST_RENDER,\r
};\r
\r
/**\r
#define DALI_ADAPTOR_ATSPI_ACCESSIBLE_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
virtual Dali::Actor GetInternalActor() = 0;
/**
+ * @brief Sets whether to listen for post render callback.
+ *
+ * @param[in] enabled If ture, registration post render callback, false otherwise
+ */
+ virtual void SetListenPostRender(bool enabled);
+
+ /**
* @brief Gets all implemented interfaces.
*
* Override DoGetInterfaces() to customize the return value of this method.
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return false;
}
+void Accessible::SetListenPostRender(bool enabled)
+{
+}
+
bool Accessible::IsProxy() const
{
return false;
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
AddFunctionToInterface(desc, "DoGesture", &BridgeAccessible::DoGesture);
AddFunctionToInterface(desc, "GetReadingMaterial", &BridgeAccessible::GetReadingMaterial);
AddFunctionToInterface(desc, "GetRelationSet", &BridgeAccessible::GetRelationSet);
+ AddFunctionToInterface(desc, "SetListenPostRender", &BridgeAccessible::SetListenPostRender);
mDbusServer.addInterface("/", desc, true);
}
return ret;
}
+
+DBus::ValueOrError<void> BridgeAccessible::SetListenPostRender(bool enabled)
+{
+ FindSelf()->SetListenPostRender(enabled);
+ return {};
+}
#define DALI_INTERNAL_ACCESSIBILITY_BRIDGE_ACCESSIBLE_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
DBus::ValueOrError<std::vector<Relation>> GetRelationSet();
+ /**
+ * @copydoc Dali::Accessibility::Accessible::SetListenPostRender()
+ */
+ DBus::ValueOrError<void> SetListenPostRender(bool enabled);
+
private:
/**
* @brief Calculates Neighbor candidate object in root node.
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{WindowEvent::SHADE, "Shade"},
{WindowEvent::UU_SHADE, "uUshade"},
{WindowEvent::RESTYLE, "Restyle"},
+ {WindowEvent::POST_RENDER, "PostRender"},
};
if(!IsUp() || obj->IsHidden() || obj->GetSuppressedEvents()[AtspiEvent::WINDOW_CHANGED])
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return false;
}
+void Accessibility::Accessible::SetListenPostRender(bool enabled)
+{
+}
+
bool Accessibility::Component::IsAccessibleContainingPoint(Point point, CoordinateType type) const
{
return false;
else
{
fontClientHandle = Dali::TextAbstraction::FontClient(new FontClient);
+
+ // Make DefaultFontDescription cached
+ Dali::TextAbstraction::FontDescription defaultFontDescription;
+ fontClientHandle.GetDefaultPlatformFontDescription(defaultFontDescription);
}
gFontPreCacheAvailable = false;
{
// Output data stored here.
GlyphCacheManager::GlyphCacheData glyphData;
- if(!GetGlyphCacheData(font_data, static_cast<GlyphIndex>(glyphIndex), glyphData))
+ if(GetGlyphCacheData(font_data, static_cast<GlyphIndex>(glyphIndex), glyphData))
{
extents->x_bearing = glyphData.mGlyphMetrics.horiBearingX;
extents->y_bearing = glyphData.mGlyphMetrics.horiBearingY;
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
mNativeWindowId = mWindowBase->GetNativeWindowId();
}
+void Window::SetRenderNotification(TriggerEventInterface *renderNotification)
+{
+ if(!mWindowSurface)
+ {
+ return;
+ }
+
+ mWindowSurface->SetRenderNotification(renderNotification);
+}
+
void Window::OnAdaptorSet(Dali::Adaptor& adaptor)
{
mEventHandler = EventHandlerPtr(new EventHandler(mWindowSurface->GetWindowBase(), *mAdaptor));
#define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
void EmitAccessibilityHighlightSignal(bool highlight);
+ /**
+ * @brief Sets the render notification trigger to call when render thread is completed a frame
+ *
+ * @param[in] renderNotification to use
+ */
+ void SetRenderNotification(TriggerEventInterface *renderNotification);
+
public: // Dali::Internal::Adaptor::SceneHolder
/**
* @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle
if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_DOWN");
+
Device::Class::Type deviceClass;
Device::Subclass::Type deviceSubclass;
if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_UP");
+
Device::Class::Type deviceClass;
Device::Subclass::Type deviceSubclass;
if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_MOVE");
+
Device::Class::Type deviceClass;
Device::Subclass::Type deviceSubclass;
if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_CANCEL");
+
Integration::Point point;
point.SetDeviceId(touchEvent->multi.device);
point.SetState(PointState::INTERRUPTED);
if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_WHEEL");
+
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
Integration::WheelEvent wheelEvent(Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2(mouseWheelEvent->x, mouseWheelEvent->y), mouseWheelEvent->z, mouseWheelEvent->timestamp);
return 0;
}
-
Rect<int> WindowBaseEcoreWl2::RecalculateInputRect(const Rect<int>& rect)
{
Rect<int> newRect;
void WindowBaseEcoreWl2::IncludeInputRegion(const Rect<int>& inputRegion)
{
- Rect<int> convertRegion = RecalculateInputRect(inputRegion);
+ Rect<int> convertRegion = RecalculateInputRect(inputRegion);
Eina_Rectangle rect;
rect.x = convertRegion.x;
void WindowBaseEcoreWl2::ExcludeInputRegion(const Rect<int>& inputRegion)
{
- Rect<int> convertRegion = RecalculateInputRect(inputRegion);
+ Rect<int> convertRegion = RecalculateInputRect(inputRegion);
Eina_Rectangle rect;
rect.x = convertRegion.x;