#define DALI_ADAPTOR_ACCESSIBILITY_BRIDGE_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
// EXTERNAL INCLUDES
#include <dali/public-api/actors/actor.h>
+#include <dali/public-api/events/key-event.h>
#include <dali/public-api/math/rect.h>
#include <functional>
#include <memory>
*
* @param[in] object The accessible object
*/
- virtual void RegisterDefaultLabel(Accessible* object) = 0;
+ virtual void RegisterDefaultLabel(std::shared_ptr<Accessible> object) = 0;
/**
* @brief Removes object from the stack of "default label" sourcing objects.
*
* @param[in] object The accessible object
*/
- virtual void UnregisterDefaultLabel(Accessible* object) = 0;
+ virtual void UnregisterDefaultLabel(std::shared_ptr<Accessible> object) = 0;
/**
* @brief Gets the top-most object from the stack of "default label" sourcing objects.
* Following strings are valid values for "default_label" attribute: "enabled", "disabled".
* Any other value will be interpreted as "enabled".
*/
- virtual Accessible* GetDefaultLabel(Accessible* root) const = 0;
+ virtual Accessible* GetDefaultLabel(Accessible* root) = 0;
/**
* @brief Sets name of current application which will be visible on accessibility bus.
virtual Accessible* FindByPath(const std::string& path) const = 0;
/**
+ * @brief Notifies accessibility dbus that window has just been created.
+ *
+ * @param[in] window The window to be created
+ */
+ virtual void WindowCreated(Window window) = 0;
+
+ /**
* @brief Notifies accessibility dbus that window has just been shown.
*
* @param[in] window The window to be shown
*
* @param obj Accessible Object
*/
- virtual void EmitScrollStarted(Accessible *obj) = 0;
+ virtual void EmitScrollStarted(Accessible* obj) = 0;
- /**
+ /**
* @brief Emits ScrollFinished event on at-spi bus.
*
* @param obj Accessible Object
*/
- virtual void EmitScrollFinished(Accessible *obj) = 0;
+ virtual void EmitScrollFinished(Accessible* obj) = 0;
/**
* @brief Emits state-changed event on at-spi bus.
* The actual number of events emitted during a given time interval may be smaller
* than the number of calls to this method, but at least one is guaranteed.
*/
- virtual void EmitPostRender(Accessible *obj) = 0;
+ virtual void EmitPostRender(Accessible* obj) = 0;
/**
* @brief Emits key event on at-spi bus.
* Screen-reader might receive this event and reply, that given keycode is consumed. In that case
* further processing of the keycode should be ignored.
*
- * @param[in] type Key event type
- * @param[in] keyCode Key code
- * @param[in] keyName Key name
- * @param[in] timeStamp Time stamp
- * @param[in] isText Whether it's text or not
- * @return Whether this event is consumed or not
- **/
- virtual Consumed Emit(KeyEventType type, unsigned int keyCode, const std::string& keyName, unsigned int timeStamp, bool isText) = 0;
+ * @param[in] keyEvent The key event
+ * @param[in] callback Notification if the event was consumed
+ * @return true if the event was emitted
+ */
+ virtual bool EmitKeyEvent(Dali::KeyEvent keyEvent, std::function<void(Dali::KeyEvent, bool)> callback) = 0;
/**
* @brief Reads given text by screen reader