X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Fadaptor-framework%2Faccessibility-bridge.h;h=6d30da6e6e59cdb66b8494e403d1f64e98e2717b;hb=HEAD;hp=22dbb5e5c0a59740cb70fc2226c758a23ba9da84;hpb=cc205aa721b900a930cf212cc045df56422d7f02;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/devel-api/adaptor-framework/accessibility-bridge.h b/dali/devel-api/adaptor-framework/accessibility-bridge.h index 22dbb5e..7188842 100644 --- a/dali/devel-api/adaptor-framework/accessibility-bridge.h +++ b/dali/devel-api/adaptor-framework/accessibility-bridge.h @@ -2,7 +2,7 @@ #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. @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include #include #include #include @@ -98,7 +99,7 @@ struct DALI_ADAPTOR_API Bridge * * @param[in] object The accessible object */ - virtual void RegisterDefaultLabel(Accessible* object) = 0; + virtual void RegisterDefaultLabel(std::shared_ptr object) = 0; /** * @brief Removes object from the stack of "default label" sourcing objects. @@ -107,7 +108,7 @@ struct DALI_ADAPTOR_API Bridge * * @param[in] object The accessible object */ - virtual void UnregisterDefaultLabel(Accessible* object) = 0; + virtual void UnregisterDefaultLabel(std::shared_ptr object) = 0; /** * @brief Gets the top-most object from the stack of "default label" sourcing objects. @@ -125,7 +126,7 @@ struct DALI_ADAPTOR_API Bridge * 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. @@ -160,6 +161,13 @@ struct DALI_ADAPTOR_API Bridge 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 @@ -294,14 +302,14 @@ struct DALI_ADAPTOR_API Bridge * * @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. @@ -311,7 +319,7 @@ struct DALI_ADAPTOR_API Bridge * @param[in] newValue Whether the state value is changed to new value or not. * @param[in] reserved Reserved. (Currently, this argument is not implemented in dali) **/ - virtual void EmitStateChanged(Accessible* obj, State state, int newValue, int reserved = 0) = 0; + virtual void EmitStateChanged(std::shared_ptr obj, State state, int newValue, int reserved = 0) = 0; /** * @brief Emits window event on at-spi bus. @@ -328,7 +336,7 @@ struct DALI_ADAPTOR_API Bridge * @param[in] obj The accessible object * @param[in] event Property changed event **/ - virtual void Emit(Accessible* obj, ObjectPropertyChangeEvent event) = 0; + virtual void Emit(std::shared_ptr obj, ObjectPropertyChangeEvent event) = 0; /** * @brief Emits bounds-changed event on at-spi bus. @@ -336,7 +344,7 @@ struct DALI_ADAPTOR_API Bridge * @param[in] obj The accessible object * @param[in] rect The rectangle for changed bounds **/ - virtual void EmitBoundsChanged(Accessible* obj, Rect<> rect) = 0; + virtual void EmitBoundsChanged(std::shared_ptr obj, Rect<> rect) = 0; /** * @brief Emits org.a11y.atspi.Event.Window.PostRender on the AT-SPI bus. @@ -349,7 +357,7 @@ struct DALI_ADAPTOR_API Bridge * 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(std::shared_ptr obj) = 0; /** * @brief Emits key event on at-spi bus. @@ -357,14 +365,11 @@ struct DALI_ADAPTOR_API Bridge * 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 callback) = 0; /** * @brief Reads given text by screen reader