#include <dali/public-api/actors/actor.h>
#include <dali/public-api/math/rect.h>
#include <dali/public-api/object/object-registry.h>
+#include <cstdint>
#include <string>
#include <vector>
class DALI_ADAPTOR_API Accessible
{
public:
- virtual ~Accessible();
+ virtual ~Accessible() noexcept;
using utf8_t = unsigned char;
*
* @note Word boundaries are returned as non-zero values in table breaks, which must be of size at least length.
*/
- void FindWordSeparationsUtf8(const utf8_t* string, size_t length, const char* language, char* breaks);
+ static void FindWordSeparationsUtf8(const utf8_t* string, std::size_t length, const char* language, char* breaks);
/**
* @brief Calculates and finds line boundaries in given utf8 text.
*
* @note Line boundaries are returned as non-zero values in table breaks, which must be of size at least length.
*/
- void FindLineSeparationsUtf8(const utf8_t* string, size_t length, const char* language, char* breaks);
+ static void FindLineSeparationsUtf8(const utf8_t* string, std::size_t length, const char* language, char* breaks);
/**
* @brief Helper function for emiting active-descendant-changed event.
*
* @return The string with name
*/
- virtual std::string GetName() = 0;
+ virtual std::string GetName() const = 0;
/**
* @brief Gets accessibility description.
*
* @return The string with description
*/
- virtual std::string GetDescription() = 0;
+ virtual std::string GetDescription() const = 0;
/**
* @brief Gets parent.
*
* @return The number of children
*/
- virtual size_t GetChildCount() = 0;
+ virtual std::size_t GetChildCount() const = 0;
/**
* @brief Gets collection with all children.
*
* @return The child object
*/
- virtual Accessible* GetChildAtIndex(size_t index) = 0;
+ virtual Accessible* GetChildAtIndex(std::size_t index) = 0;
/**
* @brief Gets index that current object has in its parent's children collection.
*
* @return The index of the current object
*/
- virtual size_t GetIndexInParent() = 0;
+ virtual std::size_t GetIndexInParent() = 0;
/**
* @brief Gets accessibility role.
*
* @see Dali::Accessibility::Role
*/
- virtual Role GetRole() = 0;
+ virtual Role GetRole() const = 0;
/**
* @brief Gets name of accessibility role.
* @see Dali::Accessibility::Role
* @see Accessibility::Accessible::GetRole
*/
- virtual std::string GetRoleName();
+ virtual std::string GetRoleName() const;
/**
* @brief Gets localized name of accessibility role.
*
* @note translation is not supported in this version
*/
- virtual std::string GetLocalizedRoleName();
+ virtual std::string GetLocalizedRoleName() const;
/**
* @brief Gets accessibility states.
*
* @return The map of attributes and their values
*/
- virtual Attributes GetAttributes() = 0;
+ virtual Attributes GetAttributes() const = 0;
/**
* @brief Checks if this is proxy.
*
* @return True if this is proxy
*/
- virtual bool IsProxy();
+ virtual bool IsProxy() const;
/**
* @brief Gets unique address on accessibility bus.
*
* @see Dali::Accessibility::Address
*/
- virtual Address GetAddress();
+ virtual Address GetAddress() const;
/**
* @brief Deputes an object to perform provided gesture.
*
* @return The collection of strings with implemented interfaces
*/
- std::vector<std::string> GetInterfaces();
+ std::vector<std::string> GetInterfaces() const;
/**
* @brief Checks if object is on root level.
Accessible(Accessible&&) = delete;
Accessible& operator=(const Accessible&) = delete;
Accessible& operator=(Accessible&&) = delete;
- std::shared_ptr<Bridge::Data> GetBridgeData();
+ std::shared_ptr<Bridge::Data> GetBridgeData() const;
public:
/**
private:
friend class Bridge;
- std::weak_ptr<Bridge::Data> mBridgeData;
- bool mIsOnRootLevel = false;
+ mutable std::weak_ptr<Bridge::Data> mBridgeData;
+ bool mIsOnRootLevel = false;
}; // Accessible class